maileroo-sdk
Version:
Official Node.js SDK for Maileroo v2 API. Send transactional/marketing emails via Maileroo with a simple and intuitive API.
24 lines (23 loc) • 899 B
TypeScript
import { Readable } from "node:stream";
export interface AttachmentJSON {
file_name: string;
content_type: string;
content: string;
inline: boolean;
}
export declare class Attachment {
private readonly fileName;
private readonly contentType;
private readonly contentB64;
private readonly inline;
private constructor();
static fromContent(fileName: string, content: Buffer | string, contentType?: string | null, inline?: boolean, isBase64?: boolean): Attachment;
static fromStream(fileName: string, stream: Readable, contentType?: string | null, inline?: boolean): Promise<Attachment>;
static fromFile(path: string, contentType?: string | null, inline?: boolean): Promise<Attachment>;
getFileName(): string;
getContentType(): string;
getContent(): string;
isInline(): boolean;
toJSON(): AttachmentJSON;
}
export default Attachment;