@explita/cloud-mail-client
Version:
A simple mail client for Node applications.
31 lines (30 loc) • 1 kB
TypeScript
import { Email, SendMailOptions, SendMailResponse } from "./types";
/**
* Sends an email using the mail service.
* @param data - The data for sending the email.
*
* @returns A promise that resolves to the response from the mail service.
*/
export declare function sendMail(data: SendMailOptions): Promise<SendMailResponse>;
/**
* Sends a batch of emails using the mail service.
*
* @param data - The data for sending the emails.
*
* @returns A promise that resolves to an array of responses from the mail service.
*/
export declare function sendBatch(data: SendMailOptions[]): Promise<SendMailResponse[]>;
/**
* Gets all emails from the mail service.
*
* @returns A promise that resolves to an array of emails.
*/
export declare function getEmails(): Promise<Email[]>;
/**
* Gets an email by its ID from the mail service.
*
* @param id - The ID of the email to get.
*
* @returns A promise that resolves to the email.
*/
export declare function getEmail(id: string): Promise<Email>;