mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 21:15:41 +00:00
Refactored the whole app based on the requirements shared
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IsString, IsEnum, IsOptional } from 'class-validator';
|
||||
import { IsString, IsEnum, IsOptional, IsArray } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
export enum NotificationCategoryEnum {
|
||||
@@ -17,3 +17,21 @@ export class SendNotificationDto {
|
||||
@ApiPropertyOptional({ example: 'edr://tickets/tkt_01' }) @IsOptional() @IsString() deepLink?: string;
|
||||
@ApiPropertyOptional() @IsOptional() metadata?: Record<string, any>;
|
||||
}
|
||||
|
||||
export class TestNotificationDto {
|
||||
@ApiProperty({ example: 'booking.created' })
|
||||
@IsString()
|
||||
templateKey: string;
|
||||
|
||||
@ApiProperty({ example: 'user@example.com' })
|
||||
@IsString()
|
||||
recipient: string;
|
||||
|
||||
@ApiProperty({ example: { bookingRef: 'EDR123456', passengerName: 'John Doe' } })
|
||||
context: Record<string, unknown>;
|
||||
|
||||
@ApiPropertyOptional({ example: ['EMAIL', 'SMS', 'IN_APP'] })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
channels?: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user