UNPKG

@whitebox-co/walmart-marketplace-api

Version:

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

712 lines 99.6 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Insights Management * The Insights Management API provides sellers with actionable information to optimize their listings: * Sellers can locate best-selling items with Trending Items API so they can add those to their catalog of item offerings. * Sellers can find out reasons why items go unpublished, fix the issue and republish those items. * Sellers can use Listing Quality APIs to gather listing quality metrics about their items and find out any post-production issues that they can fix. * Sellers can obtain their overall Listing Quality score, and locate any categories that show items with listing quality issues. * * 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.ListingQualityApi = exports.ListingQualityApiFactory = exports.ListingQualityApiFp = exports.ListingQualityApiAxiosParamCreator = exports.InsightApi = exports.InsightApiFactory = exports.InsightApiFp = exports.InsightApiAxiosParamCreator = exports.V3InsightsItemsListingQualityItemsQueryFieldEnum = exports.V3InsightsItemsListingQualityItemsFiltersOpEnum = exports.V3InsightsItemsListingQualityItemsFiltersFieldEnum = exports.QueryFieldEnum = exports.FilterOpEnum = exports.FilterFieldEnum = 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 FilterFieldEnum; (function (FilterFieldEnum) { FilterFieldEnum["ContentDiscoverabilityPercentage"] = "contentDiscoverabilityPercentage"; FilterFieldEnum["QualityScorePercentage"] = "qualityScorePercentage"; FilterFieldEnum["OfferPercentage"] = "offerPercentage"; FilterFieldEnum["RatingReviewsPercentage"] = "ratingReviewsPercentage"; FilterFieldEnum["ViewTrendingItems"] = "viewTrendingItems"; FilterFieldEnum["ViewPostPurchaseItems"] = "viewPostPurchaseItems"; FilterFieldEnum["WfsFlag"] = "wfsFlag"; FilterFieldEnum["CategoryName"] = "categoryName"; FilterFieldEnum["HasIssues"] = "hasIssues"; FilterFieldEnum["ProductType"] = "productType"; FilterFieldEnum["AttributeList"] = "attributeList"; FilterFieldEnum["ProductTypes"] = "productTypes"; FilterFieldEnum["BrandList"] = "brandList"; FilterFieldEnum["Oos"] = "oos"; FilterFieldEnum["FastAndFreeShipping"] = "fastAndFreeShipping"; FilterFieldEnum["PriceMeetBeatFlag"] = "priceMeetBeatFlag"; })(FilterFieldEnum = exports.FilterFieldEnum || (exports.FilterFieldEnum = {})); /** * @export * @enum {string} */ var FilterOpEnum; (function (FilterOpEnum) { FilterOpEnum["Equals"] = "equals"; FilterOpEnum["Between"] = "between"; })(FilterOpEnum = exports.FilterOpEnum || (exports.FilterOpEnum = {})); /** * @export * @enum {string} */ var QueryFieldEnum; (function (QueryFieldEnum) { QueryFieldEnum["Title"] = "title"; QueryFieldEnum["Sku"] = "sku"; QueryFieldEnum["ItemId"] = "itemId"; })(QueryFieldEnum = exports.QueryFieldEnum || (exports.QueryFieldEnum = {})); /** * @export * @enum {string} */ var V3InsightsItemsListingQualityItemsFiltersFieldEnum; (function (V3InsightsItemsListingQualityItemsFiltersFieldEnum) { V3InsightsItemsListingQualityItemsFiltersFieldEnum["ContentDiscoverabilityPercentage"] = "contentDiscoverabilityPercentage"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["QualityScorePercentage"] = "qualityScorePercentage"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["OfferPercentage"] = "offerPercentage"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["RatingReviewsPercentage"] = "ratingReviewsPercentage"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["ViewTrendingItems"] = "viewTrendingItems"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["ViewPostPurchaseItems"] = "viewPostPurchaseItems"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["WfsFlag"] = "wfsFlag"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["CategoryName"] = "categoryName"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["HasIssues"] = "hasIssues"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["ProductType"] = "productType"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["AttributeList"] = "attributeList"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["ProductTypes"] = "productTypes"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["BrandList"] = "brandList"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["Oos"] = "oos"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["FastAndFreeShipping"] = "fastAndFreeShipping"; V3InsightsItemsListingQualityItemsFiltersFieldEnum["PriceMeetBeatFlag"] = "priceMeetBeatFlag"; })(V3InsightsItemsListingQualityItemsFiltersFieldEnum = exports.V3InsightsItemsListingQualityItemsFiltersFieldEnum || (exports.V3InsightsItemsListingQualityItemsFiltersFieldEnum = {})); /** * @export * @enum {string} */ var V3InsightsItemsListingQualityItemsFiltersOpEnum; (function (V3InsightsItemsListingQualityItemsFiltersOpEnum) { V3InsightsItemsListingQualityItemsFiltersOpEnum["Equals"] = "equals"; V3InsightsItemsListingQualityItemsFiltersOpEnum["Between"] = "between"; })(V3InsightsItemsListingQualityItemsFiltersOpEnum = exports.V3InsightsItemsListingQualityItemsFiltersOpEnum || (exports.V3InsightsItemsListingQualityItemsFiltersOpEnum = {})); /** * @export * @enum {string} */ var V3InsightsItemsListingQualityItemsQueryFieldEnum; (function (V3InsightsItemsListingQualityItemsQueryFieldEnum) { V3InsightsItemsListingQualityItemsQueryFieldEnum["Title"] = "title"; V3InsightsItemsListingQualityItemsQueryFieldEnum["Sku"] = "sku"; V3InsightsItemsListingQualityItemsQueryFieldEnum["ItemId"] = "itemId"; })(V3InsightsItemsListingQualityItemsQueryFieldEnum = exports.V3InsightsItemsListingQualityItemsQueryFieldEnum || (exports.V3InsightsItemsListingQualityItemsQueryFieldEnum = {})); /** * InsightApi - axios parameter creator * @export */ const InsightApiAxiosParamCreator = function (configuration) { return { /** * Get a list of all item categories that have items with listing quality issues or brands for a seller. * @summary Item count with listing quality issues * @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 {boolean} [viewTrendingItems] Specify whether or not to include seller\'s items that are trending in the Listing Quality Score. * @param {boolean} [wfsFlag] Specify whether or not to include WFS-eligible items in the overall Listing Quality Score. * @param {number} [hasIssue] Specify whether or not to include items that have issues in the Listing Quality Score. * @param {'brand' | 'category'} [type] Specify whether to get item count by brand or category. Category is the default value when no type is specified. * @param {number} [limit] Specify number of items to return. The value is defaulted to 100 and the maximum value is 1000. * @param {number} [offset] Specify the offset of item list to be returned. * @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} */ getCategoriesList: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, viewTrendingItems, wfsFlag, hasIssue, type, limit, offset, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getCategoriesList', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getCategoriesList', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getCategoriesList', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getCategoriesList', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/insights/items/listingQuality/count`; // 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 (viewTrendingItems !== undefined) { localVarQueryParameter['viewTrendingItems'] = viewTrendingItems; } if (wfsFlag !== undefined) { localVarQueryParameter['wfsFlag'] = wfsFlag; } if (hasIssue !== undefined) { localVarQueryParameter['hasIssue'] = hasIssue; } if (type !== undefined) { localVarQueryParameter['type'] = type; } 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, }; }, /** * Get the total Listing Quality Score for a seller\'s entire item catalog. * @summary Seller Listing Quality Score * @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 {boolean} [viewTrendingItems] Specify whether or not to include seller\'s items that are trending in the Listing Quality Score. * @param {string} [wfsFlag] Specify whether or not to include WFS-eligible items in the overall Listing Quality Score. * @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} */ getListingQualityScore: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, viewTrendingItems, wfsFlag, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getListingQualityScore', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getListingQualityScore', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getListingQualityScore', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getListingQualityScore', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/insights/items/listingQuality/score`; // 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 (viewTrendingItems !== undefined) { localVarQueryParameter['viewTrendingItems'] = viewTrendingItems; } if (wfsFlag !== undefined) { localVarQueryParameter['wfsFlag'] = wfsFlag; } 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, }; }, /** * The Pro Seller badge status will provide you with information regarding your current badge status as well as the progress you\'ve made in meeting the criteria. * @summary Pro Seller Badge Status * @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} */ getProSellerBadgeInfo: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getProSellerBadgeInfo', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getProSellerBadgeInfo', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getProSellerBadgeInfo', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getProSellerBadgeInfo', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/insights/prosellerbadge`; // 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, }; }, /** * Get Trending Item List * @summary Top Trending Items * @param {string} departmentId departmentId * @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} [categoryId] categoryId * @param {string} [limit] The number of items to be returned. * @param {string} [offset] The object response to start with, where 0 is the first entity that can be requested. * @param {string} [timeFrame] Returns all trending items for the given time frame in days * @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} */ getTrendingResult: async (departmentId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, categoryId, limit, offset, timeFrame, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'departmentId' is not null or undefined (0, common_1.assertParamExists)('getTrendingResult', 'departmentId', departmentId); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getTrendingResult', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getTrendingResult', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getTrendingResult', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getTrendingResult', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/insights/items/trending`; // 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 (departmentId !== undefined) { localVarQueryParameter['departmentId'] = departmentId; } if (categoryId !== undefined) { localVarQueryParameter['categoryId'] = categoryId; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } if (timeFrame !== undefined) { localVarQueryParameter['timeFrame'] = timeFrame; } 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, }; }, /** * Get Count for Unpubished Item * @summary Unpublished Item Counts * @param {string} fromDate Returns all unpublished items count with reason codes since the given date * @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} */ getUnpublishedItemCount: async (fromDate, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'fromDate' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItemCount', 'fromDate', fromDate); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItemCount', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItemCount', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItemCount', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItemCount', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/insights/items/unpublished/counts`; // 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 (fromDate !== undefined) { localVarQueryParameter['fromDate'] = fromDate; } 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, }; }, /** * Get Unpublished Items * @summary Unpublished Items * @param {string} fromDate Returns all unpublished items since the given date * @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} [unpublishedReasonCode] Unpublished reason code * @param {string} [limit] The number of items to be returned. * @param {string} [offerLifecycleStatus] The lifecycle status of an item describes where the item listing is in the overall lifecycle. Examples of allowed values are ACTIVE , ARCHIVED, RETIRED. * @param {string} [marketTrending] Filter the item list to return only items that are trending on Walmart.com * @param {string} [itemsWithInventory] Filter the item list to return only items that have 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} */ getUnpublishedItems: async (fromDate, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, unpublishedReasonCode, limit, offerLifecycleStatus, marketTrending, itemsWithInventory, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'fromDate' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItems', 'fromDate', fromDate); // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItems', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItems', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItems', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('getUnpublishedItems', 'wMSVCNAME', wMSVCNAME); const localVarPath = `/v3/insights/items/unpublished/items`; // 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 (unpublishedReasonCode !== undefined) { localVarQueryParameter['unpublishedReasonCode'] = unpublishedReasonCode; } if (fromDate !== undefined) { localVarQueryParameter['fromDate'] = fromDate; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offerLifecycleStatus !== undefined) { localVarQueryParameter['offerLifecycleStatus'] = offerLifecycleStatus; } if (marketTrending !== undefined) { localVarQueryParameter['marketTrending'] = marketTrending; } if (itemsWithInventory !== undefined) { localVarQueryParameter['itemsWithInventory'] = itemsWithInventory; } 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, }; }, /** * Get each item\'s listing quality details including: item quality score, offer score, content score and issues, and item performance. * @summary Item Listing Quality Details * @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} [limit] Specify number of items to return. If no limit is specified, API returns 200 items by default. * @param {string} [nextCursor] Specify pagination for long list of 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} */ itemsDetailsForListing: async (authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, inlineObject, limit, nextCursor, wMCONSUMERCHANNELTYPE, options = {}) => { // verify required parameter 'authorization' is not null or undefined (0, common_1.assertParamExists)('itemsDetailsForListing', 'authorization', authorization); // verify required parameter 'wMSECACCESSTOKEN' is not null or undefined (0, common_1.assertParamExists)('itemsDetailsForListing', 'wMSECACCESSTOKEN', wMSECACCESSTOKEN); // verify required parameter 'wMQOSCORRELATIONID' is not null or undefined (0, common_1.assertParamExists)('itemsDetailsForListing', 'wMQOSCORRELATIONID', wMQOSCORRELATIONID); // verify required parameter 'wMSVCNAME' is not null or undefined (0, common_1.assertParamExists)('itemsDetailsForListing', 'wMSVCNAME', wMSVCNAME); // verify required parameter 'inlineObject' is not null or undefined (0, common_1.assertParamExists)('itemsDetailsForListing', 'inlineObject', inlineObject); const localVarPath = `/v3/insights/items/listingQuality/items`; // 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 (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); } 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)(inlineObject, localVarRequestOptions, configuration); return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.InsightApiAxiosParamCreator = InsightApiAxiosParamCreator; /** * InsightApi - functional programming interface * @export */ const InsightApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.InsightApiAxiosParamCreator)(configuration); return { /** * Get a list of all item categories that have items with listing quality issues or brands for a seller. * @summary Item count with listing quality issues * @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 {boolean} [viewTrendingItems] Specify whether or not to include seller\'s items that are trending in the Listing Quality Score. * @param {boolean} [wfsFlag] Specify whether or not to include WFS-eligible items in the overall Listing Quality Score. * @param {number} [hasIssue] Specify whether or not to include items that have issues in the Listing Quality Score. * @param {'brand' | 'category'} [type] Specify whether to get item count by brand or category. Category is the default value when no type is specified. * @param {number} [limit] Specify number of items to return. The value is defaulted to 100 and the maximum value is 1000. * @param {number} [offset] Specify the offset of item list to be returned. * @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 getCategoriesList(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, viewTrendingItems, wfsFlag, hasIssue, type, limit, offset, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getCategoriesList(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, viewTrendingItems, wfsFlag, hasIssue, type, limit, offset, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Get the total Listing Quality Score for a seller\'s entire item catalog. * @summary Seller Listing Quality Score * @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 {boolean} [viewTrendingItems] Specify whether or not to include seller\'s items that are trending in the Listing Quality Score. * @param {string} [wfsFlag] Specify whether or not to include WFS-eligible items in the overall Listing Quality Score. * @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 getListingQualityScore(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, viewTrendingItems, wfsFlag, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getListingQualityScore(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, viewTrendingItems, wfsFlag, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * The Pro Seller badge status will provide you with information regarding your current badge status as well as the progress you\'ve made in meeting the criteria. * @summary Pro Seller Badge Status * @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} */ async getProSellerBadgeInfo(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getProSellerBadgeInfo(authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Get Trending Item List * @summary Top Trending Items * @param {string} departmentId departmentId * @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} [categoryId] categoryId * @param {string} [limit] The number of items to be returned. * @param {string} [offset] The object response to start with, where 0 is the first entity that can be requested. * @param {string} [timeFrame] Returns all trending items for the given time frame in days * @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 getTrendingResult(departmentId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, categoryId, limit, offset, timeFrame, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getTrendingResult(departmentId, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, categoryId, limit, offset, timeFrame, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Get Count for Unpubished Item * @summary Unpublished Item Counts * @param {string} fromDate Returns all unpublished items count with reason codes since the given date * @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} */ async getUnpublishedItemCount(fromDate, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.getUnpublishedItemCount(fromDate, authorization, wMSECACCESSTOKEN, wMQOSCORRELATIONID, wMSVCNAME, wMCONSUMERCHANNELTYPE, options); return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }, /** * Get Unpublished Items * @summary Unpublished Items * @param {string} fromDate Returns all unpublished items since the given date * @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 AP