@deliverart/sdk-js-core 2.5.26 → 2.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +9 -5
- package/dist/index.js +9 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -60,7 +60,14 @@ var OutputValidationError = class extends Error {
|
|
|
60
60
|
|
|
61
61
|
// src/ApiClient.ts
|
|
62
62
|
function serializeQueryValue(value) {
|
|
63
|
+
if (Array.isArray(value)) {
|
|
64
|
+
return value.map(serializeQueryValue);
|
|
65
|
+
}
|
|
63
66
|
if (value && typeof value === "object") {
|
|
67
|
+
const v = value;
|
|
68
|
+
if (typeof v.iri === "string") {
|
|
69
|
+
return v.iri;
|
|
70
|
+
}
|
|
64
71
|
const maybeToString = value.toString;
|
|
65
72
|
if (typeof maybeToString === "function") {
|
|
66
73
|
const str = maybeToString.call(value);
|
|
@@ -68,12 +75,9 @@ function serializeQueryValue(value) {
|
|
|
68
75
|
return str;
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
|
-
if (Array.isArray(value)) {
|
|
72
|
-
return value.map(serializeQueryValue);
|
|
73
|
-
}
|
|
74
78
|
const out = {};
|
|
75
|
-
for (const [k,
|
|
76
|
-
out[k] = serializeQueryValue(
|
|
79
|
+
for (const [k, v2] of Object.entries(v)) {
|
|
80
|
+
out[k] = serializeQueryValue(v2);
|
|
77
81
|
}
|
|
78
82
|
return out;
|
|
79
83
|
}
|
package/dist/index.js
CHANGED
|
@@ -21,7 +21,14 @@ var OutputValidationError = class extends Error {
|
|
|
21
21
|
|
|
22
22
|
// src/ApiClient.ts
|
|
23
23
|
function serializeQueryValue(value) {
|
|
24
|
+
if (Array.isArray(value)) {
|
|
25
|
+
return value.map(serializeQueryValue);
|
|
26
|
+
}
|
|
24
27
|
if (value && typeof value === "object") {
|
|
28
|
+
const v = value;
|
|
29
|
+
if (typeof v.iri === "string") {
|
|
30
|
+
return v.iri;
|
|
31
|
+
}
|
|
25
32
|
const maybeToString = value.toString;
|
|
26
33
|
if (typeof maybeToString === "function") {
|
|
27
34
|
const str = maybeToString.call(value);
|
|
@@ -29,12 +36,9 @@ function serializeQueryValue(value) {
|
|
|
29
36
|
return str;
|
|
30
37
|
}
|
|
31
38
|
}
|
|
32
|
-
if (Array.isArray(value)) {
|
|
33
|
-
return value.map(serializeQueryValue);
|
|
34
|
-
}
|
|
35
39
|
const out = {};
|
|
36
|
-
for (const [k,
|
|
37
|
-
out[k] = serializeQueryValue(
|
|
40
|
+
for (const [k, v2] of Object.entries(v)) {
|
|
41
|
+
out[k] = serializeQueryValue(v2);
|
|
38
42
|
}
|
|
39
43
|
return out;
|
|
40
44
|
}
|
package/package.json
CHANGED