update notif

This commit is contained in:
2025-12-12 21:28:46 +03:30
parent ecb68de7b3
commit 249e7f7581
10 changed files with 216 additions and 127 deletions
@@ -9,19 +9,16 @@ export enum NotifTypeEnum {
SYSTEM = 'system',
}
export enum NotifTitleEnum {
PAGER_CREATED = 'pager.created',
ORDER_CREATED = 'order.created',
PAYMENT_SUCCESS = 'payment.success',
REVIEW_CREATED = 'review.created',
ORDER_STATUS_CHANGED = 'order.status.changed',
}
export type recipientType =
| { phone: string }
| { email: string }
| { fcmToken: string }
| { userId: string; restaurantId: string };
export type recipientType = { userId: string; restaurantId: string } | { adminId: string; restaurantId: string };
export interface NotifRequestMessage {
subject: string;
subject: NotifTitleEnum;
body: string;
smsText: string;
pushNotif: {
@@ -36,11 +33,11 @@ export interface NotifRequestMessage {
}
export interface NotifRequest {
requestId: string;
timestamp: Date;
notifType: NotifTypeEnum;
channels: NotifChannelEnum[];
recipient: recipientType;
// requestId: string;
// timestamp: Date;
// notifType: NotifTypeEnum;
// channels: NotifChannelEnum[];
recipients: recipientType[];
message: NotifRequestMessage;
metadata: {
priority: number;