update get status of tsp provider

This commit is contained in:
2026-05-27 22:44:01 +03:30
parent 816c5ebb50
commit cd3492d625
9 changed files with 116 additions and 164 deletions
+45 -1
View File
@@ -1,7 +1,12 @@
import { CustomerType, PaymentMethodType } from '@/generated/prisma/enums'
import {
CustomerType,
PaymentMethodType,
TspProviderResponseStatus,
} from '@/generated/prisma/enums'
import { ApiProperty } from '@nestjs/swagger'
import { Type } from 'class-transformer'
import {
IsBoolean,
IsDateString,
IsEnum,
IsNumber,
@@ -127,3 +132,42 @@ export class goldTypePayload {
@IsString()
commission: string
}
export class ProviderCommonResponse {
@ApiProperty({ enum: TspProviderResponseStatus })
@IsEnum(TspProviderResponseStatus)
status: TspProviderResponseStatus
@ApiProperty({ required: false, nullable: true, type: Object })
@IsOptional()
@IsObject()
provider_response?: Object
@ApiProperty({ required: true })
@IsBoolean()
hasError: boolean
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
message?: string | null
@ApiProperty({ required: false, nullable: true })
@IsOptional()
@IsString()
error_message?: string
@ApiProperty({ required: false, nullable: true, type: Object })
@IsOptional()
@IsObject()
fiscal_warnings?: Object
@ApiProperty({ required: false, nullable: true, type: Object })
@IsOptional()
@IsObject()
validation_errors?: Object
@ApiProperty({ required: true })
@IsDateString()
received_at: string
}