edge-impulse-api 1.66.28 → 1.66.30

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 (27) hide show
  1. package/build/library/sdk/api/adminApi.js +2 -1
  2. package/build/library/sdk/api/adminApi.js.map +1 -1
  3. package/build/library/sdk/api/projectsApi.d.ts +15 -0
  4. package/build/library/sdk/api/projectsApi.js +83 -0
  5. package/build/library/sdk/api/projectsApi.js.map +1 -1
  6. package/build/library/sdk/model/convertParquetToCsvRequest.d.ts +33 -0
  7. package/build/library/sdk/model/convertParquetToCsvRequest.js +29 -0
  8. package/build/library/sdk/model/convertParquetToCsvRequest.js.map +1 -0
  9. package/build/library/sdk/model/convertParquetToCsvResponse.d.ts +33 -0
  10. package/build/library/sdk/model/convertParquetToCsvResponse.js +39 -0
  11. package/build/library/sdk/model/convertParquetToCsvResponse.js.map +1 -0
  12. package/build/library/sdk/model/convertParquetToCsvResponseAllOf.d.ts +25 -0
  13. package/build/library/sdk/model/convertParquetToCsvResponseAllOf.js +29 -0
  14. package/build/library/sdk/model/convertParquetToCsvResponseAllOf.js.map +1 -0
  15. package/build/library/sdk/model/deploymentTarget.d.ts +2 -0
  16. package/build/library/sdk/model/deploymentTarget.js +5 -0
  17. package/build/library/sdk/model/deploymentTarget.js.map +1 -1
  18. package/build/library/sdk/model/deploymentTargetVariant.d.ts +28 -0
  19. package/build/library/sdk/model/deploymentTargetVariant.js +39 -0
  20. package/build/library/sdk/model/deploymentTargetVariant.js.map +1 -0
  21. package/build/library/sdk/model/models.d.ts +4 -0
  22. package/build/library/sdk/model/models.js +12 -0
  23. package/build/library/sdk/model/models.js.map +1 -1
  24. package/build/library/sdk/model/projectDeploymentTarget.d.ts +2 -0
  25. package/build/library/sdk/model/projectDeploymentTarget.js +5 -0
  26. package/build/library/sdk/model/projectDeploymentTarget.js.map +1 -1
  27. package/package.json +1 -1
@@ -14,6 +14,7 @@ import { AddApiKeyResponse } from '../model/addApiKeyResponse';
14
14
  import { AddCollaboratorRequest } from '../model/addCollaboratorRequest';
15
15
  import { AddHmacKeyRequest } from '../model/addHmacKeyRequest';
16
16
  import { AddProjectApiKeyRequest } from '../model/addProjectApiKeyRequest';
17
+ import { ConvertParquetToCsvResponse } from '../model/convertParquetToCsvResponse';
17
18
  import { CreateProjectRequest } from '../model/createProjectRequest';
18
19
  import { CreateProjectResponse } from '../model/createProjectResponse';
19
20
  import { DevelopmentBoardsResponse } from '../model/developmentBoardsResponse';
@@ -64,6 +65,9 @@ export declare enum ProjectsApiApiKeys {
64
65
  JWTAuthentication = 1,
65
66
  JWTHttpHeaderAuthentication = 2
66
67
  }
68
+ export type convertParquetToCsvFormParams = {
69
+ file: RequestFile;
70
+ };
67
71
  type getModelVariantsQueryParams = {
68
72
  impulseId?: number;
69
73
  };
@@ -162,6 +166,17 @@ export declare class ProjectsApi {
162
166
  [name: string]: string;
163
167
  };
164
168
  }): Promise<GenericApiResponse>;
169
+ /**
170
+ * Takes in a Parquet file and spits out the first few thousand lines of a corresponding CSV file. This is a helper function in the CSV wizard UI.
171
+ * @summary Convert Parquet file to CSV
172
+ * @param projectId Project ID
173
+ * @param file
174
+ */
175
+ convertParquetToCsv(projectId: number, params: convertParquetToCsvFormParams, options?: {
176
+ headers: {
177
+ [name: string]: string;
178
+ };
179
+ }): Promise<ConvertParquetToCsvResponse>;
165
180
  /**
166
181
  * Create a new AI Action.
167
182
  * @summary Create AI Action
@@ -394,6 +394,89 @@ class ProjectsApi {
394
394
  });
395
395
  });
396
396
  }
397
+ /**
398
+ * Takes in a Parquet file and spits out the first few thousand lines of a corresponding CSV file. This is a helper function in the CSV wizard UI.
399
+ * @summary Convert Parquet file to CSV
400
+ * @param projectId Project ID
401
+ * @param file
402
+ */
403
+ async convertParquetToCsv(projectId, params, options = { headers: {} }) {
404
+ const localVarPath = this.basePath + '/api/{projectId}/csv-wizard/parquet-to-csv'
405
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
406
+ let localVarQueryParameters = {};
407
+ let localVarHeaderParams = Object.assign({
408
+ 'User-Agent': 'edgeimpulse-api nodejs'
409
+ }, this.defaultHeaders);
410
+ const produces = ['application/json'];
411
+ // give precedence to 'application/json'
412
+ if (produces.indexOf('application/json') >= 0) {
413
+ localVarHeaderParams.Accept = 'application/json';
414
+ }
415
+ else {
416
+ localVarHeaderParams.Accept = produces.join(',');
417
+ }
418
+ let localVarFormParams = {};
419
+ // verify required parameter 'projectId' is not null or undefined
420
+ if (projectId === null || projectId === undefined) {
421
+ throw new Error('Required parameter projectId was null or undefined when calling convertParquetToCsv.');
422
+ }
423
+ // verify required parameter 'file' is not null or undefined
424
+ if (params.file === null || params.file === undefined) {
425
+ throw new Error('Required parameter params.file was null or undefined when calling convertParquetToCsv.');
426
+ }
427
+ Object.assign(localVarHeaderParams, options.headers);
428
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
429
+ let localVarUseFormData = false;
430
+ if (params.file !== undefined) {
431
+ localVarFormParams['file'] = params.file;
432
+ }
433
+ localVarUseFormData = true;
434
+ let localVarRequestOptions = {
435
+ method: 'POST',
436
+ qs: localVarQueryParameters,
437
+ headers: localVarHeaderParams,
438
+ uri: localVarPath,
439
+ useQuerystring: this._useQuerystring,
440
+ agentOptions: { keepAlive: false },
441
+ json: true,
442
+ };
443
+ let authenticationPromise = Promise.resolve();
444
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
445
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
446
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
447
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
448
+ return authenticationPromise.then(() => {
449
+ if (Object.keys(localVarFormParams).length) {
450
+ if (localVarUseFormData) {
451
+ localVarRequestOptions.formData = localVarFormParams;
452
+ }
453
+ else {
454
+ localVarRequestOptions.form = localVarFormParams;
455
+ }
456
+ }
457
+ return new Promise((resolve, reject) => {
458
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
459
+ if (error) {
460
+ reject(error);
461
+ }
462
+ else {
463
+ body = models_1.ObjectSerializer.deserialize(body, "ConvertParquetToCsvResponse");
464
+ if (typeof body.success === 'boolean' && !body.success) {
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
+ });
479
+ }
397
480
  /**
398
481
  * Create a new AI Action.
399
482
  * @summary Create AI Action