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

1.2.33 • Public • Published

Installation

npm install --save @types/smtpapi

Summary

This package contains type definitions for smtpapi (https://github.com/sendgrid/smtpapi-nodejs).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/smtpapi.

index.d.ts

declare var SmtpApi: SmtpApi.Constructor;
export = SmtpApi;

declare namespace SmtpApi {
    interface Header {
        to: string[];
        sub: Object;
        unique_args: Object;
        category: string[];
        section: Object;
        filters: Object;
        send_at: "" | number;
        send_each_at: number[];
        asm_group_id: number;
        ip_pool: string;
    }

    interface Constructor {
        new(): Instance;
        new(header: Header): Instance;
    }

    interface Instance {
        header: Header;
        version: string;

        jsonObject(): Header;
        jsonString(): string;

        addTo(to: string): void;
        addTo(tos: string[]): void;
        addSubstitution(key: string, val: string): void;
        addSubstitution(key: string, val: string[]): void;
        addUniqueArg(key: string, val: string): void;
        addCategory(cat: string): void;
        addCategory(cat: string[]): void;
        addSection(sec: string, val: string): void;
        addFilter(filter: string, setting: string, val: number): void;
        addFilter(filter: string, setting: string, val: string): void;
        addSendEachAt(send_each_at: number): void;
        addSendEachAt(send_each_at: number[]): void;

        setTos(email: string): void;
        setTos(emails: string[]): void;
        setSubstitutions(subs: Object): void;
        setUniqueArgs(val: Object): void;
        setCategories(cats: string): void;
        setCategories(cats: string[]): void;
        setSections(sec: Object): void;
        setFilters(filters: Object): void;
        setSendAt(send_at: number): void;
        setSendEachAt(send_each_at: number[]): void;
        setASMGroupID(asm_group_id: number): void;
        setIpPool(ip_pool: string): void;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Antonio Morales.

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @types/smtpapi

Weekly Downloads

552

Version

1.2.33

License

MIT

Unpacked Size

6.08 kB

Total Files

5

Last publish

Collaborators

  • types