shipstation-client
Version:
ShipStation V2 SDK
423 lines (422 loc) • 22.2 kB
TypeScript
/**
* ShipStation API v2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { BatchStatus } from '../models';
import type { BatchesSortBy } from '../models';
import type { CreateAndProcessBatchRequestBody } from '../models';
import type { CreateBatchRequest } from '../models';
import type { CreateBatchResponseBody } from '../models';
import type { GetBatchByExternalIdResponseBody } from '../models';
import type { GetBatchByIdResponseBody } from '../models';
import type { ListBatchErrorsResponseBody } from '../models';
import type { ListBatchesResponseBody } from '../models';
import type { ProcessBatchRequestBody } from '../models';
import type { RemoveFromBatchRequestBody } from '../models';
import type { SortDir } from '../models';
/**
* BatchesApi - axios parameter creator
* @export
*/
export declare const BatchesApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Add a shipment or rate to a batch.
* @summary Add to a batch
* @param {string} batchId Batch ID
* @param {CreateAndProcessBatchRequestBody} createAndProcessBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addToBatch: (batchId: string, createAndProcessBatchRequestBody: CreateAndProcessBatchRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Create a batch containing multiple labels.
* @summary Create a batch
* @param {CreateBatchRequest} createBatchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createBatch: (createBatchRequest: CreateBatchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Delete a batch based on its batch id. Sets its status to \'archived\'.
* @summary Delete batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteBatch: (batchId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Retreive a batch using an external batch ID
* @summary Get batch by external id
* @param {string} externalBatchId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBatchByExternalId: (externalBatchId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Get batch details for a specific batch id.
* @summary Get batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBatchById: (batchId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Errors in batches must be handled differently from synchronous requests. You must retrieve the status of your batch by getting a batch and getting an overview of the statuses or by listing the batch errors.
* @summary Get batch errors
* @param {string} batchId Batch ID
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pagesize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBatchErrors: (batchId: string, page?: number, pagesize?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* List the batches associated with your ShipStation account.
* @summary List batches
* @param {BatchStatus} [status]
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pageSize] The number of results to return per response.
* @param {SortDir} [sortDir] Controls the sort order of the query.
* @param {string} [batchNumber] Batch Number
* @param {BatchesSortBy} [sortBy]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBatches: (status?: BatchStatus, page?: number, pageSize?: number, sortDir?: SortDir, batchNumber?: string, sortBy?: BatchesSortBy, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Create and purchase the labels for the shipments included in the batch.
* @summary Process batch id labels
* @param {string} batchId Batch ID
* @param {ProcessBatchRequestBody} processBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
processBatch: (batchId: string, processBatchRequestBody: ProcessBatchRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Remove specific shipment ids or rate ids from a batch.
* @summary Remove from batch
* @param {string} batchId Batch ID
* @param {RemoveFromBatchRequestBody} removeFromBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeFromBatch: (batchId: string, removeFromBatchRequestBody: RemoveFromBatchRequestBody, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Update a batch by id setting its status to \'archived\'.
* @summary Update batch status to \'archived\' by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateBatch: (batchId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* BatchesApi - functional programming interface
* @export
*/
export declare const BatchesApiFp: (configuration?: Configuration) => {
/**
* Add a shipment or rate to a batch.
* @summary Add to a batch
* @param {string} batchId Batch ID
* @param {CreateAndProcessBatchRequestBody} createAndProcessBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addToBatch(batchId: string, createAndProcessBatchRequestBody: CreateAndProcessBatchRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
/**
* Create a batch containing multiple labels.
* @summary Create a batch
* @param {CreateBatchRequest} createBatchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createBatch(createBatchRequest: CreateBatchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateBatchResponseBody>>;
/**
* Delete a batch based on its batch id. Sets its status to \'archived\'.
* @summary Delete batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteBatch(batchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
/**
* Retreive a batch using an external batch ID
* @summary Get batch by external id
* @param {string} externalBatchId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBatchByExternalId(externalBatchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBatchByExternalIdResponseBody>>;
/**
* Get batch details for a specific batch id.
* @summary Get batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBatchById(batchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetBatchByIdResponseBody>>;
/**
* Errors in batches must be handled differently from synchronous requests. You must retrieve the status of your batch by getting a batch and getting an overview of the statuses or by listing the batch errors.
* @summary Get batch errors
* @param {string} batchId Batch ID
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pagesize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBatchErrors(batchId: string, page?: number, pagesize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBatchErrorsResponseBody>>;
/**
* List the batches associated with your ShipStation account.
* @summary List batches
* @param {BatchStatus} [status]
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pageSize] The number of results to return per response.
* @param {SortDir} [sortDir] Controls the sort order of the query.
* @param {string} [batchNumber] Batch Number
* @param {BatchesSortBy} [sortBy]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBatches(status?: BatchStatus, page?: number, pageSize?: number, sortDir?: SortDir, batchNumber?: string, sortBy?: BatchesSortBy, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListBatchesResponseBody>>;
/**
* Create and purchase the labels for the shipments included in the batch.
* @summary Process batch id labels
* @param {string} batchId Batch ID
* @param {ProcessBatchRequestBody} processBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
processBatch(batchId: string, processBatchRequestBody: ProcessBatchRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
/**
* Remove specific shipment ids or rate ids from a batch.
* @summary Remove from batch
* @param {string} batchId Batch ID
* @param {RemoveFromBatchRequestBody} removeFromBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeFromBatch(batchId: string, removeFromBatchRequestBody: RemoveFromBatchRequestBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
/**
* Update a batch by id setting its status to \'archived\'.
* @summary Update batch status to \'archived\' by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateBatch(batchId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
};
/**
* BatchesApi - factory interface
* @export
*/
export declare const BatchesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Add a shipment or rate to a batch.
* @summary Add to a batch
* @param {string} batchId Batch ID
* @param {CreateAndProcessBatchRequestBody} createAndProcessBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addToBatch(batchId: string, createAndProcessBatchRequestBody: CreateAndProcessBatchRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<string>;
/**
* Create a batch containing multiple labels.
* @summary Create a batch
* @param {CreateBatchRequest} createBatchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createBatch(createBatchRequest: CreateBatchRequest, options?: RawAxiosRequestConfig): AxiosPromise<CreateBatchResponseBody>;
/**
* Delete a batch based on its batch id. Sets its status to \'archived\'.
* @summary Delete batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteBatch(batchId: string, options?: RawAxiosRequestConfig): AxiosPromise<string>;
/**
* Retreive a batch using an external batch ID
* @summary Get batch by external id
* @param {string} externalBatchId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBatchByExternalId(externalBatchId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetBatchByExternalIdResponseBody>;
/**
* Get batch details for a specific batch id.
* @summary Get batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getBatchById(batchId: string, options?: RawAxiosRequestConfig): AxiosPromise<GetBatchByIdResponseBody>;
/**
* Errors in batches must be handled differently from synchronous requests. You must retrieve the status of your batch by getting a batch and getting an overview of the statuses or by listing the batch errors.
* @summary Get batch errors
* @param {string} batchId Batch ID
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pagesize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBatchErrors(batchId: string, page?: number, pagesize?: number, options?: RawAxiosRequestConfig): AxiosPromise<ListBatchErrorsResponseBody>;
/**
* List the batches associated with your ShipStation account.
* @summary List batches
* @param {BatchStatus} [status]
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pageSize] The number of results to return per response.
* @param {SortDir} [sortDir] Controls the sort order of the query.
* @param {string} [batchNumber] Batch Number
* @param {BatchesSortBy} [sortBy]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listBatches(status?: BatchStatus, page?: number, pageSize?: number, sortDir?: SortDir, batchNumber?: string, sortBy?: BatchesSortBy, options?: RawAxiosRequestConfig): AxiosPromise<ListBatchesResponseBody>;
/**
* Create and purchase the labels for the shipments included in the batch.
* @summary Process batch id labels
* @param {string} batchId Batch ID
* @param {ProcessBatchRequestBody} processBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
processBatch(batchId: string, processBatchRequestBody: ProcessBatchRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<string>;
/**
* Remove specific shipment ids or rate ids from a batch.
* @summary Remove from batch
* @param {string} batchId Batch ID
* @param {RemoveFromBatchRequestBody} removeFromBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
removeFromBatch(batchId: string, removeFromBatchRequestBody: RemoveFromBatchRequestBody, options?: RawAxiosRequestConfig): AxiosPromise<string>;
/**
* Update a batch by id setting its status to \'archived\'.
* @summary Update batch status to \'archived\' by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateBatch(batchId: string, options?: RawAxiosRequestConfig): AxiosPromise<string>;
};
/**
* BatchesApi - object-oriented interface
* @export
* @class BatchesApi
* @extends {BaseAPI}
*/
export declare class BatchesApi extends BaseAPI {
/**
* Add a shipment or rate to a batch.
* @summary Add to a batch
* @param {string} batchId Batch ID
* @param {CreateAndProcessBatchRequestBody} createAndProcessBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
addToBatch(batchId: string, createAndProcessBatchRequestBody: CreateAndProcessBatchRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
/**
* Create a batch containing multiple labels.
* @summary Create a batch
* @param {CreateBatchRequest} createBatchRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
createBatch(createBatchRequest: CreateBatchRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<import("../models").Batch, any>>;
/**
* Delete a batch based on its batch id. Sets its status to \'archived\'.
* @summary Delete batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
deleteBatch(batchId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
/**
* Retreive a batch using an external batch ID
* @summary Get batch by external id
* @param {string} externalBatchId
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
getBatchByExternalId(externalBatchId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<import("../models").Batch, any>>;
/**
* Get batch details for a specific batch id.
* @summary Get batch by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
getBatchById(batchId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<import("../models").Batch, any>>;
/**
* Errors in batches must be handled differently from synchronous requests. You must retrieve the status of your batch by getting a batch and getting an overview of the statuses or by listing the batch errors.
* @summary Get batch errors
* @param {string} batchId Batch ID
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pagesize]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
listBatchErrors(batchId: string, page?: number, pagesize?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBatchErrorsResponseBody, any>>;
/**
* List the batches associated with your ShipStation account.
* @summary List batches
* @param {BatchStatus} [status]
* @param {number} [page] Return a specific page of results. Defaults to the first page. If set to a number that\'s greater than the number of pages of results, an empty page is returned.
* @param {number} [pageSize] The number of results to return per response.
* @param {SortDir} [sortDir] Controls the sort order of the query.
* @param {string} [batchNumber] Batch Number
* @param {BatchesSortBy} [sortBy]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
listBatches(status?: BatchStatus, page?: number, pageSize?: number, sortDir?: SortDir, batchNumber?: string, sortBy?: BatchesSortBy, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ListBatchesResponseBody, any>>;
/**
* Create and purchase the labels for the shipments included in the batch.
* @summary Process batch id labels
* @param {string} batchId Batch ID
* @param {ProcessBatchRequestBody} processBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
processBatch(batchId: string, processBatchRequestBody: ProcessBatchRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
/**
* Remove specific shipment ids or rate ids from a batch.
* @summary Remove from batch
* @param {string} batchId Batch ID
* @param {RemoveFromBatchRequestBody} removeFromBatchRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
removeFromBatch(batchId: string, removeFromBatchRequestBody: RemoveFromBatchRequestBody, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
/**
* Update a batch by id setting its status to \'archived\'.
* @summary Update batch status to \'archived\' by id
* @param {string} batchId Batch ID
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof BatchesApi
*/
updateBatch(batchId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any>>;
}