import { Type } from "@nestjs/common"; import { ModuleMetadata } from "@nestjs/common/interfaces"; import { MailDataRequired } from "@sendgrid/mail"; export interface SendGridModuleOptions { apikey: string; /** * You can set default data */ defaultMailData?: Partial; substitutionWrappers?: { left: string; right: string; }; } export type SendGridModuleAsyncOptions = { useClass?: Type; /** * The factory which should be used to provide the SendGrid options */ useFactory?: (...args: any[]) => Promise | SendGridModuleOptions; /** * The providers which should get injected */ inject?: any[]; } & Pick; export interface SendGridModuleOptionsFactory { createSendGridModuleOptions(): Promise | SendGridModuleOptions; }