@lob/lob-typescript-sdk
Version:
Lob API wrapper
185 lines (184 loc) • 11.6 kB
TypeScript
/**
* 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 { Campaign } from "../models";
import { CampaignDeletion } from "../models";
import { CampaignUpdatable } from "../models";
import { CampaignWritable } from "../models";
import { CampaignsList } from "../models";
/**
* CampaignsApi - axios parameter creator
* @export
*/
export declare const CampaignsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign).
* @summary create
* @param {CampaignWritable} campaignWritable
* @param {'native' | 'match'} [xLangOutput] * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignCreate: (campaignWritable: CampaignWritable, xLangOutput?: "native" | "match", options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign\'s `send_date` matches its associated mail pieces\' `send_date`s.
* @summary delete
* @param {string} cmpId id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignDelete: (cmpId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.
* @summary get
* @param {string} cmpId id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignRetrieve: (cmpId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation.
* @summary update
* @param {string} cmpId id of the campaign
* @param {CampaignUpdatable} campaignUpdatable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignUpdate: (cmpId: string, campaignUpdatable: CampaignUpdatable, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first.
* @summary list
* @param {number} [limit] How many results to return.
* @param {Array<string>} [include] Request that the response include the total count by specifying `include[]=total_count`.
* @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 `previous_url` 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 `next_url` field in the return response.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignsList: (limit?: number, include?: Array<string>, before?: string, after?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* CampaignsApi - functional programming interface
* @export
*/
export declare const CampaignsApiFp: (configuration?: Configuration) => {
/**
* Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign).
* @summary create
* @param {CampaignWritable} campaignWritable
* @param {'native' | 'match'} [xLangOutput] * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignCreate(campaignWritable: CampaignWritable, xLangOutput?: "native" | "match", options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Campaign>>;
/**
* Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign\'s `send_date` matches its associated mail pieces\' `send_date`s.
* @summary delete
* @param {string} cmpId id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignDelete(cmpId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CampaignDeletion>>;
/**
* Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.
* @summary get
* @param {string} cmpId id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignRetrieve(cmpId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Campaign>>;
/**
* Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation.
* @summary update
* @param {string} cmpId id of the campaign
* @param {CampaignUpdatable} campaignUpdatable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignUpdate(cmpId: string, campaignUpdatable: CampaignUpdatable, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Campaign>>;
/**
* Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first.
* @summary list
* @param {number} [limit] How many results to return.
* @param {Array<string>} [include] Request that the response include the total count by specifying `include[]=total_count`.
* @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 `previous_url` 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 `next_url` field in the return response.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
campaignsList(limit?: number, include?: Array<string>, before?: string, after?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CampaignsList>>;
};
/**
* CampaignsApi - object-oriented interface
* @export
* @class CampaignsApi
* @extends {BaseAPI}
*/
export declare class CampaignsApi extends BaseAPI {
/**
* Creates a new campaign with the provided properties. See how to launch your first campaign [here](https://help.lob.com/best-practices/launching-your-first-campaign).
* @summary create
* @param {CampaignWritable} campaignWritable
* @param {'native' | 'match'} [xLangOutput] * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CampaignsApi
*/
create(campaignWritable: CampaignWritable, xLangOutput?: "native" | "match", options?: AxiosRequestConfig): Promise<Campaign>;
/**
* Delete an existing campaign. You need only supply the unique identifier that was returned upon campaign creation. Deleting a campaign also deletes any associated mail pieces that have been created but not sent. A campaign\'s `send_date` matches its associated mail pieces\' `send_date`s.
* @summary delete
* @param {string} cmpId id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CampaignsApi
*/
delete(cmpId: string, options?: AxiosRequestConfig): Promise<CampaignDeletion>;
/**
* Retrieves the details of an existing campaign. You need only supply the unique campaign identifier that was returned upon campaign creation.
* @summary get
* @param {string} cmpId id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CampaignsApi
*/
get(cmpId: string, options?: AxiosRequestConfig): Promise<Campaign>;
/**
* Update the details of an existing campaign. You need only supply the unique identifier that was returned upon campaign creation.
* @summary update
* @param {string} cmpId id of the campaign
* @param {CampaignUpdatable} campaignUpdatable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CampaignsApi
*/
update(cmpId: string, campaignUpdatable: CampaignUpdatable, options?: AxiosRequestConfig): Promise<Campaign>;
/**
* Returns a list of your campaigns. The campaigns are returned sorted by creation date, with the most recently created campaigns appearing first.
* @summary list
* @param {number} [limit] How many results to return.
* @param {Array<string>} [include] Request that the response include the total count by specifying `include[]=total_count`.
* @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 `previous_url` 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 `next_url` field in the return response.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CampaignsApi
*/
list(limit?: number, include?: Array<string>, before?: string, after?: string, options?: AxiosRequestConfig): Promise<CampaignsList>;
}
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/