remove unused modules
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
export enum NotifChannelEnum {
|
||||
IN_APP = 'in-app',
|
||||
SMS = 'sms',
|
||||
PUSH = 'push',
|
||||
}
|
||||
export enum NotifTypeEnum {
|
||||
TRANSACTIONAL = 'transactional',
|
||||
PROMOTIONAL = 'promotional',
|
||||
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 = { userId: string } | { adminId: string };
|
||||
|
||||
export interface NotifRequestMessage {
|
||||
title: NotifTitleEnum;
|
||||
content: string;
|
||||
sms: {
|
||||
templateId: string;
|
||||
parameters?: Record<string, string>;
|
||||
};
|
||||
pushNotif: {
|
||||
title: string;
|
||||
content: string;
|
||||
icon: string;
|
||||
action: {
|
||||
type: string; //view order
|
||||
url: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface NotifRequest {
|
||||
// requestId: string;
|
||||
// timestamp: Date;
|
||||
// notifType: NotifTypeEnum;
|
||||
// channels: NotifChannelEnum[];
|
||||
restaurantId: string;
|
||||
recipients: recipientType[];
|
||||
message: NotifRequestMessage;
|
||||
metadata: {
|
||||
priority: number;
|
||||
// retries: number;
|
||||
};
|
||||
}
|
||||
//************************************************ */
|
||||
interface INotifySmsPayload {
|
||||
[key: string]: string | number | Date;
|
||||
}
|
||||
interface INotifySms {
|
||||
phone: string;
|
||||
subject: NotifTitleEnum;
|
||||
}
|
||||
export interface IInAppNotificationPayload {
|
||||
notificationId: string;
|
||||
subject: NotifTitleEnum;
|
||||
body: string;
|
||||
}
|
||||
|
||||
// 2. Payment Success
|
||||
interface IPaymentSuccessSmsNotifyPayload extends INotifySmsPayload {
|
||||
amount: number;
|
||||
date: Date;
|
||||
}
|
||||
|
||||
interface IPaymentSuccessSmsNotify extends INotifySms {
|
||||
subject: NotifTitleEnum.PAYMENT_SUCCESS;
|
||||
payload: IPaymentSuccessSmsNotifyPayload;
|
||||
}
|
||||
|
||||
export type ISmsNotifyPayload = IPaymentSuccessSmsNotify;
|
||||
Reference in New Issue
Block a user