import { EmailData } from '@sendgrid/helpers/classes/email-address' export type AttachmentType = { url?: string filename: string type?: string } export type EmailDataType = { to?: EmailData[] subject?: string from?: EmailData template?: TemplateNameTypes text?: string html?: string attachments?: AttachmentType[] customVariables?: Record customArgs?: { [key: string]: any } } export type SendInputType = EmailDataType & { to: EmailData[] subject: string } export type TemplateDataType = { id: string name: string } export type EventWebhook = { email: string timestamp: number event: string smtp: string useragent: string ip: string sg_event_id: string sg_message_i: string reason: string status: string response: string tls: string url: string category: string asm_group_id: number unique_args: string marketing_campaign_id: string marketing_campaign_name: string attempt: string pool: string notificationId?: string postId?: string emailTemplate?: TemplateNameTypes } export type TemplateNameTypes = | 'RESIDENT_WELCOME' | 'RESIDENT_WELCOME_FR' | 'RESIDENT_FIRST_INVITE' | 'RESIDENT_FIRST_INVITE_FR' | 'RESIDENT_SECOND_INVITE' | 'RESIDENT_SECOND_INVITE_FR' | 'RESIDENT_NEW_POST' | 'RESIDENT_NEW_POST_FR' | 'RESET_PASSWORD' | 'RESET_PASSWORD_FR' | 'ORDER_CONFIRMATION' | 'PARTNER_INVOICE' | 'NEW_MESSAGE_TO_RESIDENT' | 'NEW_MESSAGE_TO_RESIDENT_FR' | 'NEW_MESSAGE_TO_MANAGER' | 'RESIDENT_GENERAL_NOTIFICATION_FR' | 'MANAGER_GENERAL_NOTIFICATION' | 'NEW_PROXY_FROM_MANAGER_FR' | 'NEW_PROXY_FROM_MANAGER' | 'NEW_PROXY_COMPLETED_TO_RESIDENT' | 'NEW_PROXY_COMPLETED_TO_RESIDENT_FR' | 'NEW_PROXY_COMPLETED_TO_MANAGER' | 'PRIVATE_CONVERSATION_MENTIONED' | 'PROVIDER_ORDER_REQUEST_SUMMARY' | 'COVID19_NEW_SERVICES' | 'COVID19_NEW_SERVICES_FR' | 'RESIDENT_GENERAL_NOTIFICATION'