@maccuaa/intellitrust-issuance-sdk
Advanced tools
Comparing version 5.33.3 to 5.36.0
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -5,0 +5,0 @@ * Contact: support@entrust.com |
@@ -41,13 +41,13 @@ import { RequiredError } from "./base"; | ||
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); | ||
} | ||
} | ||
else { | ||
Object.keys(parameter).forEach(currentKey => | ||
Object.keys(parameter).forEach(currentKey => | ||
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) | ||
); | ||
} | ||
} | ||
} | ||
else { | ||
if (urlSearchParams.has(key)) { | ||
urlSearchParams.append(key, parameter); | ||
} | ||
} | ||
else { | ||
@@ -79,7 +79,47 @@ urlSearchParams.set(key, parameter); | ||
return needsSerialization | ||
? JSON.stringify(value !== undefined ? value : {}) | ||
? JSON.stringify(value !== undefined ? convertMapsAndSetsToPlain(value) : {}) | ||
: (value || ""); | ||
} | ||
function convertMapsAndSetsToPlain(value: any): any { | ||
if (typeof Set === "undefined") return value; | ||
if (typeof Map === "undefined") return value; | ||
if (typeof value !== "object" || !value) { | ||
return value; | ||
} | ||
if (value instanceof Set) { | ||
return Array.from(value).map(item => convertMapsAndSetsToPlain(item)); | ||
} | ||
if (value instanceof Map) { | ||
const entries: Array<[string, any]> = []; | ||
value.forEach((value: any, key: any) => { | ||
entries.push([key, convertMapsAndSetsToPlain(value)]) | ||
}); | ||
return objectFromEntries(entries); | ||
} | ||
if (Array.isArray(value)) { | ||
return value.map(it => convertMapsAndSetsToPlain(it)); | ||
} | ||
return objectFromEntries(objectEntries(value) | ||
.map(([k, v]) => [k, convertMapsAndSetsToPlain(v)])); | ||
} | ||
/** | ||
* Ponyfill for Object.entries | ||
*/ | ||
function objectEntries(object: Record<string, any>): Array<[string, any]> { | ||
return Object.keys(object).map(key => [key, object[key]]); | ||
} | ||
/** | ||
* Ponyfill for Object.fromEntries | ||
*/ | ||
function objectFromEntries(entries: any): Record<string, any> { | ||
return [...entries].reduce((object, [key, val]) => { | ||
object[key] = val; | ||
return object; | ||
}, {}); | ||
} | ||
/** | ||
* | ||
@@ -101,2 +141,2 @@ * @export | ||
}; | ||
} | ||
} |
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -5,0 +5,0 @@ * Contact: support@entrust.com |
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -5,0 +5,0 @@ * Contact: support@entrust.com |
@@ -75,7 +75,46 @@ "use strict"; | ||
return needsSerialization | ||
? JSON.stringify(value !== undefined ? value : {}) | ||
? JSON.stringify(value !== undefined ? convertMapsAndSetsToPlain(value) : {}) | ||
: (value || ""); | ||
}; | ||
exports.serializeDataIfNeeded = serializeDataIfNeeded; | ||
function convertMapsAndSetsToPlain(value) { | ||
if (typeof Set === "undefined") | ||
return value; | ||
if (typeof Map === "undefined") | ||
return value; | ||
if (typeof value !== "object" || !value) { | ||
return value; | ||
} | ||
if (value instanceof Set) { | ||
return Array.from(value).map(item => convertMapsAndSetsToPlain(item)); | ||
} | ||
if (value instanceof Map) { | ||
const entries = []; | ||
value.forEach((value, key) => { | ||
entries.push([key, convertMapsAndSetsToPlain(value)]); | ||
}); | ||
return objectFromEntries(entries); | ||
} | ||
if (Array.isArray(value)) { | ||
return value.map(it => convertMapsAndSetsToPlain(it)); | ||
} | ||
return objectFromEntries(objectEntries(value) | ||
.map(([k, v]) => [k, convertMapsAndSetsToPlain(v)])); | ||
} | ||
/** | ||
* Ponyfill for Object.entries | ||
*/ | ||
function objectEntries(object) { | ||
return Object.keys(object).map(key => [key, object[key]]); | ||
} | ||
/** | ||
* Ponyfill for Object.fromEntries | ||
*/ | ||
function objectFromEntries(entries) { | ||
return [...entries].reduce((object, [key, val]) => { | ||
object[key] = val; | ||
return object; | ||
}, {}); | ||
} | ||
/** | ||
* | ||
@@ -82,0 +121,0 @@ * @export |
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -5,0 +5,0 @@ * Contact: support@entrust.com |
"use strict"; | ||
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -6,0 +6,0 @@ * Contact: support@entrust.com |
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -5,0 +5,0 @@ * Contact: support@entrust.com |
"use strict"; | ||
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -6,0 +6,0 @@ * Contact: support@entrust.com |
/** | ||
* Entrust Identity as a Service Issuance API | ||
* 5.33.3 | ||
* 5.36 | ||
@@ -5,0 +5,0 @@ * Contact: support@entrust.com |
{ | ||
"name": "@maccuaa/intellitrust-issuance-sdk", | ||
"version": "5.33.3", | ||
"version": "5.36.0", | ||
"description": "JavaScript client for @maccuaa/intellitrust-issuance-sdk", | ||
"author": "Andrew MacCuaig <andrewmaccuaig@gmail.com>", | ||
"homepage": "https://www.npmjs.com/package/@maccuaa/intellitrust-issuance-sdk/v/5.33.3", | ||
"homepage": "https://www.npmjs.com/package/@maccuaa/intellitrust-issuance-sdk/v/5.36.0", | ||
"repository": { | ||
@@ -32,8 +32,8 @@ "type": "git", | ||
"dependencies": { | ||
"axios": "1.6.7" | ||
"axios": "1.7.7" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^20.9.0", | ||
"@types/node": "^22.5.4", | ||
"typescript": "^5.2.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
## @maccuaa/intellitrust-issuance-sdk@5.33.3 | ||
## @maccuaa/intellitrust-issuance-sdk@5.36.0 | ||
@@ -3,0 +3,0 @@ This is a JavaScript client for the Entrust Identity as a Service Issuance API. This module can be used in the following environments: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
873279
20578
+ Addedaxios@1.7.7(transitive)
- Removedaxios@1.6.7(transitive)
Updatedaxios@1.7.7