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

@sp-api-sdk/aplus-content-api-2020-11-01

Package Overview
Dependencies
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sp-api-sdk/aplus-content-api-2020-11-01 - npm Package Compare versions

Comparing version 1.10.4 to 1.10.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": "With the A+ Content API, you can build applications that help selling partners add rich marketing content to their Amazon product detail pages. A+ content helps selling partners share their brand and product story, which helps buyers make informed purchasing decisions. Selling partners assemble content by choosing from content modules and adding images and text.",
"version": "1.10.4",
"version": "1.10.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