2.0.7 • Published 6 months ago

@types/mailgen v2.0.7

Weekly downloads
1,251
License
MIT
Repository
github
Last release
6 months ago

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.

2.0.7

6 months ago

2.0.6

7 months ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

6 years ago

2.0.1

7 years ago

2.0.0

7 years ago