Files
shop-server/shared/constants/notification-events.d.ts
T
2026-05-18 11:23:12 +05:00

35 lines
930 B
TypeScript

export type NotificationEventType =
| 'order:created'
| 'order:statusChanged'
| 'orderMessage:sent'
| 'orderMessage:adminReply'
| 'payment:statusChanged'
| 'auth:codeRequested'
export type NotificationChannel = 'email' | 'telegram'
export type NotificationStatus = 'pending' | 'sent' | 'failed'
export const NOTIFICATION_EVENTS: {
ORDER_CREATED: NotificationEventType
ORDER_STATUS_CHANGED: NotificationEventType
ORDER_MESSAGE_SENT: NotificationEventType
ORDER_MESSAGE_ADMIN_REPLY: NotificationEventType
PAYMENT_STATUS_CHANGED: NotificationEventType
AUTH_CODE_REQUESTED: NotificationEventType
}
export const NOTIFICATION_CHANNELS: {
EMAIL: NotificationChannel
TELEGRAM: NotificationChannel
}
export const NOTIFICATION_STATUSES: {
PENDING: NotificationStatus
SENT: NotificationStatus
FAILED: NotificationStatus
}
export const MAX_RETRY_ATTEMPTS: number
export const RETRY_DELAYS_MS: number[]