edge-impulse-api 1.48.6 → 1.49.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.
- package/LICENSE +0 -0
- package/README.md +0 -0
- package/build/library/sdk/api/adminApi.d.ts +31 -2
- package/build/library/sdk/api/adminApi.js +162 -2
- package/build/library/sdk/api/adminApi.js.map +1 -1
- package/build/library/sdk/api/organizationsApi.d.ts +68 -0
- package/build/library/sdk/api/organizationsApi.js +433 -0
- package/build/library/sdk/api/organizationsApi.js.map +1 -1
- package/build/library/sdk/model/addOrganizationTransformationBlockRequest.d.ts +4 -0
- package/build/library/sdk/model/addOrganizationTransformationBlockRequest.js +5 -0
- package/build/library/sdk/model/addOrganizationTransformationBlockRequest.js.map +1 -1
- package/build/library/sdk/model/adminCreateOrganizationDataExportRequest.d.ts +0 -4
- package/build/library/sdk/model/adminCreateOrganizationDataExportRequest.js +0 -5
- package/build/library/sdk/model/adminCreateOrganizationDataExportRequest.js.map +1 -1
- package/build/library/sdk/model/dSPMetadata.d.ts +4 -0
- package/build/library/sdk/model/dSPMetadata.js +5 -0
- package/build/library/sdk/model/dSPMetadata.js.map +1 -1
- package/build/library/sdk/model/dSPMetadataResponse.d.ts +4 -0
- package/build/library/sdk/model/dSPMetadataResponse.js +5 -0
- package/build/library/sdk/model/dSPMetadataResponse.js.map +1 -1
- package/build/library/sdk/model/models.d.ts +1 -0
- package/build/library/sdk/model/models.js +3 -0
- package/build/library/sdk/model/models.js.map +1 -1
- package/build/library/sdk/model/organizationDataExport.d.ts +5 -0
- package/build/library/sdk/model/organizationDataExport.js +20 -0
- package/build/library/sdk/model/organizationDataExport.js.map +1 -1
- package/build/library/sdk/model/organizationInfoResponse.d.ts +2 -0
- package/build/library/sdk/model/organizationInfoResponse.js +5 -0
- package/build/library/sdk/model/organizationInfoResponse.js.map +1 -1
- package/build/library/sdk/model/organizationInfoResponseAllOf.d.ts +2 -0
- package/build/library/sdk/model/organizationInfoResponseAllOf.js +5 -0
- package/build/library/sdk/model/organizationInfoResponseAllOf.js.map +1 -1
- package/build/library/sdk/model/organizationInfoResponseAllOfPerformance.d.ts +28 -0
- package/build/library/sdk/model/organizationInfoResponseAllOfPerformance.js +32 -0
- package/build/library/sdk/model/organizationInfoResponseAllOfPerformance.js.map +1 -0
- package/build/library/sdk/model/organizationTransformationBlock.d.ts +4 -0
- package/build/library/sdk/model/organizationTransformationBlock.js +5 -0
- package/build/library/sdk/model/organizationTransformationBlock.js.map +1 -1
- package/build/library/sdk/model/publicOrganizationTransformationBlock.d.ts +4 -0
- package/build/library/sdk/model/publicOrganizationTransformationBlock.js +5 -0
- package/build/library/sdk/model/publicOrganizationTransformationBlock.js.map +1 -1
- package/build/library/sdk/model/updateOrganizationRequest.d.ts +4 -0
- package/build/library/sdk/model/updateOrganizationRequest.js +5 -0
- package/build/library/sdk/model/updateOrganizationRequest.js.map +1 -1
- package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.d.ts +4 -0
- package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.js +5 -0
- package/build/library/sdk/model/updateOrganizationTransformationBlockRequest.js.map +1 -1
- package/package.json +1 -1
|
@@ -15,6 +15,7 @@ import { AdminAddOrganizationApiKeyRequest } from '../model/adminAddOrganization
|
|
|
15
15
|
import { AdminAddOrganizationUserRequest } from '../model/adminAddOrganizationUserRequest';
|
|
16
16
|
import { AdminAddProjectApiKeyRequest } from '../model/adminAddProjectApiKeyRequest';
|
|
17
17
|
import { AdminAddProjectUserRequest } from '../model/adminAddProjectUserRequest';
|
|
18
|
+
import { AdminCreateOrganizationDataExportRequest } from '../model/adminCreateOrganizationDataExportRequest';
|
|
18
19
|
import { AdminCreateProjectRequest } from '../model/adminCreateProjectRequest';
|
|
19
20
|
import { AdminGetMetricsResponse } from '../model/adminGetMetricsResponse';
|
|
20
21
|
import { AdminGetOrganizationComputeTimeUsageResponse } from '../model/adminGetOrganizationComputeTimeUsageResponse';
|
|
@@ -26,6 +27,7 @@ import { AdminGetUserResponse } from '../model/adminGetUserResponse';
|
|
|
26
27
|
import { AdminGetUsersResponse } from '../model/adminGetUsersResponse';
|
|
27
28
|
import { AdminListProjectsResponse } from '../model/adminListProjectsResponse';
|
|
28
29
|
import { AdminOrganizationInfoResponse } from '../model/adminOrganizationInfoResponse';
|
|
30
|
+
import { AdminUpdateOrganizationDataExportRequest } from '../model/adminUpdateOrganizationDataExportRequest';
|
|
29
31
|
import { AdminUpdateOrganizationRequest } from '../model/adminUpdateOrganizationRequest';
|
|
30
32
|
import { AdminUpdateUserRequest } from '../model/adminUpdateUserRequest';
|
|
31
33
|
import { CreateOrganizationRequest } from '../model/createOrganizationRequest';
|
|
@@ -95,6 +97,10 @@ declare type whitelabelAdminGetOrganizationComputeTimeUsageQueryParams = {
|
|
|
95
97
|
startDate: Date;
|
|
96
98
|
endDate: Date;
|
|
97
99
|
};
|
|
100
|
+
declare type whitelabelAdminGetOrganizationExportsQueryParams = {
|
|
101
|
+
limit?: number;
|
|
102
|
+
offset?: number;
|
|
103
|
+
};
|
|
98
104
|
declare type whitelabelAdminGetOrganizationInfoQueryParams = {
|
|
99
105
|
includeDeleted?: boolean;
|
|
100
106
|
};
|
|
@@ -492,6 +498,18 @@ export declare class OrganizationsApi {
|
|
|
492
498
|
[name: string]: string;
|
|
493
499
|
};
|
|
494
500
|
}): Promise<CreateOrganizationResponse>;
|
|
501
|
+
/**
|
|
502
|
+
* 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. This is an API only available to white label admins.
|
|
503
|
+
* @summary White Label Admin - Create a new organization data export
|
|
504
|
+
* @param organizationId Organization ID
|
|
505
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
506
|
+
* @param adminCreateOrganizationDataExportRequest
|
|
507
|
+
*/
|
|
508
|
+
whitelabelAdminCreateOrganizationExport(organizationId: number, innerOrganizationId: number, adminCreateOrganizationDataExportRequest: AdminCreateOrganizationDataExportRequest, options?: {
|
|
509
|
+
headers: {
|
|
510
|
+
[name: string]: string;
|
|
511
|
+
};
|
|
512
|
+
}): Promise<StartJobResponse>;
|
|
495
513
|
/**
|
|
496
514
|
* White label admin only API to create a new project for an organization.
|
|
497
515
|
* @summary White Label Admin - Create a new organization project
|
|
@@ -539,6 +557,18 @@ export declare class OrganizationsApi {
|
|
|
539
557
|
[name: string]: string;
|
|
540
558
|
};
|
|
541
559
|
}): Promise<GenericApiResponse>;
|
|
560
|
+
/**
|
|
561
|
+
* Delete a data export for an organization. This is an API only available to white label admins.
|
|
562
|
+
* @summary White Label Admin - Delete organization data export
|
|
563
|
+
* @param organizationId Organization ID
|
|
564
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
565
|
+
* @param exportId Export ID
|
|
566
|
+
*/
|
|
567
|
+
whitelabelAdminDeleteOrganizationExport(organizationId: number, innerOrganizationId: number, exportId: number, options?: {
|
|
568
|
+
headers: {
|
|
569
|
+
[name: string]: string;
|
|
570
|
+
};
|
|
571
|
+
}): Promise<GenericApiResponse>;
|
|
542
572
|
/**
|
|
543
573
|
* Delete a usage report for an organization. This is an API only available to white label admins.
|
|
544
574
|
* @summary White Label Admin - Delete usage report
|
|
@@ -618,6 +648,31 @@ export declare class OrganizationsApi {
|
|
|
618
648
|
[name: string]: string;
|
|
619
649
|
};
|
|
620
650
|
}): Promise<AdminGetOrganizationComputeTimeUsageResponse>;
|
|
651
|
+
/**
|
|
652
|
+
* Get a data export for an organization. This is an API only available to white label admins.
|
|
653
|
+
* @summary White Label Admin - Get organization data export
|
|
654
|
+
* @param organizationId Organization ID
|
|
655
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
656
|
+
* @param exportId Export ID
|
|
657
|
+
*/
|
|
658
|
+
whitelabelAdminGetOrganizationExport(organizationId: number, innerOrganizationId: number, exportId: number, options?: {
|
|
659
|
+
headers: {
|
|
660
|
+
[name: string]: string;
|
|
661
|
+
};
|
|
662
|
+
}): Promise<GetOrganizationDataExportResponse>;
|
|
663
|
+
/**
|
|
664
|
+
* Get all data exports for an organization. This is an API only available to white label admins.
|
|
665
|
+
* @summary White Label Admin - Get all organization data exports
|
|
666
|
+
* @param organizationId Organization ID
|
|
667
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
668
|
+
* @param limit Maximum number of results
|
|
669
|
+
* @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
|
|
670
|
+
*/
|
|
671
|
+
whitelabelAdminGetOrganizationExports(organizationId: number, innerOrganizationId: number, queryParams: whitelabelAdminGetOrganizationExportsQueryParams, options?: {
|
|
672
|
+
headers: {
|
|
673
|
+
[name: string]: string;
|
|
674
|
+
};
|
|
675
|
+
}): Promise<GetOrganizationDataExportsResponse>;
|
|
621
676
|
/**
|
|
622
677
|
* White label admin only API to list all information about an organization.
|
|
623
678
|
* @summary White Label Admin - Get organization information
|
|
@@ -873,6 +928,19 @@ export declare class OrganizationsApi {
|
|
|
873
928
|
[name: string]: string;
|
|
874
929
|
};
|
|
875
930
|
}): Promise<GenericApiResponse>;
|
|
931
|
+
/**
|
|
932
|
+
* Update a data export for an organization. This is an API only available to white label admins.
|
|
933
|
+
* @summary White Label Admin - Update organization data export
|
|
934
|
+
* @param organizationId Organization ID
|
|
935
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
936
|
+
* @param exportId Export ID
|
|
937
|
+
* @param adminUpdateOrganizationDataExportRequest
|
|
938
|
+
*/
|
|
939
|
+
whitelabelAdminUpdateOrganizationExport(organizationId: number, innerOrganizationId: number, exportId: number, adminUpdateOrganizationDataExportRequest: AdminUpdateOrganizationDataExportRequest, options?: {
|
|
940
|
+
headers: {
|
|
941
|
+
[name: string]: string;
|
|
942
|
+
};
|
|
943
|
+
}): Promise<GenericApiResponse>;
|
|
876
944
|
/**
|
|
877
945
|
* White label admin only API to update project properties.
|
|
878
946
|
* @summary White Label Admin - Update white label project
|
|
@@ -2416,6 +2416,91 @@ class OrganizationsApi {
|
|
|
2416
2416
|
});
|
|
2417
2417
|
});
|
|
2418
2418
|
}
|
|
2419
|
+
/**
|
|
2420
|
+
* 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. This is an API only available to white label admins.
|
|
2421
|
+
* @summary White Label Admin - Create a new organization data export
|
|
2422
|
+
* @param organizationId Organization ID
|
|
2423
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
2424
|
+
* @param adminCreateOrganizationDataExportRequest
|
|
2425
|
+
*/
|
|
2426
|
+
async whitelabelAdminCreateOrganizationExport(organizationId, innerOrganizationId, adminCreateOrganizationDataExportRequest, options = { headers: {} }) {
|
|
2427
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports'
|
|
2428
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2429
|
+
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
|
|
2430
|
+
let localVarQueryParameters = {};
|
|
2431
|
+
let localVarHeaderParams = Object.assign({
|
|
2432
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2433
|
+
}, this.defaultHeaders);
|
|
2434
|
+
const produces = ['application/json'];
|
|
2435
|
+
// give precedence to 'application/json'
|
|
2436
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2437
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
2438
|
+
}
|
|
2439
|
+
else {
|
|
2440
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2441
|
+
}
|
|
2442
|
+
let localVarFormParams = {};
|
|
2443
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
2444
|
+
if (organizationId === null || organizationId === undefined) {
|
|
2445
|
+
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminCreateOrganizationExport.');
|
|
2446
|
+
}
|
|
2447
|
+
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
2448
|
+
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
2449
|
+
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminCreateOrganizationExport.');
|
|
2450
|
+
}
|
|
2451
|
+
// verify required parameter 'adminCreateOrganizationDataExportRequest' is not null or undefined
|
|
2452
|
+
if (adminCreateOrganizationDataExportRequest === null || adminCreateOrganizationDataExportRequest === undefined) {
|
|
2453
|
+
throw new Error('Required parameter adminCreateOrganizationDataExportRequest was null or undefined when calling whitelabelAdminCreateOrganizationExport.');
|
|
2454
|
+
}
|
|
2455
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
2456
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2457
|
+
let localVarUseFormData = false;
|
|
2458
|
+
let localVarRequestOptions = {
|
|
2459
|
+
method: 'POST',
|
|
2460
|
+
qs: localVarQueryParameters,
|
|
2461
|
+
headers: localVarHeaderParams,
|
|
2462
|
+
uri: localVarPath,
|
|
2463
|
+
useQuerystring: this._useQuerystring,
|
|
2464
|
+
agentOptions: { keepAlive: false },
|
|
2465
|
+
json: true,
|
|
2466
|
+
body: models_1.ObjectSerializer.serialize(adminCreateOrganizationDataExportRequest, "AdminCreateOrganizationDataExportRequest")
|
|
2467
|
+
};
|
|
2468
|
+
let authenticationPromise = Promise.resolve();
|
|
2469
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2470
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2471
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2472
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2473
|
+
return authenticationPromise.then(() => {
|
|
2474
|
+
if (Object.keys(localVarFormParams).length) {
|
|
2475
|
+
if (localVarUseFormData) {
|
|
2476
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
2477
|
+
}
|
|
2478
|
+
else {
|
|
2479
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
return new Promise((resolve, reject) => {
|
|
2483
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2484
|
+
if (error) {
|
|
2485
|
+
reject(error);
|
|
2486
|
+
}
|
|
2487
|
+
else {
|
|
2488
|
+
body = models_1.ObjectSerializer.deserialize(body, "StartJobResponse");
|
|
2489
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2490
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
2491
|
+
reject(new Error(body.error || errString));
|
|
2492
|
+
}
|
|
2493
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2494
|
+
resolve(body);
|
|
2495
|
+
}
|
|
2496
|
+
else {
|
|
2497
|
+
reject(errString);
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
});
|
|
2501
|
+
});
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2419
2504
|
/**
|
|
2420
2505
|
* White label admin only API to create a new project for an organization.
|
|
2421
2506
|
* @summary White Label Admin - Create a new organization project
|
|
@@ -2754,6 +2839,91 @@ class OrganizationsApi {
|
|
|
2754
2839
|
});
|
|
2755
2840
|
});
|
|
2756
2841
|
}
|
|
2842
|
+
/**
|
|
2843
|
+
* Delete a data export for an organization. This is an API only available to white label admins.
|
|
2844
|
+
* @summary White Label Admin - Delete organization data export
|
|
2845
|
+
* @param organizationId Organization ID
|
|
2846
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
2847
|
+
* @param exportId Export ID
|
|
2848
|
+
*/
|
|
2849
|
+
async whitelabelAdminDeleteOrganizationExport(organizationId, innerOrganizationId, exportId, options = { headers: {} }) {
|
|
2850
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports/{exportId}'
|
|
2851
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2852
|
+
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)))
|
|
2853
|
+
.replace('{' + 'exportId' + '}', encodeURIComponent(String(exportId)));
|
|
2854
|
+
let localVarQueryParameters = {};
|
|
2855
|
+
let localVarHeaderParams = Object.assign({
|
|
2856
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
2857
|
+
}, this.defaultHeaders);
|
|
2858
|
+
const produces = ['application/json'];
|
|
2859
|
+
// give precedence to 'application/json'
|
|
2860
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2861
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
2862
|
+
}
|
|
2863
|
+
else {
|
|
2864
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2865
|
+
}
|
|
2866
|
+
let localVarFormParams = {};
|
|
2867
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
2868
|
+
if (organizationId === null || organizationId === undefined) {
|
|
2869
|
+
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminDeleteOrganizationExport.');
|
|
2870
|
+
}
|
|
2871
|
+
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
2872
|
+
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
2873
|
+
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminDeleteOrganizationExport.');
|
|
2874
|
+
}
|
|
2875
|
+
// verify required parameter 'exportId' is not null or undefined
|
|
2876
|
+
if (exportId === null || exportId === undefined) {
|
|
2877
|
+
throw new Error('Required parameter exportId was null or undefined when calling whitelabelAdminDeleteOrganizationExport.');
|
|
2878
|
+
}
|
|
2879
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
2880
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
2881
|
+
let localVarUseFormData = false;
|
|
2882
|
+
let localVarRequestOptions = {
|
|
2883
|
+
method: 'DELETE',
|
|
2884
|
+
qs: localVarQueryParameters,
|
|
2885
|
+
headers: localVarHeaderParams,
|
|
2886
|
+
uri: localVarPath,
|
|
2887
|
+
useQuerystring: this._useQuerystring,
|
|
2888
|
+
agentOptions: { keepAlive: false },
|
|
2889
|
+
json: true,
|
|
2890
|
+
};
|
|
2891
|
+
let authenticationPromise = Promise.resolve();
|
|
2892
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
2893
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
2894
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
2895
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
2896
|
+
return authenticationPromise.then(() => {
|
|
2897
|
+
if (Object.keys(localVarFormParams).length) {
|
|
2898
|
+
if (localVarUseFormData) {
|
|
2899
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
2900
|
+
}
|
|
2901
|
+
else {
|
|
2902
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
return new Promise((resolve, reject) => {
|
|
2906
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
2907
|
+
if (error) {
|
|
2908
|
+
reject(error);
|
|
2909
|
+
}
|
|
2910
|
+
else {
|
|
2911
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
2912
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
2913
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
2914
|
+
reject(new Error(body.error || errString));
|
|
2915
|
+
}
|
|
2916
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
2917
|
+
resolve(body);
|
|
2918
|
+
}
|
|
2919
|
+
else {
|
|
2920
|
+
reject(errString);
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
});
|
|
2924
|
+
});
|
|
2925
|
+
});
|
|
2926
|
+
}
|
|
2757
2927
|
/**
|
|
2758
2928
|
* Delete a usage report for an organization. This is an API only available to white label admins.
|
|
2759
2929
|
* @summary White Label Admin - Delete usage report
|
|
@@ -3314,6 +3484,178 @@ class OrganizationsApi {
|
|
|
3314
3484
|
});
|
|
3315
3485
|
});
|
|
3316
3486
|
}
|
|
3487
|
+
/**
|
|
3488
|
+
* Get a data export for an organization. This is an API only available to white label admins.
|
|
3489
|
+
* @summary White Label Admin - Get organization data export
|
|
3490
|
+
* @param organizationId Organization ID
|
|
3491
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
3492
|
+
* @param exportId Export ID
|
|
3493
|
+
*/
|
|
3494
|
+
async whitelabelAdminGetOrganizationExport(organizationId, innerOrganizationId, exportId, options = { headers: {} }) {
|
|
3495
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports/{exportId}'
|
|
3496
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
3497
|
+
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)))
|
|
3498
|
+
.replace('{' + 'exportId' + '}', encodeURIComponent(String(exportId)));
|
|
3499
|
+
let localVarQueryParameters = {};
|
|
3500
|
+
let localVarHeaderParams = Object.assign({
|
|
3501
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
3502
|
+
}, this.defaultHeaders);
|
|
3503
|
+
const produces = ['application/json'];
|
|
3504
|
+
// give precedence to 'application/json'
|
|
3505
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
3506
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
3507
|
+
}
|
|
3508
|
+
else {
|
|
3509
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3510
|
+
}
|
|
3511
|
+
let localVarFormParams = {};
|
|
3512
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
3513
|
+
if (organizationId === null || organizationId === undefined) {
|
|
3514
|
+
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetOrganizationExport.');
|
|
3515
|
+
}
|
|
3516
|
+
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
3517
|
+
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
3518
|
+
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminGetOrganizationExport.');
|
|
3519
|
+
}
|
|
3520
|
+
// verify required parameter 'exportId' is not null or undefined
|
|
3521
|
+
if (exportId === null || exportId === undefined) {
|
|
3522
|
+
throw new Error('Required parameter exportId was null or undefined when calling whitelabelAdminGetOrganizationExport.');
|
|
3523
|
+
}
|
|
3524
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
3525
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
3526
|
+
let localVarUseFormData = false;
|
|
3527
|
+
let localVarRequestOptions = {
|
|
3528
|
+
method: 'GET',
|
|
3529
|
+
qs: localVarQueryParameters,
|
|
3530
|
+
headers: localVarHeaderParams,
|
|
3531
|
+
uri: localVarPath,
|
|
3532
|
+
useQuerystring: this._useQuerystring,
|
|
3533
|
+
agentOptions: { keepAlive: false },
|
|
3534
|
+
json: true,
|
|
3535
|
+
};
|
|
3536
|
+
let authenticationPromise = Promise.resolve();
|
|
3537
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
3538
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
3539
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
3540
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
3541
|
+
return authenticationPromise.then(() => {
|
|
3542
|
+
if (Object.keys(localVarFormParams).length) {
|
|
3543
|
+
if (localVarUseFormData) {
|
|
3544
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
3545
|
+
}
|
|
3546
|
+
else {
|
|
3547
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
3548
|
+
}
|
|
3549
|
+
}
|
|
3550
|
+
return new Promise((resolve, reject) => {
|
|
3551
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
3552
|
+
if (error) {
|
|
3553
|
+
reject(error);
|
|
3554
|
+
}
|
|
3555
|
+
else {
|
|
3556
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetOrganizationDataExportResponse");
|
|
3557
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
3558
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
3559
|
+
reject(new Error(body.error || errString));
|
|
3560
|
+
}
|
|
3561
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
3562
|
+
resolve(body);
|
|
3563
|
+
}
|
|
3564
|
+
else {
|
|
3565
|
+
reject(errString);
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
});
|
|
3569
|
+
});
|
|
3570
|
+
});
|
|
3571
|
+
}
|
|
3572
|
+
/**
|
|
3573
|
+
* Get all data exports for an organization. This is an API only available to white label admins.
|
|
3574
|
+
* @summary White Label Admin - Get all organization data exports
|
|
3575
|
+
* @param organizationId Organization ID
|
|
3576
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
3577
|
+
* @param limit Maximum number of results
|
|
3578
|
+
* @param offset Offset in results, can be used in conjunction with LimitResultsParameter to implement paging.
|
|
3579
|
+
*/
|
|
3580
|
+
async whitelabelAdminGetOrganizationExports(organizationId, innerOrganizationId, queryParams, options = { headers: {} }) {
|
|
3581
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports'
|
|
3582
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
3583
|
+
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
|
|
3584
|
+
let localVarQueryParameters = {};
|
|
3585
|
+
let localVarHeaderParams = Object.assign({
|
|
3586
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
3587
|
+
}, this.defaultHeaders);
|
|
3588
|
+
const produces = ['application/json'];
|
|
3589
|
+
// give precedence to 'application/json'
|
|
3590
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
3591
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
3592
|
+
}
|
|
3593
|
+
else {
|
|
3594
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3595
|
+
}
|
|
3596
|
+
let localVarFormParams = {};
|
|
3597
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
3598
|
+
if (organizationId === null || organizationId === undefined) {
|
|
3599
|
+
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminGetOrganizationExports.');
|
|
3600
|
+
}
|
|
3601
|
+
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
3602
|
+
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
3603
|
+
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminGetOrganizationExports.');
|
|
3604
|
+
}
|
|
3605
|
+
if (queryParams.limit !== undefined) {
|
|
3606
|
+
localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(queryParams.limit, "number");
|
|
3607
|
+
}
|
|
3608
|
+
if (queryParams.offset !== undefined) {
|
|
3609
|
+
localVarQueryParameters['offset'] = models_1.ObjectSerializer.serialize(queryParams.offset, "number");
|
|
3610
|
+
}
|
|
3611
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
3612
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
3613
|
+
let localVarUseFormData = false;
|
|
3614
|
+
let localVarRequestOptions = {
|
|
3615
|
+
method: 'GET',
|
|
3616
|
+
qs: localVarQueryParameters,
|
|
3617
|
+
headers: localVarHeaderParams,
|
|
3618
|
+
uri: localVarPath,
|
|
3619
|
+
useQuerystring: this._useQuerystring,
|
|
3620
|
+
agentOptions: { keepAlive: false },
|
|
3621
|
+
json: true,
|
|
3622
|
+
};
|
|
3623
|
+
let authenticationPromise = Promise.resolve();
|
|
3624
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
3625
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
3626
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
3627
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
3628
|
+
return authenticationPromise.then(() => {
|
|
3629
|
+
if (Object.keys(localVarFormParams).length) {
|
|
3630
|
+
if (localVarUseFormData) {
|
|
3631
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
3632
|
+
}
|
|
3633
|
+
else {
|
|
3634
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
3635
|
+
}
|
|
3636
|
+
}
|
|
3637
|
+
return new Promise((resolve, reject) => {
|
|
3638
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
3639
|
+
if (error) {
|
|
3640
|
+
reject(error);
|
|
3641
|
+
}
|
|
3642
|
+
else {
|
|
3643
|
+
body = models_1.ObjectSerializer.deserialize(body, "GetOrganizationDataExportsResponse");
|
|
3644
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
3645
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
3646
|
+
reject(new Error(body.error || errString));
|
|
3647
|
+
}
|
|
3648
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
3649
|
+
resolve(body);
|
|
3650
|
+
}
|
|
3651
|
+
else {
|
|
3652
|
+
reject(errString);
|
|
3653
|
+
}
|
|
3654
|
+
}
|
|
3655
|
+
});
|
|
3656
|
+
});
|
|
3657
|
+
});
|
|
3658
|
+
}
|
|
3317
3659
|
/**
|
|
3318
3660
|
* White label admin only API to list all information about an organization.
|
|
3319
3661
|
* @summary White Label Admin - Get organization information
|
|
@@ -5070,6 +5412,97 @@ class OrganizationsApi {
|
|
|
5070
5412
|
});
|
|
5071
5413
|
});
|
|
5072
5414
|
}
|
|
5415
|
+
/**
|
|
5416
|
+
* Update a data export for an organization. This is an API only available to white label admins.
|
|
5417
|
+
* @summary White Label Admin - Update organization data export
|
|
5418
|
+
* @param organizationId Organization ID
|
|
5419
|
+
* @param innerOrganizationId Organization ID within the context of a white label
|
|
5420
|
+
* @param exportId Export ID
|
|
5421
|
+
* @param adminUpdateOrganizationDataExportRequest
|
|
5422
|
+
*/
|
|
5423
|
+
async whitelabelAdminUpdateOrganizationExport(organizationId, innerOrganizationId, exportId, adminUpdateOrganizationDataExportRequest, options = { headers: {} }) {
|
|
5424
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/exports/{exportId}'
|
|
5425
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
5426
|
+
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)))
|
|
5427
|
+
.replace('{' + 'exportId' + '}', encodeURIComponent(String(exportId)));
|
|
5428
|
+
let localVarQueryParameters = {};
|
|
5429
|
+
let localVarHeaderParams = Object.assign({
|
|
5430
|
+
'User-Agent': 'edgeimpulse-api nodejs'
|
|
5431
|
+
}, this.defaultHeaders);
|
|
5432
|
+
const produces = ['application/json'];
|
|
5433
|
+
// give precedence to 'application/json'
|
|
5434
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
5435
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
5436
|
+
}
|
|
5437
|
+
else {
|
|
5438
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
5439
|
+
}
|
|
5440
|
+
let localVarFormParams = {};
|
|
5441
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
5442
|
+
if (organizationId === null || organizationId === undefined) {
|
|
5443
|
+
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminUpdateOrganizationExport.');
|
|
5444
|
+
}
|
|
5445
|
+
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
5446
|
+
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
5447
|
+
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminUpdateOrganizationExport.');
|
|
5448
|
+
}
|
|
5449
|
+
// verify required parameter 'exportId' is not null or undefined
|
|
5450
|
+
if (exportId === null || exportId === undefined) {
|
|
5451
|
+
throw new Error('Required parameter exportId was null or undefined when calling whitelabelAdminUpdateOrganizationExport.');
|
|
5452
|
+
}
|
|
5453
|
+
// verify required parameter 'adminUpdateOrganizationDataExportRequest' is not null or undefined
|
|
5454
|
+
if (adminUpdateOrganizationDataExportRequest === null || adminUpdateOrganizationDataExportRequest === undefined) {
|
|
5455
|
+
throw new Error('Required parameter adminUpdateOrganizationDataExportRequest was null or undefined when calling whitelabelAdminUpdateOrganizationExport.');
|
|
5456
|
+
}
|
|
5457
|
+
Object.assign(localVarHeaderParams, options.headers);
|
|
5458
|
+
Object.assign(localVarHeaderParams, this.opts.extraHeaders);
|
|
5459
|
+
let localVarUseFormData = false;
|
|
5460
|
+
let localVarRequestOptions = {
|
|
5461
|
+
method: 'PUT',
|
|
5462
|
+
qs: localVarQueryParameters,
|
|
5463
|
+
headers: localVarHeaderParams,
|
|
5464
|
+
uri: localVarPath,
|
|
5465
|
+
useQuerystring: this._useQuerystring,
|
|
5466
|
+
agentOptions: { keepAlive: false },
|
|
5467
|
+
json: true,
|
|
5468
|
+
body: models_1.ObjectSerializer.serialize(adminUpdateOrganizationDataExportRequest, "AdminUpdateOrganizationDataExportRequest")
|
|
5469
|
+
};
|
|
5470
|
+
let authenticationPromise = Promise.resolve();
|
|
5471
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
|
|
5472
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
|
|
5473
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
|
|
5474
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
5475
|
+
return authenticationPromise.then(() => {
|
|
5476
|
+
if (Object.keys(localVarFormParams).length) {
|
|
5477
|
+
if (localVarUseFormData) {
|
|
5478
|
+
localVarRequestOptions.formData = localVarFormParams;
|
|
5479
|
+
}
|
|
5480
|
+
else {
|
|
5481
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
5482
|
+
}
|
|
5483
|
+
}
|
|
5484
|
+
return new Promise((resolve, reject) => {
|
|
5485
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
5486
|
+
if (error) {
|
|
5487
|
+
reject(error);
|
|
5488
|
+
}
|
|
5489
|
+
else {
|
|
5490
|
+
body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
|
|
5491
|
+
const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
|
|
5492
|
+
if (typeof body.success === 'boolean' && !body.success) {
|
|
5493
|
+
reject(new Error(body.error || errString));
|
|
5494
|
+
}
|
|
5495
|
+
else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
5496
|
+
resolve(body);
|
|
5497
|
+
}
|
|
5498
|
+
else {
|
|
5499
|
+
reject(errString);
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
});
|
|
5503
|
+
});
|
|
5504
|
+
});
|
|
5505
|
+
}
|
|
5073
5506
|
/**
|
|
5074
5507
|
* White label admin only API to update project properties.
|
|
5075
5508
|
* @summary White Label Admin - Update white label project
|