59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import {
|
|
IsString,
|
|
ValidateNested,
|
|
IsNotEmpty,
|
|
IsDateString,
|
|
IsOptional,
|
|
} from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
|
|
export class InboundSMSMessageDto {
|
|
@ApiProperty({ example: '2025-10-30T14:00:00Z' })
|
|
@IsDateString()
|
|
@IsOptional()
|
|
dateTime: string;
|
|
|
|
@ApiProperty({ example: '+33612345678' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
destinationAddress: string;
|
|
|
|
@ApiProperty({ example: 'mes1234' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@IsOptional()
|
|
messageId: string;
|
|
|
|
@ApiProperty({
|
|
example: 'recipient id %% The content of the message we should send.',
|
|
})
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
message: string;
|
|
|
|
@ApiProperty({ example: 'acr:token' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
senderAddress: string;
|
|
}
|
|
|
|
export class InboundSMSMessageNotificationDto {
|
|
@ApiProperty({ example: '12345' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
callbackData: string;
|
|
|
|
@ApiProperty({ type: InboundSMSMessageDto })
|
|
@ValidateNested()
|
|
@Type(() => InboundSMSMessageDto)
|
|
inboundSMSMessage: InboundSMSMessageDto;
|
|
}
|
|
|
|
export class InboundSMSMessageNotificationWrapperDto {
|
|
@ApiProperty({ type: InboundSMSMessageNotificationDto })
|
|
@ValidateNested()
|
|
@Type(() => InboundSMSMessageNotificationDto)
|
|
inboundSMSMessageNotification: InboundSMSMessageNotificationDto;
|
|
}
|