chore: add new method for sms service and notification service

This commit is contained in:
mahyargdz
2025-05-04 12:27:21 +03:30
parent 8fe1d398a6
commit 3d24cee972
10 changed files with 451 additions and 8 deletions
@@ -4,7 +4,7 @@ export enum NotifCategory {
INVOICE = "INVOICE",
ACCOUNT = "ACCOUNT",
FINANCE = "FINANCE", //WALLET AND ...
// ANNOUNCEMENT = "ANNOUNCEMENT",
ADMIN = "ADMIN", // New category for admin notifications
}
export enum NotifType {
@@ -36,6 +36,14 @@ export enum NotifType {
RECURRING_INVOICE = "RECURRING_INVOICE",
PAYMENT_REMINDER = "PAYMENT_REMINDER",
PAYMENT_CANCELLATION = "PAYMENT_CANCELLATION",
// // Admin category
NEW_BLOG_COMMENT = "NEW_BLOG_COMMENT",
NEW_SERVICE_REVIEW = "NEW_SERVICE_REVIEW",
NEW_CUSTOMER = "NEW_CUSTOMER",
NEW_SUBSCRIPTION = "NEW_SUBSCRIPTION",
NEW_TICKET = "NEW_TICKET",
NEW_CRITICISM = "NEW_CRITICISM",
}
export const NotifDescriptions: Record<NotifType, { fa: string; category: NotifCategory }> = {
@@ -65,6 +73,14 @@ export const NotifDescriptions: Record<NotifType, { fa: string; category: NotifC
// Support category
[NotifType.ANSWER_TICKET]: { fa: "پاسخ تیکت", category: NotifCategory.SUPPORT },
[NotifType.CREATE_TICKET]: { fa: "ثبت تیکت جدید", category: NotifCategory.SUPPORT },
//TODO: FIX THIS this is for admin
[NotifType.ASSIGN_TICKET]: { fa: "ارجاع تیکت", category: NotifCategory.SUPPORT },
// // Admin category
//this are not inserted in the database
[NotifType.NEW_BLOG_COMMENT]: { fa: "نظر جدید در بلاگ", category: NotifCategory.ADMIN },
[NotifType.NEW_SERVICE_REVIEW]: { fa: "نقد و بررسی جدید سرویس", category: NotifCategory.ADMIN },
[NotifType.NEW_CUSTOMER]: { fa: "مشتری جدید", category: NotifCategory.ADMIN },
[NotifType.NEW_SUBSCRIPTION]: { fa: "اشتراک جدید", category: NotifCategory.ADMIN },
[NotifType.NEW_TICKET]: { fa: "تیکت جدید", category: NotifCategory.ADMIN },
[NotifType.NEW_CRITICISM]: { fa: "انتقاد جدید", category: NotifCategory.ADMIN },
};