@ntegral/nestjs-sendgrid-client
Version:
Provides an injectable SendGrid Client for the SendGrid v3 Web API
17 lines (14 loc) • 673 B
text/typescript
import { SendGridClientOptions } from '@ntegral/sendgrid-client';
import { ModuleMetadata, Type } from '@nestjs/common/interfaces';
export interface SendGridClientModuleOptions extends SendGridClientOptions {}
export interface SendGridClientOptionsFactory {
createSendGridClientOptions(): Promise<SendGridClientOptions> | SendGridClientOptions;
}
export interface SendGridClientAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
inject?: any[];
useClass?: Type<SendGridClientOptionsFactory>;
useExisting?: Type<SendGridClientOptionsFactory>;
useFactory?: (
...args: any[]
) => Promise<SendGridClientOptions> | SendGridClientOptions;
}