Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sp-api-sdk/fulfillment-inbound-api-v0

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sp-api-sdk/fulfillment-inbound-api-v0 - npm Package Compare versions

Comparing version 1.9.4 to 1.9.5

32

dist/cjs/src/api-model/common.js

@@ -83,2 +83,20 @@ "use strict";

exports.setOAuthToObject = setOAuthToObject;
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
if (typeof parameter === "object") {
if (Array.isArray(parameter)) {
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
}
else {
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
}
}
else {
if (urlSearchParams.has(key)) {
urlSearchParams.append(key, parameter);
}
else {
urlSearchParams.set(key, parameter);
}
}
}
/**

@@ -90,15 +108,3 @@ *

const searchParams = new URLSearchParams(url.search);
for (const object of objects) {
for (const key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (const item of object[key]) {
searchParams.append(key, item);
}
}
else {
searchParams.set(key, object[key]);
}
}
}
setFlattenedQueryParams(searchParams, objects);
url.search = searchParams.toString();

@@ -105,0 +111,0 @@ };

@@ -75,2 +75,20 @@ /* tslint:disable */

};
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
if (typeof parameter === "object") {
if (Array.isArray(parameter)) {
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
}
else {
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
}
}
else {
if (urlSearchParams.has(key)) {
urlSearchParams.append(key, parameter);
}
else {
urlSearchParams.set(key, parameter);
}
}
}
/**

@@ -82,15 +100,3 @@ *

const searchParams = new URLSearchParams(url.search);
for (const object of objects) {
for (const key in object) {
if (Array.isArray(object[key])) {
searchParams.delete(key);
for (const item of object[key]) {
searchParams.append(key, item);
}
}
else {
searchParams.set(key, object[key]);
}
}
}
setFlattenedQueryParams(searchParams, objects);
url.search = searchParams.toString();

@@ -97,0 +103,0 @@ };

@@ -5,3 +5,3 @@ {

"description": "The Selling Partner API for Fulfillment Inbound lets you create applications that create and update inbound shipments of inventory to Amazon's fulfillment network.",
"version": "1.9.4",
"version": "1.9.5",
"main": "dist/cjs/index.js",

@@ -30,3 +30,3 @@ "module": "dist/es/index.js",

"dependencies": {
"@sp-api-sdk/common": "^1.9.16",
"@sp-api-sdk/common": "^1.9.17",
"axios": "^0.27.2"

@@ -56,3 +56,3 @@ },

},
"gitHead": "e5aa87a6384048c9f49b97db7d5d7aca34927853"
"gitHead": "07823635b37c2e82b4b6ad962d8ef4b7318a011c"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc