global-notification.ts 579 B

123456789101112131415161718192021222324252627
  1. export const NotifyType = {
  2. Email: 'mail',
  3. SLACK: 'slack',
  4. } as const;
  5. export type NotifyType = typeof NotifyType[keyof typeof NotifyType]
  6. export const TriggerEventType = {
  7. CREATE: 'pageCreate',
  8. EDIT: 'pageEdit',
  9. MOVE: 'pageMove',
  10. DELETE: 'pageDelete',
  11. LIKE: 'pageLike',
  12. POST: 'comment',
  13. } as const;
  14. type TriggerEventType = typeof TriggerEventType[keyof typeof TriggerEventType]
  15. export type IGlobalNotification = {
  16. triggerPath: string,
  17. notifyType: NotifyType,
  18. emailToSend: string,
  19. slackChannelToSend: string,
  20. triggerEvents: TriggerEventType[],
  21. };