edge-impulse-linux 1.18.3 → 1.20.1
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/build/cli/linux/linux.js +17 -6
- package/build/cli/linux/linux.js.map +1 -1
- package/build/cli/linux/runner-downloader.d.ts +0 -1
- package/build/cli/linux/runner-downloader.js +5 -11
- package/build/cli/linux/runner-downloader.js.map +1 -1
- package/build/cli/linux/runner-profiling.d.ts +6 -4
- package/build/cli/linux/runner-profiling.js +167 -37
- package/build/cli/linux/runner-profiling.js.map +1 -1
- package/build/cli/linux/runner.js +69 -56
- package/build/cli/linux/runner.js.map +1 -1
- package/build/library/sensors/gstreamer.d.ts +10 -3
- package/build/library/sensors/gstreamer.js +219 -52
- package/build/library/sensors/gstreamer.js.map +1 -1
- package/build/library/sensors/icamera.d.ts +21 -1
- package/build/library/sensors/imagesnap.d.ts +3 -2
- package/build/library/sensors/imagesnap.js +18 -1
- package/build/library/sensors/imagesnap.js.map +1 -1
- package/build/library/sensors/prophesee.d.ts +2 -2
- package/build/library/sensors/sensors-helper.d.ts +6 -1
- package/build/library/sensors/sensors-helper.js +32 -9
- package/build/library/sensors/sensors-helper.js.map +1 -1
- package/build/sdk/studio/sdk/api/adminApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/adminApi.js +4782 -4928
- package/build/sdk/studio/sdk/api/adminApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/authApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/authApi.js +88 -56
- package/build/sdk/studio/sdk/api/authApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/cDNApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/cDNApi.js +76 -53
- package/build/sdk/studio/sdk/api/cDNApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/canaryApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/canaryApi.js +79 -53
- package/build/sdk/studio/sdk/api/canaryApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/classifyApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/classifyApi.js +527 -499
- package/build/sdk/studio/sdk/api/classifyApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/dSPApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/dSPApi.js +938 -942
- package/build/sdk/studio/sdk/api/dSPApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/deploymentApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/deploymentApi.js +680 -603
- package/build/sdk/studio/sdk/api/deploymentApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/devicesApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/devicesApi.js +802 -800
- package/build/sdk/studio/sdk/api/devicesApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/emailVerificationApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/emailVerificationApi.js +184 -190
- package/build/sdk/studio/sdk/api/emailVerificationApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/exportApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/exportApi.js +88 -56
- package/build/sdk/studio/sdk/api/exportApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/featureFlagsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/featureFlagsApi.js +76 -52
- package/build/sdk/studio/sdk/api/featureFlagsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/healthApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/healthApi.js +111 -97
- package/build/sdk/studio/sdk/api/healthApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/impulseApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/impulseApi.js +942 -902
- package/build/sdk/studio/sdk/api/impulseApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/integrationsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/integrationsApi.js +136 -106
- package/build/sdk/studio/sdk/api/integrationsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/jobsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/jobsApi.js +2270 -2326
- package/build/sdk/studio/sdk/api/jobsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/learnApi.d.ts +22 -6
- package/build/sdk/studio/sdk/api/learnApi.js +1597 -1424
- package/build/sdk/studio/sdk/api/learnApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/loginApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/loginApi.js +112 -98
- package/build/sdk/studio/sdk/api/loginApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/metricsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/metricsApi.js +148 -144
- package/build/sdk/studio/sdk/api/metricsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/optimizationApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/optimizationApi.js +844 -844
- package/build/sdk/studio/sdk/api/optimizationApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationBlocksApi.d.ts +8 -6
- package/build/sdk/studio/sdk/api/organizationBlocksApi.js +1974 -1548
- package/build/sdk/studio/sdk/api/organizationBlocksApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationCreateProjectApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationCreateProjectApi.js +700 -652
- package/build/sdk/studio/sdk/api/organizationCreateProjectApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationDataApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationDataApi.js +2074 -1985
- package/build/sdk/studio/sdk/api/organizationDataApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationDataCampaignsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationDataCampaignsApi.js +626 -602
- package/build/sdk/studio/sdk/api/organizationDataCampaignsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationJobsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationJobsApi.js +417 -399
- package/build/sdk/studio/sdk/api/organizationJobsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationPipelinesApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationPipelinesApi.js +419 -401
- package/build/sdk/studio/sdk/api/organizationPipelinesApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationPortalsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationPortalsApi.js +372 -352
- package/build/sdk/studio/sdk/api/organizationPortalsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/organizationsApi.js +4024 -4050
- package/build/sdk/studio/sdk/api/organizationsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/performanceCalibrationApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/performanceCalibrationApi.js +586 -560
- package/build/sdk/studio/sdk/api/performanceCalibrationApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/postProcessingApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/postProcessingApi.js +279 -255
- package/build/sdk/studio/sdk/api/postProcessingApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/projectsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/projectsApi.js +2758 -2818
- package/build/sdk/studio/sdk/api/projectsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/rawDataApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/rawDataApi.js +3055 -3131
- package/build/sdk/studio/sdk/api/rawDataApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/testApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/testApi.js +152 -108
- package/build/sdk/studio/sdk/api/testApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/themesApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/themesApi.js +341 -305
- package/build/sdk/studio/sdk/api/themesApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/thirdPartyAuthApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/thirdPartyAuthApi.js +387 -353
- package/build/sdk/studio/sdk/api/thirdPartyAuthApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/uploadPortalApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/uploadPortalApi.js +375 -355
- package/build/sdk/studio/sdk/api/uploadPortalApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/userApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/userApi.js +2345 -2452
- package/build/sdk/studio/sdk/api/userApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/vlmApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/vlmApi.js +277 -253
- package/build/sdk/studio/sdk/api/vlmApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/whitelabelsApi.d.ts +4 -6
- package/build/sdk/studio/sdk/api/whitelabelsApi.js +408 -398
- package/build/sdk/studio/sdk/api/whitelabelsApi.js.map +1 -1
- package/build/sdk/studio/sdk/model/addOrganizationDeployBlockRequest.d.ts +4 -0
- package/build/sdk/studio/sdk/model/addOrganizationDeployBlockRequest.js +5 -0
- package/build/sdk/studio/sdk/model/addOrganizationDeployBlockRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/buildOnDeviceModelRequest.d.ts +6 -0
- package/build/sdk/studio/sdk/model/buildOnDeviceModelRequest.js +5 -0
- package/build/sdk/studio/sdk/model/buildOnDeviceModelRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/buildOrganizationOnDeviceModelRequest.d.ts +6 -0
- package/build/sdk/studio/sdk/model/buildOrganizationOnDeviceModelRequest.js +5 -0
- package/build/sdk/studio/sdk/model/buildOrganizationOnDeviceModelRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.d.ts +4 -0
- package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.js +5 -0
- package/build/sdk/studio/sdk/model/deployPretrainedModelRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/deploymentTarget.d.ts +2 -0
- package/build/sdk/studio/sdk/model/deploymentTarget.js +5 -0
- package/build/sdk/studio/sdk/model/deploymentTarget.js.map +1 -1
- package/build/sdk/studio/sdk/model/models.d.ts +47 -7
- package/build/sdk/studio/sdk/model/models.js +33 -22
- package/build/sdk/studio/sdk/model/models.js.map +1 -1
- package/build/sdk/studio/sdk/model/organizationDeployBlock.d.ts +9 -0
- package/build/sdk/studio/sdk/model/organizationDeployBlock.js +10 -0
- package/build/sdk/studio/sdk/model/organizationDeployBlock.js.map +1 -1
- package/build/sdk/studio/sdk/model/projectDeploymentTarget.d.ts +2 -0
- package/build/sdk/studio/sdk/model/projectDeploymentTarget.js +5 -0
- package/build/sdk/studio/sdk/model/projectDeploymentTarget.js.map +1 -1
- package/build/sdk/studio/sdk/model/transferLearningModel.d.ts +4 -0
- package/build/sdk/studio/sdk/model/transferLearningModel.js +5 -0
- package/build/sdk/studio/sdk/model/transferLearningModel.js.map +1 -1
- package/build/sdk/studio/sdk/model/updateOrganizationDeployBlockRequest.d.ts +4 -0
- package/build/sdk/studio/sdk/model/updateOrganizationDeployBlockRequest.js +5 -0
- package/build/sdk/studio/sdk/model/updateOrganizationDeployBlockRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/uploadPretrainedModelByUrlRequest.d.ts +47 -0
- package/build/sdk/studio/sdk/model/uploadPretrainedModelByUrlRequest.js +55 -0
- package/build/sdk/studio/sdk/model/uploadPretrainedModelByUrlRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/uploadPretrainedModelRequest.d.ts +4 -0
- package/build/sdk/studio/sdk/model/uploadPretrainedModelRequest.js +5 -0
- package/build/sdk/studio/sdk/model/uploadPretrainedModelRequest.js.map +1 -1
- package/package.json +4 -2
- package/test/gstreamer.test.ts +984 -3788
- package/test/imx219-csi-on-arduino-unoq-inspect.txt +564 -0
- package/test/imx219-csi-on-arduino-unoq-monitor.txt +285 -0
- package/test/logitech-c920-on-ubuntu-22-parallells.txt +211 -0
- package/test/logitech-c922-on-rpi-bullseye-2.txt +270 -0
- package/test/logitech-c922-on-rpi-bullseye.txt +331 -0
- package/test/macbook-pro-w-internal-and-external-cam-inspect.txt +1496 -0
- package/test/macbook-pro-w-internal-and-external-cam-monitor.txt +209 -0
- package/test/nvidia-jetson-w-csi-camera.txt +94 -0
- package/test/nvidia-jetson-w-logitech-c922-monitor.txt +204 -0
- package/test/nvidia-orin-w-basler-camera-inspect.txt +859 -0
- package/test/nvidia-orin-w-basler-camera-pylonsrc.txt +806 -0
- package/test/rb1-debian-inspect.txt +568 -0
- package/test/rb1-debian-libcamera-monitor.txt +190 -0
- package/test/rpi-cam-v3-c920-webcam-bookworm-no-libcamerasrc.txt +383 -0
- package/test/rpi4-trixie-csi-gst-device-monitor.txt +1110 -0
- package/test/rpi4-trixie-csi-gst-inspect.txt +1379 -0
- package/test/rpi5-with-csi-imx500-camera-monitor.txt +3617 -0
- package/test/rpi5-with-csi-imx708-monitor.txt +2277 -0
- package/test/usb-camera-on-rpi-w-image-jpg.txt +130 -0
- /package/test/{qualcomm-rb3-inspect-qtiqmmfsrc.txt → qualcomm-rb3-gen-2-qimp-linux-1-2-with-logitech-brio-inspect-qtiqmmfsrc.txt} +0 -0
- /package/test/{qualcomm-rb3-inspect.txt → qualcomm-rb3-gen-2-qimp-linux-1-2-with-logitech-brio-inspect.txt} +0 -0
- /package/test/{qualcomm-rb3-monitor-brio.txt → qualcomm-rb3-gen-2-qimp-linux-1-2-with-logitech-brio-monitor.txt} +0 -0
- /package/test/{triple-vision-camera-inspect.txt → triple-vision-ai-industrial-camera-inspect.txt} +0 -0
- /package/test/{triple-vision-camera-monitor.txt → triple-vision-ai-industrial-camera-monitor.txt} +0 -0
|
@@ -12,14 +12,31 @@
|
|
|
12
12
|
*/
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.OrganizationBlocksApi = exports.OrganizationBlocksApiApiKeys = void 0;
|
|
15
|
-
// tslint:disable-next-line: variable-name, no-var-requires
|
|
16
15
|
const PATH = require('path');
|
|
17
|
-
// tslint:disable-next-line: no-unsafe-any
|
|
18
16
|
module.paths.push(PATH.join(process.cwd(), 'node_modules'));
|
|
19
|
-
|
|
17
|
+
let fetch;
|
|
18
|
+
let FormData;
|
|
19
|
+
if (globalThis.fetch && globalThis.FormData) {
|
|
20
|
+
fetch = globalThis.fetch;
|
|
21
|
+
FormData = globalThis.FormData;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
const undici = require('undici');
|
|
25
|
+
fetch = undici.fetch;
|
|
26
|
+
FormData = undici.FormData;
|
|
27
|
+
}
|
|
20
28
|
const models_1 = require("../model/models");
|
|
21
29
|
const models_2 = require("../model/models");
|
|
22
30
|
let defaultBasePath = 'https://studio.edgeimpulse.com/v1';
|
|
31
|
+
async function parseResponse(res) {
|
|
32
|
+
const ct = (res.headers.get('content-type') || '').toLowerCase();
|
|
33
|
+
if (ct.includes('application/json'))
|
|
34
|
+
return res.json();
|
|
35
|
+
if (/^(image|video|audio)\/|application\/(octet-stream|zip|x-tar|cbor)/.test(ct)) {
|
|
36
|
+
return Buffer.from(await res.arrayBuffer());
|
|
37
|
+
}
|
|
38
|
+
return res.text();
|
|
39
|
+
}
|
|
23
40
|
// ===============================================
|
|
24
41
|
// This file is autogenerated - Please do not edit
|
|
25
42
|
// ===============================================
|
|
@@ -30,10 +47,30 @@ var OrganizationBlocksApiApiKeys;
|
|
|
30
47
|
OrganizationBlocksApiApiKeys[OrganizationBlocksApiApiKeys["JWTHttpHeaderAuthentication"] = 2] = "JWTHttpHeaderAuthentication";
|
|
31
48
|
})(OrganizationBlocksApiApiKeys = exports.OrganizationBlocksApiApiKeys || (exports.OrganizationBlocksApiApiKeys = {}));
|
|
32
49
|
class OrganizationBlocksApi {
|
|
50
|
+
async handleResponse(response, returnType) {
|
|
51
|
+
let body = await parseResponse(response);
|
|
52
|
+
if (!response.ok) {
|
|
53
|
+
let errorMsg;
|
|
54
|
+
if (typeof body === 'object' && body !== null && 'error' in body) {
|
|
55
|
+
errorMsg = body.error;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
errorMsg = `Failed to call "${response.url}", returned ${response.status}: ` + (typeof body === 'string' ? body : JSON.stringify(body));
|
|
59
|
+
}
|
|
60
|
+
throw new Error(errorMsg);
|
|
61
|
+
}
|
|
62
|
+
if (returnType) {
|
|
63
|
+
body = models_1.ObjectSerializer.deserialize(body, returnType);
|
|
64
|
+
}
|
|
65
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
66
|
+
const errString = `Failed to call "${response.url}", returned ${response.status}: ` + body.error;
|
|
67
|
+
throw new Error(body.error || errString);
|
|
68
|
+
}
|
|
69
|
+
return body;
|
|
70
|
+
}
|
|
33
71
|
constructor(basePathOrUsername, opts, password, basePath) {
|
|
34
72
|
this._basePath = defaultBasePath;
|
|
35
73
|
this.defaultHeaders = {};
|
|
36
|
-
this._useQuerystring = false;
|
|
37
74
|
this._opts = {};
|
|
38
75
|
this.authentications = {
|
|
39
76
|
'default': new models_1.VoidAuth(),
|
|
@@ -54,9 +91,6 @@ class OrganizationBlocksApi {
|
|
|
54
91
|
}
|
|
55
92
|
this.opts = opts ?? {};
|
|
56
93
|
}
|
|
57
|
-
set useQuerystring(value) {
|
|
58
|
-
this._useQuerystring = value;
|
|
59
|
-
}
|
|
60
94
|
set basePath(basePath) {
|
|
61
95
|
this._basePath = basePath;
|
|
62
96
|
}
|
|
@@ -98,14 +132,17 @@ class OrganizationBlocksApi {
|
|
|
98
132
|
* @param showOptimizations
|
|
99
133
|
* @param category
|
|
100
134
|
* @param sourceCodeDownloadStaffOnly Whether the source code is only available for staff users.
|
|
135
|
+
* @param parameters List of parameters, spec\'ed according to https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
|
|
101
136
|
*/
|
|
102
137
|
async addOrganizationDeployBlock(organizationId, params, options = { headers: {} }) {
|
|
103
138
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy'
|
|
104
139
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
105
140
|
let localVarQueryParameters = {};
|
|
106
|
-
let localVarHeaderParams =
|
|
107
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
108
|
-
|
|
141
|
+
let localVarHeaderParams = {
|
|
142
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
143
|
+
'Content-Type': 'application/json',
|
|
144
|
+
...this.defaultHeaders,
|
|
145
|
+
};
|
|
109
146
|
const produces = ['application/json'];
|
|
110
147
|
// give precedence to 'application/json'
|
|
111
148
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -114,7 +151,7 @@ class OrganizationBlocksApi {
|
|
|
114
151
|
else {
|
|
115
152
|
localVarHeaderParams.Accept = produces.join(',');
|
|
116
153
|
}
|
|
117
|
-
let localVarFormParams
|
|
154
|
+
let localVarFormParams;
|
|
118
155
|
// verify required parameter 'organizationId' is not null or undefined
|
|
119
156
|
if (organizationId === null || organizationId === undefined) {
|
|
120
157
|
throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationDeployBlock.');
|
|
@@ -135,104 +172,325 @@ class OrganizationBlocksApi {
|
|
|
135
172
|
if (params.cliArguments === null || params.cliArguments === undefined) {
|
|
136
173
|
throw new Error('Required parameter params.cliArguments was null or undefined when calling addOrganizationDeployBlock.');
|
|
137
174
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
175
|
+
localVarHeaderParams = {
|
|
176
|
+
...localVarHeaderParams,
|
|
177
|
+
...options.headers,
|
|
178
|
+
...this.opts.extraHeaders,
|
|
179
|
+
};
|
|
141
180
|
if (params.name !== undefined) {
|
|
142
|
-
|
|
181
|
+
const isParametersField = "name" === "parameters";
|
|
182
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
183
|
+
const nameSerialized = serializableParams
|
|
184
|
+
? JSON.stringify(params.parameters)
|
|
185
|
+
: models_1.ObjectSerializer.serializeFormData(params.name, "string");
|
|
186
|
+
if (localVarFormParams instanceof FormData) {
|
|
187
|
+
localVarFormParams.append('name', nameSerialized);
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
if (!localVarFormParams) {
|
|
191
|
+
localVarFormParams = {};
|
|
192
|
+
}
|
|
193
|
+
localVarFormParams['name'] = nameSerialized;
|
|
194
|
+
}
|
|
143
195
|
}
|
|
144
196
|
if (params.dockerContainer !== undefined) {
|
|
145
|
-
|
|
197
|
+
const isParametersField = "dockerContainer" === "parameters";
|
|
198
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
199
|
+
const dockerContainerSerialized = serializableParams
|
|
200
|
+
? JSON.stringify(params.parameters)
|
|
201
|
+
: models_1.ObjectSerializer.serializeFormData(params.dockerContainer, "string");
|
|
202
|
+
if (localVarFormParams instanceof FormData) {
|
|
203
|
+
localVarFormParams.append('dockerContainer', dockerContainerSerialized);
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
if (!localVarFormParams) {
|
|
207
|
+
localVarFormParams = {};
|
|
208
|
+
}
|
|
209
|
+
localVarFormParams['dockerContainer'] = dockerContainerSerialized;
|
|
210
|
+
}
|
|
146
211
|
}
|
|
147
212
|
if (params.description !== undefined) {
|
|
148
|
-
|
|
213
|
+
const isParametersField = "description" === "parameters";
|
|
214
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
215
|
+
const descriptionSerialized = serializableParams
|
|
216
|
+
? JSON.stringify(params.parameters)
|
|
217
|
+
: models_1.ObjectSerializer.serializeFormData(params.description, "string");
|
|
218
|
+
if (localVarFormParams instanceof FormData) {
|
|
219
|
+
localVarFormParams.append('description', descriptionSerialized);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
if (!localVarFormParams) {
|
|
223
|
+
localVarFormParams = {};
|
|
224
|
+
}
|
|
225
|
+
localVarFormParams['description'] = descriptionSerialized;
|
|
226
|
+
}
|
|
149
227
|
}
|
|
150
228
|
if (params.cliArguments !== undefined) {
|
|
151
|
-
|
|
229
|
+
const isParametersField = "cliArguments" === "parameters";
|
|
230
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
231
|
+
const cliArgumentsSerialized = serializableParams
|
|
232
|
+
? JSON.stringify(params.parameters)
|
|
233
|
+
: models_1.ObjectSerializer.serializeFormData(params.cliArguments, "string");
|
|
234
|
+
if (localVarFormParams instanceof FormData) {
|
|
235
|
+
localVarFormParams.append('cliArguments', cliArgumentsSerialized);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
if (!localVarFormParams) {
|
|
239
|
+
localVarFormParams = {};
|
|
240
|
+
}
|
|
241
|
+
localVarFormParams['cliArguments'] = cliArgumentsSerialized;
|
|
242
|
+
}
|
|
152
243
|
}
|
|
153
244
|
if (params.requestsCpu !== undefined) {
|
|
154
|
-
|
|
245
|
+
const isParametersField = "requestsCpu" === "parameters";
|
|
246
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
247
|
+
const requestsCpuSerialized = serializableParams
|
|
248
|
+
? JSON.stringify(params.parameters)
|
|
249
|
+
: models_1.ObjectSerializer.serializeFormData(params.requestsCpu, "number");
|
|
250
|
+
if (localVarFormParams instanceof FormData) {
|
|
251
|
+
localVarFormParams.append('requestsCpu', requestsCpuSerialized);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
if (!localVarFormParams) {
|
|
255
|
+
localVarFormParams = {};
|
|
256
|
+
}
|
|
257
|
+
localVarFormParams['requestsCpu'] = requestsCpuSerialized;
|
|
258
|
+
}
|
|
155
259
|
}
|
|
156
260
|
if (params.requestsMemory !== undefined) {
|
|
157
|
-
|
|
261
|
+
const isParametersField = "requestsMemory" === "parameters";
|
|
262
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
263
|
+
const requestsMemorySerialized = serializableParams
|
|
264
|
+
? JSON.stringify(params.parameters)
|
|
265
|
+
: models_1.ObjectSerializer.serializeFormData(params.requestsMemory, "number");
|
|
266
|
+
if (localVarFormParams instanceof FormData) {
|
|
267
|
+
localVarFormParams.append('requestsMemory', requestsMemorySerialized);
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
if (!localVarFormParams) {
|
|
271
|
+
localVarFormParams = {};
|
|
272
|
+
}
|
|
273
|
+
localVarFormParams['requestsMemory'] = requestsMemorySerialized;
|
|
274
|
+
}
|
|
158
275
|
}
|
|
159
276
|
if (params.limitsCpu !== undefined) {
|
|
160
|
-
|
|
277
|
+
const isParametersField = "limitsCpu" === "parameters";
|
|
278
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
279
|
+
const limitsCpuSerialized = serializableParams
|
|
280
|
+
? JSON.stringify(params.parameters)
|
|
281
|
+
: models_1.ObjectSerializer.serializeFormData(params.limitsCpu, "number");
|
|
282
|
+
if (localVarFormParams instanceof FormData) {
|
|
283
|
+
localVarFormParams.append('limitsCpu', limitsCpuSerialized);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
if (!localVarFormParams) {
|
|
287
|
+
localVarFormParams = {};
|
|
288
|
+
}
|
|
289
|
+
localVarFormParams['limitsCpu'] = limitsCpuSerialized;
|
|
290
|
+
}
|
|
161
291
|
}
|
|
162
292
|
if (params.limitsMemory !== undefined) {
|
|
163
|
-
|
|
293
|
+
const isParametersField = "limitsMemory" === "parameters";
|
|
294
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
295
|
+
const limitsMemorySerialized = serializableParams
|
|
296
|
+
? JSON.stringify(params.parameters)
|
|
297
|
+
: models_1.ObjectSerializer.serializeFormData(params.limitsMemory, "number");
|
|
298
|
+
if (localVarFormParams instanceof FormData) {
|
|
299
|
+
localVarFormParams.append('limitsMemory', limitsMemorySerialized);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
if (!localVarFormParams) {
|
|
303
|
+
localVarFormParams = {};
|
|
304
|
+
}
|
|
305
|
+
localVarFormParams['limitsMemory'] = limitsMemorySerialized;
|
|
306
|
+
}
|
|
164
307
|
}
|
|
165
308
|
if (params.photo !== undefined) {
|
|
166
|
-
localVarFormParams
|
|
309
|
+
if (!(localVarFormParams instanceof FormData)) {
|
|
310
|
+
const existingParams = localVarFormParams;
|
|
311
|
+
localVarFormParams = new FormData();
|
|
312
|
+
if (existingParams && typeof existingParams === 'object') {
|
|
313
|
+
Object.keys(existingParams).forEach(key => {
|
|
314
|
+
localVarFormParams.append(key, existingParams[key]);
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const photoFiles = Array.isArray(params.photo) ? params.photo : [params.photo];
|
|
319
|
+
const Blob = globalThis.Blob || require('buffer').Blob;
|
|
320
|
+
photoFiles.forEach((f) => {
|
|
321
|
+
localVarFormParams.append('photo', new Blob([f.value], {
|
|
322
|
+
type: f.options.contentType
|
|
323
|
+
}), f.options.filename);
|
|
324
|
+
});
|
|
167
325
|
}
|
|
168
|
-
localVarUseFormData = true;
|
|
169
326
|
if (params.integrateUrl !== undefined) {
|
|
170
|
-
|
|
327
|
+
const isParametersField = "integrateUrl" === "parameters";
|
|
328
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
329
|
+
const integrateUrlSerialized = serializableParams
|
|
330
|
+
? JSON.stringify(params.parameters)
|
|
331
|
+
: models_1.ObjectSerializer.serializeFormData(params.integrateUrl, "string");
|
|
332
|
+
if (localVarFormParams instanceof FormData) {
|
|
333
|
+
localVarFormParams.append('integrateUrl', integrateUrlSerialized);
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
if (!localVarFormParams) {
|
|
337
|
+
localVarFormParams = {};
|
|
338
|
+
}
|
|
339
|
+
localVarFormParams['integrateUrl'] = integrateUrlSerialized;
|
|
340
|
+
}
|
|
171
341
|
}
|
|
172
342
|
if (params.privileged !== undefined) {
|
|
173
|
-
|
|
343
|
+
const isParametersField = "privileged" === "parameters";
|
|
344
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
345
|
+
const privilegedSerialized = serializableParams
|
|
346
|
+
? JSON.stringify(params.parameters)
|
|
347
|
+
: models_1.ObjectSerializer.serializeFormData(params.privileged, "boolean");
|
|
348
|
+
if (localVarFormParams instanceof FormData) {
|
|
349
|
+
localVarFormParams.append('privileged', privilegedSerialized);
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
if (!localVarFormParams) {
|
|
353
|
+
localVarFormParams = {};
|
|
354
|
+
}
|
|
355
|
+
localVarFormParams['privileged'] = privilegedSerialized;
|
|
356
|
+
}
|
|
174
357
|
}
|
|
175
358
|
if (params.mountLearnBlock !== undefined) {
|
|
176
|
-
|
|
359
|
+
const isParametersField = "mountLearnBlock" === "parameters";
|
|
360
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
361
|
+
const mountLearnBlockSerialized = serializableParams
|
|
362
|
+
? JSON.stringify(params.parameters)
|
|
363
|
+
: models_1.ObjectSerializer.serializeFormData(params.mountLearnBlock, "boolean");
|
|
364
|
+
if (localVarFormParams instanceof FormData) {
|
|
365
|
+
localVarFormParams.append('mountLearnBlock', mountLearnBlockSerialized);
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
if (!localVarFormParams) {
|
|
369
|
+
localVarFormParams = {};
|
|
370
|
+
}
|
|
371
|
+
localVarFormParams['mountLearnBlock'] = mountLearnBlockSerialized;
|
|
372
|
+
}
|
|
177
373
|
}
|
|
178
374
|
if (params.supportsEonCompiler !== undefined) {
|
|
179
|
-
|
|
375
|
+
const isParametersField = "supportsEonCompiler" === "parameters";
|
|
376
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
377
|
+
const supportsEonCompilerSerialized = serializableParams
|
|
378
|
+
? JSON.stringify(params.parameters)
|
|
379
|
+
: models_1.ObjectSerializer.serializeFormData(params.supportsEonCompiler, "boolean");
|
|
380
|
+
if (localVarFormParams instanceof FormData) {
|
|
381
|
+
localVarFormParams.append('supportsEonCompiler', supportsEonCompilerSerialized);
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
if (!localVarFormParams) {
|
|
385
|
+
localVarFormParams = {};
|
|
386
|
+
}
|
|
387
|
+
localVarFormParams['supportsEonCompiler'] = supportsEonCompilerSerialized;
|
|
388
|
+
}
|
|
180
389
|
}
|
|
181
390
|
if (params.showOptimizations !== undefined) {
|
|
182
|
-
|
|
391
|
+
const isParametersField = "showOptimizations" === "parameters";
|
|
392
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
393
|
+
const showOptimizationsSerialized = serializableParams
|
|
394
|
+
? JSON.stringify(params.parameters)
|
|
395
|
+
: models_1.ObjectSerializer.serializeFormData(params.showOptimizations, "boolean");
|
|
396
|
+
if (localVarFormParams instanceof FormData) {
|
|
397
|
+
localVarFormParams.append('showOptimizations', showOptimizationsSerialized);
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
if (!localVarFormParams) {
|
|
401
|
+
localVarFormParams = {};
|
|
402
|
+
}
|
|
403
|
+
localVarFormParams['showOptimizations'] = showOptimizationsSerialized;
|
|
404
|
+
}
|
|
183
405
|
}
|
|
184
406
|
if (params.category !== undefined) {
|
|
185
|
-
|
|
407
|
+
const isParametersField = "category" === "parameters";
|
|
408
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
409
|
+
const categorySerialized = serializableParams
|
|
410
|
+
? JSON.stringify(params.parameters)
|
|
411
|
+
: models_1.ObjectSerializer.serializeFormData(params.category, "string");
|
|
412
|
+
if (localVarFormParams instanceof FormData) {
|
|
413
|
+
localVarFormParams.append('category', categorySerialized);
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
if (!localVarFormParams) {
|
|
417
|
+
localVarFormParams = {};
|
|
418
|
+
}
|
|
419
|
+
localVarFormParams['category'] = categorySerialized;
|
|
420
|
+
}
|
|
186
421
|
}
|
|
187
422
|
if (params.sourceCodeDownloadStaffOnly !== undefined) {
|
|
188
|
-
|
|
423
|
+
const isParametersField = "sourceCodeDownloadStaffOnly" === "parameters";
|
|
424
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
425
|
+
const sourceCodeDownloadStaffOnlySerialized = serializableParams
|
|
426
|
+
? JSON.stringify(params.parameters)
|
|
427
|
+
: models_1.ObjectSerializer.serializeFormData(params.sourceCodeDownloadStaffOnly, "boolean");
|
|
428
|
+
if (localVarFormParams instanceof FormData) {
|
|
429
|
+
localVarFormParams.append('sourceCodeDownloadStaffOnly', sourceCodeDownloadStaffOnlySerialized);
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
if (!localVarFormParams) {
|
|
433
|
+
localVarFormParams = {};
|
|
434
|
+
}
|
|
435
|
+
localVarFormParams['sourceCodeDownloadStaffOnly'] = sourceCodeDownloadStaffOnlySerialized;
|
|
436
|
+
}
|
|
189
437
|
}
|
|
438
|
+
if (params.parameters !== undefined) {
|
|
439
|
+
const isParametersField = "parameters" === "parameters";
|
|
440
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
441
|
+
const parametersSerialized = serializableParams
|
|
442
|
+
? JSON.stringify(params.parameters)
|
|
443
|
+
: models_1.ObjectSerializer.serializeFormData(params.parameters, "Array<object>");
|
|
444
|
+
if (localVarFormParams instanceof FormData) {
|
|
445
|
+
localVarFormParams.append('parameters', parametersSerialized);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
if (!localVarFormParams) {
|
|
449
|
+
localVarFormParams = {};
|
|
450
|
+
}
|
|
451
|
+
localVarFormParams['parameters'] = parametersSerialized;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
455
|
+
.filter(([, value]) => value !== undefined)
|
|
456
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
457
|
+
.join('&');
|
|
458
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
190
459
|
let localVarRequestOptions = {
|
|
191
460
|
method: 'POST',
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
461
|
+
headers: { ...localVarHeaderParams },
|
|
462
|
+
};
|
|
463
|
+
let requestOptions = localVarRequestOptions;
|
|
464
|
+
let url = localVarUrl;
|
|
465
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
466
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
467
|
+
url = auth_ApiKeyAuthentication.url;
|
|
468
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
469
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
470
|
+
url = auth_JWTAuthentication.url;
|
|
471
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
472
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
473
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
474
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
475
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
476
|
+
url = auth_OAuth2.url;
|
|
477
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
478
|
+
requestOptions = authDefault.requestOptions;
|
|
479
|
+
url = authDefault.url;
|
|
480
|
+
if (localVarFormParams) {
|
|
481
|
+
delete requestOptions.headers['Content-Type'];
|
|
482
|
+
if (localVarFormParams instanceof FormData) {
|
|
483
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
484
|
+
requestOptions.body = localVarFormParams;
|
|
213
485
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
223
|
-
reject(new Error(body.error || errString));
|
|
224
|
-
}
|
|
225
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
226
|
-
resolve(body);
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
230
|
-
reject(errString);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
});
|
|
486
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
487
|
+
// URL-encoded form
|
|
488
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
489
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
const response = await fetch(url, requestOptions);
|
|
493
|
+
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
236
494
|
}
|
|
237
495
|
/**
|
|
238
496
|
* Adds a dsp block.
|
|
@@ -244,9 +502,11 @@ class OrganizationBlocksApi {
|
|
|
244
502
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp'
|
|
245
503
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
246
504
|
let localVarQueryParameters = {};
|
|
247
|
-
let localVarHeaderParams =
|
|
248
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
249
|
-
|
|
505
|
+
let localVarHeaderParams = {
|
|
506
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
507
|
+
'Content-Type': 'application/json',
|
|
508
|
+
...this.defaultHeaders,
|
|
509
|
+
};
|
|
250
510
|
const produces = ['application/json'];
|
|
251
511
|
// give precedence to 'application/json'
|
|
252
512
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -255,7 +515,7 @@ class OrganizationBlocksApi {
|
|
|
255
515
|
else {
|
|
256
516
|
localVarHeaderParams.Accept = produces.join(',');
|
|
257
517
|
}
|
|
258
|
-
let localVarFormParams
|
|
518
|
+
let localVarFormParams;
|
|
259
519
|
// verify required parameter 'organizationId' is not null or undefined
|
|
260
520
|
if (organizationId === null || organizationId === undefined) {
|
|
261
521
|
throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationDspBlock.');
|
|
@@ -264,56 +524,52 @@ class OrganizationBlocksApi {
|
|
|
264
524
|
if (addOrganizationDspBlockRequest === null || addOrganizationDspBlockRequest === undefined) {
|
|
265
525
|
throw new Error('Required parameter addOrganizationDspBlockRequest was null or undefined when calling addOrganizationDspBlock.');
|
|
266
526
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
527
|
+
localVarHeaderParams = {
|
|
528
|
+
...localVarHeaderParams,
|
|
529
|
+
...options.headers,
|
|
530
|
+
...this.opts.extraHeaders,
|
|
531
|
+
};
|
|
532
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
533
|
+
.filter(([, value]) => value !== undefined)
|
|
534
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
535
|
+
.join('&');
|
|
536
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
270
537
|
let localVarRequestOptions = {
|
|
271
538
|
method: 'POST',
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
539
|
+
headers: { ...localVarHeaderParams },
|
|
540
|
+
};
|
|
541
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(addOrganizationDspBlockRequest, "AddOrganizationDspBlockRequest"));
|
|
542
|
+
let requestOptions = localVarRequestOptions;
|
|
543
|
+
let url = localVarUrl;
|
|
544
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
545
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
546
|
+
url = auth_ApiKeyAuthentication.url;
|
|
547
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
548
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
549
|
+
url = auth_JWTAuthentication.url;
|
|
550
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
551
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
552
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
553
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
554
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
555
|
+
url = auth_OAuth2.url;
|
|
556
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
557
|
+
requestOptions = authDefault.requestOptions;
|
|
558
|
+
url = authDefault.url;
|
|
559
|
+
if (localVarFormParams) {
|
|
560
|
+
delete requestOptions.headers['Content-Type'];
|
|
561
|
+
if (localVarFormParams instanceof FormData) {
|
|
562
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
563
|
+
requestOptions.body = localVarFormParams;
|
|
294
564
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
304
|
-
reject(new Error(body.error || errString));
|
|
305
|
-
}
|
|
306
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
307
|
-
resolve(body);
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
311
|
-
reject(errString);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
});
|
|
565
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
566
|
+
// URL-encoded form
|
|
567
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
568
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
const response = await fetch(url, requestOptions);
|
|
572
|
+
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
317
573
|
}
|
|
318
574
|
/**
|
|
319
575
|
* Adds a secret.
|
|
@@ -325,9 +581,11 @@ class OrganizationBlocksApi {
|
|
|
325
581
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/secrets'
|
|
326
582
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
327
583
|
let localVarQueryParameters = {};
|
|
328
|
-
let localVarHeaderParams =
|
|
329
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
330
|
-
|
|
584
|
+
let localVarHeaderParams = {
|
|
585
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
586
|
+
'Content-Type': 'application/json',
|
|
587
|
+
...this.defaultHeaders,
|
|
588
|
+
};
|
|
331
589
|
const produces = ['application/json'];
|
|
332
590
|
// give precedence to 'application/json'
|
|
333
591
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -336,7 +594,7 @@ class OrganizationBlocksApi {
|
|
|
336
594
|
else {
|
|
337
595
|
localVarHeaderParams.Accept = produces.join(',');
|
|
338
596
|
}
|
|
339
|
-
let localVarFormParams
|
|
597
|
+
let localVarFormParams;
|
|
340
598
|
// verify required parameter 'organizationId' is not null or undefined
|
|
341
599
|
if (organizationId === null || organizationId === undefined) {
|
|
342
600
|
throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationSecret.');
|
|
@@ -345,56 +603,52 @@ class OrganizationBlocksApi {
|
|
|
345
603
|
if (addOrganizationSecretRequest === null || addOrganizationSecretRequest === undefined) {
|
|
346
604
|
throw new Error('Required parameter addOrganizationSecretRequest was null or undefined when calling addOrganizationSecret.');
|
|
347
605
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
606
|
+
localVarHeaderParams = {
|
|
607
|
+
...localVarHeaderParams,
|
|
608
|
+
...options.headers,
|
|
609
|
+
...this.opts.extraHeaders,
|
|
610
|
+
};
|
|
611
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
612
|
+
.filter(([, value]) => value !== undefined)
|
|
613
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
614
|
+
.join('&');
|
|
615
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
351
616
|
let localVarRequestOptions = {
|
|
352
617
|
method: 'POST',
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
618
|
+
headers: { ...localVarHeaderParams },
|
|
619
|
+
};
|
|
620
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(addOrganizationSecretRequest, "AddOrganizationSecretRequest"));
|
|
621
|
+
let requestOptions = localVarRequestOptions;
|
|
622
|
+
let url = localVarUrl;
|
|
623
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
624
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
625
|
+
url = auth_ApiKeyAuthentication.url;
|
|
626
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
627
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
628
|
+
url = auth_JWTAuthentication.url;
|
|
629
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
630
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
631
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
632
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
633
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
634
|
+
url = auth_OAuth2.url;
|
|
635
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
636
|
+
requestOptions = authDefault.requestOptions;
|
|
637
|
+
url = authDefault.url;
|
|
638
|
+
if (localVarFormParams) {
|
|
639
|
+
delete requestOptions.headers['Content-Type'];
|
|
640
|
+
if (localVarFormParams instanceof FormData) {
|
|
641
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
642
|
+
requestOptions.body = localVarFormParams;
|
|
375
643
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
385
|
-
reject(new Error(body.error || errString));
|
|
386
|
-
}
|
|
387
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
388
|
-
resolve(body);
|
|
389
|
-
}
|
|
390
|
-
else {
|
|
391
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
392
|
-
reject(errString);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
});
|
|
396
|
-
});
|
|
397
|
-
});
|
|
644
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
645
|
+
// URL-encoded form
|
|
646
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
647
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
const response = await fetch(url, requestOptions);
|
|
651
|
+
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
398
652
|
}
|
|
399
653
|
/**
|
|
400
654
|
* Adds a transfer learning block.
|
|
@@ -406,9 +660,11 @@ class OrganizationBlocksApi {
|
|
|
406
660
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/transfer-learning'
|
|
407
661
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
408
662
|
let localVarQueryParameters = {};
|
|
409
|
-
let localVarHeaderParams =
|
|
410
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
411
|
-
|
|
663
|
+
let localVarHeaderParams = {
|
|
664
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
665
|
+
'Content-Type': 'application/json',
|
|
666
|
+
...this.defaultHeaders,
|
|
667
|
+
};
|
|
412
668
|
const produces = ['application/json'];
|
|
413
669
|
// give precedence to 'application/json'
|
|
414
670
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -417,7 +673,7 @@ class OrganizationBlocksApi {
|
|
|
417
673
|
else {
|
|
418
674
|
localVarHeaderParams.Accept = produces.join(',');
|
|
419
675
|
}
|
|
420
|
-
let localVarFormParams
|
|
676
|
+
let localVarFormParams;
|
|
421
677
|
// verify required parameter 'organizationId' is not null or undefined
|
|
422
678
|
if (organizationId === null || organizationId === undefined) {
|
|
423
679
|
throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationTransferLearningBlock.');
|
|
@@ -426,56 +682,52 @@ class OrganizationBlocksApi {
|
|
|
426
682
|
if (addOrganizationTransferLearningBlockRequest === null || addOrganizationTransferLearningBlockRequest === undefined) {
|
|
427
683
|
throw new Error('Required parameter addOrganizationTransferLearningBlockRequest was null or undefined when calling addOrganizationTransferLearningBlock.');
|
|
428
684
|
}
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
685
|
+
localVarHeaderParams = {
|
|
686
|
+
...localVarHeaderParams,
|
|
687
|
+
...options.headers,
|
|
688
|
+
...this.opts.extraHeaders,
|
|
689
|
+
};
|
|
690
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
691
|
+
.filter(([, value]) => value !== undefined)
|
|
692
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
693
|
+
.join('&');
|
|
694
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
432
695
|
let localVarRequestOptions = {
|
|
433
696
|
method: 'POST',
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
697
|
+
headers: { ...localVarHeaderParams },
|
|
698
|
+
};
|
|
699
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(addOrganizationTransferLearningBlockRequest, "AddOrganizationTransferLearningBlockRequest"));
|
|
700
|
+
let requestOptions = localVarRequestOptions;
|
|
701
|
+
let url = localVarUrl;
|
|
702
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
703
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
704
|
+
url = auth_ApiKeyAuthentication.url;
|
|
705
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
706
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
707
|
+
url = auth_JWTAuthentication.url;
|
|
708
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
709
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
710
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
711
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
712
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
713
|
+
url = auth_OAuth2.url;
|
|
714
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
715
|
+
requestOptions = authDefault.requestOptions;
|
|
716
|
+
url = authDefault.url;
|
|
717
|
+
if (localVarFormParams) {
|
|
718
|
+
delete requestOptions.headers['Content-Type'];
|
|
719
|
+
if (localVarFormParams instanceof FormData) {
|
|
720
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
721
|
+
requestOptions.body = localVarFormParams;
|
|
456
722
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
466
|
-
reject(new Error(body.error || errString));
|
|
467
|
-
}
|
|
468
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
469
|
-
resolve(body);
|
|
470
|
-
}
|
|
471
|
-
else {
|
|
472
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
473
|
-
reject(errString);
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
|
-
});
|
|
723
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
724
|
+
// URL-encoded form
|
|
725
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
726
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
const response = await fetch(url, requestOptions);
|
|
730
|
+
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
479
731
|
}
|
|
480
732
|
/**
|
|
481
733
|
* Adds a transformation block.
|
|
@@ -487,9 +739,11 @@ class OrganizationBlocksApi {
|
|
|
487
739
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation'
|
|
488
740
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
489
741
|
let localVarQueryParameters = {};
|
|
490
|
-
let localVarHeaderParams =
|
|
491
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
492
|
-
|
|
742
|
+
let localVarHeaderParams = {
|
|
743
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
744
|
+
'Content-Type': 'application/json',
|
|
745
|
+
...this.defaultHeaders,
|
|
746
|
+
};
|
|
493
747
|
const produces = ['application/json'];
|
|
494
748
|
// give precedence to 'application/json'
|
|
495
749
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -498,7 +752,7 @@ class OrganizationBlocksApi {
|
|
|
498
752
|
else {
|
|
499
753
|
localVarHeaderParams.Accept = produces.join(',');
|
|
500
754
|
}
|
|
501
|
-
let localVarFormParams
|
|
755
|
+
let localVarFormParams;
|
|
502
756
|
// verify required parameter 'organizationId' is not null or undefined
|
|
503
757
|
if (organizationId === null || organizationId === undefined) {
|
|
504
758
|
throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationTransformationBlock.');
|
|
@@ -507,56 +761,52 @@ class OrganizationBlocksApi {
|
|
|
507
761
|
if (addOrganizationTransformationBlockRequest === null || addOrganizationTransformationBlockRequest === undefined) {
|
|
508
762
|
throw new Error('Required parameter addOrganizationTransformationBlockRequest was null or undefined when calling addOrganizationTransformationBlock.');
|
|
509
763
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
764
|
+
localVarHeaderParams = {
|
|
765
|
+
...localVarHeaderParams,
|
|
766
|
+
...options.headers,
|
|
767
|
+
...this.opts.extraHeaders,
|
|
768
|
+
};
|
|
769
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
770
|
+
.filter(([, value]) => value !== undefined)
|
|
771
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
772
|
+
.join('&');
|
|
773
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
513
774
|
let localVarRequestOptions = {
|
|
514
775
|
method: 'POST',
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
776
|
+
headers: { ...localVarHeaderParams },
|
|
777
|
+
};
|
|
778
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(addOrganizationTransformationBlockRequest, "AddOrganizationTransformationBlockRequest"));
|
|
779
|
+
let requestOptions = localVarRequestOptions;
|
|
780
|
+
let url = localVarUrl;
|
|
781
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
782
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
783
|
+
url = auth_ApiKeyAuthentication.url;
|
|
784
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
785
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
786
|
+
url = auth_JWTAuthentication.url;
|
|
787
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
788
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
789
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
790
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
791
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
792
|
+
url = auth_OAuth2.url;
|
|
793
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
794
|
+
requestOptions = authDefault.requestOptions;
|
|
795
|
+
url = authDefault.url;
|
|
796
|
+
if (localVarFormParams) {
|
|
797
|
+
delete requestOptions.headers['Content-Type'];
|
|
798
|
+
if (localVarFormParams instanceof FormData) {
|
|
799
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
800
|
+
requestOptions.body = localVarFormParams;
|
|
537
801
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
547
|
-
reject(new Error(body.error || errString));
|
|
548
|
-
}
|
|
549
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
550
|
-
resolve(body);
|
|
551
|
-
}
|
|
552
|
-
else {
|
|
553
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
554
|
-
reject(errString);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
});
|
|
558
|
-
});
|
|
559
|
-
});
|
|
802
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
803
|
+
// URL-encoded form
|
|
804
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
805
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
const response = await fetch(url, requestOptions);
|
|
809
|
+
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
560
810
|
}
|
|
561
811
|
/**
|
|
562
812
|
* Deletes a deploy block.
|
|
@@ -569,9 +819,11 @@ class OrganizationBlocksApi {
|
|
|
569
819
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
570
820
|
.replace('{' + 'deployId' + '}', encodeURIComponent(String(deployId)));
|
|
571
821
|
let localVarQueryParameters = {};
|
|
572
|
-
let localVarHeaderParams =
|
|
573
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
574
|
-
|
|
822
|
+
let localVarHeaderParams = {
|
|
823
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
824
|
+
'Content-Type': 'application/json',
|
|
825
|
+
...this.defaultHeaders,
|
|
826
|
+
};
|
|
575
827
|
const produces = ['application/json'];
|
|
576
828
|
// give precedence to 'application/json'
|
|
577
829
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -580,7 +832,7 @@ class OrganizationBlocksApi {
|
|
|
580
832
|
else {
|
|
581
833
|
localVarHeaderParams.Accept = produces.join(',');
|
|
582
834
|
}
|
|
583
|
-
let localVarFormParams
|
|
835
|
+
let localVarFormParams;
|
|
584
836
|
// verify required parameter 'organizationId' is not null or undefined
|
|
585
837
|
if (organizationId === null || organizationId === undefined) {
|
|
586
838
|
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationDeployBlock.');
|
|
@@ -589,55 +841,51 @@ class OrganizationBlocksApi {
|
|
|
589
841
|
if (deployId === null || deployId === undefined) {
|
|
590
842
|
throw new Error('Required parameter deployId was null or undefined when calling deleteOrganizationDeployBlock.');
|
|
591
843
|
}
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
844
|
+
localVarHeaderParams = {
|
|
845
|
+
...localVarHeaderParams,
|
|
846
|
+
...options.headers,
|
|
847
|
+
...this.opts.extraHeaders,
|
|
848
|
+
};
|
|
849
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
850
|
+
.filter(([, value]) => value !== undefined)
|
|
851
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
852
|
+
.join('&');
|
|
853
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
595
854
|
let localVarRequestOptions = {
|
|
596
855
|
method: 'DELETE',
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
856
|
+
headers: { ...localVarHeaderParams },
|
|
857
|
+
};
|
|
858
|
+
let requestOptions = localVarRequestOptions;
|
|
859
|
+
let url = localVarUrl;
|
|
860
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
861
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
862
|
+
url = auth_ApiKeyAuthentication.url;
|
|
863
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
864
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
865
|
+
url = auth_JWTAuthentication.url;
|
|
866
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
867
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
868
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
869
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
870
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
871
|
+
url = auth_OAuth2.url;
|
|
872
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
873
|
+
requestOptions = authDefault.requestOptions;
|
|
874
|
+
url = authDefault.url;
|
|
875
|
+
if (localVarFormParams) {
|
|
876
|
+
delete requestOptions.headers['Content-Type'];
|
|
877
|
+
if (localVarFormParams instanceof FormData) {
|
|
878
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
879
|
+
requestOptions.body = localVarFormParams;
|
|
618
880
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
628
|
-
reject(new Error(body.error || errString));
|
|
629
|
-
}
|
|
630
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
631
|
-
resolve(body);
|
|
632
|
-
}
|
|
633
|
-
else {
|
|
634
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
635
|
-
reject(errString);
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
});
|
|
639
|
-
});
|
|
640
|
-
});
|
|
881
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
882
|
+
// URL-encoded form
|
|
883
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
884
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
const response = await fetch(url, requestOptions);
|
|
888
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
641
889
|
}
|
|
642
890
|
/**
|
|
643
891
|
* Deletes a dsp block.
|
|
@@ -650,9 +898,11 @@ class OrganizationBlocksApi {
|
|
|
650
898
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
651
899
|
.replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
|
|
652
900
|
let localVarQueryParameters = {};
|
|
653
|
-
let localVarHeaderParams =
|
|
654
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
655
|
-
|
|
901
|
+
let localVarHeaderParams = {
|
|
902
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
903
|
+
'Content-Type': 'application/json',
|
|
904
|
+
...this.defaultHeaders,
|
|
905
|
+
};
|
|
656
906
|
const produces = ['application/json'];
|
|
657
907
|
// give precedence to 'application/json'
|
|
658
908
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -661,7 +911,7 @@ class OrganizationBlocksApi {
|
|
|
661
911
|
else {
|
|
662
912
|
localVarHeaderParams.Accept = produces.join(',');
|
|
663
913
|
}
|
|
664
|
-
let localVarFormParams
|
|
914
|
+
let localVarFormParams;
|
|
665
915
|
// verify required parameter 'organizationId' is not null or undefined
|
|
666
916
|
if (organizationId === null || organizationId === undefined) {
|
|
667
917
|
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationDspBlock.');
|
|
@@ -670,55 +920,51 @@ class OrganizationBlocksApi {
|
|
|
670
920
|
if (dspId === null || dspId === undefined) {
|
|
671
921
|
throw new Error('Required parameter dspId was null or undefined when calling deleteOrganizationDspBlock.');
|
|
672
922
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
923
|
+
localVarHeaderParams = {
|
|
924
|
+
...localVarHeaderParams,
|
|
925
|
+
...options.headers,
|
|
926
|
+
...this.opts.extraHeaders,
|
|
927
|
+
};
|
|
928
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
929
|
+
.filter(([, value]) => value !== undefined)
|
|
930
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
931
|
+
.join('&');
|
|
932
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
676
933
|
let localVarRequestOptions = {
|
|
677
934
|
method: 'DELETE',
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
935
|
+
headers: { ...localVarHeaderParams },
|
|
936
|
+
};
|
|
937
|
+
let requestOptions = localVarRequestOptions;
|
|
938
|
+
let url = localVarUrl;
|
|
939
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
940
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
941
|
+
url = auth_ApiKeyAuthentication.url;
|
|
942
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
943
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
944
|
+
url = auth_JWTAuthentication.url;
|
|
945
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
946
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
947
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
948
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
949
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
950
|
+
url = auth_OAuth2.url;
|
|
951
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
952
|
+
requestOptions = authDefault.requestOptions;
|
|
953
|
+
url = authDefault.url;
|
|
954
|
+
if (localVarFormParams) {
|
|
955
|
+
delete requestOptions.headers['Content-Type'];
|
|
956
|
+
if (localVarFormParams instanceof FormData) {
|
|
957
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
958
|
+
requestOptions.body = localVarFormParams;
|
|
699
959
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
709
|
-
reject(new Error(body.error || errString));
|
|
710
|
-
}
|
|
711
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
712
|
-
resolve(body);
|
|
713
|
-
}
|
|
714
|
-
else {
|
|
715
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
716
|
-
reject(errString);
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
});
|
|
720
|
-
});
|
|
721
|
-
});
|
|
960
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
961
|
+
// URL-encoded form
|
|
962
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
963
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
const response = await fetch(url, requestOptions);
|
|
967
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
722
968
|
}
|
|
723
969
|
/**
|
|
724
970
|
* Deletes a secret
|
|
@@ -731,9 +977,11 @@ class OrganizationBlocksApi {
|
|
|
731
977
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
732
978
|
.replace('{' + 'secretId' + '}', encodeURIComponent(String(secretId)));
|
|
733
979
|
let localVarQueryParameters = {};
|
|
734
|
-
let localVarHeaderParams =
|
|
735
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
736
|
-
|
|
980
|
+
let localVarHeaderParams = {
|
|
981
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
982
|
+
'Content-Type': 'application/json',
|
|
983
|
+
...this.defaultHeaders,
|
|
984
|
+
};
|
|
737
985
|
const produces = ['application/json'];
|
|
738
986
|
// give precedence to 'application/json'
|
|
739
987
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -742,7 +990,7 @@ class OrganizationBlocksApi {
|
|
|
742
990
|
else {
|
|
743
991
|
localVarHeaderParams.Accept = produces.join(',');
|
|
744
992
|
}
|
|
745
|
-
let localVarFormParams
|
|
993
|
+
let localVarFormParams;
|
|
746
994
|
// verify required parameter 'organizationId' is not null or undefined
|
|
747
995
|
if (organizationId === null || organizationId === undefined) {
|
|
748
996
|
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationSecret.');
|
|
@@ -751,55 +999,51 @@ class OrganizationBlocksApi {
|
|
|
751
999
|
if (secretId === null || secretId === undefined) {
|
|
752
1000
|
throw new Error('Required parameter secretId was null or undefined when calling deleteOrganizationSecret.');
|
|
753
1001
|
}
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
1002
|
+
localVarHeaderParams = {
|
|
1003
|
+
...localVarHeaderParams,
|
|
1004
|
+
...options.headers,
|
|
1005
|
+
...this.opts.extraHeaders,
|
|
1006
|
+
};
|
|
1007
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1008
|
+
.filter(([, value]) => value !== undefined)
|
|
1009
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1010
|
+
.join('&');
|
|
1011
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
757
1012
|
let localVarRequestOptions = {
|
|
758
1013
|
method: 'DELETE',
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
1014
|
+
headers: { ...localVarHeaderParams },
|
|
1015
|
+
};
|
|
1016
|
+
let requestOptions = localVarRequestOptions;
|
|
1017
|
+
let url = localVarUrl;
|
|
1018
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1019
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1020
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1021
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1022
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1023
|
+
url = auth_JWTAuthentication.url;
|
|
1024
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1025
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1026
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1027
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1028
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1029
|
+
url = auth_OAuth2.url;
|
|
1030
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1031
|
+
requestOptions = authDefault.requestOptions;
|
|
1032
|
+
url = authDefault.url;
|
|
1033
|
+
if (localVarFormParams) {
|
|
1034
|
+
delete requestOptions.headers['Content-Type'];
|
|
1035
|
+
if (localVarFormParams instanceof FormData) {
|
|
1036
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1037
|
+
requestOptions.body = localVarFormParams;
|
|
780
1038
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
790
|
-
reject(new Error(body.error || errString));
|
|
791
|
-
}
|
|
792
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
793
|
-
resolve(body);
|
|
794
|
-
}
|
|
795
|
-
else {
|
|
796
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
797
|
-
reject(errString);
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
});
|
|
801
|
-
});
|
|
802
|
-
});
|
|
1039
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1040
|
+
// URL-encoded form
|
|
1041
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1042
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
const response = await fetch(url, requestOptions);
|
|
1046
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
803
1047
|
}
|
|
804
1048
|
/**
|
|
805
1049
|
* Deletes a transfer learning block.
|
|
@@ -812,9 +1056,11 @@ class OrganizationBlocksApi {
|
|
|
812
1056
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
813
1057
|
.replace('{' + 'transferLearningId' + '}', encodeURIComponent(String(transferLearningId)));
|
|
814
1058
|
let localVarQueryParameters = {};
|
|
815
|
-
let localVarHeaderParams =
|
|
816
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
817
|
-
|
|
1059
|
+
let localVarHeaderParams = {
|
|
1060
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1061
|
+
'Content-Type': 'application/json',
|
|
1062
|
+
...this.defaultHeaders,
|
|
1063
|
+
};
|
|
818
1064
|
const produces = ['application/json'];
|
|
819
1065
|
// give precedence to 'application/json'
|
|
820
1066
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -823,7 +1069,7 @@ class OrganizationBlocksApi {
|
|
|
823
1069
|
else {
|
|
824
1070
|
localVarHeaderParams.Accept = produces.join(',');
|
|
825
1071
|
}
|
|
826
|
-
let localVarFormParams
|
|
1072
|
+
let localVarFormParams;
|
|
827
1073
|
// verify required parameter 'organizationId' is not null or undefined
|
|
828
1074
|
if (organizationId === null || organizationId === undefined) {
|
|
829
1075
|
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationTransferLearningBlock.');
|
|
@@ -832,55 +1078,51 @@ class OrganizationBlocksApi {
|
|
|
832
1078
|
if (transferLearningId === null || transferLearningId === undefined) {
|
|
833
1079
|
throw new Error('Required parameter transferLearningId was null or undefined when calling deleteOrganizationTransferLearningBlock.');
|
|
834
1080
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
1081
|
+
localVarHeaderParams = {
|
|
1082
|
+
...localVarHeaderParams,
|
|
1083
|
+
...options.headers,
|
|
1084
|
+
...this.opts.extraHeaders,
|
|
1085
|
+
};
|
|
1086
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1087
|
+
.filter(([, value]) => value !== undefined)
|
|
1088
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1089
|
+
.join('&');
|
|
1090
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
838
1091
|
let localVarRequestOptions = {
|
|
839
1092
|
method: 'DELETE',
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
1093
|
+
headers: { ...localVarHeaderParams },
|
|
1094
|
+
};
|
|
1095
|
+
let requestOptions = localVarRequestOptions;
|
|
1096
|
+
let url = localVarUrl;
|
|
1097
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1098
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1099
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1100
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1101
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1102
|
+
url = auth_JWTAuthentication.url;
|
|
1103
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1104
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1105
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1106
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1107
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1108
|
+
url = auth_OAuth2.url;
|
|
1109
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1110
|
+
requestOptions = authDefault.requestOptions;
|
|
1111
|
+
url = authDefault.url;
|
|
1112
|
+
if (localVarFormParams) {
|
|
1113
|
+
delete requestOptions.headers['Content-Type'];
|
|
1114
|
+
if (localVarFormParams instanceof FormData) {
|
|
1115
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1116
|
+
requestOptions.body = localVarFormParams;
|
|
861
1117
|
}
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
871
|
-
reject(new Error(body.error || errString));
|
|
872
|
-
}
|
|
873
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
874
|
-
resolve(body);
|
|
875
|
-
}
|
|
876
|
-
else {
|
|
877
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
878
|
-
reject(errString);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
});
|
|
882
|
-
});
|
|
883
|
-
});
|
|
1118
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1119
|
+
// URL-encoded form
|
|
1120
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1121
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
const response = await fetch(url, requestOptions);
|
|
1125
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
884
1126
|
}
|
|
885
1127
|
/**
|
|
886
1128
|
* Deletes a transformation block.
|
|
@@ -893,9 +1135,11 @@ class OrganizationBlocksApi {
|
|
|
893
1135
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
894
1136
|
.replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
|
|
895
1137
|
let localVarQueryParameters = {};
|
|
896
|
-
let localVarHeaderParams =
|
|
897
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
898
|
-
|
|
1138
|
+
let localVarHeaderParams = {
|
|
1139
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1140
|
+
'Content-Type': 'application/json',
|
|
1141
|
+
...this.defaultHeaders,
|
|
1142
|
+
};
|
|
899
1143
|
const produces = ['application/json'];
|
|
900
1144
|
// give precedence to 'application/json'
|
|
901
1145
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -904,7 +1148,7 @@ class OrganizationBlocksApi {
|
|
|
904
1148
|
else {
|
|
905
1149
|
localVarHeaderParams.Accept = produces.join(',');
|
|
906
1150
|
}
|
|
907
|
-
let localVarFormParams
|
|
1151
|
+
let localVarFormParams;
|
|
908
1152
|
// verify required parameter 'organizationId' is not null or undefined
|
|
909
1153
|
if (organizationId === null || organizationId === undefined) {
|
|
910
1154
|
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationTransformationBlock.');
|
|
@@ -913,55 +1157,51 @@ class OrganizationBlocksApi {
|
|
|
913
1157
|
if (transformationId === null || transformationId === undefined) {
|
|
914
1158
|
throw new Error('Required parameter transformationId was null or undefined when calling deleteOrganizationTransformationBlock.');
|
|
915
1159
|
}
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
1160
|
+
localVarHeaderParams = {
|
|
1161
|
+
...localVarHeaderParams,
|
|
1162
|
+
...options.headers,
|
|
1163
|
+
...this.opts.extraHeaders,
|
|
1164
|
+
};
|
|
1165
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1166
|
+
.filter(([, value]) => value !== undefined)
|
|
1167
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1168
|
+
.join('&');
|
|
1169
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
919
1170
|
let localVarRequestOptions = {
|
|
920
1171
|
method: 'DELETE',
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
1172
|
+
headers: { ...localVarHeaderParams },
|
|
1173
|
+
};
|
|
1174
|
+
let requestOptions = localVarRequestOptions;
|
|
1175
|
+
let url = localVarUrl;
|
|
1176
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1177
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1178
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1179
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1180
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1181
|
+
url = auth_JWTAuthentication.url;
|
|
1182
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1183
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1184
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1185
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1186
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1187
|
+
url = auth_OAuth2.url;
|
|
1188
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1189
|
+
requestOptions = authDefault.requestOptions;
|
|
1190
|
+
url = authDefault.url;
|
|
1191
|
+
if (localVarFormParams) {
|
|
1192
|
+
delete requestOptions.headers['Content-Type'];
|
|
1193
|
+
if (localVarFormParams instanceof FormData) {
|
|
1194
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1195
|
+
requestOptions.body = localVarFormParams;
|
|
942
1196
|
}
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
952
|
-
reject(new Error(body.error || errString));
|
|
953
|
-
}
|
|
954
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
955
|
-
resolve(body);
|
|
956
|
-
}
|
|
957
|
-
else {
|
|
958
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
959
|
-
reject(errString);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
});
|
|
963
|
-
});
|
|
964
|
-
});
|
|
1197
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1198
|
+
// URL-encoded form
|
|
1199
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1200
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
const response = await fetch(url, requestOptions);
|
|
1204
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
965
1205
|
}
|
|
966
1206
|
/**
|
|
967
1207
|
* Download the source code for this block.
|
|
@@ -974,9 +1214,11 @@ class OrganizationBlocksApi {
|
|
|
974
1214
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
975
1215
|
.replace('{' + 'deployId' + '}', encodeURIComponent(String(deployId)));
|
|
976
1216
|
let localVarQueryParameters = {};
|
|
977
|
-
let localVarHeaderParams =
|
|
978
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
979
|
-
|
|
1217
|
+
let localVarHeaderParams = {
|
|
1218
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1219
|
+
'Content-Type': 'application/json',
|
|
1220
|
+
...this.defaultHeaders,
|
|
1221
|
+
};
|
|
980
1222
|
const produces = ['application/json'];
|
|
981
1223
|
// give precedence to 'application/json'
|
|
982
1224
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -985,7 +1227,7 @@ class OrganizationBlocksApi {
|
|
|
985
1227
|
else {
|
|
986
1228
|
localVarHeaderParams.Accept = produces.join(',');
|
|
987
1229
|
}
|
|
988
|
-
let localVarFormParams
|
|
1230
|
+
let localVarFormParams;
|
|
989
1231
|
// verify required parameter 'organizationId' is not null or undefined
|
|
990
1232
|
if (organizationId === null || organizationId === undefined) {
|
|
991
1233
|
throw new Error('Required parameter organizationId was null or undefined when calling exportOrganizationDeployBlock.');
|
|
@@ -994,55 +1236,51 @@ class OrganizationBlocksApi {
|
|
|
994
1236
|
if (deployId === null || deployId === undefined) {
|
|
995
1237
|
throw new Error('Required parameter deployId was null or undefined when calling exportOrganizationDeployBlock.');
|
|
996
1238
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1239
|
+
localVarHeaderParams = {
|
|
1240
|
+
...localVarHeaderParams,
|
|
1241
|
+
...options.headers,
|
|
1242
|
+
...this.opts.extraHeaders,
|
|
1243
|
+
};
|
|
1244
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1245
|
+
.filter(([, value]) => value !== undefined)
|
|
1246
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1247
|
+
.join('&');
|
|
1248
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1000
1249
|
let localVarRequestOptions = {
|
|
1001
1250
|
method: 'POST',
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1251
|
+
headers: { ...localVarHeaderParams },
|
|
1252
|
+
};
|
|
1253
|
+
let requestOptions = localVarRequestOptions;
|
|
1254
|
+
let url = localVarUrl;
|
|
1255
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1256
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1257
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1258
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1259
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1260
|
+
url = auth_JWTAuthentication.url;
|
|
1261
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1262
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1263
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1264
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1265
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1266
|
+
url = auth_OAuth2.url;
|
|
1267
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1268
|
+
requestOptions = authDefault.requestOptions;
|
|
1269
|
+
url = authDefault.url;
|
|
1270
|
+
if (localVarFormParams) {
|
|
1271
|
+
delete requestOptions.headers['Content-Type'];
|
|
1272
|
+
if (localVarFormParams instanceof FormData) {
|
|
1273
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1274
|
+
requestOptions.body = localVarFormParams;
|
|
1023
1275
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1033
|
-
reject(new Error(body.error || errString));
|
|
1034
|
-
}
|
|
1035
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1036
|
-
resolve(body);
|
|
1037
|
-
}
|
|
1038
|
-
else {
|
|
1039
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1040
|
-
reject(errString);
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
});
|
|
1044
|
-
});
|
|
1045
|
-
});
|
|
1276
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1277
|
+
// URL-encoded form
|
|
1278
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1279
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
const response = await fetch(url, requestOptions);
|
|
1283
|
+
return this.handleResponse(response, 'ExportBlockResponse');
|
|
1046
1284
|
}
|
|
1047
1285
|
/**
|
|
1048
1286
|
* Download the source code for this block.
|
|
@@ -1055,9 +1293,11 @@ class OrganizationBlocksApi {
|
|
|
1055
1293
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1056
1294
|
.replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
|
|
1057
1295
|
let localVarQueryParameters = {};
|
|
1058
|
-
let localVarHeaderParams =
|
|
1059
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1060
|
-
|
|
1296
|
+
let localVarHeaderParams = {
|
|
1297
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1298
|
+
'Content-Type': 'application/json',
|
|
1299
|
+
...this.defaultHeaders,
|
|
1300
|
+
};
|
|
1061
1301
|
const produces = ['application/json'];
|
|
1062
1302
|
// give precedence to 'application/json'
|
|
1063
1303
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1066,7 +1306,7 @@ class OrganizationBlocksApi {
|
|
|
1066
1306
|
else {
|
|
1067
1307
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1068
1308
|
}
|
|
1069
|
-
let localVarFormParams
|
|
1309
|
+
let localVarFormParams;
|
|
1070
1310
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1071
1311
|
if (organizationId === null || organizationId === undefined) {
|
|
1072
1312
|
throw new Error('Required parameter organizationId was null or undefined when calling exportOrganizationDspBlock.');
|
|
@@ -1075,55 +1315,51 @@ class OrganizationBlocksApi {
|
|
|
1075
1315
|
if (dspId === null || dspId === undefined) {
|
|
1076
1316
|
throw new Error('Required parameter dspId was null or undefined when calling exportOrganizationDspBlock.');
|
|
1077
1317
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1318
|
+
localVarHeaderParams = {
|
|
1319
|
+
...localVarHeaderParams,
|
|
1320
|
+
...options.headers,
|
|
1321
|
+
...this.opts.extraHeaders,
|
|
1322
|
+
};
|
|
1323
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1324
|
+
.filter(([, value]) => value !== undefined)
|
|
1325
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1326
|
+
.join('&');
|
|
1327
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1081
1328
|
let localVarRequestOptions = {
|
|
1082
1329
|
method: 'POST',
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1330
|
+
headers: { ...localVarHeaderParams },
|
|
1331
|
+
};
|
|
1332
|
+
let requestOptions = localVarRequestOptions;
|
|
1333
|
+
let url = localVarUrl;
|
|
1334
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1335
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1336
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1337
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1338
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1339
|
+
url = auth_JWTAuthentication.url;
|
|
1340
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1341
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1342
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1343
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1344
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1345
|
+
url = auth_OAuth2.url;
|
|
1346
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1347
|
+
requestOptions = authDefault.requestOptions;
|
|
1348
|
+
url = authDefault.url;
|
|
1349
|
+
if (localVarFormParams) {
|
|
1350
|
+
delete requestOptions.headers['Content-Type'];
|
|
1351
|
+
if (localVarFormParams instanceof FormData) {
|
|
1352
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1353
|
+
requestOptions.body = localVarFormParams;
|
|
1104
1354
|
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1114
|
-
reject(new Error(body.error || errString));
|
|
1115
|
-
}
|
|
1116
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1117
|
-
resolve(body);
|
|
1118
|
-
}
|
|
1119
|
-
else {
|
|
1120
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1121
|
-
reject(errString);
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
});
|
|
1125
|
-
});
|
|
1126
|
-
});
|
|
1355
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1356
|
+
// URL-encoded form
|
|
1357
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1358
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
const response = await fetch(url, requestOptions);
|
|
1362
|
+
return this.handleResponse(response, 'ExportBlockResponse');
|
|
1127
1363
|
}
|
|
1128
1364
|
/**
|
|
1129
1365
|
* Download the source code for this block.
|
|
@@ -1136,9 +1372,11 @@ class OrganizationBlocksApi {
|
|
|
1136
1372
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1137
1373
|
.replace('{' + 'transferLearningId' + '}', encodeURIComponent(String(transferLearningId)));
|
|
1138
1374
|
let localVarQueryParameters = {};
|
|
1139
|
-
let localVarHeaderParams =
|
|
1140
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1141
|
-
|
|
1375
|
+
let localVarHeaderParams = {
|
|
1376
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1377
|
+
'Content-Type': 'application/json',
|
|
1378
|
+
...this.defaultHeaders,
|
|
1379
|
+
};
|
|
1142
1380
|
const produces = ['application/json'];
|
|
1143
1381
|
// give precedence to 'application/json'
|
|
1144
1382
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1147,7 +1385,7 @@ class OrganizationBlocksApi {
|
|
|
1147
1385
|
else {
|
|
1148
1386
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1149
1387
|
}
|
|
1150
|
-
let localVarFormParams
|
|
1388
|
+
let localVarFormParams;
|
|
1151
1389
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1152
1390
|
if (organizationId === null || organizationId === undefined) {
|
|
1153
1391
|
throw new Error('Required parameter organizationId was null or undefined when calling exportOrganizationTransferLearningBlock.');
|
|
@@ -1156,55 +1394,51 @@ class OrganizationBlocksApi {
|
|
|
1156
1394
|
if (transferLearningId === null || transferLearningId === undefined) {
|
|
1157
1395
|
throw new Error('Required parameter transferLearningId was null or undefined when calling exportOrganizationTransferLearningBlock.');
|
|
1158
1396
|
}
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1397
|
+
localVarHeaderParams = {
|
|
1398
|
+
...localVarHeaderParams,
|
|
1399
|
+
...options.headers,
|
|
1400
|
+
...this.opts.extraHeaders,
|
|
1401
|
+
};
|
|
1402
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1403
|
+
.filter(([, value]) => value !== undefined)
|
|
1404
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1405
|
+
.join('&');
|
|
1406
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1162
1407
|
let localVarRequestOptions = {
|
|
1163
1408
|
method: 'POST',
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1409
|
+
headers: { ...localVarHeaderParams },
|
|
1410
|
+
};
|
|
1411
|
+
let requestOptions = localVarRequestOptions;
|
|
1412
|
+
let url = localVarUrl;
|
|
1413
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1414
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1415
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1416
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1417
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1418
|
+
url = auth_JWTAuthentication.url;
|
|
1419
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1420
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1421
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1422
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1423
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1424
|
+
url = auth_OAuth2.url;
|
|
1425
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1426
|
+
requestOptions = authDefault.requestOptions;
|
|
1427
|
+
url = authDefault.url;
|
|
1428
|
+
if (localVarFormParams) {
|
|
1429
|
+
delete requestOptions.headers['Content-Type'];
|
|
1430
|
+
if (localVarFormParams instanceof FormData) {
|
|
1431
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1432
|
+
requestOptions.body = localVarFormParams;
|
|
1185
1433
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1195
|
-
reject(new Error(body.error || errString));
|
|
1196
|
-
}
|
|
1197
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1198
|
-
resolve(body);
|
|
1199
|
-
}
|
|
1200
|
-
else {
|
|
1201
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1202
|
-
reject(errString);
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
});
|
|
1206
|
-
});
|
|
1207
|
-
});
|
|
1434
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1435
|
+
// URL-encoded form
|
|
1436
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1437
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
const response = await fetch(url, requestOptions);
|
|
1441
|
+
return this.handleResponse(response, 'ExportBlockResponse');
|
|
1208
1442
|
}
|
|
1209
1443
|
/**
|
|
1210
1444
|
* Download the source code for this block.
|
|
@@ -1217,9 +1451,11 @@ class OrganizationBlocksApi {
|
|
|
1217
1451
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1218
1452
|
.replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
|
|
1219
1453
|
let localVarQueryParameters = {};
|
|
1220
|
-
let localVarHeaderParams =
|
|
1221
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1222
|
-
|
|
1454
|
+
let localVarHeaderParams = {
|
|
1455
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1456
|
+
'Content-Type': 'application/json',
|
|
1457
|
+
...this.defaultHeaders,
|
|
1458
|
+
};
|
|
1223
1459
|
const produces = ['application/json'];
|
|
1224
1460
|
// give precedence to 'application/json'
|
|
1225
1461
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1228,7 +1464,7 @@ class OrganizationBlocksApi {
|
|
|
1228
1464
|
else {
|
|
1229
1465
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1230
1466
|
}
|
|
1231
|
-
let localVarFormParams
|
|
1467
|
+
let localVarFormParams;
|
|
1232
1468
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1233
1469
|
if (organizationId === null || organizationId === undefined) {
|
|
1234
1470
|
throw new Error('Required parameter organizationId was null or undefined when calling exportOrganizationTransformationBlock.');
|
|
@@ -1237,55 +1473,51 @@ class OrganizationBlocksApi {
|
|
|
1237
1473
|
if (transformationId === null || transformationId === undefined) {
|
|
1238
1474
|
throw new Error('Required parameter transformationId was null or undefined when calling exportOrganizationTransformationBlock.');
|
|
1239
1475
|
}
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1476
|
+
localVarHeaderParams = {
|
|
1477
|
+
...localVarHeaderParams,
|
|
1478
|
+
...options.headers,
|
|
1479
|
+
...this.opts.extraHeaders,
|
|
1480
|
+
};
|
|
1481
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1482
|
+
.filter(([, value]) => value !== undefined)
|
|
1483
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1484
|
+
.join('&');
|
|
1485
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1243
1486
|
let localVarRequestOptions = {
|
|
1244
1487
|
method: 'POST',
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1488
|
+
headers: { ...localVarHeaderParams },
|
|
1489
|
+
};
|
|
1490
|
+
let requestOptions = localVarRequestOptions;
|
|
1491
|
+
let url = localVarUrl;
|
|
1492
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1493
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1494
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1495
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1496
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1497
|
+
url = auth_JWTAuthentication.url;
|
|
1498
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1499
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1500
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1501
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1502
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1503
|
+
url = auth_OAuth2.url;
|
|
1504
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1505
|
+
requestOptions = authDefault.requestOptions;
|
|
1506
|
+
url = authDefault.url;
|
|
1507
|
+
if (localVarFormParams) {
|
|
1508
|
+
delete requestOptions.headers['Content-Type'];
|
|
1509
|
+
if (localVarFormParams instanceof FormData) {
|
|
1510
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1511
|
+
requestOptions.body = localVarFormParams;
|
|
1266
1512
|
}
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1276
|
-
reject(new Error(body.error || errString));
|
|
1277
|
-
}
|
|
1278
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1279
|
-
resolve(body);
|
|
1280
|
-
}
|
|
1281
|
-
else {
|
|
1282
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1283
|
-
reject(errString);
|
|
1284
|
-
}
|
|
1285
|
-
}
|
|
1286
|
-
});
|
|
1287
|
-
});
|
|
1288
|
-
});
|
|
1513
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1514
|
+
// URL-encoded form
|
|
1515
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1516
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
const response = await fetch(url, requestOptions);
|
|
1520
|
+
return this.handleResponse(response, 'ExportBlockResponse');
|
|
1289
1521
|
}
|
|
1290
1522
|
/**
|
|
1291
1523
|
* Gets a deploy block.
|
|
@@ -1298,9 +1530,11 @@ class OrganizationBlocksApi {
|
|
|
1298
1530
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1299
1531
|
.replace('{' + 'deployId' + '}', encodeURIComponent(String(deployId)));
|
|
1300
1532
|
let localVarQueryParameters = {};
|
|
1301
|
-
let localVarHeaderParams =
|
|
1302
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1303
|
-
|
|
1533
|
+
let localVarHeaderParams = {
|
|
1534
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1535
|
+
'Content-Type': 'application/json',
|
|
1536
|
+
...this.defaultHeaders,
|
|
1537
|
+
};
|
|
1304
1538
|
const produces = ['application/json'];
|
|
1305
1539
|
// give precedence to 'application/json'
|
|
1306
1540
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1309,7 +1543,7 @@ class OrganizationBlocksApi {
|
|
|
1309
1543
|
else {
|
|
1310
1544
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1311
1545
|
}
|
|
1312
|
-
let localVarFormParams
|
|
1546
|
+
let localVarFormParams;
|
|
1313
1547
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1314
1548
|
if (organizationId === null || organizationId === undefined) {
|
|
1315
1549
|
throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationDeployBlock.');
|
|
@@ -1318,55 +1552,51 @@ class OrganizationBlocksApi {
|
|
|
1318
1552
|
if (deployId === null || deployId === undefined) {
|
|
1319
1553
|
throw new Error('Required parameter deployId was null or undefined when calling getOrganizationDeployBlock.');
|
|
1320
1554
|
}
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1555
|
+
localVarHeaderParams = {
|
|
1556
|
+
...localVarHeaderParams,
|
|
1557
|
+
...options.headers,
|
|
1558
|
+
...this.opts.extraHeaders,
|
|
1559
|
+
};
|
|
1560
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1561
|
+
.filter(([, value]) => value !== undefined)
|
|
1562
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1563
|
+
.join('&');
|
|
1564
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1324
1565
|
let localVarRequestOptions = {
|
|
1325
1566
|
method: 'GET',
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1567
|
+
headers: { ...localVarHeaderParams },
|
|
1568
|
+
};
|
|
1569
|
+
let requestOptions = localVarRequestOptions;
|
|
1570
|
+
let url = localVarUrl;
|
|
1571
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1572
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1573
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1574
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1575
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1576
|
+
url = auth_JWTAuthentication.url;
|
|
1577
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1578
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1579
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1580
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1581
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1582
|
+
url = auth_OAuth2.url;
|
|
1583
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1584
|
+
requestOptions = authDefault.requestOptions;
|
|
1585
|
+
url = authDefault.url;
|
|
1586
|
+
if (localVarFormParams) {
|
|
1587
|
+
delete requestOptions.headers['Content-Type'];
|
|
1588
|
+
if (localVarFormParams instanceof FormData) {
|
|
1589
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1590
|
+
requestOptions.body = localVarFormParams;
|
|
1347
1591
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1357
|
-
reject(new Error(body.error || errString));
|
|
1358
|
-
}
|
|
1359
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1360
|
-
resolve(body);
|
|
1361
|
-
}
|
|
1362
|
-
else {
|
|
1363
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1364
|
-
reject(errString);
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
});
|
|
1368
|
-
});
|
|
1369
|
-
});
|
|
1592
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1593
|
+
// URL-encoded form
|
|
1594
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1595
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
const response = await fetch(url, requestOptions);
|
|
1599
|
+
return this.handleResponse(response, 'GetOrganizationDeployBlockResponse');
|
|
1370
1600
|
}
|
|
1371
1601
|
/**
|
|
1372
1602
|
* Gets a dsp block.
|
|
@@ -1379,9 +1609,11 @@ class OrganizationBlocksApi {
|
|
|
1379
1609
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1380
1610
|
.replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
|
|
1381
1611
|
let localVarQueryParameters = {};
|
|
1382
|
-
let localVarHeaderParams =
|
|
1383
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1384
|
-
|
|
1612
|
+
let localVarHeaderParams = {
|
|
1613
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1614
|
+
'Content-Type': 'application/json',
|
|
1615
|
+
...this.defaultHeaders,
|
|
1616
|
+
};
|
|
1385
1617
|
const produces = ['application/json'];
|
|
1386
1618
|
// give precedence to 'application/json'
|
|
1387
1619
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1390,7 +1622,7 @@ class OrganizationBlocksApi {
|
|
|
1390
1622
|
else {
|
|
1391
1623
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1392
1624
|
}
|
|
1393
|
-
let localVarFormParams
|
|
1625
|
+
let localVarFormParams;
|
|
1394
1626
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1395
1627
|
if (organizationId === null || organizationId === undefined) {
|
|
1396
1628
|
throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationDspBlock.');
|
|
@@ -1399,55 +1631,51 @@ class OrganizationBlocksApi {
|
|
|
1399
1631
|
if (dspId === null || dspId === undefined) {
|
|
1400
1632
|
throw new Error('Required parameter dspId was null or undefined when calling getOrganizationDspBlock.');
|
|
1401
1633
|
}
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1634
|
+
localVarHeaderParams = {
|
|
1635
|
+
...localVarHeaderParams,
|
|
1636
|
+
...options.headers,
|
|
1637
|
+
...this.opts.extraHeaders,
|
|
1638
|
+
};
|
|
1639
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1640
|
+
.filter(([, value]) => value !== undefined)
|
|
1641
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1642
|
+
.join('&');
|
|
1643
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1405
1644
|
let localVarRequestOptions = {
|
|
1406
1645
|
method: 'GET',
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1646
|
+
headers: { ...localVarHeaderParams },
|
|
1647
|
+
};
|
|
1648
|
+
let requestOptions = localVarRequestOptions;
|
|
1649
|
+
let url = localVarUrl;
|
|
1650
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1651
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1652
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1653
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1654
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1655
|
+
url = auth_JWTAuthentication.url;
|
|
1656
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1657
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1658
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1659
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1660
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1661
|
+
url = auth_OAuth2.url;
|
|
1662
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1663
|
+
requestOptions = authDefault.requestOptions;
|
|
1664
|
+
url = authDefault.url;
|
|
1665
|
+
if (localVarFormParams) {
|
|
1666
|
+
delete requestOptions.headers['Content-Type'];
|
|
1667
|
+
if (localVarFormParams instanceof FormData) {
|
|
1668
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1669
|
+
requestOptions.body = localVarFormParams;
|
|
1428
1670
|
}
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1438
|
-
reject(new Error(body.error || errString));
|
|
1439
|
-
}
|
|
1440
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1441
|
-
resolve(body);
|
|
1442
|
-
}
|
|
1443
|
-
else {
|
|
1444
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1445
|
-
reject(errString);
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
});
|
|
1449
|
-
});
|
|
1450
|
-
});
|
|
1671
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1672
|
+
// URL-encoded form
|
|
1673
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1674
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
const response = await fetch(url, requestOptions);
|
|
1678
|
+
return this.handleResponse(response, 'GetOrganizationDspBlockResponse');
|
|
1451
1679
|
}
|
|
1452
1680
|
/**
|
|
1453
1681
|
* Gets a transfer learning block.
|
|
@@ -1460,9 +1688,11 @@ class OrganizationBlocksApi {
|
|
|
1460
1688
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1461
1689
|
.replace('{' + 'transferLearningId' + '}', encodeURIComponent(String(transferLearningId)));
|
|
1462
1690
|
let localVarQueryParameters = {};
|
|
1463
|
-
let localVarHeaderParams =
|
|
1464
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1465
|
-
|
|
1691
|
+
let localVarHeaderParams = {
|
|
1692
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1693
|
+
'Content-Type': 'application/json',
|
|
1694
|
+
...this.defaultHeaders,
|
|
1695
|
+
};
|
|
1466
1696
|
const produces = ['application/json'];
|
|
1467
1697
|
// give precedence to 'application/json'
|
|
1468
1698
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1471,7 +1701,7 @@ class OrganizationBlocksApi {
|
|
|
1471
1701
|
else {
|
|
1472
1702
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1473
1703
|
}
|
|
1474
|
-
let localVarFormParams
|
|
1704
|
+
let localVarFormParams;
|
|
1475
1705
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1476
1706
|
if (organizationId === null || organizationId === undefined) {
|
|
1477
1707
|
throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationTransferLearningBlock.');
|
|
@@ -1480,55 +1710,51 @@ class OrganizationBlocksApi {
|
|
|
1480
1710
|
if (transferLearningId === null || transferLearningId === undefined) {
|
|
1481
1711
|
throw new Error('Required parameter transferLearningId was null or undefined when calling getOrganizationTransferLearningBlock.');
|
|
1482
1712
|
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1713
|
+
localVarHeaderParams = {
|
|
1714
|
+
...localVarHeaderParams,
|
|
1715
|
+
...options.headers,
|
|
1716
|
+
...this.opts.extraHeaders,
|
|
1717
|
+
};
|
|
1718
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1719
|
+
.filter(([, value]) => value !== undefined)
|
|
1720
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1721
|
+
.join('&');
|
|
1722
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1486
1723
|
let localVarRequestOptions = {
|
|
1487
1724
|
method: 'GET',
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1725
|
+
headers: { ...localVarHeaderParams },
|
|
1726
|
+
};
|
|
1727
|
+
let requestOptions = localVarRequestOptions;
|
|
1728
|
+
let url = localVarUrl;
|
|
1729
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1730
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1731
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1732
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1733
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1734
|
+
url = auth_JWTAuthentication.url;
|
|
1735
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1736
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1737
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1738
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1739
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1740
|
+
url = auth_OAuth2.url;
|
|
1741
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1742
|
+
requestOptions = authDefault.requestOptions;
|
|
1743
|
+
url = authDefault.url;
|
|
1744
|
+
if (localVarFormParams) {
|
|
1745
|
+
delete requestOptions.headers['Content-Type'];
|
|
1746
|
+
if (localVarFormParams instanceof FormData) {
|
|
1747
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1748
|
+
requestOptions.body = localVarFormParams;
|
|
1509
1749
|
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1519
|
-
reject(new Error(body.error || errString));
|
|
1520
|
-
}
|
|
1521
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1522
|
-
resolve(body);
|
|
1523
|
-
}
|
|
1524
|
-
else {
|
|
1525
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1526
|
-
reject(errString);
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
});
|
|
1530
|
-
});
|
|
1531
|
-
});
|
|
1750
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1751
|
+
// URL-encoded form
|
|
1752
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1753
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
const response = await fetch(url, requestOptions);
|
|
1757
|
+
return this.handleResponse(response, 'GetOrganizationTransferLearningBlockResponse');
|
|
1532
1758
|
}
|
|
1533
1759
|
/**
|
|
1534
1760
|
* Get a transformation block.
|
|
@@ -1541,9 +1767,11 @@ class OrganizationBlocksApi {
|
|
|
1541
1767
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1542
1768
|
.replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
|
|
1543
1769
|
let localVarQueryParameters = {};
|
|
1544
|
-
let localVarHeaderParams =
|
|
1545
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1546
|
-
|
|
1770
|
+
let localVarHeaderParams = {
|
|
1771
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1772
|
+
'Content-Type': 'application/json',
|
|
1773
|
+
...this.defaultHeaders,
|
|
1774
|
+
};
|
|
1547
1775
|
const produces = ['application/json'];
|
|
1548
1776
|
// give precedence to 'application/json'
|
|
1549
1777
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1552,7 +1780,7 @@ class OrganizationBlocksApi {
|
|
|
1552
1780
|
else {
|
|
1553
1781
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1554
1782
|
}
|
|
1555
|
-
let localVarFormParams
|
|
1783
|
+
let localVarFormParams;
|
|
1556
1784
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1557
1785
|
if (organizationId === null || organizationId === undefined) {
|
|
1558
1786
|
throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationTransformationBlock.');
|
|
@@ -1561,55 +1789,51 @@ class OrganizationBlocksApi {
|
|
|
1561
1789
|
if (transformationId === null || transformationId === undefined) {
|
|
1562
1790
|
throw new Error('Required parameter transformationId was null or undefined when calling getOrganizationTransformationBlock.');
|
|
1563
1791
|
}
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1792
|
+
localVarHeaderParams = {
|
|
1793
|
+
...localVarHeaderParams,
|
|
1794
|
+
...options.headers,
|
|
1795
|
+
...this.opts.extraHeaders,
|
|
1796
|
+
};
|
|
1797
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1798
|
+
.filter(([, value]) => value !== undefined)
|
|
1799
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1800
|
+
.join('&');
|
|
1801
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1567
1802
|
let localVarRequestOptions = {
|
|
1568
1803
|
method: 'GET',
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1804
|
+
headers: { ...localVarHeaderParams },
|
|
1805
|
+
};
|
|
1806
|
+
let requestOptions = localVarRequestOptions;
|
|
1807
|
+
let url = localVarUrl;
|
|
1808
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1809
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1810
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1811
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1812
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1813
|
+
url = auth_JWTAuthentication.url;
|
|
1814
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1815
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1816
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1817
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1818
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1819
|
+
url = auth_OAuth2.url;
|
|
1820
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1821
|
+
requestOptions = authDefault.requestOptions;
|
|
1822
|
+
url = authDefault.url;
|
|
1823
|
+
if (localVarFormParams) {
|
|
1824
|
+
delete requestOptions.headers['Content-Type'];
|
|
1825
|
+
if (localVarFormParams instanceof FormData) {
|
|
1826
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1827
|
+
requestOptions.body = localVarFormParams;
|
|
1590
1828
|
}
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1600
|
-
reject(new Error(body.error || errString));
|
|
1601
|
-
}
|
|
1602
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1603
|
-
resolve(body);
|
|
1604
|
-
}
|
|
1605
|
-
else {
|
|
1606
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1607
|
-
reject(errString);
|
|
1608
|
-
}
|
|
1609
|
-
}
|
|
1610
|
-
});
|
|
1611
|
-
});
|
|
1612
|
-
});
|
|
1829
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1830
|
+
// URL-encoded form
|
|
1831
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1832
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
const response = await fetch(url, requestOptions);
|
|
1836
|
+
return this.handleResponse(response, 'GetOrganizationTransformationBlockResponse');
|
|
1613
1837
|
}
|
|
1614
1838
|
/**
|
|
1615
1839
|
* Retrieve a transformation blocks published by other organizations, available for all organizations.
|
|
@@ -1622,9 +1846,11 @@ class OrganizationBlocksApi {
|
|
|
1622
1846
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1623
1847
|
.replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
|
|
1624
1848
|
let localVarQueryParameters = {};
|
|
1625
|
-
let localVarHeaderParams =
|
|
1626
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1627
|
-
|
|
1849
|
+
let localVarHeaderParams = {
|
|
1850
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1851
|
+
'Content-Type': 'application/json',
|
|
1852
|
+
...this.defaultHeaders,
|
|
1853
|
+
};
|
|
1628
1854
|
const produces = ['application/json'];
|
|
1629
1855
|
// give precedence to 'application/json'
|
|
1630
1856
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1633,7 +1859,7 @@ class OrganizationBlocksApi {
|
|
|
1633
1859
|
else {
|
|
1634
1860
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1635
1861
|
}
|
|
1636
|
-
let localVarFormParams
|
|
1862
|
+
let localVarFormParams;
|
|
1637
1863
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1638
1864
|
if (organizationId === null || organizationId === undefined) {
|
|
1639
1865
|
throw new Error('Required parameter organizationId was null or undefined when calling getPublicOrganizationTransformationBlock.');
|
|
@@ -1642,55 +1868,51 @@ class OrganizationBlocksApi {
|
|
|
1642
1868
|
if (transformationId === null || transformationId === undefined) {
|
|
1643
1869
|
throw new Error('Required parameter transformationId was null or undefined when calling getPublicOrganizationTransformationBlock.');
|
|
1644
1870
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1871
|
+
localVarHeaderParams = {
|
|
1872
|
+
...localVarHeaderParams,
|
|
1873
|
+
...options.headers,
|
|
1874
|
+
...this.opts.extraHeaders,
|
|
1875
|
+
};
|
|
1876
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1877
|
+
.filter(([, value]) => value !== undefined)
|
|
1878
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1879
|
+
.join('&');
|
|
1880
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1648
1881
|
let localVarRequestOptions = {
|
|
1649
1882
|
method: 'GET',
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1883
|
+
headers: { ...localVarHeaderParams },
|
|
1884
|
+
};
|
|
1885
|
+
let requestOptions = localVarRequestOptions;
|
|
1886
|
+
let url = localVarUrl;
|
|
1887
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1888
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1889
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1890
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1891
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1892
|
+
url = auth_JWTAuthentication.url;
|
|
1893
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1894
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1895
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1896
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1897
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1898
|
+
url = auth_OAuth2.url;
|
|
1899
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1900
|
+
requestOptions = authDefault.requestOptions;
|
|
1901
|
+
url = authDefault.url;
|
|
1902
|
+
if (localVarFormParams) {
|
|
1903
|
+
delete requestOptions.headers['Content-Type'];
|
|
1904
|
+
if (localVarFormParams instanceof FormData) {
|
|
1905
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1906
|
+
requestOptions.body = localVarFormParams;
|
|
1671
1907
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1681
|
-
reject(new Error(body.error || errString));
|
|
1682
|
-
}
|
|
1683
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1684
|
-
resolve(body);
|
|
1685
|
-
}
|
|
1686
|
-
else {
|
|
1687
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1688
|
-
reject(errString);
|
|
1689
|
-
}
|
|
1690
|
-
}
|
|
1691
|
-
});
|
|
1692
|
-
});
|
|
1693
|
-
});
|
|
1908
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1909
|
+
// URL-encoded form
|
|
1910
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1911
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
const response = await fetch(url, requestOptions);
|
|
1915
|
+
return this.handleResponse(response, 'GetPublicOrganizationTransformationBlockResponse');
|
|
1694
1916
|
}
|
|
1695
1917
|
/**
|
|
1696
1918
|
* Retrieve all deploy blocks.
|
|
@@ -1701,9 +1923,11 @@ class OrganizationBlocksApi {
|
|
|
1701
1923
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy'
|
|
1702
1924
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
1703
1925
|
let localVarQueryParameters = {};
|
|
1704
|
-
let localVarHeaderParams =
|
|
1705
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1706
|
-
|
|
1926
|
+
let localVarHeaderParams = {
|
|
1927
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1928
|
+
'Content-Type': 'application/json',
|
|
1929
|
+
...this.defaultHeaders,
|
|
1930
|
+
};
|
|
1707
1931
|
const produces = ['application/json'];
|
|
1708
1932
|
// give precedence to 'application/json'
|
|
1709
1933
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1712,60 +1936,56 @@ class OrganizationBlocksApi {
|
|
|
1712
1936
|
else {
|
|
1713
1937
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1714
1938
|
}
|
|
1715
|
-
let localVarFormParams
|
|
1939
|
+
let localVarFormParams;
|
|
1716
1940
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1717
1941
|
if (organizationId === null || organizationId === undefined) {
|
|
1718
1942
|
throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationDeployBlocks.');
|
|
1719
1943
|
}
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1944
|
+
localVarHeaderParams = {
|
|
1945
|
+
...localVarHeaderParams,
|
|
1946
|
+
...options.headers,
|
|
1947
|
+
...this.opts.extraHeaders,
|
|
1948
|
+
};
|
|
1949
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
1950
|
+
.filter(([, value]) => value !== undefined)
|
|
1951
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1952
|
+
.join('&');
|
|
1953
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1723
1954
|
let localVarRequestOptions = {
|
|
1724
1955
|
method: 'GET',
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1956
|
+
headers: { ...localVarHeaderParams },
|
|
1957
|
+
};
|
|
1958
|
+
let requestOptions = localVarRequestOptions;
|
|
1959
|
+
let url = localVarUrl;
|
|
1960
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1961
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1962
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1963
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1964
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1965
|
+
url = auth_JWTAuthentication.url;
|
|
1966
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1967
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1968
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1969
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1970
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1971
|
+
url = auth_OAuth2.url;
|
|
1972
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1973
|
+
requestOptions = authDefault.requestOptions;
|
|
1974
|
+
url = authDefault.url;
|
|
1975
|
+
if (localVarFormParams) {
|
|
1976
|
+
delete requestOptions.headers['Content-Type'];
|
|
1977
|
+
if (localVarFormParams instanceof FormData) {
|
|
1978
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
1979
|
+
requestOptions.body = localVarFormParams;
|
|
1746
1980
|
}
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1756
|
-
reject(new Error(body.error || errString));
|
|
1757
|
-
}
|
|
1758
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1759
|
-
resolve(body);
|
|
1760
|
-
}
|
|
1761
|
-
else {
|
|
1762
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1763
|
-
reject(errString);
|
|
1764
|
-
}
|
|
1765
|
-
}
|
|
1766
|
-
});
|
|
1767
|
-
});
|
|
1768
|
-
});
|
|
1981
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
1982
|
+
// URL-encoded form
|
|
1983
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
1984
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
const response = await fetch(url, requestOptions);
|
|
1988
|
+
return this.handleResponse(response, 'ListOrganizationDeployBlocksResponse');
|
|
1769
1989
|
}
|
|
1770
1990
|
/**
|
|
1771
1991
|
* Retrieve all dsp blocks.
|
|
@@ -1776,9 +1996,11 @@ class OrganizationBlocksApi {
|
|
|
1776
1996
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/dsp'
|
|
1777
1997
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
1778
1998
|
let localVarQueryParameters = {};
|
|
1779
|
-
let localVarHeaderParams =
|
|
1780
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1781
|
-
|
|
1999
|
+
let localVarHeaderParams = {
|
|
2000
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2001
|
+
'Content-Type': 'application/json',
|
|
2002
|
+
...this.defaultHeaders,
|
|
2003
|
+
};
|
|
1782
2004
|
const produces = ['application/json'];
|
|
1783
2005
|
// give precedence to 'application/json'
|
|
1784
2006
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1787,60 +2009,56 @@ class OrganizationBlocksApi {
|
|
|
1787
2009
|
else {
|
|
1788
2010
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1789
2011
|
}
|
|
1790
|
-
let localVarFormParams
|
|
2012
|
+
let localVarFormParams;
|
|
1791
2013
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1792
2014
|
if (organizationId === null || organizationId === undefined) {
|
|
1793
2015
|
throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationDspBlocks.');
|
|
1794
2016
|
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
2017
|
+
localVarHeaderParams = {
|
|
2018
|
+
...localVarHeaderParams,
|
|
2019
|
+
...options.headers,
|
|
2020
|
+
...this.opts.extraHeaders,
|
|
2021
|
+
};
|
|
2022
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2023
|
+
.filter(([, value]) => value !== undefined)
|
|
2024
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2025
|
+
.join('&');
|
|
2026
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1798
2027
|
let localVarRequestOptions = {
|
|
1799
2028
|
method: 'GET',
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
2029
|
+
headers: { ...localVarHeaderParams },
|
|
2030
|
+
};
|
|
2031
|
+
let requestOptions = localVarRequestOptions;
|
|
2032
|
+
let url = localVarUrl;
|
|
2033
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2034
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2035
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2036
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2037
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2038
|
+
url = auth_JWTAuthentication.url;
|
|
2039
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2040
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2041
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2042
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2043
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2044
|
+
url = auth_OAuth2.url;
|
|
2045
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2046
|
+
requestOptions = authDefault.requestOptions;
|
|
2047
|
+
url = authDefault.url;
|
|
2048
|
+
if (localVarFormParams) {
|
|
2049
|
+
delete requestOptions.headers['Content-Type'];
|
|
2050
|
+
if (localVarFormParams instanceof FormData) {
|
|
2051
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2052
|
+
requestOptions.body = localVarFormParams;
|
|
1821
2053
|
}
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1831
|
-
reject(new Error(body.error || errString));
|
|
1832
|
-
}
|
|
1833
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1834
|
-
resolve(body);
|
|
1835
|
-
}
|
|
1836
|
-
else {
|
|
1837
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1838
|
-
reject(errString);
|
|
1839
|
-
}
|
|
1840
|
-
}
|
|
1841
|
-
});
|
|
1842
|
-
});
|
|
1843
|
-
});
|
|
2054
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2055
|
+
// URL-encoded form
|
|
2056
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2057
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
const response = await fetch(url, requestOptions);
|
|
2061
|
+
return this.handleResponse(response, 'ListOrganizationDspBlocksResponse');
|
|
1844
2062
|
}
|
|
1845
2063
|
/**
|
|
1846
2064
|
* Retrieve all secrets.
|
|
@@ -1851,9 +2069,11 @@ class OrganizationBlocksApi {
|
|
|
1851
2069
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/secrets'
|
|
1852
2070
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
1853
2071
|
let localVarQueryParameters = {};
|
|
1854
|
-
let localVarHeaderParams =
|
|
1855
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1856
|
-
|
|
2072
|
+
let localVarHeaderParams = {
|
|
2073
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2074
|
+
'Content-Type': 'application/json',
|
|
2075
|
+
...this.defaultHeaders,
|
|
2076
|
+
};
|
|
1857
2077
|
const produces = ['application/json'];
|
|
1858
2078
|
// give precedence to 'application/json'
|
|
1859
2079
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1862,60 +2082,56 @@ class OrganizationBlocksApi {
|
|
|
1862
2082
|
else {
|
|
1863
2083
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1864
2084
|
}
|
|
1865
|
-
let localVarFormParams
|
|
2085
|
+
let localVarFormParams;
|
|
1866
2086
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1867
2087
|
if (organizationId === null || organizationId === undefined) {
|
|
1868
2088
|
throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationSecrets.');
|
|
1869
2089
|
}
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
2090
|
+
localVarHeaderParams = {
|
|
2091
|
+
...localVarHeaderParams,
|
|
2092
|
+
...options.headers,
|
|
2093
|
+
...this.opts.extraHeaders,
|
|
2094
|
+
};
|
|
2095
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2096
|
+
.filter(([, value]) => value !== undefined)
|
|
2097
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2098
|
+
.join('&');
|
|
2099
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1873
2100
|
let localVarRequestOptions = {
|
|
1874
2101
|
method: 'GET',
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
2102
|
+
headers: { ...localVarHeaderParams },
|
|
2103
|
+
};
|
|
2104
|
+
let requestOptions = localVarRequestOptions;
|
|
2105
|
+
let url = localVarUrl;
|
|
2106
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2107
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2108
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2109
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2110
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2111
|
+
url = auth_JWTAuthentication.url;
|
|
2112
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2113
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2114
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2115
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2116
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2117
|
+
url = auth_OAuth2.url;
|
|
2118
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2119
|
+
requestOptions = authDefault.requestOptions;
|
|
2120
|
+
url = authDefault.url;
|
|
2121
|
+
if (localVarFormParams) {
|
|
2122
|
+
delete requestOptions.headers['Content-Type'];
|
|
2123
|
+
if (localVarFormParams instanceof FormData) {
|
|
2124
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2125
|
+
requestOptions.body = localVarFormParams;
|
|
1896
2126
|
}
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1906
|
-
reject(new Error(body.error || errString));
|
|
1907
|
-
}
|
|
1908
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1909
|
-
resolve(body);
|
|
1910
|
-
}
|
|
1911
|
-
else {
|
|
1912
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1913
|
-
reject(errString);
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
});
|
|
1917
|
-
});
|
|
1918
|
-
});
|
|
2127
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2128
|
+
// URL-encoded form
|
|
2129
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2130
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
const response = await fetch(url, requestOptions);
|
|
2134
|
+
return this.handleResponse(response, 'ListOrganizationSecretsResponse');
|
|
1919
2135
|
}
|
|
1920
2136
|
/**
|
|
1921
2137
|
* Retrieve all transfer learning blocks.
|
|
@@ -1926,9 +2142,11 @@ class OrganizationBlocksApi {
|
|
|
1926
2142
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/transfer-learning'
|
|
1927
2143
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
1928
2144
|
let localVarQueryParameters = {};
|
|
1929
|
-
let localVarHeaderParams =
|
|
1930
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1931
|
-
|
|
2145
|
+
let localVarHeaderParams = {
|
|
2146
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2147
|
+
'Content-Type': 'application/json',
|
|
2148
|
+
...this.defaultHeaders,
|
|
2149
|
+
};
|
|
1932
2150
|
const produces = ['application/json'];
|
|
1933
2151
|
// give precedence to 'application/json'
|
|
1934
2152
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -1937,60 +2155,56 @@ class OrganizationBlocksApi {
|
|
|
1937
2155
|
else {
|
|
1938
2156
|
localVarHeaderParams.Accept = produces.join(',');
|
|
1939
2157
|
}
|
|
1940
|
-
let localVarFormParams
|
|
2158
|
+
let localVarFormParams;
|
|
1941
2159
|
// verify required parameter 'organizationId' is not null or undefined
|
|
1942
2160
|
if (organizationId === null || organizationId === undefined) {
|
|
1943
2161
|
throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationTransferLearningBlocks.');
|
|
1944
2162
|
}
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2163
|
+
localVarHeaderParams = {
|
|
2164
|
+
...localVarHeaderParams,
|
|
2165
|
+
...options.headers,
|
|
2166
|
+
...this.opts.extraHeaders,
|
|
2167
|
+
};
|
|
2168
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2169
|
+
.filter(([, value]) => value !== undefined)
|
|
2170
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2171
|
+
.join('&');
|
|
2172
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1948
2173
|
let localVarRequestOptions = {
|
|
1949
2174
|
method: 'GET',
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
2175
|
+
headers: { ...localVarHeaderParams },
|
|
2176
|
+
};
|
|
2177
|
+
let requestOptions = localVarRequestOptions;
|
|
2178
|
+
let url = localVarUrl;
|
|
2179
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2180
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2181
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2182
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2183
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2184
|
+
url = auth_JWTAuthentication.url;
|
|
2185
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2186
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2187
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2188
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2189
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2190
|
+
url = auth_OAuth2.url;
|
|
2191
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2192
|
+
requestOptions = authDefault.requestOptions;
|
|
2193
|
+
url = authDefault.url;
|
|
2194
|
+
if (localVarFormParams) {
|
|
2195
|
+
delete requestOptions.headers['Content-Type'];
|
|
2196
|
+
if (localVarFormParams instanceof FormData) {
|
|
2197
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2198
|
+
requestOptions.body = localVarFormParams;
|
|
1971
2199
|
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1981
|
-
reject(new Error(body.error || errString));
|
|
1982
|
-
}
|
|
1983
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1984
|
-
resolve(body);
|
|
1985
|
-
}
|
|
1986
|
-
else {
|
|
1987
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1988
|
-
reject(errString);
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
});
|
|
1992
|
-
});
|
|
1993
|
-
});
|
|
2200
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2201
|
+
// URL-encoded form
|
|
2202
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2203
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
const response = await fetch(url, requestOptions);
|
|
2207
|
+
return this.handleResponse(response, 'ListOrganizationTransferLearningBlocksResponse');
|
|
1994
2208
|
}
|
|
1995
2209
|
/**
|
|
1996
2210
|
* Retrieve all transformation blocks.
|
|
@@ -2001,9 +2215,11 @@ class OrganizationBlocksApi {
|
|
|
2001
2215
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation'
|
|
2002
2216
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
2003
2217
|
let localVarQueryParameters = {};
|
|
2004
|
-
let localVarHeaderParams =
|
|
2005
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2006
|
-
|
|
2218
|
+
let localVarHeaderParams = {
|
|
2219
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2220
|
+
'Content-Type': 'application/json',
|
|
2221
|
+
...this.defaultHeaders,
|
|
2222
|
+
};
|
|
2007
2223
|
const produces = ['application/json'];
|
|
2008
2224
|
// give precedence to 'application/json'
|
|
2009
2225
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2012,60 +2228,56 @@ class OrganizationBlocksApi {
|
|
|
2012
2228
|
else {
|
|
2013
2229
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2014
2230
|
}
|
|
2015
|
-
let localVarFormParams
|
|
2231
|
+
let localVarFormParams;
|
|
2016
2232
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2017
2233
|
if (organizationId === null || organizationId === undefined) {
|
|
2018
2234
|
throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationTransformationBlocks.');
|
|
2019
2235
|
}
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2236
|
+
localVarHeaderParams = {
|
|
2237
|
+
...localVarHeaderParams,
|
|
2238
|
+
...options.headers,
|
|
2239
|
+
...this.opts.extraHeaders,
|
|
2240
|
+
};
|
|
2241
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2242
|
+
.filter(([, value]) => value !== undefined)
|
|
2243
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2244
|
+
.join('&');
|
|
2245
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2023
2246
|
let localVarRequestOptions = {
|
|
2024
2247
|
method: 'GET',
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2248
|
+
headers: { ...localVarHeaderParams },
|
|
2249
|
+
};
|
|
2250
|
+
let requestOptions = localVarRequestOptions;
|
|
2251
|
+
let url = localVarUrl;
|
|
2252
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2253
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2254
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2255
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2256
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2257
|
+
url = auth_JWTAuthentication.url;
|
|
2258
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2259
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2260
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2261
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2262
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2263
|
+
url = auth_OAuth2.url;
|
|
2264
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2265
|
+
requestOptions = authDefault.requestOptions;
|
|
2266
|
+
url = authDefault.url;
|
|
2267
|
+
if (localVarFormParams) {
|
|
2268
|
+
delete requestOptions.headers['Content-Type'];
|
|
2269
|
+
if (localVarFormParams instanceof FormData) {
|
|
2270
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2271
|
+
requestOptions.body = localVarFormParams;
|
|
2046
2272
|
}
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2056
|
-
reject(new Error(body.error || errString));
|
|
2057
|
-
}
|
|
2058
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2059
|
-
resolve(body);
|
|
2060
|
-
}
|
|
2061
|
-
else {
|
|
2062
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2063
|
-
reject(errString);
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
});
|
|
2067
|
-
});
|
|
2068
|
-
});
|
|
2273
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2274
|
+
// URL-encoded form
|
|
2275
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2276
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
const response = await fetch(url, requestOptions);
|
|
2280
|
+
return this.handleResponse(response, 'ListOrganizationTransformationBlocksResponse');
|
|
2069
2281
|
}
|
|
2070
2282
|
/**
|
|
2071
2283
|
* Retrieve all transformation blocks published by other organizations, available for all organizations.
|
|
@@ -2076,9 +2288,11 @@ class OrganizationBlocksApi {
|
|
|
2076
2288
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/transformation/public'
|
|
2077
2289
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
2078
2290
|
let localVarQueryParameters = {};
|
|
2079
|
-
let localVarHeaderParams =
|
|
2080
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2081
|
-
|
|
2291
|
+
let localVarHeaderParams = {
|
|
2292
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2293
|
+
'Content-Type': 'application/json',
|
|
2294
|
+
...this.defaultHeaders,
|
|
2295
|
+
};
|
|
2082
2296
|
const produces = ['application/json'];
|
|
2083
2297
|
// give precedence to 'application/json'
|
|
2084
2298
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2087,60 +2301,56 @@ class OrganizationBlocksApi {
|
|
|
2087
2301
|
else {
|
|
2088
2302
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2089
2303
|
}
|
|
2090
|
-
let localVarFormParams
|
|
2304
|
+
let localVarFormParams;
|
|
2091
2305
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2092
2306
|
if (organizationId === null || organizationId === undefined) {
|
|
2093
2307
|
throw new Error('Required parameter organizationId was null or undefined when calling listPublicOrganizationTransformationBlocks.');
|
|
2094
2308
|
}
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2309
|
+
localVarHeaderParams = {
|
|
2310
|
+
...localVarHeaderParams,
|
|
2311
|
+
...options.headers,
|
|
2312
|
+
...this.opts.extraHeaders,
|
|
2313
|
+
};
|
|
2314
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2315
|
+
.filter(([, value]) => value !== undefined)
|
|
2316
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2317
|
+
.join('&');
|
|
2318
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2098
2319
|
let localVarRequestOptions = {
|
|
2099
2320
|
method: 'GET',
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2321
|
+
headers: { ...localVarHeaderParams },
|
|
2322
|
+
};
|
|
2323
|
+
let requestOptions = localVarRequestOptions;
|
|
2324
|
+
let url = localVarUrl;
|
|
2325
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2326
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2327
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2328
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2329
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2330
|
+
url = auth_JWTAuthentication.url;
|
|
2331
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2332
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2333
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2334
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2335
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2336
|
+
url = auth_OAuth2.url;
|
|
2337
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2338
|
+
requestOptions = authDefault.requestOptions;
|
|
2339
|
+
url = authDefault.url;
|
|
2340
|
+
if (localVarFormParams) {
|
|
2341
|
+
delete requestOptions.headers['Content-Type'];
|
|
2342
|
+
if (localVarFormParams instanceof FormData) {
|
|
2343
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2344
|
+
requestOptions.body = localVarFormParams;
|
|
2121
2345
|
}
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2131
|
-
reject(new Error(body.error || errString));
|
|
2132
|
-
}
|
|
2133
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2134
|
-
resolve(body);
|
|
2135
|
-
}
|
|
2136
|
-
else {
|
|
2137
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2138
|
-
reject(errString);
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
});
|
|
2142
|
-
});
|
|
2143
|
-
});
|
|
2346
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2347
|
+
// URL-encoded form
|
|
2348
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2349
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
const response = await fetch(url, requestOptions);
|
|
2353
|
+
return this.handleResponse(response, 'ListPublicOrganizationTransformationBlocksResponse');
|
|
2144
2354
|
}
|
|
2145
2355
|
/**
|
|
2146
2356
|
* Retry launch a dsp block.
|
|
@@ -2153,9 +2363,11 @@ class OrganizationBlocksApi {
|
|
|
2153
2363
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2154
2364
|
.replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
|
|
2155
2365
|
let localVarQueryParameters = {};
|
|
2156
|
-
let localVarHeaderParams =
|
|
2157
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2158
|
-
|
|
2366
|
+
let localVarHeaderParams = {
|
|
2367
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2368
|
+
'Content-Type': 'application/json',
|
|
2369
|
+
...this.defaultHeaders,
|
|
2370
|
+
};
|
|
2159
2371
|
const produces = ['application/json'];
|
|
2160
2372
|
// give precedence to 'application/json'
|
|
2161
2373
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2164,7 +2376,7 @@ class OrganizationBlocksApi {
|
|
|
2164
2376
|
else {
|
|
2165
2377
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2166
2378
|
}
|
|
2167
|
-
let localVarFormParams
|
|
2379
|
+
let localVarFormParams;
|
|
2168
2380
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2169
2381
|
if (organizationId === null || organizationId === undefined) {
|
|
2170
2382
|
throw new Error('Required parameter organizationId was null or undefined when calling retryOrganizationDspBlock.');
|
|
@@ -2173,55 +2385,51 @@ class OrganizationBlocksApi {
|
|
|
2173
2385
|
if (dspId === null || dspId === undefined) {
|
|
2174
2386
|
throw new Error('Required parameter dspId was null or undefined when calling retryOrganizationDspBlock.');
|
|
2175
2387
|
}
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2388
|
+
localVarHeaderParams = {
|
|
2389
|
+
...localVarHeaderParams,
|
|
2390
|
+
...options.headers,
|
|
2391
|
+
...this.opts.extraHeaders,
|
|
2392
|
+
};
|
|
2393
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2394
|
+
.filter(([, value]) => value !== undefined)
|
|
2395
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2396
|
+
.join('&');
|
|
2397
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2179
2398
|
let localVarRequestOptions = {
|
|
2180
2399
|
method: 'POST',
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2400
|
+
headers: { ...localVarHeaderParams },
|
|
2401
|
+
};
|
|
2402
|
+
let requestOptions = localVarRequestOptions;
|
|
2403
|
+
let url = localVarUrl;
|
|
2404
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2405
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2406
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2407
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2408
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2409
|
+
url = auth_JWTAuthentication.url;
|
|
2410
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2411
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2412
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2413
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2414
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2415
|
+
url = auth_OAuth2.url;
|
|
2416
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2417
|
+
requestOptions = authDefault.requestOptions;
|
|
2418
|
+
url = authDefault.url;
|
|
2419
|
+
if (localVarFormParams) {
|
|
2420
|
+
delete requestOptions.headers['Content-Type'];
|
|
2421
|
+
if (localVarFormParams instanceof FormData) {
|
|
2422
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2423
|
+
requestOptions.body = localVarFormParams;
|
|
2202
2424
|
}
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2212
|
-
reject(new Error(body.error || errString));
|
|
2213
|
-
}
|
|
2214
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2215
|
-
resolve(body);
|
|
2216
|
-
}
|
|
2217
|
-
else {
|
|
2218
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2219
|
-
reject(errString);
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
});
|
|
2223
|
-
});
|
|
2224
|
-
});
|
|
2425
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2426
|
+
// URL-encoded form
|
|
2427
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2428
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
const response = await fetch(url, requestOptions);
|
|
2432
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
2225
2433
|
}
|
|
2226
2434
|
/**
|
|
2227
2435
|
* Updates a deploy block. Only values in the body will be updated.
|
|
@@ -2244,15 +2452,18 @@ class OrganizationBlocksApi {
|
|
|
2244
2452
|
* @param showOptimizations
|
|
2245
2453
|
* @param category
|
|
2246
2454
|
* @param sourceCodeDownloadStaffOnly Whether the source code is only available for staff users.
|
|
2455
|
+
* @param parameters List of parameters, spec\'ed according to https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks
|
|
2247
2456
|
*/
|
|
2248
2457
|
async updateOrganizationDeployBlock(organizationId, deployId, params, options = { headers: {} }) {
|
|
2249
2458
|
const localVarPath = this.basePath + '/api/organizations/{organizationId}/deploy/{deployId}'
|
|
2250
2459
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2251
2460
|
.replace('{' + 'deployId' + '}', encodeURIComponent(String(deployId)));
|
|
2252
2461
|
let localVarQueryParameters = {};
|
|
2253
|
-
let localVarHeaderParams =
|
|
2254
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2255
|
-
|
|
2462
|
+
let localVarHeaderParams = {
|
|
2463
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2464
|
+
'Content-Type': 'application/json',
|
|
2465
|
+
...this.defaultHeaders,
|
|
2466
|
+
};
|
|
2256
2467
|
const produces = ['application/json'];
|
|
2257
2468
|
// give precedence to 'application/json'
|
|
2258
2469
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2261,7 +2472,7 @@ class OrganizationBlocksApi {
|
|
|
2261
2472
|
else {
|
|
2262
2473
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2263
2474
|
}
|
|
2264
|
-
let localVarFormParams
|
|
2475
|
+
let localVarFormParams;
|
|
2265
2476
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2266
2477
|
if (organizationId === null || organizationId === undefined) {
|
|
2267
2478
|
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationDeployBlock.');
|
|
@@ -2270,104 +2481,325 @@ class OrganizationBlocksApi {
|
|
|
2270
2481
|
if (deployId === null || deployId === undefined) {
|
|
2271
2482
|
throw new Error('Required parameter deployId was null or undefined when calling updateOrganizationDeployBlock.');
|
|
2272
2483
|
}
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2484
|
+
localVarHeaderParams = {
|
|
2485
|
+
...localVarHeaderParams,
|
|
2486
|
+
...options.headers,
|
|
2487
|
+
...this.opts.extraHeaders,
|
|
2488
|
+
};
|
|
2276
2489
|
if (params.name !== undefined) {
|
|
2277
|
-
|
|
2490
|
+
const isParametersField = "name" === "parameters";
|
|
2491
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2492
|
+
const nameSerialized = serializableParams
|
|
2493
|
+
? JSON.stringify(params.parameters)
|
|
2494
|
+
: models_1.ObjectSerializer.serializeFormData(params.name, "string");
|
|
2495
|
+
if (localVarFormParams instanceof FormData) {
|
|
2496
|
+
localVarFormParams.append('name', nameSerialized);
|
|
2497
|
+
}
|
|
2498
|
+
else {
|
|
2499
|
+
if (!localVarFormParams) {
|
|
2500
|
+
localVarFormParams = {};
|
|
2501
|
+
}
|
|
2502
|
+
localVarFormParams['name'] = nameSerialized;
|
|
2503
|
+
}
|
|
2278
2504
|
}
|
|
2279
2505
|
if (params.dockerContainer !== undefined) {
|
|
2280
|
-
|
|
2506
|
+
const isParametersField = "dockerContainer" === "parameters";
|
|
2507
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2508
|
+
const dockerContainerSerialized = serializableParams
|
|
2509
|
+
? JSON.stringify(params.parameters)
|
|
2510
|
+
: models_1.ObjectSerializer.serializeFormData(params.dockerContainer, "string");
|
|
2511
|
+
if (localVarFormParams instanceof FormData) {
|
|
2512
|
+
localVarFormParams.append('dockerContainer', dockerContainerSerialized);
|
|
2513
|
+
}
|
|
2514
|
+
else {
|
|
2515
|
+
if (!localVarFormParams) {
|
|
2516
|
+
localVarFormParams = {};
|
|
2517
|
+
}
|
|
2518
|
+
localVarFormParams['dockerContainer'] = dockerContainerSerialized;
|
|
2519
|
+
}
|
|
2281
2520
|
}
|
|
2282
2521
|
if (params.description !== undefined) {
|
|
2283
|
-
|
|
2522
|
+
const isParametersField = "description" === "parameters";
|
|
2523
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2524
|
+
const descriptionSerialized = serializableParams
|
|
2525
|
+
? JSON.stringify(params.parameters)
|
|
2526
|
+
: models_1.ObjectSerializer.serializeFormData(params.description, "string");
|
|
2527
|
+
if (localVarFormParams instanceof FormData) {
|
|
2528
|
+
localVarFormParams.append('description', descriptionSerialized);
|
|
2529
|
+
}
|
|
2530
|
+
else {
|
|
2531
|
+
if (!localVarFormParams) {
|
|
2532
|
+
localVarFormParams = {};
|
|
2533
|
+
}
|
|
2534
|
+
localVarFormParams['description'] = descriptionSerialized;
|
|
2535
|
+
}
|
|
2284
2536
|
}
|
|
2285
2537
|
if (params.cliArguments !== undefined) {
|
|
2286
|
-
|
|
2538
|
+
const isParametersField = "cliArguments" === "parameters";
|
|
2539
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2540
|
+
const cliArgumentsSerialized = serializableParams
|
|
2541
|
+
? JSON.stringify(params.parameters)
|
|
2542
|
+
: models_1.ObjectSerializer.serializeFormData(params.cliArguments, "string");
|
|
2543
|
+
if (localVarFormParams instanceof FormData) {
|
|
2544
|
+
localVarFormParams.append('cliArguments', cliArgumentsSerialized);
|
|
2545
|
+
}
|
|
2546
|
+
else {
|
|
2547
|
+
if (!localVarFormParams) {
|
|
2548
|
+
localVarFormParams = {};
|
|
2549
|
+
}
|
|
2550
|
+
localVarFormParams['cliArguments'] = cliArgumentsSerialized;
|
|
2551
|
+
}
|
|
2287
2552
|
}
|
|
2288
2553
|
if (params.requestsCpu !== undefined) {
|
|
2289
|
-
|
|
2554
|
+
const isParametersField = "requestsCpu" === "parameters";
|
|
2555
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2556
|
+
const requestsCpuSerialized = serializableParams
|
|
2557
|
+
? JSON.stringify(params.parameters)
|
|
2558
|
+
: models_1.ObjectSerializer.serializeFormData(params.requestsCpu, "number");
|
|
2559
|
+
if (localVarFormParams instanceof FormData) {
|
|
2560
|
+
localVarFormParams.append('requestsCpu', requestsCpuSerialized);
|
|
2561
|
+
}
|
|
2562
|
+
else {
|
|
2563
|
+
if (!localVarFormParams) {
|
|
2564
|
+
localVarFormParams = {};
|
|
2565
|
+
}
|
|
2566
|
+
localVarFormParams['requestsCpu'] = requestsCpuSerialized;
|
|
2567
|
+
}
|
|
2290
2568
|
}
|
|
2291
2569
|
if (params.requestsMemory !== undefined) {
|
|
2292
|
-
|
|
2570
|
+
const isParametersField = "requestsMemory" === "parameters";
|
|
2571
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2572
|
+
const requestsMemorySerialized = serializableParams
|
|
2573
|
+
? JSON.stringify(params.parameters)
|
|
2574
|
+
: models_1.ObjectSerializer.serializeFormData(params.requestsMemory, "number");
|
|
2575
|
+
if (localVarFormParams instanceof FormData) {
|
|
2576
|
+
localVarFormParams.append('requestsMemory', requestsMemorySerialized);
|
|
2577
|
+
}
|
|
2578
|
+
else {
|
|
2579
|
+
if (!localVarFormParams) {
|
|
2580
|
+
localVarFormParams = {};
|
|
2581
|
+
}
|
|
2582
|
+
localVarFormParams['requestsMemory'] = requestsMemorySerialized;
|
|
2583
|
+
}
|
|
2293
2584
|
}
|
|
2294
2585
|
if (params.limitsCpu !== undefined) {
|
|
2295
|
-
|
|
2586
|
+
const isParametersField = "limitsCpu" === "parameters";
|
|
2587
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2588
|
+
const limitsCpuSerialized = serializableParams
|
|
2589
|
+
? JSON.stringify(params.parameters)
|
|
2590
|
+
: models_1.ObjectSerializer.serializeFormData(params.limitsCpu, "number");
|
|
2591
|
+
if (localVarFormParams instanceof FormData) {
|
|
2592
|
+
localVarFormParams.append('limitsCpu', limitsCpuSerialized);
|
|
2593
|
+
}
|
|
2594
|
+
else {
|
|
2595
|
+
if (!localVarFormParams) {
|
|
2596
|
+
localVarFormParams = {};
|
|
2597
|
+
}
|
|
2598
|
+
localVarFormParams['limitsCpu'] = limitsCpuSerialized;
|
|
2599
|
+
}
|
|
2296
2600
|
}
|
|
2297
2601
|
if (params.limitsMemory !== undefined) {
|
|
2298
|
-
|
|
2602
|
+
const isParametersField = "limitsMemory" === "parameters";
|
|
2603
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2604
|
+
const limitsMemorySerialized = serializableParams
|
|
2605
|
+
? JSON.stringify(params.parameters)
|
|
2606
|
+
: models_1.ObjectSerializer.serializeFormData(params.limitsMemory, "number");
|
|
2607
|
+
if (localVarFormParams instanceof FormData) {
|
|
2608
|
+
localVarFormParams.append('limitsMemory', limitsMemorySerialized);
|
|
2609
|
+
}
|
|
2610
|
+
else {
|
|
2611
|
+
if (!localVarFormParams) {
|
|
2612
|
+
localVarFormParams = {};
|
|
2613
|
+
}
|
|
2614
|
+
localVarFormParams['limitsMemory'] = limitsMemorySerialized;
|
|
2615
|
+
}
|
|
2299
2616
|
}
|
|
2300
2617
|
if (params.photo !== undefined) {
|
|
2301
|
-
localVarFormParams
|
|
2618
|
+
if (!(localVarFormParams instanceof FormData)) {
|
|
2619
|
+
const existingParams = localVarFormParams;
|
|
2620
|
+
localVarFormParams = new FormData();
|
|
2621
|
+
if (existingParams && typeof existingParams === 'object') {
|
|
2622
|
+
Object.keys(existingParams).forEach(key => {
|
|
2623
|
+
localVarFormParams.append(key, existingParams[key]);
|
|
2624
|
+
});
|
|
2625
|
+
}
|
|
2626
|
+
}
|
|
2627
|
+
const photoFiles = Array.isArray(params.photo) ? params.photo : [params.photo];
|
|
2628
|
+
const Blob = globalThis.Blob || require('buffer').Blob;
|
|
2629
|
+
photoFiles.forEach((f) => {
|
|
2630
|
+
localVarFormParams.append('photo', new Blob([f.value], {
|
|
2631
|
+
type: f.options.contentType
|
|
2632
|
+
}), f.options.filename);
|
|
2633
|
+
});
|
|
2302
2634
|
}
|
|
2303
|
-
localVarUseFormData = true;
|
|
2304
2635
|
if (params.integrateUrl !== undefined) {
|
|
2305
|
-
|
|
2636
|
+
const isParametersField = "integrateUrl" === "parameters";
|
|
2637
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2638
|
+
const integrateUrlSerialized = serializableParams
|
|
2639
|
+
? JSON.stringify(params.parameters)
|
|
2640
|
+
: models_1.ObjectSerializer.serializeFormData(params.integrateUrl, "string");
|
|
2641
|
+
if (localVarFormParams instanceof FormData) {
|
|
2642
|
+
localVarFormParams.append('integrateUrl', integrateUrlSerialized);
|
|
2643
|
+
}
|
|
2644
|
+
else {
|
|
2645
|
+
if (!localVarFormParams) {
|
|
2646
|
+
localVarFormParams = {};
|
|
2647
|
+
}
|
|
2648
|
+
localVarFormParams['integrateUrl'] = integrateUrlSerialized;
|
|
2649
|
+
}
|
|
2306
2650
|
}
|
|
2307
2651
|
if (params.privileged !== undefined) {
|
|
2308
|
-
|
|
2652
|
+
const isParametersField = "privileged" === "parameters";
|
|
2653
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2654
|
+
const privilegedSerialized = serializableParams
|
|
2655
|
+
? JSON.stringify(params.parameters)
|
|
2656
|
+
: models_1.ObjectSerializer.serializeFormData(params.privileged, "boolean");
|
|
2657
|
+
if (localVarFormParams instanceof FormData) {
|
|
2658
|
+
localVarFormParams.append('privileged', privilegedSerialized);
|
|
2659
|
+
}
|
|
2660
|
+
else {
|
|
2661
|
+
if (!localVarFormParams) {
|
|
2662
|
+
localVarFormParams = {};
|
|
2663
|
+
}
|
|
2664
|
+
localVarFormParams['privileged'] = privilegedSerialized;
|
|
2665
|
+
}
|
|
2309
2666
|
}
|
|
2310
2667
|
if (params.mountLearnBlock !== undefined) {
|
|
2311
|
-
|
|
2668
|
+
const isParametersField = "mountLearnBlock" === "parameters";
|
|
2669
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2670
|
+
const mountLearnBlockSerialized = serializableParams
|
|
2671
|
+
? JSON.stringify(params.parameters)
|
|
2672
|
+
: models_1.ObjectSerializer.serializeFormData(params.mountLearnBlock, "boolean");
|
|
2673
|
+
if (localVarFormParams instanceof FormData) {
|
|
2674
|
+
localVarFormParams.append('mountLearnBlock', mountLearnBlockSerialized);
|
|
2675
|
+
}
|
|
2676
|
+
else {
|
|
2677
|
+
if (!localVarFormParams) {
|
|
2678
|
+
localVarFormParams = {};
|
|
2679
|
+
}
|
|
2680
|
+
localVarFormParams['mountLearnBlock'] = mountLearnBlockSerialized;
|
|
2681
|
+
}
|
|
2312
2682
|
}
|
|
2313
2683
|
if (params.supportsEonCompiler !== undefined) {
|
|
2314
|
-
|
|
2684
|
+
const isParametersField = "supportsEonCompiler" === "parameters";
|
|
2685
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2686
|
+
const supportsEonCompilerSerialized = serializableParams
|
|
2687
|
+
? JSON.stringify(params.parameters)
|
|
2688
|
+
: models_1.ObjectSerializer.serializeFormData(params.supportsEonCompiler, "boolean");
|
|
2689
|
+
if (localVarFormParams instanceof FormData) {
|
|
2690
|
+
localVarFormParams.append('supportsEonCompiler', supportsEonCompilerSerialized);
|
|
2691
|
+
}
|
|
2692
|
+
else {
|
|
2693
|
+
if (!localVarFormParams) {
|
|
2694
|
+
localVarFormParams = {};
|
|
2695
|
+
}
|
|
2696
|
+
localVarFormParams['supportsEonCompiler'] = supportsEonCompilerSerialized;
|
|
2697
|
+
}
|
|
2315
2698
|
}
|
|
2316
2699
|
if (params.showOptimizations !== undefined) {
|
|
2317
|
-
|
|
2700
|
+
const isParametersField = "showOptimizations" === "parameters";
|
|
2701
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2702
|
+
const showOptimizationsSerialized = serializableParams
|
|
2703
|
+
? JSON.stringify(params.parameters)
|
|
2704
|
+
: models_1.ObjectSerializer.serializeFormData(params.showOptimizations, "boolean");
|
|
2705
|
+
if (localVarFormParams instanceof FormData) {
|
|
2706
|
+
localVarFormParams.append('showOptimizations', showOptimizationsSerialized);
|
|
2707
|
+
}
|
|
2708
|
+
else {
|
|
2709
|
+
if (!localVarFormParams) {
|
|
2710
|
+
localVarFormParams = {};
|
|
2711
|
+
}
|
|
2712
|
+
localVarFormParams['showOptimizations'] = showOptimizationsSerialized;
|
|
2713
|
+
}
|
|
2318
2714
|
}
|
|
2319
2715
|
if (params.category !== undefined) {
|
|
2320
|
-
|
|
2716
|
+
const isParametersField = "category" === "parameters";
|
|
2717
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2718
|
+
const categorySerialized = serializableParams
|
|
2719
|
+
? JSON.stringify(params.parameters)
|
|
2720
|
+
: models_1.ObjectSerializer.serializeFormData(params.category, "string");
|
|
2721
|
+
if (localVarFormParams instanceof FormData) {
|
|
2722
|
+
localVarFormParams.append('category', categorySerialized);
|
|
2723
|
+
}
|
|
2724
|
+
else {
|
|
2725
|
+
if (!localVarFormParams) {
|
|
2726
|
+
localVarFormParams = {};
|
|
2727
|
+
}
|
|
2728
|
+
localVarFormParams['category'] = categorySerialized;
|
|
2729
|
+
}
|
|
2321
2730
|
}
|
|
2322
2731
|
if (params.sourceCodeDownloadStaffOnly !== undefined) {
|
|
2323
|
-
|
|
2732
|
+
const isParametersField = "sourceCodeDownloadStaffOnly" === "parameters";
|
|
2733
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2734
|
+
const sourceCodeDownloadStaffOnlySerialized = serializableParams
|
|
2735
|
+
? JSON.stringify(params.parameters)
|
|
2736
|
+
: models_1.ObjectSerializer.serializeFormData(params.sourceCodeDownloadStaffOnly, "boolean");
|
|
2737
|
+
if (localVarFormParams instanceof FormData) {
|
|
2738
|
+
localVarFormParams.append('sourceCodeDownloadStaffOnly', sourceCodeDownloadStaffOnlySerialized);
|
|
2739
|
+
}
|
|
2740
|
+
else {
|
|
2741
|
+
if (!localVarFormParams) {
|
|
2742
|
+
localVarFormParams = {};
|
|
2743
|
+
}
|
|
2744
|
+
localVarFormParams['sourceCodeDownloadStaffOnly'] = sourceCodeDownloadStaffOnlySerialized;
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
if (params.parameters !== undefined) {
|
|
2748
|
+
const isParametersField = "parameters" === "parameters";
|
|
2749
|
+
const serializableParams = isParametersField && params && ("parameters" in params);
|
|
2750
|
+
const parametersSerialized = serializableParams
|
|
2751
|
+
? JSON.stringify(params.parameters)
|
|
2752
|
+
: models_1.ObjectSerializer.serializeFormData(params.parameters, "Array<object>");
|
|
2753
|
+
if (localVarFormParams instanceof FormData) {
|
|
2754
|
+
localVarFormParams.append('parameters', parametersSerialized);
|
|
2755
|
+
}
|
|
2756
|
+
else {
|
|
2757
|
+
if (!localVarFormParams) {
|
|
2758
|
+
localVarFormParams = {};
|
|
2759
|
+
}
|
|
2760
|
+
localVarFormParams['parameters'] = parametersSerialized;
|
|
2761
|
+
}
|
|
2324
2762
|
}
|
|
2763
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2764
|
+
.filter(([, value]) => value !== undefined)
|
|
2765
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2766
|
+
.join('&');
|
|
2767
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2325
2768
|
let localVarRequestOptions = {
|
|
2326
2769
|
method: 'POST',
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2770
|
+
headers: { ...localVarHeaderParams },
|
|
2771
|
+
};
|
|
2772
|
+
let requestOptions = localVarRequestOptions;
|
|
2773
|
+
let url = localVarUrl;
|
|
2774
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2775
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2776
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2777
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2778
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2779
|
+
url = auth_JWTAuthentication.url;
|
|
2780
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2781
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2782
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2783
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2784
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2785
|
+
url = auth_OAuth2.url;
|
|
2786
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2787
|
+
requestOptions = authDefault.requestOptions;
|
|
2788
|
+
url = authDefault.url;
|
|
2789
|
+
if (localVarFormParams) {
|
|
2790
|
+
delete requestOptions.headers['Content-Type'];
|
|
2791
|
+
if (localVarFormParams instanceof FormData) {
|
|
2792
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2793
|
+
requestOptions.body = localVarFormParams;
|
|
2348
2794
|
}
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2358
|
-
reject(new Error(body.error || errString));
|
|
2359
|
-
}
|
|
2360
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2361
|
-
resolve(body);
|
|
2362
|
-
}
|
|
2363
|
-
else {
|
|
2364
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2365
|
-
reject(errString);
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
});
|
|
2369
|
-
});
|
|
2370
|
-
});
|
|
2795
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2796
|
+
// URL-encoded form
|
|
2797
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2798
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2799
|
+
}
|
|
2800
|
+
}
|
|
2801
|
+
const response = await fetch(url, requestOptions);
|
|
2802
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
2371
2803
|
}
|
|
2372
2804
|
/**
|
|
2373
2805
|
* Updates a dsp block. Only values in the body will be updated.
|
|
@@ -2381,9 +2813,11 @@ class OrganizationBlocksApi {
|
|
|
2381
2813
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2382
2814
|
.replace('{' + 'dspId' + '}', encodeURIComponent(String(dspId)));
|
|
2383
2815
|
let localVarQueryParameters = {};
|
|
2384
|
-
let localVarHeaderParams =
|
|
2385
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2386
|
-
|
|
2816
|
+
let localVarHeaderParams = {
|
|
2817
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2818
|
+
'Content-Type': 'application/json',
|
|
2819
|
+
...this.defaultHeaders,
|
|
2820
|
+
};
|
|
2387
2821
|
const produces = ['application/json'];
|
|
2388
2822
|
// give precedence to 'application/json'
|
|
2389
2823
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2392,7 +2826,7 @@ class OrganizationBlocksApi {
|
|
|
2392
2826
|
else {
|
|
2393
2827
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2394
2828
|
}
|
|
2395
|
-
let localVarFormParams
|
|
2829
|
+
let localVarFormParams;
|
|
2396
2830
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2397
2831
|
if (organizationId === null || organizationId === undefined) {
|
|
2398
2832
|
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationDspBlock.');
|
|
@@ -2405,56 +2839,52 @@ class OrganizationBlocksApi {
|
|
|
2405
2839
|
if (updateOrganizationDspBlockRequest === null || updateOrganizationDspBlockRequest === undefined) {
|
|
2406
2840
|
throw new Error('Required parameter updateOrganizationDspBlockRequest was null or undefined when calling updateOrganizationDspBlock.');
|
|
2407
2841
|
}
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2842
|
+
localVarHeaderParams = {
|
|
2843
|
+
...localVarHeaderParams,
|
|
2844
|
+
...options.headers,
|
|
2845
|
+
...this.opts.extraHeaders,
|
|
2846
|
+
};
|
|
2847
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2848
|
+
.filter(([, value]) => value !== undefined)
|
|
2849
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2850
|
+
.join('&');
|
|
2851
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2411
2852
|
let localVarRequestOptions = {
|
|
2412
2853
|
method: 'POST',
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2854
|
+
headers: { ...localVarHeaderParams },
|
|
2855
|
+
};
|
|
2856
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(updateOrganizationDspBlockRequest, "UpdateOrganizationDspBlockRequest"));
|
|
2857
|
+
let requestOptions = localVarRequestOptions;
|
|
2858
|
+
let url = localVarUrl;
|
|
2859
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2860
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2861
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2862
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2863
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2864
|
+
url = auth_JWTAuthentication.url;
|
|
2865
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2866
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2867
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2868
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2869
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2870
|
+
url = auth_OAuth2.url;
|
|
2871
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2872
|
+
requestOptions = authDefault.requestOptions;
|
|
2873
|
+
url = authDefault.url;
|
|
2874
|
+
if (localVarFormParams) {
|
|
2875
|
+
delete requestOptions.headers['Content-Type'];
|
|
2876
|
+
if (localVarFormParams instanceof FormData) {
|
|
2877
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2878
|
+
requestOptions.body = localVarFormParams;
|
|
2435
2879
|
}
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2445
|
-
reject(new Error(body.error || errString));
|
|
2446
|
-
}
|
|
2447
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2448
|
-
resolve(body);
|
|
2449
|
-
}
|
|
2450
|
-
else {
|
|
2451
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2452
|
-
reject(errString);
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
2455
|
-
});
|
|
2456
|
-
});
|
|
2457
|
-
});
|
|
2880
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2881
|
+
// URL-encoded form
|
|
2882
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2883
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2884
|
+
}
|
|
2885
|
+
}
|
|
2886
|
+
const response = await fetch(url, requestOptions);
|
|
2887
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
2458
2888
|
}
|
|
2459
2889
|
/**
|
|
2460
2890
|
* Updates a transfer learning block. Only values in the body will be updated.
|
|
@@ -2468,9 +2898,11 @@ class OrganizationBlocksApi {
|
|
|
2468
2898
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2469
2899
|
.replace('{' + 'transferLearningId' + '}', encodeURIComponent(String(transferLearningId)));
|
|
2470
2900
|
let localVarQueryParameters = {};
|
|
2471
|
-
let localVarHeaderParams =
|
|
2472
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2473
|
-
|
|
2901
|
+
let localVarHeaderParams = {
|
|
2902
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2903
|
+
'Content-Type': 'application/json',
|
|
2904
|
+
...this.defaultHeaders,
|
|
2905
|
+
};
|
|
2474
2906
|
const produces = ['application/json'];
|
|
2475
2907
|
// give precedence to 'application/json'
|
|
2476
2908
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2479,7 +2911,7 @@ class OrganizationBlocksApi {
|
|
|
2479
2911
|
else {
|
|
2480
2912
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2481
2913
|
}
|
|
2482
|
-
let localVarFormParams
|
|
2914
|
+
let localVarFormParams;
|
|
2483
2915
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2484
2916
|
if (organizationId === null || organizationId === undefined) {
|
|
2485
2917
|
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationTransferLearningBlock.');
|
|
@@ -2492,56 +2924,52 @@ class OrganizationBlocksApi {
|
|
|
2492
2924
|
if (updateOrganizationTransferLearningBlockRequest === null || updateOrganizationTransferLearningBlockRequest === undefined) {
|
|
2493
2925
|
throw new Error('Required parameter updateOrganizationTransferLearningBlockRequest was null or undefined when calling updateOrganizationTransferLearningBlock.');
|
|
2494
2926
|
}
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2927
|
+
localVarHeaderParams = {
|
|
2928
|
+
...localVarHeaderParams,
|
|
2929
|
+
...options.headers,
|
|
2930
|
+
...this.opts.extraHeaders,
|
|
2931
|
+
};
|
|
2932
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
2933
|
+
.filter(([, value]) => value !== undefined)
|
|
2934
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2935
|
+
.join('&');
|
|
2936
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2498
2937
|
let localVarRequestOptions = {
|
|
2499
2938
|
method: 'POST',
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2939
|
+
headers: { ...localVarHeaderParams },
|
|
2940
|
+
};
|
|
2941
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(updateOrganizationTransferLearningBlockRequest, "UpdateOrganizationTransferLearningBlockRequest"));
|
|
2942
|
+
let requestOptions = localVarRequestOptions;
|
|
2943
|
+
let url = localVarUrl;
|
|
2944
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2945
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2946
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2947
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2948
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2949
|
+
url = auth_JWTAuthentication.url;
|
|
2950
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2951
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2952
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2953
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2954
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2955
|
+
url = auth_OAuth2.url;
|
|
2956
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2957
|
+
requestOptions = authDefault.requestOptions;
|
|
2958
|
+
url = authDefault.url;
|
|
2959
|
+
if (localVarFormParams) {
|
|
2960
|
+
delete requestOptions.headers['Content-Type'];
|
|
2961
|
+
if (localVarFormParams instanceof FormData) {
|
|
2962
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
2963
|
+
requestOptions.body = localVarFormParams;
|
|
2522
2964
|
}
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2532
|
-
reject(new Error(body.error || errString));
|
|
2533
|
-
}
|
|
2534
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2535
|
-
resolve(body);
|
|
2536
|
-
}
|
|
2537
|
-
else {
|
|
2538
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2539
|
-
reject(errString);
|
|
2540
|
-
}
|
|
2541
|
-
}
|
|
2542
|
-
});
|
|
2543
|
-
});
|
|
2544
|
-
});
|
|
2965
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
2966
|
+
// URL-encoded form
|
|
2967
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
2968
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
2969
|
+
}
|
|
2970
|
+
}
|
|
2971
|
+
const response = await fetch(url, requestOptions);
|
|
2972
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
2545
2973
|
}
|
|
2546
2974
|
/**
|
|
2547
2975
|
* Updates a transformation block. Only values in the body will be updated.
|
|
@@ -2555,9 +2983,11 @@ class OrganizationBlocksApi {
|
|
|
2555
2983
|
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2556
2984
|
.replace('{' + 'transformationId' + '}', encodeURIComponent(String(transformationId)));
|
|
2557
2985
|
let localVarQueryParameters = {};
|
|
2558
|
-
let localVarHeaderParams =
|
|
2559
|
-
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2560
|
-
|
|
2986
|
+
let localVarHeaderParams = {
|
|
2987
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2988
|
+
'Content-Type': 'application/json',
|
|
2989
|
+
...this.defaultHeaders,
|
|
2990
|
+
};
|
|
2561
2991
|
const produces = ['application/json'];
|
|
2562
2992
|
// give precedence to 'application/json'
|
|
2563
2993
|
if (produces.indexOf('application/json') >= 0) {
|
|
@@ -2566,7 +2996,7 @@ class OrganizationBlocksApi {
|
|
|
2566
2996
|
else {
|
|
2567
2997
|
localVarHeaderParams.Accept = produces.join(',');
|
|
2568
2998
|
}
|
|
2569
|
-
let localVarFormParams
|
|
2999
|
+
let localVarFormParams;
|
|
2570
3000
|
// verify required parameter 'organizationId' is not null or undefined
|
|
2571
3001
|
if (organizationId === null || organizationId === undefined) {
|
|
2572
3002
|
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationTransformationBlock.');
|
|
@@ -2579,56 +3009,52 @@ class OrganizationBlocksApi {
|
|
|
2579
3009
|
if (updateOrganizationTransformationBlockRequest === null || updateOrganizationTransformationBlockRequest === undefined) {
|
|
2580
3010
|
throw new Error('Required parameter updateOrganizationTransformationBlockRequest was null or undefined when calling updateOrganizationTransformationBlock.');
|
|
2581
3011
|
}
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
3012
|
+
localVarHeaderParams = {
|
|
3013
|
+
...localVarHeaderParams,
|
|
3014
|
+
...options.headers,
|
|
3015
|
+
...this.opts.extraHeaders,
|
|
3016
|
+
};
|
|
3017
|
+
const queryString = Object.entries(localVarQueryParameters)
|
|
3018
|
+
.filter(([, value]) => value !== undefined)
|
|
3019
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
3020
|
+
.join('&');
|
|
3021
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2585
3022
|
let localVarRequestOptions = {
|
|
2586
3023
|
method: 'POST',
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
3024
|
+
headers: { ...localVarHeaderParams },
|
|
3025
|
+
};
|
|
3026
|
+
localVarRequestOptions.body = JSON.stringify(models_1.ObjectSerializer.serialize(updateOrganizationTransformationBlockRequest, "UpdateOrganizationTransformationBlockRequest"));
|
|
3027
|
+
let requestOptions = localVarRequestOptions;
|
|
3028
|
+
let url = localVarUrl;
|
|
3029
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
3030
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
3031
|
+
url = auth_ApiKeyAuthentication.url;
|
|
3032
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
3033
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
3034
|
+
url = auth_JWTAuthentication.url;
|
|
3035
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
3036
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
3037
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
3038
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
3039
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
3040
|
+
url = auth_OAuth2.url;
|
|
3041
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
3042
|
+
requestOptions = authDefault.requestOptions;
|
|
3043
|
+
url = authDefault.url;
|
|
3044
|
+
if (localVarFormParams) {
|
|
3045
|
+
delete requestOptions.headers['Content-Type'];
|
|
3046
|
+
if (localVarFormParams instanceof FormData) {
|
|
3047
|
+
// FormData: fetch will handle Content-Type automatically.
|
|
3048
|
+
requestOptions.body = localVarFormParams;
|
|
2609
3049
|
}
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2619
|
-
reject(new Error(body.error || errString));
|
|
2620
|
-
}
|
|
2621
|
-
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2622
|
-
resolve(body);
|
|
2623
|
-
}
|
|
2624
|
-
else {
|
|
2625
|
-
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2626
|
-
reject(errString);
|
|
2627
|
-
}
|
|
2628
|
-
}
|
|
2629
|
-
});
|
|
2630
|
-
});
|
|
2631
|
-
});
|
|
3050
|
+
else if (Object.keys(localVarFormParams).length > 0) {
|
|
3051
|
+
// URL-encoded form
|
|
3052
|
+
requestOptions.body = new URLSearchParams(localVarFormParams).toString();
|
|
3053
|
+
requestOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
3054
|
+
}
|
|
3055
|
+
}
|
|
3056
|
+
const response = await fetch(url, requestOptions);
|
|
3057
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
2632
3058
|
}
|
|
2633
3059
|
}
|
|
2634
3060
|
exports.OrganizationBlocksApi = OrganizationBlocksApi;
|