@shapediver/sdk.geometry-api-sdk-v2 3.4.2 → 3.5.0
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/client/api.d.ts +0 -18
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +113 -151
- package/dist/client/api.js.map +1 -1
- package/dist/client/common.d.ts +1 -0
- package/dist/client/common.d.ts.map +1 -1
- package/dist/client/common.js +12 -3
- package/dist/client/common.js.map +1 -1
- package/dist/client/configuration.js +2 -2
- package/dist/client/configuration.js.map +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/package.json +5 -5
- package/src/client/api.ts +115 -226
- package/src/client/base.ts +1 -1
- package/src/client/common.ts +17 -3
- package/src/client/configuration.ts +3 -3
- package/src/client/index.ts +1 -1
- package/src/configuration.ts +1 -1
package/src/client/base.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Geometry Backend API v2
|
|
5
5
|
* The ShapeDiver Geometry Backend system is used to: * host Grasshopper models in a secure, reliable, scalable, and performant way, * run computations of Grasshopper models, * and cache and output the results of computations and exports.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.4.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/client/common.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Geometry Backend API v2
|
|
5
5
|
* The ShapeDiver Geometry Backend system is used to: * host Grasshopper models in a secure, reliable, scalable, and performant way, * run computations of Grasshopper models, * and cache and output the results of computations and exports.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.4.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -66,7 +66,7 @@ export const setOAuthToObject = async function (object: any, name: string, scope
|
|
|
66
66
|
function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void {
|
|
67
67
|
if (parameter == null) return;
|
|
68
68
|
if (typeof parameter === "object") {
|
|
69
|
-
if (Array.isArray(parameter)) {
|
|
69
|
+
if (Array.isArray(parameter) || parameter instanceof Set) {
|
|
70
70
|
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
@@ -91,13 +91,27 @@ export const setSearchParams = function (url: URL, ...objects: any[]) {
|
|
|
91
91
|
url.search = searchParams.toString();
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* JSON serialization helper function which replaces instances of unserializable types with serializable ones.
|
|
96
|
+
* This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
|
|
97
|
+
* Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
|
|
98
|
+
*/
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) {
|
|
101
|
+
if (value instanceof Set) {
|
|
102
|
+
return Array.from(value);
|
|
103
|
+
} else {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
94
108
|
export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) {
|
|
95
109
|
const nonString = typeof value !== 'string';
|
|
96
110
|
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
97
111
|
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
98
112
|
: nonString;
|
|
99
113
|
return needsSerialization
|
|
100
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
114
|
+
? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
|
|
101
115
|
: (value || "");
|
|
102
116
|
}
|
|
103
117
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Geometry Backend API v2
|
|
4
4
|
* The ShapeDiver Geometry Backend system is used to: * host Grasshopper models in a secure, reliable, scalable, and performant way, * run computations of Grasshopper models, * and cache and output the results of computations and exports.
|
|
5
5
|
*
|
|
6
|
-
* The version of the OpenAPI document: 2.
|
|
6
|
+
* The version of the OpenAPI document: 2.4.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -115,7 +115,7 @@ export class Configuration {
|
|
|
115
115
|
* @return True if the given MIME is JSON, false otherwise.
|
|
116
116
|
*/
|
|
117
117
|
public isJsonMime(mime: string): boolean {
|
|
118
|
-
const jsonMime: RegExp =
|
|
119
|
-
return mime !== null &&
|
|
118
|
+
const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
|
|
119
|
+
return mime !== null && jsonMime.test(mime);
|
|
120
120
|
}
|
|
121
121
|
}
|
package/src/client/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Geometry Backend API v2
|
|
5
5
|
* The ShapeDiver Geometry Backend system is used to: * host Grasshopper models in a secure, reliable, scalable, and performant way, * run computations of Grasshopper models, * and cache and output the results of computations and exports.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 2.
|
|
7
|
+
* The version of the OpenAPI document: 2.4.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/configuration.ts
CHANGED
|
@@ -34,7 +34,7 @@ export interface ConfigurationParameters
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export class Configuration extends ClientConfig {
|
|
37
|
-
protected readonly sdkVersion = '3.
|
|
37
|
+
protected readonly sdkVersion = '3.5.0'; // WARNING: This value is updated automatically!
|
|
38
38
|
|
|
39
39
|
public readonly useCustomAxios: boolean;
|
|
40
40
|
public readonly maxRetries: number;
|