global-notification.ts 585 B

1234567891011121314151617181920212223242526
  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 =
  15. (typeof TriggerEventType)[keyof typeof TriggerEventType];
  16. export type IGlobalNotification = {
  17. triggerPath: string;
  18. notifyType: NotifyType;
  19. emailToSend: string;
  20. slackChannelToSend: string;
  21. triggerEvents: TriggerEventType[];
  22. };