feat: add response DTOs for various services across modules
- Created response DTOs for ConfigService, AppService, AuthService, CatalogsService, AccountsService, BusinessActivityComplexesService, ComplexPosesService, SalesInvoicesService, BusinessActivitiesService, ConsumerBusinessActivityGoodsService, and others. - Implemented Create, FindAll, FindOne, and Update response types for services in consumer, partners, and POS modules. - Added request DTOs for creating and updating goods in the consumer business activities module. - Introduced filtering DTO for partner licenses. - Enhanced response mapping for partner license activations.
This commit is contained in:
@@ -2,6 +2,7 @@ import { PublicWithToken } from '@/common/decorators/withToken.decorator'
|
||||
import { Controller, Get, Param } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { CatalogsService } from './catalog.service'
|
||||
import type { CatalogsServiceGetDeviceBrandsResponseDto, CatalogsServiceGetDevicesResponseDto, CatalogsServiceGetGuildGoodCategoriesResponseDto, CatalogsServiceGetGuildsResponseDto, CatalogsServiceGetProvidersResponseDto } from './dto/catalog-response.dto'
|
||||
|
||||
@ApiTags('Catalog')
|
||||
@Controller('catalog')
|
||||
@@ -10,31 +11,31 @@ export class CatalogsController {
|
||||
|
||||
@Get('guilds')
|
||||
@PublicWithToken()
|
||||
async getGuilds() {
|
||||
async getGuilds(): Promise<CatalogsServiceGetGuildsResponseDto> {
|
||||
return this.catalogService.getGuilds()
|
||||
}
|
||||
|
||||
@Get('providers')
|
||||
@PublicWithToken()
|
||||
async getProviders() {
|
||||
async getProviders(): Promise<CatalogsServiceGetProvidersResponseDto> {
|
||||
return this.catalogService.getProviders()
|
||||
}
|
||||
|
||||
@Get('devices')
|
||||
@PublicWithToken()
|
||||
async getDevices() {
|
||||
async getDevices(): Promise<CatalogsServiceGetDevicesResponseDto> {
|
||||
return this.catalogService.getDevices()
|
||||
}
|
||||
|
||||
@Get('device_brands')
|
||||
@PublicWithToken()
|
||||
async getDeviceBrands() {
|
||||
async getDeviceBrands(): Promise<CatalogsServiceGetDeviceBrandsResponseDto> {
|
||||
return this.catalogService.getDeviceBrands()
|
||||
}
|
||||
|
||||
@Get('guilds/:guildId/good_categories')
|
||||
@PublicWithToken()
|
||||
async getGuildGoodCategories(@Param('guildId') guild_id: string) {
|
||||
async getGuildGoodCategories(@Param('guildId') guild_id: string): Promise<CatalogsServiceGetGuildGoodCategoriesResponseDto> {
|
||||
return this.catalogService.getGuildGoodCategories(guild_id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { CatalogsService } from '../catalog.service'
|
||||
|
||||
export type CatalogsServiceGetDeviceBrandsResponseDto = Awaited<ReturnType<CatalogsService['getDeviceBrands']>>
|
||||
export type CatalogsServiceGetDevicesResponseDto = Awaited<ReturnType<CatalogsService['getDevices']>>
|
||||
export type CatalogsServiceGetGuildGoodCategoriesResponseDto = Awaited<ReturnType<CatalogsService['getGuildGoodCategories']>>
|
||||
export type CatalogsServiceGetGuildsResponseDto = Awaited<ReturnType<CatalogsService['getGuilds']>>
|
||||
export type CatalogsServiceGetProvidersResponseDto = Awaited<ReturnType<CatalogsService['getProviders']>>
|
||||
Reference in New Issue
Block a user