UNPKG

@whitebox-co/walmart-marketplace-api

Version:

A fully typed TypeScript, Javascript, and Node.js API library for the Walmart Marketplace API

717 lines 136 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Rules Management * Rules Management * * 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.RulesApi = exports.RulesApiFactory = exports.RulesApiFp = exports.RulesApiAxiosParamCreator = 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"); /** * RulesApi - axios parameter creator * @export */ const RulesApiAxiosParamCreator = function (configuration) { return { /** * This API is used to activate a rule for a specific ruleId and ruleStatus. Only Rules which are in submitted and inactive state can be activated. * @summary Activate rule * @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 {InlineObject3} inlineObject3 * @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} */ activateRule: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject3, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('activateRule', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('activateRule', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('activateRule', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('activateRule', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject3' is not null or undefined (0, common_1.assertParamExists)('activateRule', 'inlineObject3', inlineObject3); const localVarPath = `/v3/rules/activate`; // 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)(inlineObject3, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This API helps you enable or disable the two-day assortment type. * @summary Change assortment type * @param {boolean} enable * @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 {object} body * @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} */ changeAssortmentType: async (enable, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, body, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'enable' is not null or undefined (0, common_1.assertParamExists)('changeAssortmentType', 'enable', enable); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('changeAssortmentType', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('changeAssortmentType', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('changeAssortmentType', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('changeAssortmentType', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'body' is not null or undefined (0, common_1.assertParamExists)('changeAssortmentType', 'body', body); const localVarPath = `/v3/rules/assortment`; // 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 (enable !== undefined) { localVarQueryParameter['enable'] = enable; } 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)(body, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This API is used to create a rule by selecting any combination of conditions for Sub-category, Price and Weight. * @summary Create a new Rule * @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 {InlineObject6} inlineObject6 * @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} */ createItemRule: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject6, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('createItemRule', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('createItemRule', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('createItemRule', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('createItemRule', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject6' is not null or undefined (0, common_1.assertParamExists)('createItemRule', 'inlineObject6', inlineObject6); const localVarPath = `/v3/rules/create`; // 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 = {}; // 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)(inlineObject6, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This API is used if any SKU is required to be removed from Two-day delivery settings * @summary Create override exceptions * @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 {InlineObject2} inlineObject2 * @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} */ createOverrideExceptions: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject2, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('createOverrideExceptions', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('createOverrideExceptions', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('createOverrideExceptions', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('createOverrideExceptions', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject2' is not null or undefined (0, common_1.assertParamExists)('createOverrideExceptions', 'inlineObject2', inlineObject2); const localVarPath = `/v3/rules/exceptions`; // 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 = {}; // 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)(inlineObject2, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * This API is used to bring back any SKU to Two-day Delivery settings. * @summary Delete exceptions * @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} */ deleteExceptions: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject1, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('deleteExceptions', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('deleteExceptions', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('deleteExceptions', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('deleteExceptions', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject1' is not null or undefined (0, common_1.assertParamExists)('deleteExceptions', 'inlineObject1', inlineObject1); const localVarPath = `/v3/rules/exceptions`; // 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, }; }, /** * This API is used to delete a rule for a specific ruleId and ruleStatus * @summary Delete rule * @param {string} ruleId Unique identifier of the rule created for custom rule assortment. * @param {string} ruleStatus Status of the rule post the rule creation. Allowed values are Active, Inactive, Submitted. * @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} [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} */ deleteRule: async (ruleId, ruleStatus, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'ruleId' is not null or undefined (0, common_1.assertParamExists)('deleteRule', 'ruleId', ruleId); // verify required parameter 'ruleStatus' is not null or undefined (0, common_1.assertParamExists)('deleteRule', 'ruleStatus', ruleStatus); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('deleteRule', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('deleteRule', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('deleteRule', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('deleteRule', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/rules/{ruleId}/status/{ruleStatus}/` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))) .replace(`{${"ruleStatus"}}`, encodeURIComponent(String(ruleStatus))); // 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: 'DELETE', ...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); } (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 list of the items defined using \"Create Override Exceptions\". * @summary Download exceptions * @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} [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} */ downloadExceptions: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('downloadExceptions', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('downloadExceptions', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('downloadExceptions', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('downloadExceptions', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/rules/downloadexceptions`; // 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 (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 download the count of items shortlisted for two-day shipping for a specific rule defined by ruleId and ruleStatus * @summary Download simulation result * @param {string} ruleId Unique identifier of the rule created for custom rule assortment. * @param {string} ruleStatus Status of the rule post the rule creation. Allowed values are Active, Inactive, Submitted. * @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} [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} */ downloadSimulationResult: async (ruleId, ruleStatus, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'ruleId' is not null or undefined (0, common_1.assertParamExists)('downloadSimulationResult', 'ruleId', ruleId); // verify required parameter 'ruleStatus' is not null or undefined (0, common_1.assertParamExists)('downloadSimulationResult', 'ruleStatus', ruleStatus); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('downloadSimulationResult', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('downloadSimulationResult', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('downloadSimulationResult', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('downloadSimulationResult', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/rules/{ruleId}/status/{ruleStatus}/simulation` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))) .replace(`{${"ruleStatus"}}`, encodeURIComponent(String(ruleStatus))); // 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 (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, }; }, /** * Retrieves a rule detail for a specific ruleId and ruleStatus. * @summary Get a rule * @param {string} ruleId Unique identifier of the rule created for custom rule assortment. * @param {string} ruleStatus Status of the rule post the rule creation. Allowed values are Active, Inactive, Submitted. * @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} [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} */ getARule: async (ruleId, ruleStatus, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'ruleId' is not null or undefined (0, common_1.assertParamExists)('getARule', 'ruleId', ruleId); // verify required parameter 'ruleStatus' is not null or undefined (0, common_1.assertParamExists)('getARule', 'ruleStatus', ruleStatus); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getARule', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getARule', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getARule', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getARule', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/rules/{ruleId}/status/{ruleStatus}` .replace(`{${"ruleId"}}`, encodeURIComponent(String(ruleId))) .replace(`{${"ruleStatus"}}`, encodeURIComponent(String(ruleStatus))); // 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 (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 provides you the list of states on which you can provide two-day shipping of an item. * @summary Get all areas * @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} [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} */ getAllAreas: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getAllAreas', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getAllAreas', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getAllAreas', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getAllAreas', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/rules/areas`; // 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 (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 retrieves all the items which has been defined as exceptions using \"Create Override Exception\" API. * @summary Gets all exceptions * @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} [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} */ getAllExceptions: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getAllExceptions', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getAllExceptions', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getAllExceptions', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getAllExceptions', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/rules/exceptions`; // 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 (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 retrieves the details of all the rules defined using \"create an Item rule\" API. * @summary Get all rules * @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} [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} */ getAllRules: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getAllRules', 'authorization', authorization); // verify required parameter