remove unused modules

This commit is contained in:
2026-01-07 12:24:55 +03:30
parent f2284c103d
commit 560b2983f3
150 changed files with 1853 additions and 96521 deletions
@@ -0,0 +1,40 @@
import { IsString, IsNotEmpty, IsOptional, IsArray, IsObject } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class CreateNotificationDto {
@ApiProperty({ description: 'Notification title' })
@IsString()
@IsNotEmpty()
title: string;
@ApiProperty({ description: 'Notification message' })
@IsString()
@IsNotEmpty()
message: string;
@ApiProperty({ description: 'Notification type' })
@IsString()
@IsNotEmpty()
type: string;
@ApiPropertyOptional({ description: 'User ID' })
@IsString()
@IsOptional()
userId?: string;
@ApiPropertyOptional({ description: 'Phone number for SMS' })
@IsString()
@IsOptional()
phoneNumber?: string;
@ApiPropertyOptional({ description: 'Push notification tokens', type: [String] })
@IsArray()
@IsString({ each: true })
@IsOptional()
pushTokens?: string[];
@ApiPropertyOptional({ description: 'Additional data' })
@IsObject()
@IsOptional()
data?: Record<string, any>;
}
@@ -0,0 +1,24 @@
import { IsNotEmpty, IsEnum, IsArray } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { NotifTitleEnum } from '../interfaces/notification.interface';
import { NotifChannelEnum } from '../interfaces/notification.interface';
export class CreatePreferenceDto {
@ApiProperty({
description: 'Notification title/type (e.g., order.created, review.created)',
enum: NotifTitleEnum,
example: NotifTitleEnum.ORDER_CREATED,
})
@IsEnum(NotifTitleEnum)
@IsNotEmpty()
title!: NotifTitleEnum;
@ApiProperty({
description: 'Notification type (SMS, PUSH, BOTH, or NONE)',
enum: NotifChannelEnum,
example: NotifChannelEnum.SMS,
})
@IsArray()
@IsEnum(NotifChannelEnum, { each: true })
channels!: NotifChannelEnum[];
}
@@ -0,0 +1,38 @@
import { IsString, IsNotEmpty, IsOptional, IsObject } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
export class SendNotificationDto {
@ApiProperty({ description: 'Restaurant ID (ULID)' })
@IsString()
@IsNotEmpty()
restaurantId: string;
@ApiPropertyOptional({ description: 'User ID (ULID)' })
@IsString()
@IsOptional()
userId?: string;
@ApiProperty({ description: 'Notification type (e.g., ORDER_CONFIRMED, PAYMENT_FAILED)' })
@IsString()
@IsNotEmpty()
notificationType: string;
@ApiProperty({ description: 'Notification payload' })
@IsObject()
@IsNotEmpty()
payload: {
title?: string;
message: string;
body?: string;
phoneNumber?: string;
pushToken?: string;
data?: Record<string, any>;
templateId?: string;
parameters?: Array<{ name: string; value: string }>;
};
@ApiPropertyOptional({ description: 'Idempotency key to prevent duplicates' })
@IsString()
@IsOptional()
idempotencyKey?: string;
}
@@ -0,0 +1,15 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsEnum } from 'class-validator';
import { NotifChannelEnum } from '../interfaces/notification.interface';
export class UpdatePreferenceDto {
@ApiProperty({
description: 'Notification channels (can be empty or contain any enum values)',
enum: NotifChannelEnum,
isArray: true,
example: ['sms', 'push'],
})
@IsArray()
@IsEnum(NotifChannelEnum, { each: true })
channels!: NotifChannelEnum[];
}