edge-impulse-api 1.78.1 → 1.79.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/build/library/sdk/api/devicesApi.d.ts +38 -0
  2. package/build/library/sdk/api/devicesApi.js +192 -0
  3. package/build/library/sdk/api/devicesApi.js.map +1 -1
  4. package/build/library/sdk/api/rawDataApi.d.ts +54 -0
  5. package/build/library/sdk/api/rawDataApi.js +165 -0
  6. package/build/library/sdk/api/rawDataApi.js.map +1 -1
  7. package/build/library/sdk/api/vlmApi.d.ts +24 -0
  8. package/build/library/sdk/api/vlmApi.js +162 -0
  9. package/build/library/sdk/api/vlmApi.js.map +1 -1
  10. package/build/library/sdk/model/backToLabelingRequest.d.ts +30 -0
  11. package/build/library/sdk/model/backToLabelingRequest.js +30 -0
  12. package/build/library/sdk/model/backToLabelingRequest.js.map +1 -0
  13. package/build/library/sdk/model/deploymentTarget.d.ts +1 -0
  14. package/build/library/sdk/model/deploymentTarget.js +5 -0
  15. package/build/library/sdk/model/deploymentTarget.js.map +1 -1
  16. package/build/library/sdk/model/getInferenceMetricsRequest.d.ts +32 -0
  17. package/build/library/sdk/model/getInferenceMetricsRequest.js +35 -0
  18. package/build/library/sdk/model/getInferenceMetricsRequest.js.map +1 -0
  19. package/build/library/sdk/model/getInferenceMetricsRequestAggregate.d.ts +37 -0
  20. package/build/library/sdk/model/getInferenceMetricsRequestAggregate.js +38 -0
  21. package/build/library/sdk/model/getInferenceMetricsRequestAggregate.js.map +1 -0
  22. package/build/library/sdk/model/getInferenceMetricsRequestMetrics.d.ts +34 -0
  23. package/build/library/sdk/model/getInferenceMetricsRequestMetrics.js +39 -0
  24. package/build/library/sdk/model/getInferenceMetricsRequestMetrics.js.map +1 -0
  25. package/build/library/sdk/model/getInferenceMetricsResponse.d.ts +41 -0
  26. package/build/library/sdk/model/getInferenceMetricsResponse.js +44 -0
  27. package/build/library/sdk/model/getInferenceMetricsResponse.js.map +1 -0
  28. package/build/library/sdk/model/getInferenceMetricsResponseAllOf.d.ts +33 -0
  29. package/build/library/sdk/model/getInferenceMetricsResponseAllOf.js +34 -0
  30. package/build/library/sdk/model/getInferenceMetricsResponseAllOf.js.map +1 -0
  31. package/build/library/sdk/model/getInferenceMetricsResponseAllOfData.d.ts +26 -0
  32. package/build/library/sdk/model/getInferenceMetricsResponseAllOfData.js +34 -0
  33. package/build/library/sdk/model/getInferenceMetricsResponseAllOfData.js.map +1 -0
  34. package/build/library/sdk/model/inferenceHistoryEntry.d.ts +26 -0
  35. package/build/library/sdk/model/inferenceHistoryEntry.js +34 -0
  36. package/build/library/sdk/model/inferenceHistoryEntry.js.map +1 -0
  37. package/build/library/sdk/model/inferenceHistoryTimestamp.d.ts +26 -0
  38. package/build/library/sdk/model/inferenceHistoryTimestamp.js +34 -0
  39. package/build/library/sdk/model/inferenceHistoryTimestamp.js.map +1 -0
  40. package/build/library/sdk/model/models.d.ts +13 -0
  41. package/build/library/sdk/model/models.js +42 -0
  42. package/build/library/sdk/model/models.js.map +1 -1
  43. package/build/library/sdk/model/objectDetectionAutoLabelRequest.d.ts +1 -1
  44. package/build/library/sdk/model/objectDetectionAutoLabelRequest.js +1 -1
  45. package/build/library/sdk/model/objectDetectionAutoLabelRequest.js.map +1 -1
  46. package/build/library/sdk/model/projectDeploymentTarget.d.ts +1 -0
  47. package/build/library/sdk/model/projectDeploymentTarget.js +5 -0
  48. package/build/library/sdk/model/projectDeploymentTarget.js.map +1 -1
  49. package/build/library/sdk/model/storeInferenceHistoryRequest.d.ts +26 -0
  50. package/build/library/sdk/model/storeInferenceHistoryRequest.js +29 -0
  51. package/build/library/sdk/model/storeInferenceHistoryRequest.js.map +1 -0
  52. package/build/library/sdk/model/storeInferenceHistoryRequestSummaries.d.ts +32 -0
  53. package/build/library/sdk/model/storeInferenceHistoryRequestSummaries.js +54 -0
  54. package/build/library/sdk/model/storeInferenceHistoryRequestSummaries.js.map +1 -0
  55. package/build/library/sdk/model/vlmGetModelResponse.d.ts +34 -0
  56. package/build/library/sdk/model/vlmGetModelResponse.js +39 -0
  57. package/build/library/sdk/model/vlmGetModelResponse.js.map +1 -0
  58. package/build/library/sdk/model/vlmGetModelResponseAllOf.d.ts +26 -0
  59. package/build/library/sdk/model/vlmGetModelResponseAllOf.js +29 -0
  60. package/build/library/sdk/model/vlmGetModelResponseAllOf.js.map +1 -0
  61. package/package.json +1 -1
