edge-impulse-api 1.48.6 → 1.48.7

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 (31) hide show
  1. package/build/library/sdk/api/adminApi.d.ts +31 -2
  2. package/build/library/sdk/api/adminApi.js +162 -2
  3. package/build/library/sdk/api/adminApi.js.map +1 -1
  4. package/build/library/sdk/api/organizationsApi.d.ts +68 -0
  5. package/build/library/sdk/api/organizationsApi.js +433 -0
  6. package/build/library/sdk/api/organizationsApi.js.map +1 -1
  7. package/build/library/sdk/model/addOrganizationTransformationBlockRequest.d.ts +4 -0
  8. package/build/library/sdk/model/addOrganizationTransformationBlockRequest.js +5 -0
  9. package/build/library/sdk/model/addOrganizationTransformationBlockRequest.js.map +1 -1
  10. package/build/library/sdk/model/adminCreateOrganizationDataExportRequest.d.ts +0 -4
  11. package/build/library/sdk/model/adminCreateOrganizationDataExportRequest.js +0 -5
  12. package/build/library/sdk/model/adminCreateOrganizationDataExportRequest.js.map +1 -1
  13. package/build/library/sdk/model/dSPMetadata.d.ts +4 -0
  14. package/build/library/sdk/model/dSPMetadata.js +5 -0
  15. package/build/library/sdk/model/dSPMetadata.js.map +1 -1
  16. package/build/library/sdk/model/dSPMetadataResponse.d.ts +4 -0
  17. package/build/library/sdk/model/dSPMetadataResponse.js +5 -0
  18. package/build/library/sdk/model/dSPMetadataResponse.js.map +1 -1
  19. package/build/library/sdk/model/organizationDataExport.d.ts +5 -0
  20. package/build/library/sdk/model/organizationDataExport.js +20 -0
  21. package/build/library/sdk/model/organizationDataExport.js.map +1 -1
  22. package/build/library/sdk/model/organizationTransformationBlock.d.ts +4 -0
  23. package/build/library/sdk/model/organizationTransformationBlock.js +5 -0
  24. package/build/library/sdk/model/organizationTransformationBlock.js.map +1 -1
  25. package/build/library/sdk/model/publicOrganizationTransformationBlock.d.ts +4 -0
  26. package/build/library/sdk/model/publicOrganizationTransformationBlock.js +5 -0
  27. package/build/library/sdk/model/publicOrganizationTransformationBlock.js.map +1 -1
  28. package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.d.ts +4 -0
  29. package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.js +5 -0
  30. package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.js.map +1 -1
  31. package/package.json +1 -1
@@ -47,6 +47,8 @@ import { FindUserResponse } from '../model/findUserResponse';
47
47
  import { GenericApiResponse } from '../model/genericApiResponse';
48
48
  import { GetEmailVerificationCodeResponse } from '../model/getEmailVerificationCodeResponse';
49
49
  import { GetFeatureFlagsResponse } from '../model/getFeatureFlagsResponse';
50
+ import { GetOrganizationDataExportResponse } from '../model/getOrganizationDataExportResponse';
51
+ import { GetOrganizationDataExportsResponse } from '../model/getOrganizationDataExportsResponse';
50
52
  import { JobDetailsResponse } from '../model/jobDetailsResponse';
51
53
  import { JobLogsResponse } from '../model/jobLogsResponse';
52
54
  import { JobMetricsResponse } from '../model/jobMetricsResponse';
@@ -91,6 +93,10 @@ declare type adminGetOrganizationComputeTimeUsageQueryParams = {
91
93
  startDate: Date;
92
94
  endDate: Date;
93
95
  };
96
+ declare type adminGetOrganizationDataExportsQueryParams = {
97
+ limit?: number;
98
+ offset?: number;
99
+ };
94
100
  declare type adminGetOrganizationInfoQueryParams = {
95
101
  includeDeleted?: boolean;
96
102
  };
@@ -210,7 +216,7 @@ export declare class AdminApi {
210
216
  };
211
217
  }): Promise<CreateOrganizationResponse>;
