export const EventMap = {
  ai: {
    SUMMARIZE_EMAIL: 'ai#SUMMARIZE_EMAIL',
    FIND_MATCHES: 'ai#FIND_MATCHES',
  },
  auditors: {
    NOTIFY_ONE_PROSPECT: 'auditors#NOTIFY_ONE_PROSPECT',
    NOTIFY_ALL_PROSPECTS: 'auditors#NOTIFY_ALL_PROSPECTS',
  },
  auth: {
    PASSWORD_RESET: 'auth#PASSWORD_RESET',
    SEND_PASSWORD_RESET_EMAIL: 'auth#SEND_PASSWORD_RESET_EMAIL',
    SET_NEW_PASSWORD: 'auth#SET_NEW_PASSWORD',
    TWO_FA_RESET: 'auth#TWO_FA_RESET',
  },
  bank_uploaded_transactions: {
    CREATE: 'bank_uploaded_transactions#CREATE',
  },
  crm: {
    CREATE_SHAREPOINT_FOLDER: 'crm#CREATE_SHAREPOINT_FOLDER',
    COPY_SHAREPOINT_FOLDER: 'crm#COPY_SHAREPOINT_FOLDER',
    UNLINK_SHAREPOINT_FOLDER: 'crm#UNLINK_SHAREPOINT_FOLDER',
    LINK_SHAREPOINT_FOLDER: 'crm#LINK_SHAREPOINT_FOLDER',
    RENAME_SHAREPOINT_FOLDER: 'crm#RENAME_SHAREPOINT_FOLDER',
    MOVE_SHAREPOINT_FOLDER: 'crm#MOVE_SHAREPOINT_FOLDER',
    COPY_TO_SHAREPOINT_FOLDER: 'crm#COPY_TO_SHAREPOINT_FOLDER',
    CREATE_PROSPECT_SUMMARY: 'crm#CREATE_PROSPECT_SUMMARY',
    INITIAL_YIELD_CALCULATION: 'crm#INITIAL_YIELD_CALCULATION',
    CALCULATE_YIELD_CALCULATION: 'crm#CALCULATE_YIELD_CALCULATION',
    AUDITOR_PASSWORD_RESET: 'crm#AUDITOR_PASSWORD_RESET',
    EXTERNAL_PASSWORD_RESET: 'crm#EXTERNAL_PASSWORD_RESET',
    FORM_REMINDER_CONTACT: 'crm#FORM_REMINDER_CONTACT',
    FORM_REMINDER_PROSPECT: 'crm#FORM_REMINDER_PROSPECT',
  },
  crm_report: {
    PIPELINE: 'crm_report#PIPELINE',
    DECISIONED: 'crm_report#DECISIONED',
    NOTIFY_NEW_UNDERWRITERS: 'crm_report#NOTIFY_NEW_UNDERWRITERS',
    NOTIFY_PROSPECT_UPDATES: 'crm_report#NOTIFY_PROSPECT_UPDATES',
    FILE_LINKS: 'crm_report#FILE_LINKS',
    FILE_LINKS_UNDERWRITERS: 'crm_report#FILE_LINKS_UNDERWRITERS',
  },
  database: {
    BACKUP: 'database#BACKUP',
    RESTORE: 'database#RESTORE',
  },
  notification: {
    SEND_EMAIL: 'notification#SEND_EMAIL',
  },
  portfolio: {
    CREATE_NOTE: 'portfolio#CREATE_NOTE',
    DELETE_NOTE: 'portfolio#DELETE_NOTE',
    UPDATE_NOTE: 'portfolio#UPDATE_NOTE',
  },
  prospectFiles: {
    COPY_CONFIDENTIAL: 'prospectFiles#COPY_CONFIDENTIAL',
    TOGGLE_CONFIDENTIAL: 'prospectFiles#TOGGLE_CONFIDENTIAL',
    DELETE_CONFIDENTIAL: 'prospectFiles#DELETE_CONFIDENTIAL',
    SEND_REPORT: 'prospectFiles#SEND_REPORT',
  },
  recalc: {
    UNLOCK_PRODUCT_BALANCE: 'recalc#UNLOCK_PRODUCT_BALANCE',
    PRODUCT_BALANCE: 'recalc#PRODUCT_BALANCE',
    STATEMENT_STATUS: 'recalc#STATEMENT_STATUS',
  },
  report: {
    DETAILED_PORTFOLIO: 'report#DETAILED_PORTFOLIO',
  },
  search: {
    CREATED: 'search#CREATED',
    UPDATED: 'search#UPDATED',
    DELETED: 'search#DELETED',
  }
} as const;

export type EventMapType = typeof EventMap;
export type EventName = {
  [K in keyof EventMapType]: EventMapType[K][keyof EventMapType[K]];
}[keyof EventMapType];