@@ -243,6 +243,171 @@ class RawDataApi {
243
243
  });
244
244
  });
245
245
  }
246
+ /**
247
+ * Batch operation to put multiple samples back into the object detection labeling queue. Depending on the number of affected samples this will either execute immediately or return the ID of a job that will perform this action in batches.
248
+ * @summary Put samples back into the object detection labeling queue
249
+ * @param projectId Project ID
250
+ * @param category Which of the three acquisition categories to retrieve data from
251
+ * @param backToLabelingRequest
252
+ * @param labels Only include samples with a label within the given list of labels, given as a JSON string
253
+ * @param filename Only include samples whose filename includes the given filename
254
+ * @param maxLength Only include samples shorter than the given length, in milliseconds
255
+ * @param minLength Only include samples longer than the given length, in milliseconds
256
+ * @param minFrequency Only include samples with higher frequency than given frequency, in hertz
257
+ * @param maxFrequency Only include samples with lower frequency than given frequency, in hertz
258
+ * @param signatureValidity Include samples with either valid or invalid signatures
259
+ * @param includeDisabled Include only enabled or disabled samples (or both)
260
+ * @param ids Only include samples with an ID within the given list of IDs, given as a JSON string
261
+ * @param excludeIds Exclude samples with an ID within the given list of IDs, given as a JSON string
262
+ * @param minLabel Only include samples with a label >= this value
263
+ * @param maxLabel Only include samples with a label < this value
264
+ * @param search Search query
265
+ * @param dataType Include only samples with a particular data type
266
+ * @param minId Include only samples with an ID >= this value
267
+ * @param maxId Include only samples with an ID < this value
268
+ * @param metadata Filter samples by metadata key-value pairs, provided as a JSON string. Each item in the filter list is an object with the following properties: - \"key\": Metadata key to filter on. - \"op\": Operator (\"eq\" for positive match, \"neq\" for negative match). - \"values\": (optional) Array of values to match/exclude. If omitted or empty, matches/excludes all values for the key. In addition to filter objects, the following option objects can be specified: - { \"no_metadata\": boolean } - If true, include samples without any metadata - { \"filters_combinator\": (\"and\" | \"or\") } - Specifies the combinator and matching mode: - \"and\": All filter items must match (logical AND). - \"or\": Any filter item may match (logical OR); samples with metadata keys not present in the filters are included.
269
+ * @param minDate Only include samples that where added after the date given
270
+ * @param maxDate Only include samples that were added before the date given
271
+ */
272
+ async batchBackToLabeling(projectId, backToLabelingRequest, queryParams, options = { headers: {} }) {
273
+ const localVarPath = this.basePath + '/api/{projectId}/raw-data/batch/back-to-labeling'
274
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
275
+ let localVarQueryParameters = {};
276
+ let localVarHeaderParams = Object.assign({
277
+ 'User-Agent': 'edgeimpulse-api nodejs'
278
+ }, this.defaultHeaders);
279
+ const produces = ['application/json'];
280
+ // give precedence to 'application/json'
281
+ if (produces.indexOf('application/json') >= 0) {
282
+ localVarHeaderParams.Accept = 'application/json';
283
+ }
284
+ else {
285
+ localVarHeaderParams.Accept = produces.join(',');
286
+ }
287
+ let localVarFormParams = {};
288
+ // verify required parameter 'projectId' is not null or undefined
289
+ if (projectId === null || projectId === undefined) {
290
+ throw new Error('Required parameter projectId was null or undefined when calling batchBackToLabeling.');
291
+ }
292
+ // verify required parameter 'category' is not null or undefined
293
+ if (queryParams.category === null || queryParams.category === undefined) {
294
+ throw new Error('Required parameter queryParams.category was null or undefined when calling batchBackToLabeling.');
295
+ }
296
+ // verify required parameter 'backToLabelingRequest' is not null or undefined
297
+ if (backToLabelingRequest === null || backToLabelingRequest === undefined) {
298
+ throw new Error('Required parameter backToLabelingRequest was null or undefined when calling batchBackToLabeling.');
299
+ }
300
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.category) !== undefined) {
301
+ localVarQueryParameters['category'] = models_1.ObjectSerializer.serialize(queryParams.category, "RawDataCategory");
302
+ }
303
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.labels) !== undefined) {
304
+ localVarQueryParameters['labels'] = models_1.ObjectSerializer.serialize(queryParams.labels, "string");
305
+ }
306
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.filename) !== undefined) {
307
+ localVarQueryParameters['filename'] = models_1.ObjectSerializer.serialize(queryParams.filename, "string");
308
+ }
309
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.maxLength) !== undefined) {
310
+ localVarQueryParameters['maxLength'] = models_1.ObjectSerializer.serialize(queryParams.maxLength, "number");
311
+ }
312
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.minLength) !== undefined) {
313
+ localVarQueryParameters['minLength'] = models_1.ObjectSerializer.serialize(queryParams.minLength, "number");
314
+ }
315
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.minFrequency) !== undefined) {
316
+ localVarQueryParameters['minFrequency'] = models_1.ObjectSerializer.serialize(queryParams.minFrequency, "number");
317
+ }
318
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.maxFrequency) !== undefined) {
319
+ localVarQueryParameters['maxFrequency'] = models_1.ObjectSerializer.serialize(queryParams.maxFrequency, "number");
320
+ }
321
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.signatureValidity) !== undefined) {
322
+ localVarQueryParameters['signatureValidity'] = models_1.ObjectSerializer.serialize(queryParams.signatureValidity, "'both' | 'valid' | 'invalid'");
323
+ }
324
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.includeDisabled) !== undefined) {
325
+ localVarQueryParameters['includeDisabled'] = models_1.ObjectSerializer.serialize(queryParams.includeDisabled, "'both' | 'enabled' | 'disabled'");
326
+ }
327
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.ids) !== undefined) {
328
+ localVarQueryParameters['ids'] = models_1.ObjectSerializer.serialize(queryParams.ids, "string");
329
+ }
330
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.excludeIds) !== undefined) {
331
+ localVarQueryParameters['excludeIds'] = models_1.ObjectSerializer.serialize(queryParams.excludeIds, "string");
332
+ }
333
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.minLabel) !== undefined) {
334
+ localVarQueryParameters['minLabel'] = models_1.ObjectSerializer.serialize(queryParams.minLabel, "number");
335
+ }
336
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.maxLabel) !== undefined) {
337
+ localVarQueryParameters['maxLabel'] = models_1.ObjectSerializer.serialize(queryParams.maxLabel, "number");
338
+ }
339
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.search) !== undefined) {
340
+ localVarQueryParameters['search'] = models_1.ObjectSerializer.serialize(queryParams.search, "string");
341
+ }
342
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.dataType) !== undefined) {
343
+ localVarQueryParameters['dataType'] = models_1.ObjectSerializer.serialize(queryParams.dataType, "'audio' | 'image'");
344
+ }
345
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.minId) !== undefined) {
346
+ localVarQueryParameters['minId'] = models_1.ObjectSerializer.serialize(queryParams.minId, "number");
347
+ }
348
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.maxId) !== undefined) {
349
+ localVarQueryParameters['maxId'] = models_1.ObjectSerializer.serialize(queryParams.maxId, "number");
350
+ }
351
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.metadata) !== undefined) {
352
+ localVarQueryParameters['metadata'] = models_1.ObjectSerializer.serialize(queryParams.metadata, "string");
353
+ }
354
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.minDate) !== undefined) {
355
+ localVarQueryParameters['minDate'] = models_1.ObjectSerializer.serialize(queryParams.minDate, "Date");
356
+ }
357
+ if ((queryParams === null || queryParams === void 0 ? void 0 : queryParams.maxDate) !== undefined) {
358
+ localVarQueryParameters['maxDate'] = models_1.ObjectSerializer.serialize(queryParams.maxDate, "Date");
359
+ }
360
+ Object.assign(localVarHeaderParams, options.headers);
361
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
362
+ let localVarUseFormData = false;
363
+ let localVarRequestOptions = {
364
+ method: 'POST',
365
+ qs: localVarQueryParameters,
366
+ headers: localVarHeaderParams,
367
+ uri: localVarPath,
368
+ useQuerystring: this._useQuerystring,
369
+ agentOptions: { keepAlive: false },
370
+ json: true,
371
+ body: models_1.ObjectSerializer.serialize(backToLabelingRequest, "BackToLabelingRequest")
372
+ };
373
+ let authenticationPromise = Promise.resolve();
374
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
375
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
376
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
377
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
378
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
379
+ return authenticationPromise.then(() => {
380
+ if (Object.keys(localVarFormParams).length) {
381
+ if (localVarUseFormData) {
382
+ localVarRequestOptions.formData = localVarFormParams;
383
+ }
384
+ else {
385
+ localVarRequestOptions.form = localVarFormParams;
386
+ }
387
+ }
388
+ return new Promise((resolve, reject) => {
389
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
390
+ if (error) {
391
+ reject(error);
392
+ }
393
+ else {
394
+ body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse | StartJobResponse");
395
+ if (typeof body.success === 'boolean' && !body.success) {
396
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
397
+ reject(new Error(body.error || errString));
398
+ }
399
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
400
+ resolve(body);
401
+ }
402
+ else {
403
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
404
+ reject(errString);
405
+ }
406
+ }
407
+ });
408
+ });
409
+ });
410
+ }
246
411
  /**
247
412
  * Clears all metadata for multiple samples.
248
413
  * @summary Clear all metadata (multiple samples)