Needy Poetic Mothers

    @types/mailgen
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.5 • Public • Published

    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.

    index.d.ts

    // Type definitions for mailgen 2.0
    // Project: https://github.com/eladnava/mailgen#readme
    // Definitions by: Kiet Thanh Vo <https://github.com/vothanhkiet>, Jordan Farrer <https://github.com/jordanfarrer>, Grzegorz Kawka-Osik <https://github.com/grzegorzkawkaosik>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    import Option = Mailgen.Option;
    import Content = Mailgen.Content;
    /**
     * Created by kiettv on 7/24/16.
     */
    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: Thu, 08 Jul 2021 16:23:55 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by Kiet Thanh Vo, Jordan Farrer, and Grzegorz Kawka-Osik.

    Keywords

    none

    Install

    npm i @types/mailgen

    DownloadsWeekly Downloads

    2,742

    Version

    2.0.5

    License

    MIT

    Unpacked Size

    7.11 kB

    Total Files

    4

    Last publish

    Collaborators

    • types