Installation
npm install --save @types/mailgen
Summary
This package contains type definitions for mailgen (https://github.com/eladnava/mailgen#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mailgen.
import Option = Mailgen.Option;
import Content = Mailgen.Content;
declare class Mailgen {
constructor(opts: Option);
cacheThemes(): void;
generate(params: Content): any;
generatePlaintext(params: Content): any;
parseParams(params: any): any;
}
declare namespace Mailgen {
interface Option {
theme: string | CustomTheme;
product: Product;
}
interface CustomTheme {
path: string;
plaintextPath?: string | undefined;
}
interface Product {
name: string;
link: string;
logo?: string | undefined;
logoHeight?: string | undefined;
copyright?: string | undefined;
}
interface Content {
body: ContentBody;
}
interface ContentBody {
name?: string | undefined;
greeting?: string | undefined;
signature?: string | undefined;
title?: string | undefined;
intro?: string | string[] | undefined;
action?: Action | Action[] | undefined;
table?: Table | Table[] | undefined;
dictionary?: any;
goToAction?: GoToAction | undefined;
outro?: string | string[] | undefined;
}
interface Table {
data: any[];
columns?: ColumnOptions[] | undefined;
}
interface ColumnOptions {
customWidth: any;
customAlignment: any;
}
interface GoToAction {
text: string;
link: string;
description: string;
}
interface Action {
instructions: string;
button: Button;
}
interface Button {
color: string;
text: string;
link: string;
}
}
export = Mailgen;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: none
Credits
These definitions were written by Kiet Thanh Vo, Jordan Farrer, and Grzegorz Kawka-Osik.