@whitebox-co/walmart-marketplace-api
Version:
A fully typed TypeScript, Javascript, and Node.js API library for the Walmart Marketplace API
677 lines • 80.9 kB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* Inventory Management
* Maintaining up-to-date inventory for your items on Walmart.com ensures a great experience for your customers and greater sales opportunities for you.
*
* The version of the OpenAPI document: 1.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.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.InventoryApi = exports.InventoryApiFactory = exports.InventoryApiFp = exports.InventoryApiAxiosParamCreator = exports.SupplyQuantityUnitEnum = exports.ReservedQtyUnitEnum = exports.ModelErrorCategoryEnum = exports.ModelErrorSeverityEnum = exports.InputQtyUnitEnum = exports.InlineResponse200QuantityUnitEnum = exports.InlineResponse2001InputQtyUnitEnum = exports.InlineResponse2001ErrorsCategoryEnum = exports.InlineResponse2001ErrorsSeverityEnum = exports.InlineResponse2001AvailToSellQtyUnitEnum = exports.AvailToSellQtyUnitEnum = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("./common");
// @ts-ignore
const base_1 = require("./base");
/**
* @export
* @enum {string}
*/
var AvailToSellQtyUnitEnum;
(function (AvailToSellQtyUnitEnum) {
AvailToSellQtyUnitEnum["Each"] = "EACH";
})(AvailToSellQtyUnitEnum = exports.AvailToSellQtyUnitEnum || (exports.AvailToSellQtyUnitEnum = {}));
/**
* @export
* @enum {string}
*/
var InlineResponse2001AvailToSellQtyUnitEnum;
(function (InlineResponse2001AvailToSellQtyUnitEnum) {
InlineResponse2001AvailToSellQtyUnitEnum["Each"] = "EACH";
})(InlineResponse2001AvailToSellQtyUnitEnum = exports.InlineResponse2001AvailToSellQtyUnitEnum || (exports.InlineResponse2001AvailToSellQtyUnitEnum = {}));
/**
* @export
* @enum {string}
*/
var InlineResponse2001ErrorsSeverityEnum;
(function (InlineResponse2001ErrorsSeverityEnum) {
InlineResponse2001ErrorsSeverityEnum["Info"] = "INFO";
InlineResponse2001ErrorsSeverityEnum["Warn"] = "WARN";
InlineResponse2001ErrorsSeverityEnum["Error"] = "ERROR";
})(InlineResponse2001ErrorsSeverityEnum = exports.InlineResponse2001ErrorsSeverityEnum || (exports.InlineResponse2001ErrorsSeverityEnum = {}));
/**
* @export
* @enum {string}
*/
var InlineResponse2001ErrorsCategoryEnum;
(function (InlineResponse2001ErrorsCategoryEnum) {
InlineResponse2001ErrorsCategoryEnum["Application"] = "APPLICATION";
InlineResponse2001ErrorsCategoryEnum["System"] = "SYSTEM";
InlineResponse2001ErrorsCategoryEnum["Request"] = "REQUEST";
InlineResponse2001ErrorsCategoryEnum["Data"] = "DATA";
})(InlineResponse2001ErrorsCategoryEnum = exports.InlineResponse2001ErrorsCategoryEnum || (exports.InlineResponse2001ErrorsCategoryEnum = {}));
/**
* @export
* @enum {string}
*/
var InlineResponse2001InputQtyUnitEnum;
(function (InlineResponse2001InputQtyUnitEnum) {
InlineResponse2001InputQtyUnitEnum["Each"] = "EACH";
})(InlineResponse2001InputQtyUnitEnum = exports.InlineResponse2001InputQtyUnitEnum || (exports.InlineResponse2001InputQtyUnitEnum = {}));
/**
* @export
* @enum {string}
*/
var InlineResponse200QuantityUnitEnum;
(function (InlineResponse200QuantityUnitEnum) {
InlineResponse200QuantityUnitEnum["Each"] = "EACH";
})(InlineResponse200QuantityUnitEnum = exports.InlineResponse200QuantityUnitEnum || (exports.InlineResponse200QuantityUnitEnum = {}));
/**
* @export
* @enum {string}
*/
var InputQtyUnitEnum;
(function (InputQtyUnitEnum) {
InputQtyUnitEnum["Each"] = "EACH";
})(InputQtyUnitEnum = exports.InputQtyUnitEnum || (exports.InputQtyUnitEnum = {}));
/**
* @export
* @enum {string}
*/
var ModelErrorSeverityEnum;
(function (ModelErrorSeverityEnum) {
ModelErrorSeverityEnum["Info"] = "INFO";
ModelErrorSeverityEnum["Warn"] = "WARN";
ModelErrorSeverityEnum["Error"] = "ERROR";
})(ModelErrorSeverityEnum = exports.ModelErrorSeverityEnum || (exports.ModelErrorSeverityEnum = {}));
/**
* @export
* @enum {string}
*/
var ModelErrorCategoryEnum;
(function (ModelErrorCategoryEnum) {
ModelErrorCategoryEnum["Application"] = "APPLICATION";
ModelErrorCategoryEnum["System"] = "SYSTEM";
ModelErrorCategoryEnum["Request"] = "REQUEST";
ModelErrorCategoryEnum["Data"] = "DATA";
})(ModelErrorCategoryEnum = exports.ModelErrorCategoryEnum || (exports.ModelErrorCategoryEnum = {}));
/**
* @export
* @enum {string}
*/
var ReservedQtyUnitEnum;
(function (ReservedQtyUnitEnum) {
ReservedQtyUnitEnum["Each"] = "EACH";
})(ReservedQtyUnitEnum = exports.ReservedQtyUnitEnum || (exports.ReservedQtyUnitEnum = {}));
/**
* @export
* @enum {string}
*/
var SupplyQuantityUnitEnum;
(function (SupplyQuantityUnitEnum) {
SupplyQuantityUnitEnum["Each"] = "EACH";
})(SupplyQuantityUnitEnum = exports.SupplyQuantityUnitEnum || (exports.SupplyQuantityUnitEnum = {}));
/**
* InventoryApi - axios parameter creator
* @export
*/
const InventoryApiAxiosParamCreator = function (configuration) {
return {
/**
* You can use this API to get the inventory for a given item.
* @summary Inventory
* @param {string} sku An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’, \'{\', \'}\' as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [shipNode] The shipNode for which the inventory is requested
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getInventory: async (sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, shipNode, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('getInventory', 'sku', sku);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('getInventory', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('getInventory', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('getInventory', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('getInventory', 'wMSVCNAME', wMSVCNAME);
const localVarPath = `/v3/inventory`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (sku !== undefined) {
localVarQueryParameter['sku'] = sku;
}
if (shipNode !== undefined) {
localVarQueryParameter['shipNode'] = shipNode;
}
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* This API will retrieve the inventory count for all of a seller\'s items across all ship nodes by item to ship node mapping. Inventory can be zero or non-zero. Please note that NextCursor value changes and it needs to be passed on from the previous call to next call.
* @summary Multiple Item Inventory for All Ship Nodes
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [limit] The number of items returned. Cannot be more than 50.
* @param {string} [nextCursor] String returned from initial API call to indicate pagination. Specify nextCursor value to retrieve the next 50 items.
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMultiNodeInventoryForAllSkuAndAllShipNodes: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, limit, nextCursor, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForAllSkuAndAllShipNodes', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForAllSkuAndAllShipNodes', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForAllSkuAndAllShipNodes', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForAllSkuAndAllShipNodes', 'wMSVCNAME', wMSVCNAME);
const localVarPath = `/v3/inventories`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (nextCursor !== undefined) {
localVarQueryParameter['nextCursor'] = nextCursor;
}
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* This API will retrieve the inventory count for an item across all ship nodes or one specific ship node. You can specify the ship node for which you want to fetch the inventory
* @summary Single Item Inventory by Ship Node
* @param {string} sku An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’ as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [shipNode] ShipNode Id of the ship node for which the inventory is requested
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getMultiNodeInventoryForSkuAndAllShipnodes: async (sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, shipNode, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForSkuAndAllShipnodes', 'sku', sku);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForSkuAndAllShipnodes', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForSkuAndAllShipnodes', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForSkuAndAllShipnodes', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('getMultiNodeInventoryForSkuAndAllShipnodes', 'wMSVCNAME', wMSVCNAME);
const localVarPath = `/v3/inventories/{sku}`
.replace(`{${"sku"}}`, encodeURIComponent(String(sku)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (shipNode !== undefined) {
localVarQueryParameter['shipNode'] = shipNode;
}
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* You can use this API to get the current Available to Sell inventory quantities for all WFS items in your catalog. You can also query specific SKUs or filter to only items updated after a specific date in order to reduce the response size.
* @summary WFS Inventory
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [sku] An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’ as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} [fromModifiedDate] last inventory modified date - starting range.
* @param {string} [toModifiedDate] last inventory modified date - starting range.
* @param {string} [limit] Number of Sku to be returned. Cannot be larger than 300.
* @param {string} [offset] Offset is the number of records you wish to skip before selecting records.
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getWFSInventory: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, sku, fromModifiedDate, toModifiedDate, limit, offset, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('getWFSInventory', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('getWFSInventory', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('getWFSInventory', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('getWFSInventory', 'wMSVCNAME', wMSVCNAME);
const localVarPath = `/v3/fulfillment/inventory`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (sku !== undefined) {
localVarQueryParameter['sku'] = sku;
}
if (fromModifiedDate !== undefined) {
localVarQueryParameter['fromModifiedDate'] = fromModifiedDate;
}
if (toModifiedDate !== undefined) {
localVarQueryParameter['toModifiedDate'] = toModifiedDate;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (offset !== undefined) {
localVarQueryParameter['offset'] = offset;
}
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Updates inventory for items in bulk. Seller Can either use feed type \"inventory\" or \"MP_INVENTORY\" * Inventory spec 1.4 feed type: inventory * Inventory spec 1.5 feed type: MP_INVENTORY Please Note: Multi Node Inventory Update Feed (feedType=MP_INVENTORY) only supports JSON Request and Responses. Refer to \"MultiNode_Bulk_Inventory_Update_Request.json\" for the corresponding request sample Refer to the <a href=\"https://developer.walmart.com/doc/us/us-mp/us-mp-inventory/\">guide section</a> for more detailed guide around each of the feed types Refer to the throttling limits before uploading the Feed Files.
* @summary Bulk Item Inventory Update
* @param {'inventory' | 'MP_INVENTORY'} feedType The feed Type
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {any} file Feed file to upload
* @param {string} [shipNode] The shipNode for which the inventory is to be updated. Not required in case of Multi Node Inventory Update Feed (feedType=MP_INVENTORY)
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateBulkInventory: async (feedType, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, file, shipNode, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'feedType' is not null or undefined
(0, common_1.assertParamExists)('updateBulkInventory', 'feedType', feedType);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('updateBulkInventory', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('updateBulkInventory', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('updateBulkInventory', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('updateBulkInventory', 'wMSVCNAME', wMSVCNAME);
// verify required parameter 'file' is not null or undefined
(0, common_1.assertParamExists)('updateBulkInventory', 'file', file);
const localVarPath = `/v3/feeds`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (feedType !== undefined) {
localVarQueryParameter['feedType'] = feedType;
}
if (shipNode !== undefined) {
localVarQueryParameter['shipNode'] = shipNode;
}
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
if (file !== undefined) {
localVarFormParams.append('file', file);
}
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = localVarFormParams;
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Updates the inventory for a given item.
* @summary Update inventory
* @param {string} sku An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’, \'{\', \'}\' as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {InlineObject} inlineObject
* @param {string} [shipNode] The shipNode for which the inventory is to be updated.
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateInventoryForAnItem: async (sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, shipNode, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('updateInventoryForAnItem', 'sku', sku);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('updateInventoryForAnItem', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('updateInventoryForAnItem', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('updateInventoryForAnItem', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('updateInventoryForAnItem', 'wMSVCNAME', wMSVCNAME);
// verify required parameter 'inlineObject' is not null or undefined
(0, common_1.assertParamExists)('updateInventoryForAnItem', 'inlineObject', inlineObject);
const localVarPath = `/v3/inventory`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (sku !== undefined) {
localVarQueryParameter['sku'] = sku;
}
if (shipNode !== undefined) {
localVarQueryParameter['shipNode'] = shipNode;
}
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
localVarHeaderParameter['Content-Type'] = 'application/xml';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(inlineObject, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* This API will update the inventory for an item across one or more fulfillment centers, known as ship nodes.
* @summary Update Item Inventory per Ship Node
* @param {string} sku An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’ as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {InlineObject1} inlineObject1
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateMultiNodeInventory: async (sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject1, wMCONSUMERCHANNELTYPE, options = {}) => {
// verify required parameter 'sku' is not null or undefined
(0, common_1.assertParamExists)('updateMultiNodeInventory', 'sku', sku);
// verify required parameter 'authorization' is not null or undefined
(0, common_1.assertParamExists)('updateMultiNodeInventory', 'authorization', authorization);
// verify required parameter 'wMSECACCESSTOKEN' is not null or undefined
(0, common_1.assertParamExists)('updateMultiNodeInventory', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN);
// verify required parameter 'wMQOSCORRELATIONID' is not null or undefined
(0, common_1.assertParamExists)('updateMultiNodeInventory', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID);
// verify required parameter 'wMSVCNAME' is not null or undefined
(0, common_1.assertParamExists)('updateMultiNodeInventory', 'wMSVCNAME', wMSVCNAME);
// verify required parameter 'inlineObject1' is not null or undefined
(0, common_1.assertParamExists)('updateMultiNodeInventory', 'inlineObject1', inlineObject1);
const localVarPath = `/v3/inventories/{sku}`
.replace(`{${"sku"}}`, encodeURIComponent(String(sku)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicScheme required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (authorization !== undefined && authorization !== null) {
localVarHeaderParameter['Authorization'] = String(authorization);
}
if (wMSECACCESSTOKEN !== undefined && wMSECACCESSTOKEN !== null) {
localVarHeaderParameter['WM_SEC.ACCESS_TOKEN'] = String(wMSECACCESSTOKEN);
}
if (wMCONSUMERCHANNELTYPE !== undefined && wMCONSUMERCHANNELTYPE !== null) {
localVarHeaderParameter['WM_CONSUMER.CHANNEL.TYPE'] = String(wMCONSUMERCHANNELTYPE);
}
if (wMQOSCORRELATIONID !== undefined && wMQOSCORRELATIONID !== null) {
localVarHeaderParameter['WM_QOS.CORRELATION_ID'] = String(wMQOSCORRELATIONID);
}
if (wMSVCNAME !== undefined && wMSVCNAME !== null) {
localVarHeaderParameter['WM_SVC.NAME'] = String(wMSVCNAME);
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(inlineObject1, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.InventoryApiAxiosParamCreator = InventoryApiAxiosParamCreator;
/**
* InventoryApi - functional programming interface
* @export
*/
const InventoryApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.InventoryApiAxiosParamCreator)(configuration);
return {
/**
* You can use this API to get the inventory for a given item.
* @summary Inventory
* @param {string} sku An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’, \'{\', \'}\' as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [shipNode] The shipNode for which the inventory is requested
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getInventory(sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, shipNode, wMCONSUMERCHANNELTYPE, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getInventory(sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, shipNode, wMCONSUMERCHANNELTYPE, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* This API will retrieve the inventory count for all of a seller\'s items across all ship nodes by item to ship node mapping. Inventory can be zero or non-zero. Please note that NextCursor value changes and it needs to be passed on from the previous call to next call.
* @summary Multiple Item Inventory for All Ship Nodes
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [limit] The number of items returned. Cannot be more than 50.
* @param {string} [nextCursor] String returned from initial API call to indicate pagination. Specify nextCursor value to retrieve the next 50 items.
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getMultiNodeInventoryForAllSkuAndAllShipNodes(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, limit, nextCursor, wMCONSUMERCHANNELTYPE, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getMultiNodeInventoryForAllSkuAndAllShipNodes(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, limit, nextCursor, wMCONSUMERCHANNELTYPE, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* This API will retrieve the inventory count for an item across all ship nodes or one specific ship node. You can specify the ship node for which you want to fetch the inventory
* @summary Single Item Inventory by Ship Node
* @param {string} sku An arbitrary alphanumeric unique ID, specified by the seller, which identifies each item. This will be used by the seller in the XSD file to refer to each item. Special characters in the sku needing encoding are: \':\', \'/\', \'?\', \'#\', \'[\', \']\', \'@\', \'!\', \'$\', \'&\', \"\'\", \'(\', \')\', \'*\', \'+\', \',\', \';\', \'=\', ‘ ’ as well as \'%\' itself if it\'s a part of sku. Make sure to encode space with %20. Other characters don\'t need to be encoded.
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELATIONID A unique ID which identifies each API call and used to track and debug issues; use a random generated GUID for this ID
* @param {string} wMSVCNAME Walmart Service Name
* @param {string} [shipNode] ShipNode Id of the ship node for which the inventory is requested
* @param {string} [wMCONSUMERCHANNELTYPE] A unique ID to track the consumer request by channel. Use the Consumer Channel Type received during onboarding
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getMultiNodeInventoryForSkuAndAllShipnodes(sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, shipNode, wMCONSUMERCHANNELTYPE, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getMultiNodeInventoryForSkuAndAllShipnodes(sku, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, shipNode, wMCONSUMERCHANNELTYPE, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
},
/**
* You can use this API to get the current Available to Sell inventory quantities for all WFS items in your catalog. You can also query specific SKUs or filter to only items updated after a specific date in order to reduce the response size.
* @summary WFS Inventory
* @param {string} authorization Basic authorization header. Base 64 encodes the Client ID and Client Secret retrieved in step two of the integration steps.
* @param {string} wMSECACCESSTOKEN The access token retrieved in the Token API call
* @param {string} wMQOSCORRELA