@lob/lob-typescript-sdk
Version:
Lob API wrapper
259 lines (258 loc) • 13.7 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 { Export } from "../models";
import { ExportModel } from "../models";
import { Upload } from "../models";
import { UploadCreateExport } from "../models";
import { UploadFile } from "../models";
import { UploadUpdatable } from "../models";
import { UploadWritable } from "../models";
/**
* UploadsApi - axios parameter creator
* @export
*/
export declare const UploadsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we\'re done processing the export), you will get back an export object with `state = in_progress`.
* @summary get_export
* @param {string} uplId ID of the upload
* @param {string} exId ID of the export
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
exportRetrieve: (uplId: string, exId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Creates a new upload with the provided properties.
* @summary create_upload
* @param {UploadWritable} uploadWritable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadCreate: (uploadWritable: UploadWritable, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
* @summary delete_upload
* @param {string} uplId id of the upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadDelete: (uplId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/best-practices/launching-your-first-campaign). Create an export file associated with an upload.
* @summary create_export
* @param {string} uplId ID of the upload
* @param {ExportModel} exportModel
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadExportCreate: (uplId: string, exportModel: ExportModel, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Upload an [audience file](https://help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
* @summary upload_file
* @param {string} uplId ID of the upload
* @param {any} file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadFileCreate: (uplId: string, file: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
* @summary get_upload
* @param {string} uplId id of the upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadRetrieve: (uplId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
* @summary update_upload
* @param {string} uplId id of the upload
* @param {UploadUpdatable} uploadUpdatable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadUpdate: (uplId: string, uploadUpdatable: UploadUpdatable, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Returns a list of your uploads. Optionally, filter uploads by campaign.
* @summary list_upload
* @param {string} [campaignId] id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadsList: (campaignId?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* UploadsApi - functional programming interface
* @export
*/
export declare const UploadsApiFp: (configuration?: Configuration) => {
/**
* Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we\'re done processing the export), you will get back an export object with `state = in_progress`.
* @summary get_export
* @param {string} uplId ID of the upload
* @param {string} exId ID of the export
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
exportRetrieve(uplId: string, exId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Export>>;
/**
* Creates a new upload with the provided properties.
* @summary create_upload
* @param {UploadWritable} uploadWritable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadCreate(uploadWritable: UploadWritable, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Upload>>;
/**
* Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
* @summary delete_upload
* @param {string} uplId id of the upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadDelete(uplId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
* Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/best-practices/launching-your-first-campaign). Create an export file associated with an upload.
* @summary create_export
* @param {string} uplId ID of the upload
* @param {ExportModel} exportModel
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadExportCreate(uplId: string, exportModel: ExportModel, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadCreateExport>>;
/**
* Upload an [audience file](https://help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
* @summary upload_file
* @param {string} uplId ID of the upload
* @param {any} file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadFileCreate(uplId: string, file: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UploadFile>>;
/**
* Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
* @summary get_upload
* @param {string} uplId id of the upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadRetrieve(uplId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Upload>>;
/**
* Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
* @summary update_upload
* @param {string} uplId id of the upload
* @param {UploadUpdatable} uploadUpdatable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadUpdate(uplId: string, uploadUpdatable: UploadUpdatable, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Upload>>;
/**
* Returns a list of your uploads. Optionally, filter uploads by campaign.
* @summary list_upload
* @param {string} [campaignId] id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
uploadsList(campaignId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Upload>>>;
};
/**
* UploadsApi - object-oriented interface
* @export
* @class UploadsApi
* @extends {BaseAPI}
*/
export declare class UploadsApi extends BaseAPI {
/**
* Retrieves the details of an existing export. You need only supply the unique export identifier that was returned upon export creation. If you try retrieving an export immediately after creating one (i.e., before we\'re done processing the export), you will get back an export object with `state = in_progress`.
* @summary get_export
* @param {string} uplId ID of the upload
* @param {string} exId ID of the export
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
get_export(uplId: string, exId: string, options?: AxiosRequestConfig): Promise<Export>;
/**
* Creates a new upload with the provided properties.
* @summary create_upload
* @param {UploadWritable} uploadWritable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
create_upload(uploadWritable: UploadWritable, options?: AxiosRequestConfig): Promise<Upload>;
/**
* Delete an existing upload. You need only supply the unique identifier that was returned upon upload creation.
* @summary delete_upload
* @param {string} uplId id of the upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
delete_upload(uplId: string, options?: AxiosRequestConfig): Promise<void>;
/**
* Campaign Exports can help you understand exactly which records in a campaign could not be created. By initiating and retrieving an export, you will get row-by-row errors for your campaign. For a step-by-step walkthrough of creating a campaign and exporting failures, see our [Campaigns Guide](https://help.lob.com/best-practices/launching-your-first-campaign). Create an export file associated with an upload.
* @summary create_export
* @param {string} uplId ID of the upload
* @param {ExportModel} exportModel
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
create_export(uplId: string, exportModel: ExportModel, options?: AxiosRequestConfig): Promise<UploadCreateExport>;
/**
* Upload an [audience file](https://help.lob.com/best-practices/campaign-audience-guide) and associate it with an upload.
* @summary upload_file
* @param {string} uplId ID of the upload
* @param {any} file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
upload_file(uplId: string, file: any, options?: AxiosRequestConfig): Promise<UploadFile>;
/**
* Retrieves the details of an existing upload. You need only supply the unique upload identifier that was returned upon upload creation.
* @summary get_upload
* @param {string} uplId id of the upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
get_upload(uplId: string, options?: AxiosRequestConfig): Promise<Upload>;
/**
* Update the details of an existing upload. You need only supply the unique identifier that was returned upon upload creation.
* @summary update_upload
* @param {string} uplId id of the upload
* @param {UploadUpdatable} uploadUpdatable
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
update_upload(uplId: string, uploadUpdatable: UploadUpdatable, options?: AxiosRequestConfig): Promise<Upload>;
/**
* Returns a list of your uploads. Optionally, filter uploads by campaign.
* @summary list_upload
* @param {string} [campaignId] id of the campaign
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UploadsApi
*/
list_upload(campaignId?: string, options?: AxiosRequestConfig): Promise<Upload[]>;
}
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/