@datenkraft/bb-fulfillment-api-ts-client
Version:
The fulfillment API TS Client enables you to work with the fulfillment API
601 lines • 66.1 kB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Fulfillment API
* - alpha: Currently developed API version. Subject to major changes. - beta: A semi-stable early access version. New features can be added. Breaking changes are possible. - stable: The API is recommended for use in production. [Changelog](https://fulfillment-api.steve.niceshops.com/v2/docs/changelog.html) All data is transferred in UTF-8 encoding.\\ The API uses stateless HTTP. No cookies have to be kept.\\ Authentication via OAuth2 client credentials flow. [Privacy Policy](https://www.niceshops.com/en/dienstleistungen/data-privacy-policy) [Fulfillment API PHP client @Packagist](https://packagist.org/packages/datenkraft/bb-fulfillment-api-php-client)
*
* The version of the OpenAPI document: v2.beta
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InboundDeliveryApi = exports.InboundDeliveryApiFactory = exports.InboundDeliveryApiFp = exports.InboundDeliveryApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// URLSearchParams not necessarily used
// @ts-ignore
const url_1 = require("url");
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
* InboundDeliveryApi - axios parameter creator
* @export
*/
const InboundDeliveryApiAxiosParamCreator = function (configuration) {
return {
/**
* Cancel a inbound delivery referenced by the given inboundDeliveryNumber. \\ An inboundDeliveryNumber from a canceled inbound delivery cannot be used for a new inbound delivery, because they must always be unique.
* @summary Cancel a inbound delivery.
* @param {string} inboundDeliveryNumber The number the inbound delivery should be referred by. \\ This number is user defined, must be unique and has a maximum length (check maxLength field).
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelInboundDelivery: (inboundDeliveryNumber, shopCode, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'inboundDeliveryNumber' is not null or undefined
(0, common_1.assertParamExists)('cancelInboundDelivery', 'inboundDeliveryNumber', inboundDeliveryNumber);
const localVarPath = `/inbound-delivery/{inboundDeliveryNumber}/cancel`
.replace(`{${"inboundDeliveryNumber"}}`, encodeURIComponent(String(inboundDeliveryNumber)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopCode !== undefined) {
localVarQueryParameter['shopCode'] = shopCode;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Get an inbound delivery by inbound delivery number.
* @summary Get an inbound delivery by inbound delivery number.
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDelivery: (inboundDeliveryNumber, shopCode, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'inboundDeliveryNumber' is not null or undefined
(0, common_1.assertParamExists)('getInboundDelivery', 'inboundDeliveryNumber', inboundDeliveryNumber);
const localVarPath = `/inbound-delivery/{inboundDeliveryNumber}`
.replace(`{${"inboundDeliveryNumber"}}`, encodeURIComponent(String(inboundDeliveryNumber)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopCode !== undefined) {
localVarQueryParameter['shopCode'] = shopCode;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain.
* @summary Get a spreadsheet template for performing POST queries to the respective endpoint.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryBulkImportTemplate: (options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/bulk-import/template/inbound-delivery`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Get a list of inbound deliveries.
* @summary Get a list of inbound deliveries.
* @param {number} [page] The page to read. Default is the first page.
* @param {number} [pageSize] The maximum size per page is 100. Default is 100.
* @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance.
* @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - expectedDeliveryDate The default sort order is expectedDeliveryDate:desc.
* @param {string} [filterStatus] Status of the inbound delivery (optional). The status for not yet completed is subject to change. you may poll for changes. - open: The inbound delivery has not yet been delivered. - in_progress: The inbound delivery is being processed in our warehouse. - completed: The inbound delivery has been processed in our warehouse. - deleted: The inbound delivery has been deleted.
* @param {string} [filterShopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {string} [filterExpectedDeliveryDateFrom] The start date (inclusive) in format Y-m-d for which inbound deliveries should be returned (regarding the expected delivery date).
* @param {string} [filterExpectedDeliveryDateTo] The end date (inclusive) in format Y-m-d for which inbound deliveries should be returned (regarding the expected delivery date).
* @param {string} [filterSearch] filter for inbound delivery search. Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is enabled for the fields inboundDeliveryName and inboundDeliveryNumber. - Each search term filters the response for inbound deliveries where at least one of the fields contains the search term. - For example, filter[search]=\'term1 term2\' will filter the result for products where \'term1\' is found in any field and \'term2\' is also found in any field. If only \'term1\' or \'term2\' is found in the fields, the product is not included in the results.
* @param {string} [filterCreateDateFrom] The start date (inclusive) in ISO 8601 format for which inbound deliveries should be returned (regarding the creation date).
* @param {string} [filterCreateDateTo] The end date (inclusive) in ISO 8601 format for which inbound deliveries should be returned (regarding the creation date).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryCollection: (page, pageSize, paginationMode, sortBy, filterStatus, filterShopCode, filterExpectedDeliveryDateFrom, filterExpectedDeliveryDateTo, filterSearch, filterCreateDateFrom, filterCreateDateTo, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/inbound-delivery`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (paginationMode !== undefined) {
localVarQueryParameter['paginationMode'] = paginationMode;
}
if (sortBy !== undefined) {
localVarQueryParameter['sortBy'] = sortBy;
}
if (filterStatus !== undefined) {
localVarQueryParameter['filter[status]'] = filterStatus;
}
if (filterShopCode !== undefined) {
localVarQueryParameter['filter[shopCode]'] = filterShopCode;
}
if (filterExpectedDeliveryDateFrom !== undefined) {
localVarQueryParameter['filter[expectedDeliveryDateFrom]'] = (filterExpectedDeliveryDateFrom instanceof Date) ?
filterExpectedDeliveryDateFrom.toISOString().substr(0, 10) :
filterExpectedDeliveryDateFrom;
}
if (filterExpectedDeliveryDateTo !== undefined) {
localVarQueryParameter['filter[expectedDeliveryDateTo]'] = (filterExpectedDeliveryDateTo instanceof Date) ?
filterExpectedDeliveryDateTo.toISOString().substr(0, 10) :
filterExpectedDeliveryDateTo;
}
if (filterSearch !== undefined) {
localVarQueryParameter['filter[search]'] = filterSearch;
}
if (filterCreateDateFrom !== undefined) {
localVarQueryParameter['filter[createDateFrom]'] = (filterCreateDateFrom instanceof Date) ?
filterCreateDateFrom.toISOString() :
filterCreateDateFrom;
}
if (filterCreateDateTo !== undefined) {
localVarQueryParameter['filter[createDateTo]'] = (filterCreateDateTo instanceof Date) ?
filterCreateDateTo.toISOString() :
filterCreateDateTo;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Allows to download a document associated with the given inbound delivery.
* @summary Download inbound delivery related documents
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {'supplierDeliveryLabel' | 'details'} documentCode The document type to download. The file format is determined by the Accept request header. Note: only a limited amount of document type to file format combinations are available: - supplierDeliveryLabel: the label to put on the inbound delivery for warehouse processing. Accept header: application/pdf - details: a spreadsheet containing details about the inbound delivery. Accept header: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryDocument: (inboundDeliveryNumber, documentCode, shopCode, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'inboundDeliveryNumber' is not null or undefined
(0, common_1.assertParamExists)('getInboundDeliveryDocument', 'inboundDeliveryNumber', inboundDeliveryNumber);
// verify required parameter 'documentCode' is not null or undefined
(0, common_1.assertParamExists)('getInboundDeliveryDocument', 'documentCode', documentCode);
const localVarPath = `/inbound-delivery/{inboundDeliveryNumber}/document/{documentCode}`
.replace(`{${"inboundDeliveryNumber"}}`, encodeURIComponent(String(inboundDeliveryNumber)))
.replace(`{${"documentCode"}}`, encodeURIComponent(String(documentCode)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopCode !== undefined) {
localVarQueryParameter['shopCode'] = shopCode;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Import one or more new inbound deliveries. The file type is controlled by the content type attribute of the uploaded file
* @summary Import one or more new inbound deliveries.
* @param {File} file File to upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
inboundDeliveryBulkImport: (file, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'file' is not null or undefined
(0, common_1.assertParamExists)('inboundDeliveryBulkImport', 'file', file);
const localVarPath = `/bulk-import/inbound-delivery`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (file !== undefined) {
localVarFormParams.append('file', file);
}
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = localVarFormParams;
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Patch the inbound delivery specified by the given inbound delivery number. \\ Only inbound deliveries where booking-in has not yet started can be edited. \\ All fields in the request body are optional. Only provided fields will be updated. Product changes: - To update a product\'s announced count: include the product with the new announcedCount. - To remove a product: include the product with announcedCount set to 0. - To add a new product: include a product that is not yet part of the delivery with a positive announcedCount. - Products not listed in the products array remain unchanged.
* @summary Patch an inbound delivery.
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {PatchInboundDelivery} patchInboundDelivery
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchInboundDelivery: (inboundDeliveryNumber, patchInboundDelivery, shopCode, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'inboundDeliveryNumber' is not null or undefined
(0, common_1.assertParamExists)('patchInboundDelivery', 'inboundDeliveryNumber', inboundDeliveryNumber);
// verify required parameter 'patchInboundDelivery' is not null or undefined
(0, common_1.assertParamExists)('patchInboundDelivery', 'patchInboundDelivery', patchInboundDelivery);
const localVarPath = `/inbound-delivery/{inboundDeliveryNumber}`
.replace(`{${"inboundDeliveryNumber"}}`, encodeURIComponent(String(inboundDeliveryNumber)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopCode !== undefined) {
localVarQueryParameter['shopCode'] = shopCode;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(patchInboundDelivery, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Add a new inbound delivery referenced by the given deliveryNumber.
* @summary Add a new inbound delivery.
* @param {string} inboundDeliveryNumber The number the inbound delivery should be referred by. \\ This number is user defined, must be unique and has a maximum length (check maxLength field). \\ Please ensure that it does not contain any of the following character sequences: \'/\', \'%2F\', \'%2f\', \'?\', \'%3F\', \'%3f\', \'#\', \'%23\', \'&\', \'%26\'. \\ Using any of these will result in the route not being handled correctly.
* @param {NewInboundDelivery} newInboundDelivery
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postInboundDelivery: (inboundDeliveryNumber, newInboundDelivery, shopCode, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'inboundDeliveryNumber' is not null or undefined
(0, common_1.assertParamExists)('postInboundDelivery', 'inboundDeliveryNumber', inboundDeliveryNumber);
// verify required parameter 'newInboundDelivery' is not null or undefined
(0, common_1.assertParamExists)('postInboundDelivery', 'newInboundDelivery', newInboundDelivery);
const localVarPath = `/inbound-delivery/{inboundDeliveryNumber}`
.replace(`{${"inboundDeliveryNumber"}}`, encodeURIComponent(String(inboundDeliveryNumber)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication oAuthAuthorization required
// oauth required
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oAuthAuthorization", [], configuration);
// authentication bearerAuth required
// http bearer authentication required
yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
if (shopCode !== undefined) {
localVarQueryParameter['shopCode'] = shopCode;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(newInboundDelivery, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
exports.InboundDeliveryApiAxiosParamCreator = InboundDeliveryApiAxiosParamCreator;
/**
* InboundDeliveryApi - functional programming interface
* @export
*/
const InboundDeliveryApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.InboundDeliveryApiAxiosParamCreator)(configuration);
return {
/**
* Cancel a inbound delivery referenced by the given inboundDeliveryNumber. \\ An inboundDeliveryNumber from a canceled inbound delivery cannot be used for a new inbound delivery, because they must always be unique.
* @summary Cancel a inbound delivery.
* @param {string} inboundDeliveryNumber The number the inbound delivery should be referred by. \\ This number is user defined, must be unique and has a maximum length (check maxLength field).
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelInboundDelivery(inboundDeliveryNumber, shopCode, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelInboundDelivery(inboundDeliveryNumber, shopCode, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Get an inbound delivery by inbound delivery number.
* @summary Get an inbound delivery by inbound delivery number.
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDelivery(inboundDeliveryNumber, shopCode, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInboundDelivery(inboundDeliveryNumber, shopCode, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain.
* @summary Get a spreadsheet template for performing POST queries to the respective endpoint.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryBulkImportTemplate(options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInboundDeliveryBulkImportTemplate(options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Get a list of inbound deliveries.
* @summary Get a list of inbound deliveries.
* @param {number} [page] The page to read. Default is the first page.
* @param {number} [pageSize] The maximum size per page is 100. Default is 100.
* @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance.
* @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - expectedDeliveryDate The default sort order is expectedDeliveryDate:desc.
* @param {string} [filterStatus] Status of the inbound delivery (optional). The status for not yet completed is subject to change. you may poll for changes. - open: The inbound delivery has not yet been delivered. - in_progress: The inbound delivery is being processed in our warehouse. - completed: The inbound delivery has been processed in our warehouse. - deleted: The inbound delivery has been deleted.
* @param {string} [filterShopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {string} [filterExpectedDeliveryDateFrom] The start date (inclusive) in format Y-m-d for which inbound deliveries should be returned (regarding the expected delivery date).
* @param {string} [filterExpectedDeliveryDateTo] The end date (inclusive) in format Y-m-d for which inbound deliveries should be returned (regarding the expected delivery date).
* @param {string} [filterSearch] filter for inbound delivery search. Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is enabled for the fields inboundDeliveryName and inboundDeliveryNumber. - Each search term filters the response for inbound deliveries where at least one of the fields contains the search term. - For example, filter[search]=\'term1 term2\' will filter the result for products where \'term1\' is found in any field and \'term2\' is also found in any field. If only \'term1\' or \'term2\' is found in the fields, the product is not included in the results.
* @param {string} [filterCreateDateFrom] The start date (inclusive) in ISO 8601 format for which inbound deliveries should be returned (regarding the creation date).
* @param {string} [filterCreateDateTo] The end date (inclusive) in ISO 8601 format for which inbound deliveries should be returned (regarding the creation date).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryCollection(page, pageSize, paginationMode, sortBy, filterStatus, filterShopCode, filterExpectedDeliveryDateFrom, filterExpectedDeliveryDateTo, filterSearch, filterCreateDateFrom, filterCreateDateTo, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInboundDeliveryCollection(page, pageSize, paginationMode, sortBy, filterStatus, filterShopCode, filterExpectedDeliveryDateFrom, filterExpectedDeliveryDateTo, filterSearch, filterCreateDateFrom, filterCreateDateTo, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Allows to download a document associated with the given inbound delivery.
* @summary Download inbound delivery related documents
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {'supplierDeliveryLabel' | 'details'} documentCode The document type to download. The file format is determined by the Accept request header. Note: only a limited amount of document type to file format combinations are available: - supplierDeliveryLabel: the label to put on the inbound delivery for warehouse processing. Accept header: application/pdf - details: a spreadsheet containing details about the inbound delivery. Accept header: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryDocument(inboundDeliveryNumber, documentCode, shopCode, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInboundDeliveryDocument(inboundDeliveryNumber, documentCode, shopCode, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Import one or more new inbound deliveries. The file type is controlled by the content type attribute of the uploaded file
* @summary Import one or more new inbound deliveries.
* @param {File} file File to upload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
inboundDeliveryBulkImport(file, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.inboundDeliveryBulkImport(file, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Patch the inbound delivery specified by the given inbound delivery number. \\ Only inbound deliveries where booking-in has not yet started can be edited. \\ All fields in the request body are optional. Only provided fields will be updated. Product changes: - To update a product\'s announced count: include the product with the new announcedCount. - To remove a product: include the product with announcedCount set to 0. - To add a new product: include a product that is not yet part of the delivery with a positive announcedCount. - Products not listed in the products array remain unchanged.
* @summary Patch an inbound delivery.
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {PatchInboundDelivery} patchInboundDelivery
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchInboundDelivery(inboundDeliveryNumber, patchInboundDelivery, shopCode, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.patchInboundDelivery(inboundDeliveryNumber, patchInboundDelivery, shopCode, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Add a new inbound delivery referenced by the given deliveryNumber.
* @summary Add a new inbound delivery.
* @param {string} inboundDeliveryNumber The number the inbound delivery should be referred by. \\ This number is user defined, must be unique and has a maximum length (check maxLength field). \\ Please ensure that it does not contain any of the following character sequences: \'/\', \'%2F\', \'%2f\', \'?\', \'%3F\', \'%3f\', \'#\', \'%23\', \'&\', \'%26\'. \\ Using any of these will result in the route not being handled correctly.
* @param {NewInboundDelivery} newInboundDelivery
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
postInboundDelivery(inboundDeliveryNumber, newInboundDelivery, shopCode, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.postInboundDelivery(inboundDeliveryNumber, newInboundDelivery, shopCode, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
};
};
exports.InboundDeliveryApiFp = InboundDeliveryApiFp;
/**
* InboundDeliveryApi - factory interface
* @export
*/
const InboundDeliveryApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.InboundDeliveryApiFp)(configuration);
return {
/**
* Cancel a inbound delivery referenced by the given inboundDeliveryNumber. \\ An inboundDeliveryNumber from a canceled inbound delivery cannot be used for a new inbound delivery, because they must always be unique.
* @summary Cancel a inbound delivery.
* @param {string} inboundDeliveryNumber The number the inbound delivery should be referred by. \\ This number is user defined, must be unique and has a maximum length (check maxLength field).
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
cancelInboundDelivery(inboundDeliveryNumber, shopCode, options) {
return localVarFp.cancelInboundDelivery(inboundDeliveryNumber, shopCode, options).then((request) => request(axios, basePath));
},
/**
* Get an inbound delivery by inbound delivery number.
* @summary Get an inbound delivery by inbound delivery number.
* @param {string} inboundDeliveryNumber The inbound delivery number as defined during the creation of the inbound delivery.
* @param {string} [shopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDelivery(inboundDeliveryNumber, shopCode, options) {
return localVarFp.getInboundDelivery(inboundDeliveryNumber, shopCode, options).then((request) => request(axios, basePath));
},
/**
* Get a spreadsheet template for performing POST queries to the respective endpoint. The file type is controlled by the accept header. The fill-in help in the second line can be removed or remain.
* @summary Get a spreadsheet template for performing POST queries to the respective endpoint.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryBulkImportTemplate(options) {
return localVarFp.getInboundDeliveryBulkImportTemplate(options).then((request) => request(axios, basePath));
},
/**
* Get a list of inbound deliveries.
* @summary Get a list of inbound deliveries.
* @param {number} [page] The page to read. Default is the first page.
* @param {number} [pageSize] The maximum size per page is 100. Default is 100.
* @param {'default' | 'totalCount'} [paginationMode] The paginationMode to use: - default: The total number of items in the collection will not be calculated. - totalCount: The total number of items in the collection will be calculated. This can mean loss of performance.
* @param {string} [sortBy] Sort the results by one or more comma-separated sort criteria, with the criterion specified first having priority. Available sort orders: - asc: ascending order - desc: descending order Available fields for sorting: - expectedDeliveryDate The default sort order is expectedDeliveryDate:desc.
* @param {string} [filterStatus] Status of the inbound delivery (optional). The status for not yet completed is subject to change. you may poll for changes. - open: The inbound delivery has not yet been delivered. - in_progress: The inbound delivery is being processed in our warehouse. - completed: The inbound delivery has been processed in our warehouse. - deleted: The inbound delivery has been deleted.
* @param {string} [filterShopCode] The shopCode used internally to distinguish between clients. \\ _This code is optional, if your identity is assigned to only one shop. Otherwise the response would be a 422 HTTP Error._
* @param {string} [filterExpectedDeliveryDateFrom] The start date (inclusive) in format Y-m-d for which inbound deliveries should be returned (regarding the expected delivery date).
* @param {string} [filterExpectedDeliveryDateTo] The end date (inclusive) in format Y-m-d for which inbound deliveries should be returned (regarding the expected delivery date).
* @param {string} [filterSearch] filter for inbound delivery search. Usage: - Provide one or multiple search terms (min. 2 characters) to filter results. - Multiple search terms are separated by spaces. - The search is not case sensitive. - The search is enabled for the fields inboundDeliveryName and inboundDeliveryNumber. - Each search term filters the response for inbound deliveries where at least one of the fields contains the search term. - For example, filter[search]=\'term1 term2\' will filter the result for products where \'term1\' is found in any field and \'term2\' is also found in any field. If only \'term1\' or \'term2\' is found in the fields, the product is not included in the results.
* @param {string} [filterCreateDateFrom] The start date (inclusive) in ISO 8601 format for which inbound deliveries should be returned (regarding the creation date).
* @param {string} [filterCreateDateTo] The end date (inclusive) in ISO 8601 format for which inbound deliveries should be returned (regarding the creation date).
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInboundDeliveryCollection(page, pageSize, paginationMode, sortBy, filterStatus, filterShopCode, filterExpectedDeliveryDateFrom, filterExpectedDeliveryDateTo, filterSearch, filterCreateDateFrom, filterCreateDateTo, options) {
return localVarFp.getInboundDeliveryCollection(page, pageSize, paginationMode, sortBy, filterStatus, filterShopCode, filterExpectedDeliveryDateFrom, filterExpectedDeliveryDateTo, filterSearch, filterCreateDateFrom, filterCreateDateTo, options).then((request) => request(axios, basePath));
},
/**
* Allows to download a document associated with the given inbound delivery.
* @summary Download inbound de