update notif
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user