|
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
|
|
Query,
|
|
|
|
|
UseGuards,
|
|
|
|
|
} from '@nestjs/common';
|
|
|
|
|
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
|
|
|
|
import {
|
|
|
|
|
ApiTags,
|
|
|
|
|
ApiOperation,
|
|
|
|
|
@@ -16,26 +17,25 @@ import {
|
|
|
|
|
ApiParam,
|
|
|
|
|
} from '@nestjs/swagger';
|
|
|
|
|
import { Throttle } from '@nestjs/throttler';
|
|
|
|
|
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
|
|
|
|
import { JwtAuthGuard } from '@modules/auth/presentation/guards/jwt-auth.guard';
|
|
|
|
|
import { RolesGuard } from '@modules/auth/presentation/guards/roles.guard';
|
|
|
|
|
import { type PaymentProvider } from '@prisma/client';
|
|
|
|
|
import { type JwtPayload } from '@modules/auth/infrastructure/services/token.service';
|
|
|
|
|
import { CurrentUser } from '@modules/auth/presentation/decorators/current-user.decorator';
|
|
|
|
|
import { Roles } from '@modules/auth/presentation/decorators/roles.decorator';
|
|
|
|
|
import { type JwtPayload } from '@modules/auth/infrastructure/services/token.service';
|
|
|
|
|
import { JwtAuthGuard } from '@modules/auth/presentation/guards/jwt-auth.guard';
|
|
|
|
|
import { RolesGuard } from '@modules/auth/presentation/guards/roles.guard';
|
|
|
|
|
import { CreatePaymentCommand } from '../../application/commands/create-payment/create-payment.command';
|
|
|
|
|
import { HandleCallbackCommand } from '../../application/commands/handle-callback/handle-callback.command';
|
|
|
|
|
import { RefundPaymentCommand } from '../../application/commands/refund-payment/refund-payment.command';
|
|
|
|
|
import { GetPaymentStatusQuery } from '../../application/queries/get-payment-status/get-payment-status.query';
|
|
|
|
|
import { ListTransactionsQuery } from '../../application/queries/list-transactions/list-transactions.query';
|
|
|
|
|
import { type CreatePaymentResult } from '../../application/commands/create-payment/create-payment.handler';
|
|
|
|
|
import { HandleCallbackCommand } from '../../application/commands/handle-callback/handle-callback.command';
|
|
|
|
|
import { type HandleCallbackResult } from '../../application/commands/handle-callback/handle-callback.handler';
|
|
|
|
|
import { RefundPaymentCommand } from '../../application/commands/refund-payment/refund-payment.command';
|
|
|
|
|
import { type RefundPaymentResult } from '../../application/commands/refund-payment/refund-payment.handler';
|
|
|
|
|
import { type PaymentStatusDto } from '../../application/queries/get-payment-status/get-payment-status.handler';
|
|
|
|
|
import { GetPaymentStatusQuery } from '../../application/queries/get-payment-status/get-payment-status.query';
|
|
|
|
|
import { type TransactionListDto } from '../../application/queries/list-transactions/list-transactions.handler';
|
|
|
|
|
import { CreatePaymentDto } from '../dto/create-payment.dto';
|
|
|
|
|
import { RefundPaymentDto } from '../dto/refund-payment.dto';
|
|
|
|
|
import { ListTransactionsDto } from '../dto/list-transactions.dto';
|
|
|
|
|
import { type PaymentProvider } from '@prisma/client';
|
|
|
|
|
import { ListTransactionsQuery } from '../../application/queries/list-transactions/list-transactions.query';
|
|
|
|
|
import { type CreatePaymentDto } from '../dto/create-payment.dto';
|
|
|
|
|
import { type ListTransactionsDto } from '../dto/list-transactions.dto';
|
|
|
|
|
import { type RefundPaymentDto } from '../dto/refund-payment.dto';
|
|
|
|
|
|
|
|
|
|
@ApiTags('payments')
|
|
|
|
|
@Controller('payments')
|
|
|
|
|
|