UNPKG

@lob/lob-typescript-sdk

Version:
154 lines (153 loc) 6.65 kB
/** * Lob * The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. <p> Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? * * The version of the OpenAPI document: 1.3.0 * Contact: lob-openapi@lob.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import * as Models from "./index"; import { MailType } from "./mail-type"; import { SelfMailerSize } from "./self-mailer-size"; import { SfmUseType } from "./sfm-use-type"; import { TrackingEventCertified } from "./tracking-event-certified"; /** * * @export * @class SelfMailer */ export declare class SelfMailer { constructor(input?: any); /** * Unique identifier prefixed with `sfm_`. * @type {string} * @memberof SelfMailer */ private "_id"; get id(): string; set id(newValue: string); /** * * @type {any} * @memberof SelfMailer */ "to": string | Models.Address | null; /** * * @type {any} * @memberof SelfMailer */ "from"?: string | Models.AddressDomesticExpanded | null; /** * * @type {SelfMailerSize} * @memberof SelfMailer */ "size"?: SelfMailerSize; /** * An internal description that identifies this resource. Must be no longer than 255 characters. * @type {string} * @memberof SelfMailer */ "description"?: string | null; /** * Use metadata to store custom information for tagging and labeling back to your internal systems. Must be an object with up to 20 key-value pairs. Keys must be at most 40 characters and values must be at most 500 characters. Neither can contain the characters `\"` and `\\`. i.e. \'{\"customer_id\" : \"NEWYORK2015\"}\' Nested objects are not supported. See [Metadata](#section/Metadata) for more information. * @type {{ [key: string]: string; }} * @memberof SelfMailer */ "metadata"?: { [key: string]: string; }; /** * * @type {MailType} * @memberof SelfMailer */ "mail_type"?: MailType; /** * You can input a merge variable payload object to your template to render dynamic content. For example, if you have a template like: `{{variable_name}}`, pass in `{\"variable_name\": \"Harry\"}` to render `Harry`. `merge_variables` must be an object. Any type of value is accepted as long as the object is valid JSON; you can use `strings`, `numbers`, `booleans`, `arrays`, `objects`, or `null`. The max length of the object is 25,000 characters. If you call `JSON.stringify` on your object, it can be no longer than 25,000 characters. Your variable names cannot contain any whitespace or any of the following special characters: `!`, `\"`, `#`, `%`, `&`, `\'`, `(`, `)`, `*`, `+`, `,`, `/`, `;`, `<`, `=`, `>`, `@`, `[`, `\\`, `]`, `^`, `` ` ``, `{`, `|`, `}`, `~`. More instructions can be found in [our guide to using html and merge variables](https://lob.com/resources/guides/general/using-html-and-merge-variables). Depending on your [Merge Variable strictness](https://dashboard.lob.com/#/settings/account) setting, if you define variables in your HTML but do not pass them here, you will either receive an error or the variable will render as an empty string. * @type {object} * @memberof SelfMailer */ "merge_variables"?: object | null; /** * A timestamp in ISO 8601 format which specifies a date after the current time and up to 180 days in the future to send the letter off for production. Setting a send date overrides the default [cancellation window](#section/Cancellation-Windows) applied to the mailpiece. Until the `send_date` has passed, the mailpiece can be canceled. If a date in the format `2017-11-01` is passed, it will evaluate to midnight UTC of that date (`2017-11-01T00:00:00.000Z`). If a datetime is passed, that exact time will be used. A `send_date` passed with no time zone will default to UTC, while a `send_date` passed with a time zone will be converted to UTC. * @type {string} * @memberof SelfMailer */ "send_date"?: string; /** * The unique ID of the HTML template used for the outside of the self mailer. * @type {string} * @memberof SelfMailer */ private "_outside_template_id"?; get outside_template_id(): string | null; set outside_template_id(newValue: string | null); /** * The unique ID of the HTML template used for the inside of the self mailer. * @type {string} * @memberof SelfMailer */ private "_inside_template_id"?; get inside_template_id(): string | null; set inside_template_id(newValue: string | null); /** * The unique ID of the specific version of the HTML template used for the outside of the self mailer. * @type {string} * @memberof SelfMailer */ private "_outside_template_version_id"?; get outside_template_version_id(): string | null; set outside_template_version_id(newValue: string | null); /** * The unique ID of the specific version of the HTML template used for the inside of the self mailer. * @type {string} * @memberof SelfMailer */ private "_inside_template_version_id"?; get inside_template_version_id(): string | null; set inside_template_version_id(newValue: string | null); /** * Value is resource type. * @type {string} * @memberof SelfMailer */ "object"?: SelfMailerObjectEnum; /** * An array of certified tracking events ordered by ascending `time`. Not populated in test mode. * @type {Array<TrackingEventCertified>} * @memberof SelfMailer */ "tracking_events"?: Array<TrackingEventCertified>; /** * A [signed link](#section/Asset-URLs) served over HTTPS. The link returned will expire in 30 days to prevent mis-sharing. Each time a GET request is initiated, a new signed URL will be generated. * @type {string} * @memberof SelfMailer */ private "_url"; get url(): string; set url(newValue: string); /** * * @type {SfmUseType} * @memberof SelfMailer */ "use_type": SfmUseType | null; toJSON(): {}; } /** * @export * @enum {string} */ export declare enum SelfMailerObjectEnum { SelfMailer = "self_mailer" } /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */