edge-impulse-linux 1.9.0 → 1.9.2
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/library/sensors/gstreamer.d.ts +6 -2
- package/build/library/sensors/gstreamer.js +31 -12
- package/build/library/sensors/gstreamer.js.map +1 -1
- package/build/sdk/studio/sdk/api/classifyApi.d.ts +20 -0
- package/build/sdk/studio/sdk/api/classifyApi.js +86 -0
- package/build/sdk/studio/sdk/api/classifyApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/jobsApi.d.ts +26 -0
- package/build/sdk/studio/sdk/api/jobsApi.js +168 -0
- package/build/sdk/studio/sdk/api/jobsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationBlocksApi.d.ts +12 -0
- package/build/sdk/studio/sdk/api/organizationBlocksApi.js +79 -0
- package/build/sdk/studio/sdk/api/organizationBlocksApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/organizationJobsApi.d.ts +2 -0
- package/build/sdk/studio/sdk/api/organizationJobsApi.js +4 -0
- package/build/sdk/studio/sdk/api/organizationJobsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/projectsApi.d.ts +107 -0
- package/build/sdk/studio/sdk/api/projectsApi.js +735 -26
- package/build/sdk/studio/sdk/api/projectsApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/rawDataApi.d.ts +147 -10
- package/build/sdk/studio/sdk/api/rawDataApi.js +561 -10
- package/build/sdk/studio/sdk/api/rawDataApi.js.map +1 -1
- package/build/sdk/studio/sdk/api/userApi.d.ts +16 -1
- package/build/sdk/studio/sdk/api/userApi.js +72 -1
- package/build/sdk/studio/sdk/api/userApi.js.map +1 -1
- package/build/sdk/studio/sdk/model/aIAction.d.ts +51 -0
- package/build/sdk/studio/sdk/model/aIAction.js +69 -0
- package/build/sdk/studio/sdk/model/aIAction.js.map +1 -0
- package/build/sdk/studio/sdk/model/aIActionLastPreviewState.d.ts +31 -0
- package/build/sdk/studio/sdk/model/aIActionLastPreviewState.js +37 -0
- package/build/sdk/studio/sdk/model/aIActionLastPreviewState.js.map +1 -0
- package/build/sdk/studio/sdk/model/aIActionLastPreviewStateProposedChanges.d.ts +27 -0
- package/build/sdk/studio/sdk/model/aIActionLastPreviewStateProposedChanges.js +34 -0
- package/build/sdk/studio/sdk/model/aIActionLastPreviewStateProposedChanges.js.map +1 -0
- package/build/sdk/studio/sdk/model/aIActionsConfig.d.ts +44 -0
- package/build/sdk/studio/sdk/model/aIActionsConfig.js +49 -0
- package/build/sdk/studio/sdk/model/aIActionsConfig.js.map +1 -0
- package/build/sdk/studio/sdk/model/aIActionsDataCategory.d.ts +13 -0
- package/build/sdk/studio/sdk/model/aIActionsDataCategory.js +16 -0
- package/build/sdk/studio/sdk/model/aIActionsDataCategory.js.map +1 -0
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.d.ts +6 -0
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.js +10 -0
- package/build/sdk/studio/sdk/model/addOrganizationTransformationBlockRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/additionalMetric.d.ts +1 -0
- package/build/sdk/studio/sdk/model/additionalMetric.js +5 -0
- package/build/sdk/studio/sdk/model/additionalMetric.js.map +1 -1
- package/build/sdk/studio/sdk/model/batchAddMetadataRequest.d.ts +26 -0
- package/build/sdk/studio/sdk/model/batchAddMetadataRequest.js +34 -0
- package/build/sdk/studio/sdk/model/batchAddMetadataRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/batchClearMetadataByKeyRequest.d.ts +25 -0
- package/build/sdk/studio/sdk/model/batchClearMetadataByKeyRequest.js +29 -0
- package/build/sdk/studio/sdk/model/batchClearMetadataByKeyRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/createAIActionResponse.d.ts +33 -0
- package/build/sdk/studio/sdk/model/createAIActionResponse.js +39 -0
- package/build/sdk/studio/sdk/model/createAIActionResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/createPreviewAIActionsJobRequest.d.ts +35 -0
- package/build/sdk/studio/sdk/model/createPreviewAIActionsJobRequest.js +39 -0
- package/build/sdk/studio/sdk/model/createPreviewAIActionsJobRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/dSPGroupItem.d.ts +1 -0
- package/build/sdk/studio/sdk/model/dSPGroupItem.js +5 -0
- package/build/sdk/studio/sdk/model/dSPGroupItem.js.map +1 -1
- package/build/sdk/studio/sdk/model/detailedImpulse.d.ts +4 -0
- package/build/sdk/studio/sdk/model/detailedImpulse.js +5 -0
- package/build/sdk/studio/sdk/model/detailedImpulse.js.map +1 -1
- package/build/sdk/studio/sdk/model/environmentVariable.d.ts +32 -0
- package/build/sdk/studio/sdk/model/environmentVariable.js +34 -0
- package/build/sdk/studio/sdk/model/environmentVariable.js.map +1 -0
- package/build/sdk/studio/sdk/model/getAIActionResponse.d.ts +34 -0
- package/build/sdk/studio/sdk/model/getAIActionResponse.js +39 -0
- package/build/sdk/studio/sdk/model/getAIActionResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/getAIActionResponseAllOf.d.ts +26 -0
- package/build/sdk/studio/sdk/model/getAIActionResponseAllOf.js +29 -0
- package/build/sdk/studio/sdk/model/getAIActionResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/getAIActionsProposedChangesResponse.d.ts +34 -0
- package/build/sdk/studio/sdk/model/getAIActionsProposedChangesResponse.js +39 -0
- package/build/sdk/studio/sdk/model/getAIActionsProposedChangesResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/getAIActionsProposedChangesResponseAllOf.d.ts +26 -0
- package/build/sdk/studio/sdk/model/getAIActionsProposedChangesResponseAllOf.js +29 -0
- package/build/sdk/studio/sdk/model/getAIActionsProposedChangesResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/getPublicOrganizationTransformationBlockResponse.d.ts +34 -0
- package/build/sdk/studio/sdk/model/getPublicOrganizationTransformationBlockResponse.js +39 -0
- package/build/sdk/studio/sdk/model/getPublicOrganizationTransformationBlockResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/getPublicOrganizationTransformationBlockResponseAllOf.d.ts +26 -0
- package/build/sdk/studio/sdk/model/getPublicOrganizationTransformationBlockResponseAllOf.js +29 -0
- package/build/sdk/studio/sdk/model/getPublicOrganizationTransformationBlockResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/getUserProjectsResponse.d.ts +34 -0
- package/build/sdk/studio/sdk/model/getUserProjectsResponse.js +39 -0
- package/build/sdk/studio/sdk/model/getUserProjectsResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/getUserProjectsResponseAllOf.d.ts +26 -0
- package/build/sdk/studio/sdk/model/getUserProjectsResponseAllOf.js +29 -0
- package/build/sdk/studio/sdk/model/getUserProjectsResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/getUserResponse.d.ts +9 -0
- package/build/sdk/studio/sdk/model/getUserResponse.js +10 -0
- package/build/sdk/studio/sdk/model/getUserResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/getUserResponseAllOf.d.ts +9 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOf.js +10 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOf.js.map +1 -1
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAccessedProjects.d.ts +30 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAccessedProjects.js +37 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAccessedProjects.js.map +1 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAccessedProjectsProjects.d.ts +28 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAccessedProjectsProjects.js +44 -0
- package/build/sdk/studio/sdk/model/getUserResponseAllOfLastAccessedProjectsProjects.js.map +1 -0
- package/build/sdk/studio/sdk/model/listAIActionsResponse.d.ts +34 -0
- package/build/sdk/studio/sdk/model/listAIActionsResponse.js +39 -0
- package/build/sdk/studio/sdk/model/listAIActionsResponse.js.map +1 -0
- package/build/sdk/studio/sdk/model/listAIActionsResponseAllOf.d.ts +26 -0
- package/build/sdk/studio/sdk/model/listAIActionsResponseAllOf.js +29 -0
- package/build/sdk/studio/sdk/model/listAIActionsResponseAllOf.js.map +1 -0
- package/build/sdk/studio/sdk/model/models.d.ts +27 -0
- package/build/sdk/studio/sdk/model/models.js +80 -2
- package/build/sdk/studio/sdk/model/models.js.map +1 -1
- package/build/sdk/studio/sdk/model/optimizeConfig.d.ts +6 -4
- package/build/sdk/studio/sdk/model/optimizeConfig.js +9 -5
- package/build/sdk/studio/sdk/model/optimizeConfig.js.map +1 -1
- package/build/sdk/studio/sdk/model/optimizeConfigResponse.d.ts +6 -4
- package/build/sdk/studio/sdk/model/optimizeConfigResponse.js +9 -5
- package/build/sdk/studio/sdk/model/optimizeConfigResponse.js.map +1 -1
- package/build/sdk/studio/sdk/model/organizationTransformationBlock.d.ts +9 -0
- package/build/sdk/studio/sdk/model/organizationTransformationBlock.js +10 -0
- package/build/sdk/studio/sdk/model/organizationTransformationBlock.js.map +1 -1
- package/build/sdk/studio/sdk/model/previewAIActionsSamplesRequest.d.ts +42 -0
- package/build/sdk/studio/sdk/model/previewAIActionsSamplesRequest.js +49 -0
- package/build/sdk/studio/sdk/model/previewAIActionsSamplesRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/publicOrganizationTransformationBlock.d.ts +4 -0
- package/build/sdk/studio/sdk/model/publicOrganizationTransformationBlock.js +5 -0
- package/build/sdk/studio/sdk/model/publicOrganizationTransformationBlock.js.map +1 -1
- package/build/sdk/studio/sdk/model/sampleProposedChanges.d.ts +48 -0
- package/build/sdk/studio/sdk/model/sampleProposedChanges.js +49 -0
- package/build/sdk/studio/sdk/model/sampleProposedChanges.js.map +1 -0
- package/build/sdk/studio/sdk/model/setAIActionsOrderRequest.d.ts +25 -0
- package/build/sdk/studio/sdk/model/setAIActionsOrderRequest.js +29 -0
- package/build/sdk/studio/sdk/model/setAIActionsOrderRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/setSampleProposedChangesRequest.d.ts +30 -0
- package/build/sdk/studio/sdk/model/setSampleProposedChangesRequest.js +34 -0
- package/build/sdk/studio/sdk/model/setSampleProposedChangesRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/updateAIActionRequest.d.ts +57 -0
- package/build/sdk/studio/sdk/model/updateAIActionRequest.js +64 -0
- package/build/sdk/studio/sdk/model/updateAIActionRequest.js.map +1 -0
- package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.d.ts +6 -0
- package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.js +10 -0
- package/build/sdk/studio/sdk/model/updateOrganizationTransformationBlockRequest.js.map +1 -1
- package/build/sdk/studio/sdk/model/updateProjectRequest.d.ts +4 -0
- package/build/sdk/studio/sdk/model/updateProjectRequest.js +5 -0
- package/build/sdk/studio/sdk/model/updateProjectRequest.js.map +1 -1
- package/build/shared/bounding-box-file-types.d.ts +1 -0
- package/build/shared/bounding-box-file-types.js +46 -2
- package/build/shared/bounding-box-file-types.js.map +1 -1
- package/build/shared/viewmodels/init.d.ts +3 -0
- package/build/shared/viewmodels/init.js +3 -0
- package/build/shared/viewmodels/init.js.map +1 -1
- package/cli/linux/webserver/public/assets/argon-dashboard.css +20595 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-120.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-128.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-144.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-152.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-16.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-180.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-228.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-32.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-57.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-76.png +0 -0
- package/cli/linux/webserver/public/assets/favicon-color/favicon-96.png +0 -0
- package/cli/linux/webserver/public/assets/logo-rgb.svg +18 -0
- package/cli/linux/webserver/public/assets/mark.svg +20 -0
- package/cli/linux/webserver/public/assets/mobileclient.css +4179 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300.svg +332 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300italic.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300italic.svg +345 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300italic.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300italic.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-300italic.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600.svg +336 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600italic.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600italic.svg +349 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600italic.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600italic.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-600italic.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700.svg +334 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700italic.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700italic.svg +342 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700italic.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700italic.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-700italic.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800.svg +336 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800italic.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800italic.svg +342 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800italic.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800italic.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-800italic.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-italic.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-italic.svg +349 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-italic.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-italic.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-italic.woff2 +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-regular.eot +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-regular.svg +336 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-regular.ttf +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-regular.woff +0 -0
- package/cli/linux/webserver/public/fonts/open-sans-v17-latin-regular.woff2 +0 -0
- package/cli/linux/webserver/public/index.html +114 -0
- package/cli/linux/webserver/public/inference-server.js +216 -0
- package/cli/linux/webserver/public/webserver.js +247 -0
- package/package.json +3 -2
- package/test/gstreamer.test.ts +797 -10
|
@@ -311,6 +311,158 @@ class ProjectsApi {
|
|
|
311
311
|
});
|
|
312
312
|
});
|
|
313
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* Remove all proposed changes for an AI Actions job.
|
|
316
|
+
* @summary Clear AI Actions proposed changes
|
|
317
|
+
* @param projectId Project ID
|
|
318
|
+
* @param actionId AI Action ID
|
|
319
|
+
*/
|
|
320
|
+
async clearAIActionsProposedChanges(projectId, actionId, options = { headers: {} }) {
|
|
321
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/{actionId}/clear-proposed-changes'
|
|
322
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
323
|
+
.replace('{' + 'actionId' + '}', encodeURIComponent(String(actionId)));
|
|
324
|
+
let localVarQueryParameters = {};
|
|
325
|
+
let localVarHeaderParams = Object.assign({
|
|
326
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
327
|
+
}, this.defaultHeaders);
|
|
328
|
+
const produces = ['application/json'];
|
|
329
|
+
// give precedence to 'application/json'
|
|
330
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
331
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
335
|
+
}
|
|
336
|
+
let localVarFormParams = {};
|
|
337
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
338
|
+
if (projectId === null || projectId === undefined) {
|
|
339
|
+
throw new Error('Required parameter projectId was null or undefined when calling clearAIActionsProposedChanges.');
|
|
340
|
+
}
|
|
341
|
+
// verify required parameter 'actionId' is not null or undefined
|
|
342
|
+
if (actionId === null || actionId === undefined) {
|
|
343
|
+
throw new Error('Required parameter actionId was null or undefined when calling clearAIActionsProposedChanges.');
|
|
344
|
+
}
|
|
345
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
346
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
347
|
+
let localVarUseFormData = false;
|
|
348
|
+
let localVarRequestOptions = {
|
|
349
|
+
method: 'GET',
|
|
350
|
+
qs: localVarQueryParameters,
|
|
351
|
+
headers: localVarHeaderParams,
|
|
352
|
+
uri: localVarPath,
|
|
353
|
+
useQuerystring: this._useQuerystring,
|
|
354
|
+
agentOptions: { keepAlive: false },
|
|
355
|
+
json: true,
|
|
356
|
+
};
|
|
357
|
+
let authenticationPromise = Promise.resolve();
|
|
358
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
359
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
360
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
361
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
362
|
+
return authenticationPromise.then(() => {
|
|
363
|
+
if (Object.keys(localVarFormParams).length) {
|
|
364
|
+
if (localVarUseFormData) {
|
|
365
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return new Promise((resolve, reject) => {
|
|
372
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
373
|
+
if (error) {
|
|
374
|
+
reject(error);
|
|
375
|
+
}
|
|
376
|
+
else {
|
|
377
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
378
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
379
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
380
|
+
reject(new Error(body.error || errString));
|
|
381
|
+
}
|
|
382
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
383
|
+
resolve(body);
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
reject(errString);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Create a new AI Action.
|
|
395
|
+
* @summary Create AI Action
|
|
396
|
+
* @param projectId Project ID
|
|
397
|
+
*/
|
|
398
|
+
async createAIAction(projectId, options = { headers: {} }) {
|
|
399
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/create'
|
|
400
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
401
|
+
let localVarQueryParameters = {};
|
|
402
|
+
let localVarHeaderParams = Object.assign({
|
|
403
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
404
|
+
}, this.defaultHeaders);
|
|
405
|
+
const produces = ['application/json'];
|
|
406
|
+
// give precedence to 'application/json'
|
|
407
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
408
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
409
|
+
}
|
|
410
|
+
else {
|
|
411
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
412
|
+
}
|
|
413
|
+
let localVarFormParams = {};
|
|
414
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
415
|
+
if (projectId === null || projectId === undefined) {
|
|
416
|
+
throw new Error('Required parameter projectId was null or undefined when calling createAIAction.');
|
|
417
|
+
}
|
|
418
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
419
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
420
|
+
let localVarUseFormData = false;
|
|
421
|
+
let localVarRequestOptions = {
|
|
422
|
+
method: 'POST',
|
|
423
|
+
qs: localVarQueryParameters,
|
|
424
|
+
headers: localVarHeaderParams,
|
|
425
|
+
uri: localVarPath,
|
|
426
|
+
useQuerystring: this._useQuerystring,
|
|
427
|
+
agentOptions: { keepAlive: false },
|
|
428
|
+
json: true,
|
|
429
|
+
};
|
|
430
|
+
let authenticationPromise = Promise.resolve();
|
|
431
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
432
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
433
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
434
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
435
|
+
return authenticationPromise.then(() => {
|
|
436
|
+
if (Object.keys(localVarFormParams).length) {
|
|
437
|
+
if (localVarUseFormData) {
|
|
438
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
return new Promise((resolve, reject) => {
|
|
445
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
446
|
+
if (error) {
|
|
447
|
+
reject(error);
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
body = models_1.ObjectSerializer.deserialize(body, "CreateAIActionResponse");
|
|
451
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
452
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
453
|
+
reject(new Error(body.error || errString));
|
|
454
|
+
}
|
|
455
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
456
|
+
resolve(body);
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
reject(errString);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
}
|
|
314
466
|
/**
|
|
315
467
|
* Create a new project. This API can only be called using a JWT token.
|
|
316
468
|
* @summary Create new project
|
|
@@ -384,6 +536,85 @@ class ProjectsApi {
|
|
|
384
536
|
});
|
|
385
537
|
});
|
|
386
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* Deletes an AI Actions.
|
|
541
|
+
* @summary Delete AI Actions config
|
|
542
|
+
* @param projectId Project ID
|
|
543
|
+
* @param actionId AI Action ID
|
|
544
|
+
*/
|
|
545
|
+
async deleteAIAction(projectId, actionId, options = { headers: {} }) {
|
|
546
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/{actionId}'
|
|
547
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
548
|
+
.replace('{' + 'actionId' + '}', encodeURIComponent(String(actionId)));
|
|
549
|
+
let localVarQueryParameters = {};
|
|
550
|
+
let localVarHeaderParams = Object.assign({
|
|
551
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
552
|
+
}, this.defaultHeaders);
|
|
553
|
+
const produces = ['application/json'];
|
|
554
|
+
// give precedence to 'application/json'
|
|
555
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
556
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
560
|
+
}
|
|
561
|
+
let localVarFormParams = {};
|
|
562
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
563
|
+
if (projectId === null || projectId === undefined) {
|
|
564
|
+
throw new Error('Required parameter projectId was null or undefined when calling deleteAIAction.');
|
|
565
|
+
}
|
|
566
|
+
// verify required parameter 'actionId' is not null or undefined
|
|
567
|
+
if (actionId === null || actionId === undefined) {
|
|
568
|
+
throw new Error('Required parameter actionId was null or undefined when calling deleteAIAction.');
|
|
569
|
+
}
|
|
570
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
571
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
572
|
+
let localVarUseFormData = false;
|
|
573
|
+
let localVarRequestOptions = {
|
|
574
|
+
method: 'DELETE',
|
|
575
|
+
qs: localVarQueryParameters,
|
|
576
|
+
headers: localVarHeaderParams,
|
|
577
|
+
uri: localVarPath,
|
|
578
|
+
useQuerystring: this._useQuerystring,
|
|
579
|
+
agentOptions: { keepAlive: false },
|
|
580
|
+
json: true,
|
|
581
|
+
};
|
|
582
|
+
let authenticationPromise = Promise.resolve();
|
|
583
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
584
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
585
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
586
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
587
|
+
return authenticationPromise.then(() => {
|
|
588
|
+
if (Object.keys(localVarFormParams).length) {
|
|
589
|
+
if (localVarUseFormData) {
|
|
590
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
return new Promise((resolve, reject) => {
|
|
597
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
598
|
+
if (error) {
|
|
599
|
+
reject(error);
|
|
600
|
+
}
|
|
601
|
+
else {
|
|
602
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
603
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
604
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
605
|
+
reject(new Error(body.error || errString));
|
|
606
|
+
}
|
|
607
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
608
|
+
resolve(body);
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
reject(errString);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
});
|
|
616
|
+
});
|
|
617
|
+
}
|
|
387
618
|
/**
|
|
388
619
|
* Remove the current project, and all data associated with it. This is irrevocable!
|
|
389
620
|
* @summary Remove project
|
|
@@ -682,6 +913,85 @@ class ProjectsApi {
|
|
|
682
913
|
});
|
|
683
914
|
});
|
|
684
915
|
}
|
|
916
|
+
/**
|
|
917
|
+
* Get an AI Actions config
|
|
918
|
+
* @summary Get AI Actions config
|
|
919
|
+
* @param projectId Project ID
|
|
920
|
+
* @param actionId AI Action ID
|
|
921
|
+
*/
|
|
922
|
+
async getAIAction(projectId, actionId, options = { headers: {} }) {
|
|
923
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/{actionId}'
|
|
924
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
925
|
+
.replace('{' + 'actionId' + '}', encodeURIComponent(String(actionId)));
|
|
926
|
+
let localVarQueryParameters = {};
|
|
927
|
+
let localVarHeaderParams = Object.assign({
|
|
928
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
929
|
+
}, this.defaultHeaders);
|
|
930
|
+
const produces = ['application/json'];
|
|
931
|
+
// give precedence to 'application/json'
|
|
932
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
933
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
934
|
+
}
|
|
935
|
+
else {
|
|
936
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
937
|
+
}
|
|
938
|
+
let localVarFormParams = {};
|
|
939
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
940
|
+
if (projectId === null || projectId === undefined) {
|
|
941
|
+
throw new Error('Required parameter projectId was null or undefined when calling getAIAction.');
|
|
942
|
+
}
|
|
943
|
+
// verify required parameter 'actionId' is not null or undefined
|
|
944
|
+
if (actionId === null || actionId === undefined) {
|
|
945
|
+
throw new Error('Required parameter actionId was null or undefined when calling getAIAction.');
|
|
946
|
+
}
|
|
947
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
948
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
949
|
+
let localVarUseFormData = false;
|
|
950
|
+
let localVarRequestOptions = {
|
|
951
|
+
method: 'GET',
|
|
952
|
+
qs: localVarQueryParameters,
|
|
953
|
+
headers: localVarHeaderParams,
|
|
954
|
+
uri: localVarPath,
|
|
955
|
+
useQuerystring: this._useQuerystring,
|
|
956
|
+
agentOptions: { keepAlive: false },
|
|
957
|
+
json: true,
|
|
958
|
+
};
|
|
959
|
+
let authenticationPromise = Promise.resolve();
|
|
960
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
961
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
962
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
963
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
964
|
+
return authenticationPromise.then(() => {
|
|
965
|
+
if (Object.keys(localVarFormParams).length) {
|
|
966
|
+
if (localVarUseFormData) {
|
|
967
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
968
|
+
}
|
|
969
|
+
else {
|
|
970
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
return new Promise((resolve, reject) => {
|
|
974
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
975
|
+
if (error) {
|
|
976
|
+
reject(error);
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetAIActionResponse");
|
|
980
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
981
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
982
|
+
reject(new Error(body.error || errString));
|
|
983
|
+
}
|
|
984
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
985
|
+
resolve(body);
|
|
986
|
+
}
|
|
987
|
+
else {
|
|
988
|
+
reject(errString);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
});
|
|
992
|
+
});
|
|
993
|
+
});
|
|
994
|
+
}
|
|
685
995
|
/**
|
|
686
996
|
* Returns whether the file that was uploaded when the CSV wizard was configured is available.
|
|
687
997
|
* @summary Get CSV Wizard uploaded file info
|
|
@@ -832,6 +1142,79 @@ class ProjectsApi {
|
|
|
832
1142
|
});
|
|
833
1143
|
});
|
|
834
1144
|
}
|
|
1145
|
+
/**
|
|
1146
|
+
* Get the AI Actions config for a new action
|
|
1147
|
+
* @summary Get new AI Actions config
|
|
1148
|
+
* @param projectId Project ID
|
|
1149
|
+
*/
|
|
1150
|
+
async getNewAIAction(projectId, options = { headers: {} }) {
|
|
1151
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/new'
|
|
1152
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1153
|
+
let localVarQueryParameters = {};
|
|
1154
|
+
let localVarHeaderParams = Object.assign({
|
|
1155
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1156
|
+
}, this.defaultHeaders);
|
|
1157
|
+
const produces = ['application/json'];
|
|
1158
|
+
// give precedence to 'application/json'
|
|
1159
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1160
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1161
|
+
}
|
|
1162
|
+
else {
|
|
1163
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1164
|
+
}
|
|
1165
|
+
let localVarFormParams = {};
|
|
1166
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1167
|
+
if (projectId === null || projectId === undefined) {
|
|
1168
|
+
throw new Error('Required parameter projectId was null or undefined when calling getNewAIAction.');
|
|
1169
|
+
}
|
|
1170
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1171
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1172
|
+
let localVarUseFormData = false;
|
|
1173
|
+
let localVarRequestOptions = {
|
|
1174
|
+
method: 'GET',
|
|
1175
|
+
qs: localVarQueryParameters,
|
|
1176
|
+
headers: localVarHeaderParams,
|
|
1177
|
+
uri: localVarPath,
|
|
1178
|
+
useQuerystring: this._useQuerystring,
|
|
1179
|
+
agentOptions: { keepAlive: false },
|
|
1180
|
+
json: true,
|
|
1181
|
+
};
|
|
1182
|
+
let authenticationPromise = Promise.resolve();
|
|
1183
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
1184
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
1185
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
1186
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1187
|
+
return authenticationPromise.then(() => {
|
|
1188
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1189
|
+
if (localVarUseFormData) {
|
|
1190
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1191
|
+
}
|
|
1192
|
+
else {
|
|
1193
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
return new Promise((resolve, reject) => {
|
|
1197
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
1198
|
+
if (error) {
|
|
1199
|
+
reject(error);
|
|
1200
|
+
}
|
|
1201
|
+
else {
|
|
1202
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetAIActionResponse");
|
|
1203
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1204
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
1205
|
+
reject(new Error(body.error || errString));
|
|
1206
|
+
}
|
|
1207
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1208
|
+
resolve(body);
|
|
1209
|
+
}
|
|
1210
|
+
else {
|
|
1211
|
+
reject(errString);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
});
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
835
1218
|
/**
|
|
836
1219
|
* Get a list of axes that are present in the training data.
|
|
837
1220
|
* @summary Get data axes summary
|
|
@@ -1291,12 +1674,85 @@ class ProjectsApi {
|
|
|
1291
1674
|
});
|
|
1292
1675
|
}
|
|
1293
1676
|
/**
|
|
1294
|
-
* Get a token to authenticate with the web socket interface.
|
|
1295
|
-
* @summary Get socket token
|
|
1677
|
+
* Get a token to authenticate with the web socket interface.
|
|
1678
|
+
* @summary Get socket token
|
|
1679
|
+
* @param projectId Project ID
|
|
1680
|
+
*/
|
|
1681
|
+
async getSocketToken(projectId, options = { headers: {} }) {
|
|
1682
|
+
const localVarPath = this.basePath + '/api/{projectId}/socket-token'
|
|
1683
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1684
|
+
let localVarQueryParameters = {};
|
|
1685
|
+
let localVarHeaderParams = Object.assign({
|
|
1686
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
1687
|
+
}, this.defaultHeaders);
|
|
1688
|
+
const produces = ['application/json'];
|
|
1689
|
+
// give precedence to 'application/json'
|
|
1690
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1691
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1692
|
+
}
|
|
1693
|
+
else {
|
|
1694
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1695
|
+
}
|
|
1696
|
+
let localVarFormParams = {};
|
|
1697
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1698
|
+
if (projectId === null || projectId === undefined) {
|
|
1699
|
+
throw new Error('Required parameter projectId was null or undefined when calling getSocketToken.');
|
|
1700
|
+
}
|
|
1701
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
1702
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1703
|
+
let localVarUseFormData = false;
|
|
1704
|
+
let localVarRequestOptions = {
|
|
1705
|
+
method: 'GET',
|
|
1706
|
+
qs: localVarQueryParameters,
|
|
1707
|
+
headers: localVarHeaderParams,
|
|
1708
|
+
uri: localVarPath,
|
|
1709
|
+
useQuerystring: this._useQuerystring,
|
|
1710
|
+
agentOptions: { keepAlive: false },
|
|
1711
|
+
json: true,
|
|
1712
|
+
};
|
|
1713
|
+
let authenticationPromise = Promise.resolve();
|
|
1714
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
1715
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
1716
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
1717
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
1718
|
+
return authenticationPromise.then(() => {
|
|
1719
|
+
if (Object.keys(localVarFormParams).length) {
|
|
1720
|
+
if (localVarUseFormData) {
|
|
1721
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
1722
|
+
}
|
|
1723
|
+
else {
|
|
1724
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
return new Promise((resolve, reject) => {
|
|
1728
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
1729
|
+
if (error) {
|
|
1730
|
+
reject(error);
|
|
1731
|
+
}
|
|
1732
|
+
else {
|
|
1733
|
+
body = models_1.ObjectSerializer.deserialize(body, "SocketTokenResponse");
|
|
1734
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1735
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
1736
|
+
reject(new Error(body.error || errString));
|
|
1737
|
+
}
|
|
1738
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
1739
|
+
resolve(body);
|
|
1740
|
+
}
|
|
1741
|
+
else {
|
|
1742
|
+
reject(errString);
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
});
|
|
1746
|
+
});
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Get the last used synthetic data config
|
|
1751
|
+
* @summary Get synthetic data config
|
|
1296
1752
|
* @param projectId Project ID
|
|
1297
1753
|
*/
|
|
1298
|
-
async
|
|
1299
|
-
const localVarPath = this.basePath + '/api/{projectId}/
|
|
1754
|
+
async getSyntheticDataConfig(projectId, options = { headers: {} }) {
|
|
1755
|
+
const localVarPath = this.basePath + '/api/{projectId}/synthetic-data'
|
|
1300
1756
|
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1301
1757
|
let localVarQueryParameters = {};
|
|
1302
1758
|
let localVarHeaderParams = Object.assign({
|
|
@@ -1313,7 +1769,7 @@ class ProjectsApi {
|
|
|
1313
1769
|
let localVarFormParams = {};
|
|
1314
1770
|
// verify required parameter 'projectId' is not null or undefined
|
|
1315
1771
|
if (projectId === null || projectId === undefined) {
|
|
1316
|
-
throw new Error('Required parameter projectId was null or undefined when calling
|
|
1772
|
+
throw new Error('Required parameter projectId was null or undefined when calling getSyntheticDataConfig.');
|
|
1317
1773
|
}
|
|
1318
1774
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1319
1775
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
@@ -1347,7 +1803,7 @@ class ProjectsApi {
|
|
|
1347
1803
|
reject(error);
|
|
1348
1804
|
}
|
|
1349
1805
|
else {
|
|
1350
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
1806
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetSyntheticDataConfigResponse");
|
|
1351
1807
|
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1352
1808
|
if (typeof body.success === 'boolean' && !body.success) {
|
|
1353
1809
|
reject(new Error(body.error || errString));
|
|
@@ -1364,12 +1820,12 @@ class ProjectsApi {
|
|
|
1364
1820
|
});
|
|
1365
1821
|
}
|
|
1366
1822
|
/**
|
|
1367
|
-
*
|
|
1368
|
-
* @summary Get
|
|
1823
|
+
* Retrieve target constraints for a project. The constraints object captures hardware attributes of your target device, along with an application budget to allow guidance on performance and resource usage
|
|
1824
|
+
* @summary Get target constraints
|
|
1369
1825
|
* @param projectId Project ID
|
|
1370
1826
|
*/
|
|
1371
|
-
async
|
|
1372
|
-
const localVarPath = this.basePath + '/api/{projectId}/
|
|
1827
|
+
async getTargetConstraints(projectId, options = { headers: {} }) {
|
|
1828
|
+
const localVarPath = this.basePath + '/api/{projectId}/target-constraints'
|
|
1373
1829
|
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1374
1830
|
let localVarQueryParameters = {};
|
|
1375
1831
|
let localVarHeaderParams = Object.assign({
|
|
@@ -1386,7 +1842,7 @@ class ProjectsApi {
|
|
|
1386
1842
|
let localVarFormParams = {};
|
|
1387
1843
|
// verify required parameter 'projectId' is not null or undefined
|
|
1388
1844
|
if (projectId === null || projectId === undefined) {
|
|
1389
|
-
throw new Error('Required parameter projectId was null or undefined when calling
|
|
1845
|
+
throw new Error('Required parameter projectId was null or undefined when calling getTargetConstraints.');
|
|
1390
1846
|
}
|
|
1391
1847
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1392
1848
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
@@ -1420,7 +1876,7 @@ class ProjectsApi {
|
|
|
1420
1876
|
reject(error);
|
|
1421
1877
|
}
|
|
1422
1878
|
else {
|
|
1423
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
1879
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetTargetConstraintsResponse");
|
|
1424
1880
|
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1425
1881
|
if (typeof body.success === 'boolean' && !body.success) {
|
|
1426
1882
|
reject(new Error(body.error || errString));
|
|
@@ -1437,12 +1893,12 @@ class ProjectsApi {
|
|
|
1437
1893
|
});
|
|
1438
1894
|
}
|
|
1439
1895
|
/**
|
|
1440
|
-
*
|
|
1441
|
-
* @summary
|
|
1896
|
+
* This clears out *all data in your project*, and is irrevocable. This function is only available through a JWT token, and is not available to all users.
|
|
1897
|
+
* @summary Launch getting started wizard
|
|
1442
1898
|
* @param projectId Project ID
|
|
1443
1899
|
*/
|
|
1444
|
-
async
|
|
1445
|
-
const localVarPath = this.basePath + '/api/{projectId}/
|
|
1900
|
+
async launchGettingStartedWizard(projectId, options = { headers: {} }) {
|
|
1901
|
+
const localVarPath = this.basePath + '/api/{projectId}/launch-getting-started'
|
|
1446
1902
|
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1447
1903
|
let localVarQueryParameters = {};
|
|
1448
1904
|
let localVarHeaderParams = Object.assign({
|
|
@@ -1459,13 +1915,13 @@ class ProjectsApi {
|
|
|
1459
1915
|
let localVarFormParams = {};
|
|
1460
1916
|
// verify required parameter 'projectId' is not null or undefined
|
|
1461
1917
|
if (projectId === null || projectId === undefined) {
|
|
1462
|
-
throw new Error('Required parameter projectId was null or undefined when calling
|
|
1918
|
+
throw new Error('Required parameter projectId was null or undefined when calling launchGettingStartedWizard.');
|
|
1463
1919
|
}
|
|
1464
1920
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1465
1921
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1466
1922
|
let localVarUseFormData = false;
|
|
1467
1923
|
let localVarRequestOptions = {
|
|
1468
|
-
method: '
|
|
1924
|
+
method: 'POST',
|
|
1469
1925
|
qs: localVarQueryParameters,
|
|
1470
1926
|
headers: localVarHeaderParams,
|
|
1471
1927
|
uri: localVarPath,
|
|
@@ -1493,7 +1949,7 @@ class ProjectsApi {
|
|
|
1493
1949
|
reject(error);
|
|
1494
1950
|
}
|
|
1495
1951
|
else {
|
|
1496
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
1952
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
1497
1953
|
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1498
1954
|
if (typeof body.success === 'boolean' && !body.success) {
|
|
1499
1955
|
reject(new Error(body.error || errString));
|
|
@@ -1510,12 +1966,12 @@ class ProjectsApi {
|
|
|
1510
1966
|
});
|
|
1511
1967
|
}
|
|
1512
1968
|
/**
|
|
1513
|
-
*
|
|
1514
|
-
* @summary
|
|
1969
|
+
* Get all AI actions.
|
|
1970
|
+
* @summary List AI Actions
|
|
1515
1971
|
* @param projectId Project ID
|
|
1516
1972
|
*/
|
|
1517
|
-
async
|
|
1518
|
-
const localVarPath = this.basePath + '/api/{projectId}/
|
|
1973
|
+
async listAIActions(projectId, options = { headers: {} }) {
|
|
1974
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions'
|
|
1519
1975
|
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
1520
1976
|
let localVarQueryParameters = {};
|
|
1521
1977
|
let localVarHeaderParams = Object.assign({
|
|
@@ -1532,13 +1988,13 @@ class ProjectsApi {
|
|
|
1532
1988
|
let localVarFormParams = {};
|
|
1533
1989
|
// verify required parameter 'projectId' is not null or undefined
|
|
1534
1990
|
if (projectId === null || projectId === undefined) {
|
|
1535
|
-
throw new Error('Required parameter projectId was null or undefined when calling
|
|
1991
|
+
throw new Error('Required parameter projectId was null or undefined when calling listAIActions.');
|
|
1536
1992
|
}
|
|
1537
1993
|
Object.assign(localVarHeaderParams, options.headers);
|
|
1538
1994
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
1539
1995
|
let localVarUseFormData = false;
|
|
1540
1996
|
let localVarRequestOptions = {
|
|
1541
|
-
method: '
|
|
1997
|
+
method: 'GET',
|
|
1542
1998
|
qs: localVarQueryParameters,
|
|
1543
1999
|
headers: localVarHeaderParams,
|
|
1544
2000
|
uri: localVarPath,
|
|
@@ -1566,7 +2022,7 @@ class ProjectsApi {
|
|
|
1566
2022
|
reject(error);
|
|
1567
2023
|
}
|
|
1568
2024
|
else {
|
|
1569
|
-
body = models_1.ObjectSerializer.deserialize(body, "
|
|
2025
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListAIActionsResponse");
|
|
1570
2026
|
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
1571
2027
|
if (typeof body.success === 'boolean' && !body.success) {
|
|
1572
2028
|
reject(new Error(body.error || errString));
|
|
@@ -2093,6 +2549,7 @@ class ProjectsApi {
|
|
|
2093
2549
|
* @param limit Maximum number of results
|
|
2094
2550
|
* @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
|
|
2095
2551
|
* @param project Only include projects that contain this string
|
|
2552
|
+
* @param projectTypes Comma separated list of project types to filter on. Supported values are \'audio\', \'object-detection\', \'image\', \'accelerometer\', \'other\'.
|
|
2096
2553
|
*/
|
|
2097
2554
|
async listPublicProjects(queryParams, options = { headers: {} }) {
|
|
2098
2555
|
const localVarPath = this.basePath + '/api/projects/public';
|
|
@@ -2118,6 +2575,9 @@ class ProjectsApi {
|
|
|
2118
2575
|
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.project) !== undefined) {
|
|
2119
2576
|
localVarQueryParameters['project'] = models_1.ObjectSerializer.serialize(queryParams.project, "string");
|
|
2120
2577
|
}
|
|
2578
|
+
if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.projectTypes) !== undefined) {
|
|
2579
|
+
localVarQueryParameters['projectTypes'] = models_1.ObjectSerializer.serialize(queryParams.projectTypes, "string");
|
|
2580
|
+
}
|
|
2121
2581
|
Object.assign(localVarHeaderParams, options.headers);
|
|
2122
2582
|
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2123
2583
|
let localVarUseFormData = false;
|
|
@@ -2385,6 +2845,91 @@ class ProjectsApi {
|
|
|
2385
2845
|
});
|
|
2386
2846
|
});
|
|
2387
2847
|
}
|
|
2848
|
+
/**
|
|
2849
|
+
* Get a number of random samples to show in the AI Actions screen. If `saveConfig` is passed in, then a valid actionId is required in the URL. If you don\'t need to save the config (e.g. when creating a new action), you can use -1.
|
|
2850
|
+
* @summary Preview samples for AI Actions
|
|
2851
|
+
* @param projectId Project ID
|
|
2852
|
+
* @param actionId AI Action ID
|
|
2853
|
+
* @param previewAIActionsSamplesRequest
|
|
2854
|
+
*/
|
|
2855
|
+
async previewAIActionsSamples(projectId, actionId, previewAIActionsSamplesRequest, options = { headers: {} }) {
|
|
2856
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/{actionId}/preview-samples'
|
|
2857
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
2858
|
+
.replace('{' + 'actionId' + '}', encodeURIComponent(String(actionId)));
|
|
2859
|
+
let localVarQueryParameters = {};
|
|
2860
|
+
let localVarHeaderParams = Object.assign({
|
|
2861
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2862
|
+
}, this.defaultHeaders);
|
|
2863
|
+
const produces = ['application/json'];
|
|
2864
|
+
// give precedence to 'application/json'
|
|
2865
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2866
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
2867
|
+
}
|
|
2868
|
+
else {
|
|
2869
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2870
|
+
}
|
|
2871
|
+
let localVarFormParams = {};
|
|
2872
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
2873
|
+
if (projectId === null || projectId === undefined) {
|
|
2874
|
+
throw new Error('Required parameter projectId was null or undefined when calling previewAIActionsSamples.');
|
|
2875
|
+
}
|
|
2876
|
+
// verify required parameter 'actionId' is not null or undefined
|
|
2877
|
+
if (actionId === null || actionId === undefined) {
|
|
2878
|
+
throw new Error('Required parameter actionId was null or undefined when calling previewAIActionsSamples.');
|
|
2879
|
+
}
|
|
2880
|
+
// verify required parameter 'previewAIActionsSamplesRequest' is not null or undefined
|
|
2881
|
+
if (previewAIActionsSamplesRequest === null || previewAIActionsSamplesRequest === undefined) {
|
|
2882
|
+
throw new Error('Required parameter previewAIActionsSamplesRequest was null or undefined when calling previewAIActionsSamples.');
|
|
2883
|
+
}
|
|
2884
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
2885
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2886
|
+
let localVarUseFormData = false;
|
|
2887
|
+
let localVarRequestOptions = {
|
|
2888
|
+
method: 'POST',
|
|
2889
|
+
qs: localVarQueryParameters,
|
|
2890
|
+
headers: localVarHeaderParams,
|
|
2891
|
+
uri: localVarPath,
|
|
2892
|
+
useQuerystring: this._useQuerystring,
|
|
2893
|
+
agentOptions: { keepAlive: false },
|
|
2894
|
+
json: true,
|
|
2895
|
+
body: models_1.ObjectSerializer.serialize(previewAIActionsSamplesRequest, "PreviewAIActionsSamplesRequest")
|
|
2896
|
+
};
|
|
2897
|
+
let authenticationPromise = Promise.resolve();
|
|
2898
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2899
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2900
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2901
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2902
|
+
return authenticationPromise.then(() => {
|
|
2903
|
+
if (Object.keys(localVarFormParams).length) {
|
|
2904
|
+
if (localVarUseFormData) {
|
|
2905
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
2906
|
+
}
|
|
2907
|
+
else {
|
|
2908
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
return new Promise((resolve, reject) => {
|
|
2912
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2913
|
+
if (error) {
|
|
2914
|
+
reject(error);
|
|
2915
|
+
}
|
|
2916
|
+
else {
|
|
2917
|
+
body = models_1.ObjectSerializer.deserialize(body, "ListSamplesResponse");
|
|
2918
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2919
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
2920
|
+
reject(new Error(body.error || errString));
|
|
2921
|
+
}
|
|
2922
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2923
|
+
resolve(body);
|
|
2924
|
+
}
|
|
2925
|
+
else {
|
|
2926
|
+
reject(errString);
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
});
|
|
2930
|
+
});
|
|
2931
|
+
});
|
|
2932
|
+
}
|
|
2388
2933
|
/**
|
|
2389
2934
|
* Dismiss a notification
|
|
2390
2935
|
* @summary Dismiss a notification
|
|
@@ -2701,6 +3246,85 @@ class ProjectsApi {
|
|
|
2701
3246
|
});
|
|
2702
3247
|
});
|
|
2703
3248
|
}
|
|
3249
|
+
/**
|
|
3250
|
+
* Change the order of AI actions. Post the new order of all AI Actions by ID. You need to specify _all_ AI Actions here. If not, an error will be thrown.
|
|
3251
|
+
* @summary Set AI Actions order
|
|
3252
|
+
* @param projectId Project ID
|
|
3253
|
+
* @param setAIActionsOrderRequest
|
|
3254
|
+
*/
|
|
3255
|
+
async setAIActionsOrder(projectId, setAIActionsOrderRequest, options = { headers: {} }) {
|
|
3256
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/order'
|
|
3257
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
3258
|
+
let localVarQueryParameters = {};
|
|
3259
|
+
let localVarHeaderParams = Object.assign({
|
|
3260
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
3261
|
+
}, this.defaultHeaders);
|
|
3262
|
+
const produces = ['application/json'];
|
|
3263
|
+
// give precedence to 'application/json'
|
|
3264
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
3265
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
3266
|
+
}
|
|
3267
|
+
else {
|
|
3268
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3269
|
+
}
|
|
3270
|
+
let localVarFormParams = {};
|
|
3271
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
3272
|
+
if (projectId === null || projectId === undefined) {
|
|
3273
|
+
throw new Error('Required parameter projectId was null or undefined when calling setAIActionsOrder.');
|
|
3274
|
+
}
|
|
3275
|
+
// verify required parameter 'setAIActionsOrderRequest' is not null or undefined
|
|
3276
|
+
if (setAIActionsOrderRequest === null || setAIActionsOrderRequest === undefined) {
|
|
3277
|
+
throw new Error('Required parameter setAIActionsOrderRequest was null or undefined when calling setAIActionsOrder.');
|
|
3278
|
+
}
|
|
3279
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
3280
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
3281
|
+
let localVarUseFormData = false;
|
|
3282
|
+
let localVarRequestOptions = {
|
|
3283
|
+
method: 'POST',
|
|
3284
|
+
qs: localVarQueryParameters,
|
|
3285
|
+
headers: localVarHeaderParams,
|
|
3286
|
+
uri: localVarPath,
|
|
3287
|
+
useQuerystring: this._useQuerystring,
|
|
3288
|
+
agentOptions: { keepAlive: false },
|
|
3289
|
+
json: true,
|
|
3290
|
+
body: models_1.ObjectSerializer.serialize(setAIActionsOrderRequest, "SetAIActionsOrderRequest")
|
|
3291
|
+
};
|
|
3292
|
+
let authenticationPromise = Promise.resolve();
|
|
3293
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
3294
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
3295
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
3296
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
3297
|
+
return authenticationPromise.then(() => {
|
|
3298
|
+
if (Object.keys(localVarFormParams).length) {
|
|
3299
|
+
if (localVarUseFormData) {
|
|
3300
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
3301
|
+
}
|
|
3302
|
+
else {
|
|
3303
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
return new Promise((resolve, reject) => {
|
|
3307
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
3308
|
+
if (error) {
|
|
3309
|
+
reject(error);
|
|
3310
|
+
}
|
|
3311
|
+
else {
|
|
3312
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
3313
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
3314
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
3315
|
+
reject(new Error(body.error || errString));
|
|
3316
|
+
}
|
|
3317
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
3318
|
+
resolve(body);
|
|
3319
|
+
}
|
|
3320
|
+
else {
|
|
3321
|
+
reject(errString);
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
});
|
|
3325
|
+
});
|
|
3326
|
+
});
|
|
3327
|
+
}
|
|
2704
3328
|
/**
|
|
2705
3329
|
* Change the job compute time limit for the project. This function is only available through a JWT token, and is not available to all users.
|
|
2706
3330
|
* @summary Set compute time limit
|
|
@@ -3096,6 +3720,91 @@ class ProjectsApi {
|
|
|
3096
3720
|
});
|
|
3097
3721
|
});
|
|
3098
3722
|
}
|
|
3723
|
+
/**
|
|
3724
|
+
* Store an AI Actions config. Use `createAIActionsJob` to run the job. Post the full AI Action here w/ all parameters.
|
|
3725
|
+
* @summary Save AI Actions config
|
|
3726
|
+
* @param projectId Project ID
|
|
3727
|
+
* @param actionId AI Action ID
|
|
3728
|
+
* @param updateAIActionRequest
|
|
3729
|
+
*/
|
|
3730
|
+
async updateAIAction(projectId, actionId, updateAIActionRequest, options = { headers: {} }) {
|
|
3731
|
+
const localVarPath = this.basePath + '/api/{projectId}/ai-actions/{actionId}'
|
|
3732
|
+
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
3733
|
+
.replace('{' + 'actionId' + '}', encodeURIComponent(String(actionId)));
|
|
3734
|
+
let localVarQueryParameters = {};
|
|
3735
|
+
let localVarHeaderParams = Object.assign({
|
|
3736
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
3737
|
+
}, this.defaultHeaders);
|
|
3738
|
+
const produces = ['application/json'];
|
|
3739
|
+
// give precedence to 'application/json'
|
|
3740
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
3741
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
3742
|
+
}
|
|
3743
|
+
else {
|
|
3744
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3745
|
+
}
|
|
3746
|
+
let localVarFormParams = {};
|
|
3747
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
3748
|
+
if (projectId === null || projectId === undefined) {
|
|
3749
|
+
throw new Error('Required parameter projectId was null or undefined when calling updateAIAction.');
|
|
3750
|
+
}
|
|
3751
|
+
// verify required parameter 'actionId' is not null or undefined
|
|
3752
|
+
if (actionId === null || actionId === undefined) {
|
|
3753
|
+
throw new Error('Required parameter actionId was null or undefined when calling updateAIAction.');
|
|
3754
|
+
}
|
|
3755
|
+
// verify required parameter 'updateAIActionRequest' is not null or undefined
|
|
3756
|
+
if (updateAIActionRequest === null || updateAIActionRequest === undefined) {
|
|
3757
|
+
throw new Error('Required parameter updateAIActionRequest was null or undefined when calling updateAIAction.');
|
|
3758
|
+
}
|
|
3759
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
3760
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
3761
|
+
let localVarUseFormData = false;
|
|
3762
|
+
let localVarRequestOptions = {
|
|
3763
|
+
method: 'POST',
|
|
3764
|
+
qs: localVarQueryParameters,
|
|
3765
|
+
headers: localVarHeaderParams,
|
|
3766
|
+
uri: localVarPath,
|
|
3767
|
+
useQuerystring: this._useQuerystring,
|
|
3768
|
+
agentOptions: { keepAlive: false },
|
|
3769
|
+
json: true,
|
|
3770
|
+
body: models_1.ObjectSerializer.serialize(updateAIActionRequest, "UpdateAIActionRequest")
|
|
3771
|
+
};
|
|
3772
|
+
let authenticationPromise = Promise.resolve();
|
|
3773
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
3774
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
3775
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
3776
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
3777
|
+
return authenticationPromise.then(() => {
|
|
3778
|
+
if (Object.keys(localVarFormParams).length) {
|
|
3779
|
+
if (localVarUseFormData) {
|
|
3780
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
3781
|
+
}
|
|
3782
|
+
else {
|
|
3783
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
return new Promise((resolve, reject) => {
|
|
3787
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
3788
|
+
if (error) {
|
|
3789
|
+
reject(error);
|
|
3790
|
+
}
|
|
3791
|
+
else {
|
|
3792
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
3793
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
3794
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
3795
|
+
reject(new Error(body.error || errString));
|
|
3796
|
+
}
|
|
3797
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
3798
|
+
resolve(body);
|
|
3799
|
+
}
|
|
3800
|
+
else {
|
|
3801
|
+
reject(errString);
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3805
|
+
});
|
|
3806
|
+
});
|
|
3807
|
+
}
|
|
3099
3808
|
/**
|
|
3100
3809
|
* Update project properties such as name and logo.
|
|
3101
3810
|
* @summary Update project
|