@jackdbd/notifications
Version:
Functions used to send notifications to various channels (Telegram, email, etc)
24 lines • 699 B
TypeScript
export interface Config {
from: string;
html: string;
sendgrid_api_key: string;
subject: string;
to: string | string[];
}
export interface Options {
/**
* https://docs.sendgrid.com/for-developers/sending-email/personalizations
*/
template_id?: string;
}
export interface SuccessResponse {
message: string;
sendgrid_message_id: string;
}
/**
* Send an email to one or more recipients, using the SendGrid API.
*
* https://docs.sendgrid.com/api-reference/mail-send/mail-send#body
*/
export declare const send: ({ from, html, sendgrid_api_key, subject, to }: Config, options?: Options) => Promise<SuccessResponse>;
//# sourceMappingURL=sendgrid.d.ts.map