UNPKG

@lob/lob-typescript-sdk

Version:
200 lines (199 loc) 10.9 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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from "axios"; import { Configuration } from "../configuration"; import { RequestArgs, BaseAPI } from "../base"; import { Template } from "../models"; import { TemplateDeletion } from "../models"; import { TemplateList } from "../models"; import { TemplateUpdate } from "../models"; import { TemplateWritable } from "../models"; /** * TemplatesApi - axios parameter creator * @export */ export declare const TemplatesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new template for use with the Print & Mail API. In Live mode, you can only have as many non-deleted templates as allotted in your current [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions). If you attempt to create a template past your limit, you will receive a `403` error. There is no limit in Test mode. * @summary create * @param {TemplateWritable} templateWritable * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTemplate: (templateWritable: TemplateWritable, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Permanently deletes a template. * @summary delete * @param {string} tmplId id of the template * @param {*} [options] Override http request option. * @throws {RequiredError} */ templateDelete: (tmplId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Retrieves the details of an existing template. * @summary get * @param {string} tmplId id of the template * @param {*} [options] Override http request option. * @throws {RequiredError} */ templateRetrieve: (tmplId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Updates the description and/or published version of the template with the given id. * @summary update * @param {string} tmplId id of the template * @param {TemplateUpdate} templateUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ templateUpdate: (tmplId: string, templateUpdate: TemplateUpdate, options?: AxiosRequestConfig) => Promise<RequestArgs>; /** * Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first. * @summary list * @param {number} [limit] How many results to return. * @param {string} [before] A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the &#x60;previous_url&#x60; field in the return response. * @param {string} [after] A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the &#x60;next_url&#x60; field in the return response. * @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;. * @param {{ [key: string]: string; }} [dateCreated] Filter by date created. * @param {{ [key: string]: string; }} [metadata] Filter by metadata key-value pair&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ templatesList: (limit?: number, before?: string, after?: string, include?: Array<string>, dateCreated?: { [key: string]: string; } | undefined, metadata?: { [key: string]: string; } | undefined, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * TemplatesApi - functional programming interface * @export */ export declare const TemplatesApiFp: (configuration?: Configuration) => { /** * Creates a new template for use with the Print & Mail API. In Live mode, you can only have as many non-deleted templates as allotted in your current [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions). If you attempt to create a template past your limit, you will receive a `403` error. There is no limit in Test mode. * @summary create * @param {TemplateWritable} templateWritable * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTemplate(templateWritable: TemplateWritable, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Template>>; /** * Permanently deletes a template. * @summary delete * @param {string} tmplId id of the template * @param {*} [options] Override http request option. * @throws {RequiredError} */ templateDelete(tmplId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TemplateDeletion>>; /** * Retrieves the details of an existing template. * @summary get * @param {string} tmplId id of the template * @param {*} [options] Override http request option. * @throws {RequiredError} */ templateRetrieve(tmplId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Template>>; /** * Updates the description and/or published version of the template with the given id. * @summary update * @param {string} tmplId id of the template * @param {TemplateUpdate} templateUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ templateUpdate(tmplId: string, templateUpdate: TemplateUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Template>>; /** * Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first. * @summary list * @param {number} [limit] How many results to return. * @param {string} [before] A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the &#x60;previous_url&#x60; field in the return response. * @param {string} [after] A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the &#x60;next_url&#x60; field in the return response. * @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;. * @param {{ [key: string]: string; }} [dateCreated] Filter by date created. * @param {{ [key: string]: string; }} [metadata] Filter by metadata key-value pair&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} */ templatesList(limit?: number, before?: string, after?: string, include?: Array<string>, dateCreated?: { [key: string]: string; } | undefined, metadata?: { [key: string]: string; } | undefined, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TemplateList>>; }; /** * TemplatesApi - object-oriented interface * @export * @class TemplatesApi * @extends {BaseAPI} */ export declare class TemplatesApi extends BaseAPI { /** * Creates a new template for use with the Print & Mail API. In Live mode, you can only have as many non-deleted templates as allotted in your current [Print & Mail Edition](https://dashboard.lob.com/#/settings/editions). If you attempt to create a template past your limit, you will receive a `403` error. There is no limit in Test mode. * @summary create * @param {TemplateWritable} templateWritable * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ create(templateWritable: TemplateWritable, options?: AxiosRequestConfig): Promise<Template>; /** * Permanently deletes a template. * @summary delete * @param {string} tmplId id of the template * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ delete(tmplId: string, options?: AxiosRequestConfig): Promise<TemplateDeletion>; /** * Retrieves the details of an existing template. * @summary get * @param {string} tmplId id of the template * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ get(tmplId: string, options?: AxiosRequestConfig): Promise<Template>; /** * Updates the description and/or published version of the template with the given id. * @summary update * @param {string} tmplId id of the template * @param {TemplateUpdate} templateUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ update(tmplId: string, templateUpdate: TemplateUpdate, options?: AxiosRequestConfig): Promise<Template>; /** * Returns a list of your templates. The templates are returned sorted by creation date, with the most recently created templates appearing first. * @summary list * @param {number} [limit] How many results to return. * @param {string} [before] A reference to a list entry used for paginating to the previous set of entries. This field is pre-populated in the &#x60;previous_url&#x60; field in the return response. * @param {string} [after] A reference to a list entry used for paginating to the next set of entries. This field is pre-populated in the &#x60;next_url&#x60; field in the return response. * @param {Array<string>} [include] Request that the response include the total count by specifying &#x60;include[]&#x3D;total_count&#x60;. * @param {{ [key: string]: string; }} [dateCreated] Filter by date created. * @param {{ [key: string]: string; }} [metadata] Filter by metadata key-value pair&#x60;. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TemplatesApi */ list(limit?: number, before?: string, after?: string, include?: Array<string>, dateCreated?: { [key: string]: string; }, metadata?: { [key: string]: string; }, options?: AxiosRequestConfig): Promise<TemplateList>; } /** * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */