UNPKG

walmart_marketplace

Version:
229 lines (228 loc) 22.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.get_item_report = exports.update_bulk_promotional_price = exports.get_promotional_prices = exports.update_promotional_prices_ca = exports.price_bulk_uploads = exports.update_price_ca = exports.acknowledge_orders_ca = exports.shipping_updates_ca = exports.refund_order_lines_ca = exports.cancel_order_lines_ca = exports.get_an_order = exports.get_all_orders = exports.get_all_released_orders = exports.bulk_item_setup_ca = exports.retire_an_item = exports.get_an_item = exports.get_all_items = exports.update_bulk_inventory = exports.update_inventory_for_an_item_ca = exports.get_inventory = exports.get_feed_item_status = exports.bulk_content_setup = exports.get_all_feed_statuses = exports.get_document = exports.create_international_shipment = exports.get_international_shipment = exports.create_shipment_consolidation = exports.get_shipment_consolidation = void 0; const helpers_1 = require("./helpers"); const get_shipment_consolidation = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/shipment/international/consolidation${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_shipment_consolidation = get_shipment_consolidation; const create_shipment_consolidation = (auth, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/shipment/international/consolidation`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.create_shipment_consolidation = create_shipment_consolidation; const get_international_shipment = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/shipment/international${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_international_shipment = get_international_shipment; const create_international_shipment = (auth, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/shipment/international`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.create_international_shipment = create_international_shipment; const get_document = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/shipment/international/document${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_document = get_document; const get_all_feed_statuses = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_all_feed_statuses = get_all_feed_statuses; const bulk_content_setup = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds${(0, helpers_1.json_to_query_string)(query)}`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.bulk_content_setup = bulk_content_setup; const get_feed_item_status = (auth, query, path, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds/${path.feedId}${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_feed_item_status = get_feed_item_status; const get_inventory = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/inventory${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_inventory = get_inventory; const update_inventory_for_an_item_ca = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/inventory${(0, helpers_1.json_to_query_string)(query)}`; const method = 'put'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.update_inventory_for_an_item_ca = update_inventory_for_an_item_ca; const update_bulk_inventory = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds${(0, helpers_1.json_to_query_string)(query)}`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.update_bulk_inventory = update_bulk_inventory; const get_all_items = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/items${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_all_items = get_all_items; const get_an_item = (auth, path, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/items/${path.sku}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_an_item = get_an_item; const retire_an_item = (auth, path, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/items/${path.SKU}`; const method = 'delete'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.retire_an_item = retire_an_item; const bulk_item_setup_ca = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds${(0, helpers_1.json_to_query_string)(query)}`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.bulk_item_setup_ca = bulk_item_setup_ca; const get_all_released_orders = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders/released${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_all_released_orders = get_all_released_orders; const get_all_orders = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_all_orders = get_all_orders; const get_an_order = (auth, query, path, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders/${path.purchaseOrderId}${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_an_order = get_an_order; const cancel_order_lines_ca = (auth, path, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders/${path.purchaseOrderId}/cancel`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.cancel_order_lines_ca = cancel_order_lines_ca; const refund_order_lines_ca = (auth, path, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders/${path.purchaseOrderId}/refund`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.refund_order_lines_ca = refund_order_lines_ca; const shipping_updates_ca = (auth, path, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders/${path.purchaseOrderId}/shipping`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.shipping_updates_ca = shipping_updates_ca; const acknowledge_orders_ca = (auth, path, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/orders/${path.purchaseOrderId}/acknowledge`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.acknowledge_orders_ca = acknowledge_orders_ca; const update_price_ca = (auth, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/price`; const method = 'put'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.update_price_ca = update_price_ca; const price_bulk_uploads = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds${(0, helpers_1.json_to_query_string)(query)}`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.price_bulk_uploads = price_bulk_uploads; const update_promotional_prices_ca = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/price${(0, helpers_1.json_to_query_string)(query)}`; const method = 'put'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.update_promotional_prices_ca = update_promotional_prices_ca; const get_promotional_prices = (auth, path, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/promo/sku/${path.sku}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_promotional_prices = get_promotional_prices; const update_bulk_promotional_price = (auth, query, data, headers) => { const url = `https://marketplace.walmartapis.com/v3/ca/feeds${(0, helpers_1.json_to_query_string)(query)}`; const method = 'post'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, data, headers: enhanced_headers }; }; exports.update_bulk_promotional_price = update_bulk_promotional_price; const get_item_report = (auth, query, headers) => { const url = `https://marketplace.walmartapis.com/v3/getReport${(0, helpers_1.json_to_query_string)(query)}`; const method = 'get'; const timestamp = Date.now(); const enhanced_headers = Object.assign({ 'WM_QOS.CORRELATION_ID': (0, helpers_1.generate_correlation_id)(), 'WM_SVC.NAME': 'Walmart Gateway API', 'WM_SEC.TIMESTAMP': timestamp, 'WM_SEC.AUTH_SIGNATURE': (0, helpers_1.generate_signature)(url, method, auth.walmart_secret, auth.walmart_consumer, timestamp), 'WM_CONSUMER.ID': auth.walmart_consumer, 'WM_CONSUMER.CHANNEL.TYPE': auth.walmart_channel }, headers); return { method, url, headers: enhanced_headers }; }; exports.get_item_report = get_item_report;