mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-03-10 20:41:46 +00:00
- Added KycNotificationListener to handle notifications for KYC approval and rejection events. - Introduced CardNotificationListener to manage notifications for card creation and blocking events. - Enhanced CardService to emit events for card creation and blocking, integrating with the new notification system. - Updated notification constants and interfaces to include new KYC and card-related events. - Improved notification message formatting and added localization support for new events.
21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
import { IsBoolean, IsOptional, IsString, ValidateIf } from 'class-validator';
|
|
import { i18nValidationMessage as i18n } from 'nestjs-i18n';
|
|
export class UpdateNotificationsSettingsRequestDto {
|
|
@ApiPropertyOptional({ example: true, description: 'Enable/disable push notifications (default: true)', default: true })
|
|
@IsBoolean({ message: i18n('validation.IsBoolean', { path: 'general', property: 'customer.isPushEnabled' }) })
|
|
@IsOptional()
|
|
isPushEnabled?: boolean;
|
|
|
|
@ApiPropertyOptional({ example: 'cXYzABC:APA91bH...', description: 'Firebase Cloud Messaging token (required if enabling push)' })
|
|
@IsString({ message: i18n('validation.IsString', { path: 'general', property: 'auth.fcmToken' }) })
|
|
@ValidateIf((o) => o.isPushEnabled !== false)
|
|
@IsOptional()
|
|
fcmToken?: string;
|
|
|
|
@ApiPropertyOptional({ example: 'device-123', description: 'Device identifier (optional, will be found automatically if not provided)' })
|
|
@IsOptional()
|
|
@IsString({ message: i18n('validation.IsString', { path: 'general', property: 'auth.deviceId' }) })
|
|
deviceId?: string;
|
|
}
|