212
218
  /**
213
- * Admin-only API to create a new data export for an organization.
219
+ * Admin-only API to create a new data export for an organization. A job is created to process the export request and the job details are returned in the response.
214
220
  * @summary Create a new organization data export
215
221
  * @param organizationId Organization ID
216
222
  * @param adminCreateOrganizationDataExportRequest
@@ -219,7 +225,7 @@ export declare class AdminApi {
219
225
  headers: {
220
226
  [name: string]: string;
221
227
  };
222
- }): Promise<EntityCreatedResponse>;
228
+ }): Promise<StartJobResponse>;
223
229
  /**
224
230
  * Admin-only API to create a new project for an organization.
225
231
  * @summary Create a new organization project
@@ -512,6 +518,29 @@ export declare class AdminApi {
512
518
  [name: string]: string;
513
519
  };
514
520
  }): Promise<AdminGetOrganizationComputeTimeUsageResponse>;
521
+ /**
522
+ * Admin-only API to get a data export for an organization.
523
+ * @summary Get organization data export
524
+ * @param organizationId Organization ID
525
+ * @param exportId Export ID
526
+ */
527
+ adminGetOrganizationDataExport(organizationId: number, exportId: number, options?: {
528
+ headers: {
529
+ [name: string]: string;
530
+ };
531
+ }): Promise<GetOrganizationDataExportResponse>;
532
+ /**
533
+ * Admin-only API to get the list of all data exports for an organization.
534
+ * @summary Get all organization data exports
535
+ * @param organizationId Organization ID
536
+ * @param limit Maximum number of results
537
+ * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
538
+ */
539
+ adminGetOrganizationDataExports(organizationId: number, queryParams: adminGetOrganizationDataExportsQueryParams, options?: {
540
+ headers: {
541
+ [name: string]: string;
542
+ };
543
+ }): Promise<GetOrganizationDataExportsResponse>;
515
544
  /**
516
545
  * Admin-only API to list all information about this organization.
517
546
  * @summary Organization information
@@ -523,7 +523,7 @@ class AdminApi {
523
523
  });
524
524
  }
525
525
  /**
526
- * Admin-only API to create a new data export for an organization.
526
+ * Admin-only API to create a new data export for an organization. A job is created to process the export request and the job details are returned in the response.
527
527
  * @summary Create a new organization data export
528
528
  * @param organizationId Organization ID
529
529
  * @param adminCreateOrganizationDataExportRequest
@@ -585,7 +585,7 @@ class AdminApi {
585
585
  reject(error);
586
586
  }
587
587
  else {
588
- body = models_1.ObjectSerializer.deserialize(body, "EntityCreatedResponse");
588
+ body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
589
589
  const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
590
590
  if (typeof body.success === 'boolean' && !body.success) {
591
591
  reject(new Error(body.error || errString));
@@ -2722,6 +2722,166 @@ class AdminApi {
2722
2722
  });
2723
2723
  });
2724
2724
  }
2725
+ /**
2726
+ * Admin-only API to get a data export for an organization.
2727
+ * @summary Get organization data export
2728
+ * @param organizationId Organization ID
2729
+ * @param exportId Export ID
2730
+ */
2731
+ async adminGetOrganizationDataExport(organizationId, exportId, options = { headers: {} }) {
2732
+ const localVarPath = this.basePath + '/api/admin/organizations/{organizationId}/exports/{exportId}'
2733
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
2734
+ .replace('{' + 'exportId' + '}', encodeURIComponent(String(exportId)));
2735
+ let localVarQueryParameters = {};
2736
+ let localVarHeaderParams = Object.assign({
2737
+ 'User-Agent': 'edgeimpulse-api nodejs'
2738
+ }, this.defaultHeaders);
2739
+ const produces = ['application/json'];
2740
+ // give precedence to 'application/json'
2741
+ if (produces.indexOf('application/json') >= 0) {
2742
+ localVarHeaderParams.Accept = 'application/json';
2743
+ }
2744
+ else {
2745
+ localVarHeaderParams.Accept = produces.join(',');
2746
+ }
2747
+ let localVarFormParams = {};
2748
+ // verify required parameter 'organizationId' is not null or undefined
2749
+ if (organizationId === null || organizationId === undefined) {
2750
+ throw new Error('Required parameter organizationId was null or undefined when calling adminGetOrganizationDataExport.');
2751
+ }
2752
+ // verify required parameter 'exportId' is not null or undefined
2753
+ if (exportId === null || exportId === undefined) {
2754
+ throw new Error('Required parameter exportId was null or undefined when calling adminGetOrganizationDataExport.');
2755
+ }
2756
+ Object.assign(localVarHeaderParams, options.headers);
2757
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2758
+ let localVarUseFormData = false;
2759
+ let localVarRequestOptions = {
2760
+ method: 'GET',
2761
+ qs: localVarQueryParameters,
2762
+ headers: localVarHeaderParams,
2763
+ uri: localVarPath,
2764
+ useQuerystring: this._useQuerystring,
2765
+ agentOptions: { keepAlive: false },
2766
+ json: true,
2767
+ };
2768
+ let authenticationPromise = Promise.resolve();
2769
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2770
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2771
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2772
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2773
+ return authenticationPromise.then(() => {
2774
+ if (Object.keys(localVarFormParams).length) {
2775
+ if (localVarUseFormData) {
2776
+ localVarRequestOptions.formData = localVarFormParams;
2777
+ }
2778
+ else {
2779
+ localVarRequestOptions.form = localVarFormParams;
2780
+ }
2781
+ }
2782
+ return new Promise((resolve, reject) => {
2783
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
2784
+ if (error) {
2785
+ reject(error);
2786
+ }
2787
+ else {
2788
+ body = models_1.ObjectSerializer.deserialize(body, "GetOrganizationDataExportResponse");
2789
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2790
+ if (typeof body.success === 'boolean' && !body.success) {
2791
+ reject(new Error(body.error || errString));
2792
+ }
2793
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2794
+ resolve(body);
2795
+ }
2796
+ else {
2797
+ reject(errString);
2798
+ }
2799
+ }
2800
+ });
2801
+ });
2802
+ });
2803
+ }
2804
+ /**
2805
+ * Admin-only API to get the list of all data exports for an organization.
2806
+ * @summary Get all organization data exports
2807
+ * @param organizationId Organization ID
2808
+ * @param limit Maximum number of results
2809
+ * @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
2810
+ */
2811
+ async adminGetOrganizationDataExports(organizationId, queryParams, options = { headers: {} }) {
2812
+ const localVarPath = this.basePath + '/api/admin/organizations/{organizationId}/exports'
2813
+ .replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
2814
+ let localVarQueryParameters = {};
2815
+ let localVarHeaderParams = Object.assign({
2816
+ 'User-Agent': 'edgeimpulse-api nodejs'
2817
+ }, this.defaultHeaders);
2818
+ const produces = ['application/json'];
2819
+ // give precedence to 'application/json'
2820
+ if (produces.indexOf('application/json') >= 0) {
2821
+ localVarHeaderParams.Accept = 'application/json';
2822
+ }
2823
+ else {
2824
+ localVarHeaderParams.Accept = produces.join(',');
2825
+ }
2826
+ let localVarFormParams = {};
2827
+ // verify required parameter 'organizationId' is not null or undefined
2828
+ if (organizationId === null || organizationId === undefined) {
2829
+ throw new Error('Required parameter organizationId was null or undefined when calling adminGetOrganizationDataExports.');
2830
+ }
2831
+ if (queryParams.limit !== undefined) {
2832
+ localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
2833
+ }
2834
+ if (queryParams.offset !== undefined) {
2835
+ localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
2836
+ }
2837
+ Object.assign(localVarHeaderParams, options.headers);
2838
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
2839
+ let localVarUseFormData = false;
2840
+ let localVarRequestOptions = {
2841
+ method: 'GET',
2842
+ qs: localVarQueryParameters,
2843
+ headers: localVarHeaderParams,
2844
+ uri: localVarPath,
2845
+ useQuerystring: this._useQuerystring,
2846
+ agentOptions: { keepAlive: false },
2847
+ json: true,
2848
+ };
2849
+ let authenticationPromise = Promise.resolve();
2850
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
2851
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
2852
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
2853
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
2854
+ return authenticationPromise.then(() => {
2855
+ if (Object.keys(localVarFormParams).length) {
2856
+ if (localVarUseFormData) {
2857
+ localVarRequestOptions.formData = localVarFormParams;
2858
+ }
2859
+ else {
2860
+ localVarRequestOptions.form = localVarFormParams;
2861
+ }
2862
+ }
2863
+ return new Promise((resolve, reject) => {
2864
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
2865
+ if (error) {
2866
+ reject(error);
2867
+ }
2868
+ else {
2869
+ body = models_1.ObjectSerializer.deserialize(body, "GetOrganizationDataExportsResponse");
2870
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
2871
+ if (typeof body.success === 'boolean' && !body.success) {
2872
+ reject(new Error(body.error || errString));
2873
+ }
2874
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
2875
+ resolve(body);
2876
+ }
2877
+ else {
2878
+ reject(errString);
2879
+ }
2880
+ }
2881
+ });
2882
+ });
2883
+ });
2884
+ }
2725
2885
  /**
2726
2886
  * Admin-only API to list all information about this organization.
2727
2887
  * @summary Organization information