This commit is contained in:
2026-02-01 10:35:09 +03:30
parent c92d5a8068
commit 8e754bcfec
13 changed files with 330 additions and 297 deletions
@@ -8,17 +8,17 @@ export enum NotifTypeEnum {
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 enum NotifEvent {
NEW_REQUEST = 'newRequest',
INVOICED = 'invoiced',
NEW_ORDER = 'newOrder', // for chapkhane sms bere
DESIGNER_ASSIGN = 'designerAssign',
PAYMENT_SUCCESS = 'paymentSuccess',
}
export type recipientType = { userId: string } | { adminId: string };
export interface NotifRequestMessage {
title: NotifTitleEnum;
title: NotifEvent;
content: string;
sms: {
templateId: string;
@@ -53,11 +53,11 @@ interface INotifySmsPayload {
}
interface INotifySms {
phone: string;
subject: NotifTitleEnum;
subject: NotifEvent;
}
export interface IInAppNotificationPayload {
notificationId: string;
subject: NotifTitleEnum;
subject: NotifEvent;
body: string;
}
@@ -68,7 +68,7 @@ interface IPaymentSuccessSmsNotifyPayload extends INotifySmsPayload {
}
interface IPaymentSuccessSmsNotify extends INotifySms {
subject: NotifTitleEnum.PAYMENT_SUCCESS;
subject: NotifEvent.PAYMENT_SUCCESS;
payload: IPaymentSuccessSmsNotifyPayload;
}