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 { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { AccountsService } from './accounts.service'
|
||||
import { CreateConsumerAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
import type { AccountsServiceCreateResponseDto, AccountsServiceFindAllResponseDto, AccountsServiceFindOneResponseDto, AccountsServiceUpdateResponseDto } from './dto/accounts-response.dto'
|
||||
|
||||
@ApiTags('AdminConsumerAccounts')
|
||||
@Controller('admin/consumers/:consumerId/accounts')
|
||||
@@ -9,12 +10,12 @@ export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('consumerId') consumerId: string) {
|
||||
async findAll(@Param('consumerId') consumerId: string): Promise<AccountsServiceFindAllResponseDto> {
|
||||
return this.accountsService.findAll(consumerId)
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
async findOne(@Param('id') id: string): Promise<AccountsServiceFindOneResponseDto> {
|
||||
return this.accountsService.findOne(id)
|
||||
}
|
||||
|
||||
@@ -22,12 +23,12 @@ export class AccountsController {
|
||||
async create(
|
||||
@Param('consumerId') consumerId: string,
|
||||
@Body() data: CreateConsumerAccountDto,
|
||||
) {
|
||||
): Promise<AccountsServiceCreateResponseDto> {
|
||||
return this.accountsService.create(consumerId, data)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateAccountDto) {
|
||||
async update(@Param('id') id: string, @Body() data: UpdateAccountDto): Promise<AccountsServiceUpdateResponseDto> {
|
||||
return this.accountsService.update(id, data)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user