edge-impulse-api 1.95.13 → 1.95.15
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/sdk/api/organizationsApi.d.ts +0 -94
- package/build/library/sdk/api/organizationsApi.js +0 -492
- package/build/library/sdk/api/organizationsApi.js.map +1 -1
- package/build/library/sdk/model/modelPrediction.d.ts +6 -0
- package/build/library/sdk/model/models.d.ts +0 -2
- package/build/library/sdk/model/models.js +0 -2
- package/build/library/sdk/model/models.js.map +1 -1
- package/package.json +1 -1
- package/build/browser/edge-impulse-api.d.ts +0 -31915
- package/build/browser/edge-impulse-api.js +0 -72640
- package/build/browser/edge-impulse-api.js.map +0 -1
- package/build/library/sdk/model/adminAddOrganizationApiKeyRequest.d.ts +0 -18
- package/build/library/sdk/model/adminAddOrganizationApiKeyRequest.js +0 -6
- package/build/library/sdk/model/adminAddOrganizationApiKeyRequest.js.map +0 -1
- package/build/library/sdk/model/adminAddProjectApiKeyRequest.d.ts +0 -15
- package/build/library/sdk/model/adminAddProjectApiKeyRequest.js +0 -4
- package/build/library/sdk/model/adminAddProjectApiKeyRequest.js.map +0 -1
|
@@ -15,10 +15,6 @@ import type { Response as UndiciResponse } from 'undici-types';
|
|
|
15
15
|
import { AddApiKeyResponse } from '../model/addApiKeyResponse';
|
|
16
16
|
import { AddMemberRequest } from '../model/addMemberRequest';
|
|
17
17
|
import { AddOrganizationApiKeyRequest } from '../model/addOrganizationApiKeyRequest';
|
|
18
|
-
import { AdminAddOrganizationApiKeyRequest } from '../model/adminAddOrganizationApiKeyRequest';
|
|
19
|
-
import { AdminAddOrganizationUserRequest } from '../model/adminAddOrganizationUserRequest';
|
|
20
|
-
import { AdminAddProjectApiKeyRequest } from '../model/adminAddProjectApiKeyRequest';
|
|
21
|
-
import { AdminAddProjectUserRequest } from '../model/adminAddProjectUserRequest';
|
|
22
18
|
import { AdminCreateOrganizationDataExportRequest } from '../model/adminCreateOrganizationDataExportRequest';
|
|
23
19
|
import { AdminCreateProjectRequest } from '../model/adminCreateProjectRequest';
|
|
24
20
|
import { AdminGetMetricsResponse } from '../model/adminGetMetricsResponse';
|
|
@@ -591,66 +587,6 @@ export declare class OrganizationsApi {
|
|
|
591
587
|
[name: string]: string;
|
|
592
588
|
}) => void;
|
|
593
589
|
}): Promise<EntityCreatedResponse>;
|
|
594
|
-
/**
|
|
595
|
-
* White label admin only API to add an API key to an organization. Add a temporary API key that can be used to make Organizations API (/api/organizations/{organizationId}/) requests on behalf of the organization. These API keys are not visible to the organization itself and have a customizable TTL defaulting to 1 minute.
|
|
596
|
-
* @summary White Label Admin - Add organization API key
|
|
597
|
-
* @param organizationId Organization ID
|
|
598
|
-
* @param innerOrganizationId Organization ID within the context of a white label
|
|
599
|
-
* @param adminAddOrganizationApiKeyRequest
|
|
600
|
-
*/
|
|
601
|
-
whitelabelAdminAddOrganizationApiKey(organizationId: number, innerOrganizationId: number, adminAddOrganizationApiKeyRequest: AdminAddOrganizationApiKeyRequest, options?: {
|
|
602
|
-
headers: {
|
|
603
|
-
[name: string]: string;
|
|
604
|
-
};
|
|
605
|
-
responseHeadersCallback?: (headers: {
|
|
606
|
-
[name: string]: string;
|
|
607
|
-
}) => void;
|
|
608
|
-
}): Promise<AddApiKeyResponse>;
|
|
609
|
-
/**
|
|
610
|
-
* White label admin only API to add an API key to a project. Add a temporary API key that can be used to make Projects API (/api/projects/{projectId}/) requests on behalf of the project admin. These API keys are not visible to the project itself and have a customizable TTL defaulting to 1 minute.
|
|
611
|
-
* @summary White Label Admin - Add Project API key
|
|
612
|
-
* @param organizationId Organization ID
|
|
613
|
-
* @param projectId Project ID
|
|
614
|
-
* @param adminAddProjectApiKeyRequest
|
|
615
|
-
*/
|
|
616
|
-
whitelabelAdminAddProjectApiKey(organizationId: number, projectId: number, adminAddProjectApiKeyRequest: AdminAddProjectApiKeyRequest, options?: {
|
|
617
|
-
headers: {
|
|
618
|
-
[name: string]: string;
|
|
619
|
-
};
|
|
620
|
-
responseHeadersCallback?: (headers: {
|
|
621
|
-
[name: string]: string;
|
|
622
|
-
}) => void;
|
|
623
|
-
}): Promise<AddApiKeyResponse>;
|
|
624
|
-
/**
|
|
625
|
-
* DEPRECATED. White label admin only API to add a user to an organization. If no user is provided, the current user is used.
|
|
626
|
-
* @summary White Label Admin - Add user to an organization
|
|
627
|
-
* @param organizationId Organization ID
|
|
628
|
-
* @param innerOrganizationId Organization ID within the context of a white label
|
|
629
|
-
* @param adminAddOrganizationUserRequest
|
|
630
|
-
*/
|
|
631
|
-
whitelabelAdminAddUserToOrganization(organizationId: number, innerOrganizationId: number, adminAddOrganizationUserRequest: AdminAddOrganizationUserRequest, options?: {
|
|
632
|
-
headers: {
|
|
633
|
-
[name: string]: string;
|
|
634
|
-
};
|
|
635
|
-
responseHeadersCallback?: (headers: {
|
|
636
|
-
[name: string]: string;
|
|
637
|
-
}) => void;
|
|
638
|
-
}): Promise<GenericApiResponse>;
|
|
639
|
-
/**
|
|
640
|
-
* DEPRECATED. White label admin only API to add a user to a project. If no user is provided, the current user is used.
|
|
641
|
-
* @summary White Label Admin - Add user to a project
|
|
642
|
-
* @param organizationId Organization ID
|
|
643
|
-
* @param projectId Project ID
|
|
644
|
-
* @param adminAddProjectUserRequest
|
|
645
|
-
*/
|
|
646
|
-
whitelabelAdminAddUserToProject(organizationId: number, projectId: number, adminAddProjectUserRequest: AdminAddProjectUserRequest, options?: {
|
|
647
|
-
headers: {
|
|
648
|
-
[name: string]: string;
|
|
649
|
-
};
|
|
650
|
-
responseHeadersCallback?: (headers: {
|
|
651
|
-
[name: string]: string;
|
|
652
|
-
}) => void;
|
|
653
|
-
}): Promise<GenericApiResponse>;
|
|
654
590
|
/**
|
|
655
591
|
* Create a new organization. This is an API only available to white label admins
|
|
656
592
|
* @summary White Label Admin - Create new organization within white label context
|
|
@@ -1095,36 +1031,6 @@ export declare class OrganizationsApi {
|
|
|
1095
1031
|
[name: string]: string;
|
|
1096
1032
|
}) => void;
|
|
1097
1033
|
}): Promise<GenericApiResponse>;
|
|
1098
|
-
/**
|
|
1099
|
-
* DEPRECATED. White label admin only API to remove a user from an organization.
|
|
1100
|
-
* @summary White Label Admin - Remove user from an organization
|
|
1101
|
-
* @param organizationId Organization ID
|
|
1102
|
-
* @param innerOrganizationId Organization ID within the context of a white label
|
|
1103
|
-
* @param userId User ID
|
|
1104
|
-
*/
|
|
1105
|
-
whitelabelAdminRemoveUserFromOrganization(organizationId: number, innerOrganizationId: number, userId: number, options?: {
|
|
1106
|
-
headers: {
|
|
1107
|
-
[name: string]: string;
|
|
1108
|
-
};
|
|
1109
|
-
responseHeadersCallback?: (headers: {
|
|
1110
|
-
[name: string]: string;
|
|
1111
|
-
}) => void;
|
|
1112
|
-
}): Promise<GenericApiResponse>;
|
|
1113
|
-
/**
|
|
1114
|
-
* DEPRECATED. White label admin only API to remove a user from a project.
|
|
1115
|
-
* @summary White Label Admin - Remove user from a project
|
|
1116
|
-
* @param organizationId Organization ID
|
|
1117
|
-
* @param projectId Project ID
|
|
1118
|
-
* @param userId User ID
|
|
1119
|
-
*/
|
|
1120
|
-
whitelabelAdminRemoveUserFromProject(organizationId: number, projectId: number, userId: number, options?: {
|
|
1121
|
-
headers: {
|
|
1122
|
-
[name: string]: string;
|
|
1123
|
-
};
|
|
1124
|
-
responseHeadersCallback?: (headers: {
|
|
1125
|
-
[name: string]: string;
|
|
1126
|
-
}) => void;
|
|
1127
|
-
}): Promise<GenericApiResponse>;
|
|
1128
1034
|
/**
|
|
1129
1035
|
* White label admin only API to restore a deleted organization. All organization projects sharing the same deletion date as that of the organization will also be restored. If this is a trial organization that was never upgraded to a paid plan then the organization will be restored to its original trial state.
|
|
1130
1036
|
* @summary White Label Admin - Restore an organization
|
|
@@ -2275,334 +2275,6 @@ class OrganizationsApi {
|
|
|
2275
2275
|
}
|
|
2276
2276
|
return resp;
|
|
2277
2277
|
}
|
|
2278
|
-
/**
|
|
2279
|
-
* White label admin only API to add an API key to an organization. Add a temporary API key that can be used to make Organizations API (/api/organizations/{organizationId}/) requests on behalf of the organization. These API keys are not visible to the organization itself and have a customizable TTL defaulting to 1 minute.
|
|
2280
|
-
* @summary White Label Admin - Add organization API key
|
|
2281
|
-
* @param organizationId Organization ID
|
|
2282
|
-
* @param innerOrganizationId Organization ID within the context of a white label
|
|
2283
|
-
* @param adminAddOrganizationApiKeyRequest
|
|
2284
|
-
*/
|
|
2285
|
-
async whitelabelAdminAddOrganizationApiKey(organizationId, innerOrganizationId, adminAddOrganizationApiKeyRequest, options = { headers: {} }) {
|
|
2286
|
-
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/apiKeys'
|
|
2287
|
-
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2288
|
-
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
|
|
2289
|
-
let queryParameters = {};
|
|
2290
|
-
let localVarHeaderParams = {
|
|
2291
|
-
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2292
|
-
'Content-Type': 'application/json',
|
|
2293
|
-
...this.defaultHeaders,
|
|
2294
|
-
};
|
|
2295
|
-
const produces = ['application/json'];
|
|
2296
|
-
// give precedence to 'application/json'
|
|
2297
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2298
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2299
|
-
}
|
|
2300
|
-
else {
|
|
2301
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2302
|
-
}
|
|
2303
|
-
let localVarFormParams;
|
|
2304
|
-
// verify required parameter 'organizationId' is not null or undefined
|
|
2305
|
-
if (organizationId === null || organizationId === undefined) {
|
|
2306
|
-
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddOrganizationApiKey.');
|
|
2307
|
-
}
|
|
2308
|
-
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
2309
|
-
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
2310
|
-
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminAddOrganizationApiKey.');
|
|
2311
|
-
}
|
|
2312
|
-
// verify required parameter 'adminAddOrganizationApiKeyRequest' is not null or undefined
|
|
2313
|
-
if (adminAddOrganizationApiKeyRequest === null || adminAddOrganizationApiKeyRequest === undefined) {
|
|
2314
|
-
throw new Error('Required parameter adminAddOrganizationApiKeyRequest was null or undefined when calling whitelabelAdminAddOrganizationApiKey.');
|
|
2315
|
-
}
|
|
2316
|
-
localVarHeaderParams = {
|
|
2317
|
-
...localVarHeaderParams,
|
|
2318
|
-
...options.headers,
|
|
2319
|
-
...this.opts.extraHeaders,
|
|
2320
|
-
};
|
|
2321
|
-
const queryString = Object.entries(queryParameters)
|
|
2322
|
-
.filter(([, value]) => value !== undefined)
|
|
2323
|
-
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2324
|
-
.join('&');
|
|
2325
|
-
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2326
|
-
let localVarRequestOptions = {
|
|
2327
|
-
method: 'POST',
|
|
2328
|
-
headers: { ...localVarHeaderParams },
|
|
2329
|
-
};
|
|
2330
|
-
localVarRequestOptions.body = JSON.stringify(adminAddOrganizationApiKeyRequest);
|
|
2331
|
-
let requestOptions = localVarRequestOptions;
|
|
2332
|
-
let url = localVarUrl;
|
|
2333
|
-
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2334
|
-
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2335
|
-
url = auth_ApiKeyAuthentication.url;
|
|
2336
|
-
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2337
|
-
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2338
|
-
url = auth_JWTAuthentication.url;
|
|
2339
|
-
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2340
|
-
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2341
|
-
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2342
|
-
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2343
|
-
requestOptions = auth_OAuth2.requestOptions;
|
|
2344
|
-
url = auth_OAuth2.url;
|
|
2345
|
-
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2346
|
-
requestOptions = authDefault.requestOptions;
|
|
2347
|
-
url = authDefault.url;
|
|
2348
|
-
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
2349
|
-
const response = await fetch(url, requestOptions);
|
|
2350
|
-
const resp = this.handleResponse(response, 'AddApiKeyResponse');
|
|
2351
|
-
if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
|
|
2352
|
-
const headerCb = options.responseHeadersCallback;
|
|
2353
|
-
// on next tick, so we have time to handle the response
|
|
2354
|
-
setTimeout(() => {
|
|
2355
|
-
headerCb(Object.fromEntries(response.headers.entries()));
|
|
2356
|
-
}, 0);
|
|
2357
|
-
}
|
|
2358
|
-
return resp;
|
|
2359
|
-
}
|
|
2360
|
-
/**
|
|
2361
|
-
* White label admin only API to add an API key to a project. Add a temporary API key that can be used to make Projects API (/api/projects/{projectId}/) requests on behalf of the project admin. These API keys are not visible to the project itself and have a customizable TTL defaulting to 1 minute.
|
|
2362
|
-
* @summary White Label Admin - Add Project API key
|
|
2363
|
-
* @param organizationId Organization ID
|
|
2364
|
-
* @param projectId Project ID
|
|
2365
|
-
* @param adminAddProjectApiKeyRequest
|
|
2366
|
-
*/
|
|
2367
|
-
async whitelabelAdminAddProjectApiKey(organizationId, projectId, adminAddProjectApiKeyRequest, options = { headers: {} }) {
|
|
2368
|
-
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}/apiKeys'
|
|
2369
|
-
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2370
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
2371
|
-
let queryParameters = {};
|
|
2372
|
-
let localVarHeaderParams = {
|
|
2373
|
-
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2374
|
-
'Content-Type': 'application/json',
|
|
2375
|
-
...this.defaultHeaders,
|
|
2376
|
-
};
|
|
2377
|
-
const produces = ['application/json'];
|
|
2378
|
-
// give precedence to 'application/json'
|
|
2379
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2380
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2381
|
-
}
|
|
2382
|
-
else {
|
|
2383
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2384
|
-
}
|
|
2385
|
-
let localVarFormParams;
|
|
2386
|
-
// verify required parameter 'organizationId' is not null or undefined
|
|
2387
|
-
if (organizationId === null || organizationId === undefined) {
|
|
2388
|
-
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddProjectApiKey.');
|
|
2389
|
-
}
|
|
2390
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
2391
|
-
if (projectId === null || projectId === undefined) {
|
|
2392
|
-
throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminAddProjectApiKey.');
|
|
2393
|
-
}
|
|
2394
|
-
// verify required parameter 'adminAddProjectApiKeyRequest' is not null or undefined
|
|
2395
|
-
if (adminAddProjectApiKeyRequest === null || adminAddProjectApiKeyRequest === undefined) {
|
|
2396
|
-
throw new Error('Required parameter adminAddProjectApiKeyRequest was null or undefined when calling whitelabelAdminAddProjectApiKey.');
|
|
2397
|
-
}
|
|
2398
|
-
localVarHeaderParams = {
|
|
2399
|
-
...localVarHeaderParams,
|
|
2400
|
-
...options.headers,
|
|
2401
|
-
...this.opts.extraHeaders,
|
|
2402
|
-
};
|
|
2403
|
-
const queryString = Object.entries(queryParameters)
|
|
2404
|
-
.filter(([, value]) => value !== undefined)
|
|
2405
|
-
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2406
|
-
.join('&');
|
|
2407
|
-
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2408
|
-
let localVarRequestOptions = {
|
|
2409
|
-
method: 'POST',
|
|
2410
|
-
headers: { ...localVarHeaderParams },
|
|
2411
|
-
};
|
|
2412
|
-
localVarRequestOptions.body = JSON.stringify(adminAddProjectApiKeyRequest);
|
|
2413
|
-
let requestOptions = localVarRequestOptions;
|
|
2414
|
-
let url = localVarUrl;
|
|
2415
|
-
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2416
|
-
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2417
|
-
url = auth_ApiKeyAuthentication.url;
|
|
2418
|
-
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2419
|
-
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2420
|
-
url = auth_JWTAuthentication.url;
|
|
2421
|
-
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2422
|
-
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2423
|
-
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2424
|
-
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2425
|
-
requestOptions = auth_OAuth2.requestOptions;
|
|
2426
|
-
url = auth_OAuth2.url;
|
|
2427
|
-
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2428
|
-
requestOptions = authDefault.requestOptions;
|
|
2429
|
-
url = authDefault.url;
|
|
2430
|
-
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
2431
|
-
const response = await fetch(url, requestOptions);
|
|
2432
|
-
const resp = this.handleResponse(response, 'AddApiKeyResponse');
|
|
2433
|
-
if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
|
|
2434
|
-
const headerCb = options.responseHeadersCallback;
|
|
2435
|
-
// on next tick, so we have time to handle the response
|
|
2436
|
-
setTimeout(() => {
|
|
2437
|
-
headerCb(Object.fromEntries(response.headers.entries()));
|
|
2438
|
-
}, 0);
|
|
2439
|
-
}
|
|
2440
|
-
return resp;
|
|
2441
|
-
}
|
|
2442
|
-
/**
|
|
2443
|
-
* DEPRECATED. White label admin only API to add a user to an organization. If no user is provided, the current user is used.
|
|
2444
|
-
* @summary White Label Admin - Add user to an organization
|
|
2445
|
-
* @param organizationId Organization ID
|
|
2446
|
-
* @param innerOrganizationId Organization ID within the context of a white label
|
|
2447
|
-
* @param adminAddOrganizationUserRequest
|
|
2448
|
-
*/
|
|
2449
|
-
async whitelabelAdminAddUserToOrganization(organizationId, innerOrganizationId, adminAddOrganizationUserRequest, options = { headers: {} }) {
|
|
2450
|
-
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members'
|
|
2451
|
-
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2452
|
-
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)));
|
|
2453
|
-
let queryParameters = {};
|
|
2454
|
-
let localVarHeaderParams = {
|
|
2455
|
-
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2456
|
-
'Content-Type': 'application/json',
|
|
2457
|
-
...this.defaultHeaders,
|
|
2458
|
-
};
|
|
2459
|
-
const produces = ['application/json'];
|
|
2460
|
-
// give precedence to 'application/json'
|
|
2461
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2462
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2463
|
-
}
|
|
2464
|
-
else {
|
|
2465
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2466
|
-
}
|
|
2467
|
-
let localVarFormParams;
|
|
2468
|
-
// verify required parameter 'organizationId' is not null or undefined
|
|
2469
|
-
if (organizationId === null || organizationId === undefined) {
|
|
2470
|
-
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddUserToOrganization.');
|
|
2471
|
-
}
|
|
2472
|
-
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
2473
|
-
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
2474
|
-
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminAddUserToOrganization.');
|
|
2475
|
-
}
|
|
2476
|
-
// verify required parameter 'adminAddOrganizationUserRequest' is not null or undefined
|
|
2477
|
-
if (adminAddOrganizationUserRequest === null || adminAddOrganizationUserRequest === undefined) {
|
|
2478
|
-
throw new Error('Required parameter adminAddOrganizationUserRequest was null or undefined when calling whitelabelAdminAddUserToOrganization.');
|
|
2479
|
-
}
|
|
2480
|
-
localVarHeaderParams = {
|
|
2481
|
-
...localVarHeaderParams,
|
|
2482
|
-
...options.headers,
|
|
2483
|
-
...this.opts.extraHeaders,
|
|
2484
|
-
};
|
|
2485
|
-
const queryString = Object.entries(queryParameters)
|
|
2486
|
-
.filter(([, value]) => value !== undefined)
|
|
2487
|
-
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2488
|
-
.join('&');
|
|
2489
|
-
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2490
|
-
let localVarRequestOptions = {
|
|
2491
|
-
method: 'POST',
|
|
2492
|
-
headers: { ...localVarHeaderParams },
|
|
2493
|
-
};
|
|
2494
|
-
localVarRequestOptions.body = JSON.stringify(adminAddOrganizationUserRequest);
|
|
2495
|
-
let requestOptions = localVarRequestOptions;
|
|
2496
|
-
let url = localVarUrl;
|
|
2497
|
-
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2498
|
-
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2499
|
-
url = auth_ApiKeyAuthentication.url;
|
|
2500
|
-
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2501
|
-
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2502
|
-
url = auth_JWTAuthentication.url;
|
|
2503
|
-
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2504
|
-
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2505
|
-
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2506
|
-
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2507
|
-
requestOptions = auth_OAuth2.requestOptions;
|
|
2508
|
-
url = auth_OAuth2.url;
|
|
2509
|
-
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2510
|
-
requestOptions = authDefault.requestOptions;
|
|
2511
|
-
url = authDefault.url;
|
|
2512
|
-
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
2513
|
-
const response = await fetch(url, requestOptions);
|
|
2514
|
-
const resp = this.handleResponse(response, 'GenericApiResponse');
|
|
2515
|
-
if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
|
|
2516
|
-
const headerCb = options.responseHeadersCallback;
|
|
2517
|
-
// on next tick, so we have time to handle the response
|
|
2518
|
-
setTimeout(() => {
|
|
2519
|
-
headerCb(Object.fromEntries(response.headers.entries()));
|
|
2520
|
-
}, 0);
|
|
2521
|
-
}
|
|
2522
|
-
return resp;
|
|
2523
|
-
}
|
|
2524
|
-
/**
|
|
2525
|
-
* DEPRECATED. White label admin only API to add a user to a project. If no user is provided, the current user is used.
|
|
2526
|
-
* @summary White Label Admin - Add user to a project
|
|
2527
|
-
* @param organizationId Organization ID
|
|
2528
|
-
* @param projectId Project ID
|
|
2529
|
-
* @param adminAddProjectUserRequest
|
|
2530
|
-
*/
|
|
2531
|
-
async whitelabelAdminAddUserToProject(organizationId, projectId, adminAddProjectUserRequest, options = { headers: {} }) {
|
|
2532
|
-
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}/members'
|
|
2533
|
-
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2534
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
|
|
2535
|
-
let queryParameters = {};
|
|
2536
|
-
let localVarHeaderParams = {
|
|
2537
|
-
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2538
|
-
'Content-Type': 'application/json',
|
|
2539
|
-
...this.defaultHeaders,
|
|
2540
|
-
};
|
|
2541
|
-
const produces = ['application/json'];
|
|
2542
|
-
// give precedence to 'application/json'
|
|
2543
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2544
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2545
|
-
}
|
|
2546
|
-
else {
|
|
2547
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
2548
|
-
}
|
|
2549
|
-
let localVarFormParams;
|
|
2550
|
-
// verify required parameter 'organizationId' is not null or undefined
|
|
2551
|
-
if (organizationId === null || organizationId === undefined) {
|
|
2552
|
-
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminAddUserToProject.');
|
|
2553
|
-
}
|
|
2554
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
2555
|
-
if (projectId === null || projectId === undefined) {
|
|
2556
|
-
throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminAddUserToProject.');
|
|
2557
|
-
}
|
|
2558
|
-
// verify required parameter 'adminAddProjectUserRequest' is not null or undefined
|
|
2559
|
-
if (adminAddProjectUserRequest === null || adminAddProjectUserRequest === undefined) {
|
|
2560
|
-
throw new Error('Required parameter adminAddProjectUserRequest was null or undefined when calling whitelabelAdminAddUserToProject.');
|
|
2561
|
-
}
|
|
2562
|
-
localVarHeaderParams = {
|
|
2563
|
-
...localVarHeaderParams,
|
|
2564
|
-
...options.headers,
|
|
2565
|
-
...this.opts.extraHeaders,
|
|
2566
|
-
};
|
|
2567
|
-
const queryString = Object.entries(queryParameters)
|
|
2568
|
-
.filter(([, value]) => value !== undefined)
|
|
2569
|
-
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2570
|
-
.join('&');
|
|
2571
|
-
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2572
|
-
let localVarRequestOptions = {
|
|
2573
|
-
method: 'POST',
|
|
2574
|
-
headers: { ...localVarHeaderParams },
|
|
2575
|
-
};
|
|
2576
|
-
localVarRequestOptions.body = JSON.stringify(adminAddProjectUserRequest);
|
|
2577
|
-
let requestOptions = localVarRequestOptions;
|
|
2578
|
-
let url = localVarUrl;
|
|
2579
|
-
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2580
|
-
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2581
|
-
url = auth_ApiKeyAuthentication.url;
|
|
2582
|
-
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2583
|
-
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2584
|
-
url = auth_JWTAuthentication.url;
|
|
2585
|
-
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2586
|
-
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2587
|
-
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2588
|
-
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2589
|
-
requestOptions = auth_OAuth2.requestOptions;
|
|
2590
|
-
url = auth_OAuth2.url;
|
|
2591
|
-
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2592
|
-
requestOptions = authDefault.requestOptions;
|
|
2593
|
-
url = authDefault.url;
|
|
2594
|
-
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
2595
|
-
const response = await fetch(url, requestOptions);
|
|
2596
|
-
const resp = this.handleResponse(response, 'GenericApiResponse');
|
|
2597
|
-
if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
|
|
2598
|
-
const headerCb = options.responseHeadersCallback;
|
|
2599
|
-
// on next tick, so we have time to handle the response
|
|
2600
|
-
setTimeout(() => {
|
|
2601
|
-
headerCb(Object.fromEntries(response.headers.entries()));
|
|
2602
|
-
}, 0);
|
|
2603
|
-
}
|
|
2604
|
-
return resp;
|
|
2605
|
-
}
|
|
2606
2278
|
/**
|
|
2607
2279
|
* Create a new organization. This is an API only available to white label admins
|
|
2608
2280
|
* @summary White Label Admin - Create new organization within white label context
|
|
@@ -4971,170 +4643,6 @@ class OrganizationsApi {
|
|
|
4971
4643
|
}
|
|
4972
4644
|
return resp;
|
|
4973
4645
|
}
|
|
4974
|
-
/**
|
|
4975
|
-
* DEPRECATED. White label admin only API to remove a user from an organization.
|
|
4976
|
-
* @summary White Label Admin - Remove user from an organization
|
|
4977
|
-
* @param organizationId Organization ID
|
|
4978
|
-
* @param innerOrganizationId Organization ID within the context of a white label
|
|
4979
|
-
* @param userId User ID
|
|
4980
|
-
*/
|
|
4981
|
-
async whitelabelAdminRemoveUserFromOrganization(organizationId, innerOrganizationId, userId, options = { headers: {} }) {
|
|
4982
|
-
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/organizations/{innerOrganizationId}/members/{userId}'
|
|
4983
|
-
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
4984
|
-
.replace('{' + 'innerOrganizationId' + '}', encodeURIComponent(String(innerOrganizationId)))
|
|
4985
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
4986
|
-
let queryParameters = {};
|
|
4987
|
-
let localVarHeaderParams = {
|
|
4988
|
-
'User-Agent': 'edgeimpulse-api nodejs',
|
|
4989
|
-
'Content-Type': 'application/json',
|
|
4990
|
-
...this.defaultHeaders,
|
|
4991
|
-
};
|
|
4992
|
-
const produces = ['application/json'];
|
|
4993
|
-
// give precedence to 'application/json'
|
|
4994
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
4995
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
4996
|
-
}
|
|
4997
|
-
else {
|
|
4998
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
4999
|
-
}
|
|
5000
|
-
let localVarFormParams;
|
|
5001
|
-
// verify required parameter 'organizationId' is not null or undefined
|
|
5002
|
-
if (organizationId === null || organizationId === undefined) {
|
|
5003
|
-
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminRemoveUserFromOrganization.');
|
|
5004
|
-
}
|
|
5005
|
-
// verify required parameter 'innerOrganizationId' is not null or undefined
|
|
5006
|
-
if (innerOrganizationId === null || innerOrganizationId === undefined) {
|
|
5007
|
-
throw new Error('Required parameter innerOrganizationId was null or undefined when calling whitelabelAdminRemoveUserFromOrganization.');
|
|
5008
|
-
}
|
|
5009
|
-
// verify required parameter 'userId' is not null or undefined
|
|
5010
|
-
if (userId === null || userId === undefined) {
|
|
5011
|
-
throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminRemoveUserFromOrganization.');
|
|
5012
|
-
}
|
|
5013
|
-
localVarHeaderParams = {
|
|
5014
|
-
...localVarHeaderParams,
|
|
5015
|
-
...options.headers,
|
|
5016
|
-
...this.opts.extraHeaders,
|
|
5017
|
-
};
|
|
5018
|
-
const queryString = Object.entries(queryParameters)
|
|
5019
|
-
.filter(([, value]) => value !== undefined)
|
|
5020
|
-
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
5021
|
-
.join('&');
|
|
5022
|
-
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
5023
|
-
let localVarRequestOptions = {
|
|
5024
|
-
method: 'DELETE',
|
|
5025
|
-
headers: { ...localVarHeaderParams },
|
|
5026
|
-
};
|
|
5027
|
-
let requestOptions = localVarRequestOptions;
|
|
5028
|
-
let url = localVarUrl;
|
|
5029
|
-
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
5030
|
-
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
5031
|
-
url = auth_ApiKeyAuthentication.url;
|
|
5032
|
-
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
5033
|
-
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
5034
|
-
url = auth_JWTAuthentication.url;
|
|
5035
|
-
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
5036
|
-
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
5037
|
-
url = auth_JWTHttpHeaderAuthentication.url;
|
|
5038
|
-
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
5039
|
-
requestOptions = auth_OAuth2.requestOptions;
|
|
5040
|
-
url = auth_OAuth2.url;
|
|
5041
|
-
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
5042
|
-
requestOptions = authDefault.requestOptions;
|
|
5043
|
-
url = authDefault.url;
|
|
5044
|
-
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
5045
|
-
const response = await fetch(url, requestOptions);
|
|
5046
|
-
const resp = this.handleResponse(response, 'GenericApiResponse');
|
|
5047
|
-
if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
|
|
5048
|
-
const headerCb = options.responseHeadersCallback;
|
|
5049
|
-
// on next tick, so we have time to handle the response
|
|
5050
|
-
setTimeout(() => {
|
|
5051
|
-
headerCb(Object.fromEntries(response.headers.entries()));
|
|
5052
|
-
}, 0);
|
|
5053
|
-
}
|
|
5054
|
-
return resp;
|
|
5055
|
-
}
|
|
5056
|
-
/**
|
|
5057
|
-
* DEPRECATED. White label admin only API to remove a user from a project.
|
|
5058
|
-
* @summary White Label Admin - Remove user from a project
|
|
5059
|
-
* @param organizationId Organization ID
|
|
5060
|
-
* @param projectId Project ID
|
|
5061
|
-
* @param userId User ID
|
|
5062
|
-
*/
|
|
5063
|
-
async whitelabelAdminRemoveUserFromProject(organizationId, projectId, userId, options = { headers: {} }) {
|
|
5064
|
-
const localVarPath = this.basePath + '/api/organizations/{organizationId}/whitelabel/projects/{projectId}/members/{userId}'
|
|
5065
|
-
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
5066
|
-
.replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
|
|
5067
|
-
.replace('{' + 'userId' + '}', encodeURIComponent(String(userId)));
|
|
5068
|
-
let queryParameters = {};
|
|
5069
|
-
let localVarHeaderParams = {
|
|
5070
|
-
'User-Agent': 'edgeimpulse-api nodejs',
|
|
5071
|
-
'Content-Type': 'application/json',
|
|
5072
|
-
...this.defaultHeaders,
|
|
5073
|
-
};
|
|
5074
|
-
const produces = ['application/json'];
|
|
5075
|
-
// give precedence to 'application/json'
|
|
5076
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
5077
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
5078
|
-
}
|
|
5079
|
-
else {
|
|
5080
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
5081
|
-
}
|
|
5082
|
-
let localVarFormParams;
|
|
5083
|
-
// verify required parameter 'organizationId' is not null or undefined
|
|
5084
|
-
if (organizationId === null || organizationId === undefined) {
|
|
5085
|
-
throw new Error('Required parameter organizationId was null or undefined when calling whitelabelAdminRemoveUserFromProject.');
|
|
5086
|
-
}
|
|
5087
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
5088
|
-
if (projectId === null || projectId === undefined) {
|
|
5089
|
-
throw new Error('Required parameter projectId was null or undefined when calling whitelabelAdminRemoveUserFromProject.');
|
|
5090
|
-
}
|
|
5091
|
-
// verify required parameter 'userId' is not null or undefined
|
|
5092
|
-
if (userId === null || userId === undefined) {
|
|
5093
|
-
throw new Error('Required parameter userId was null or undefined when calling whitelabelAdminRemoveUserFromProject.');
|
|
5094
|
-
}
|
|
5095
|
-
localVarHeaderParams = {
|
|
5096
|
-
...localVarHeaderParams,
|
|
5097
|
-
...options.headers,
|
|
5098
|
-
...this.opts.extraHeaders,
|
|
5099
|
-
};
|
|
5100
|
-
const queryString = Object.entries(queryParameters)
|
|
5101
|
-
.filter(([, value]) => value !== undefined)
|
|
5102
|
-
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
5103
|
-
.join('&');
|
|
5104
|
-
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
5105
|
-
let localVarRequestOptions = {
|
|
5106
|
-
method: 'DELETE',
|
|
5107
|
-
headers: { ...localVarHeaderParams },
|
|
5108
|
-
};
|
|
5109
|
-
let requestOptions = localVarRequestOptions;
|
|
5110
|
-
let url = localVarUrl;
|
|
5111
|
-
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
5112
|
-
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
5113
|
-
url = auth_ApiKeyAuthentication.url;
|
|
5114
|
-
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
5115
|
-
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
5116
|
-
url = auth_JWTAuthentication.url;
|
|
5117
|
-
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
5118
|
-
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
5119
|
-
url = auth_JWTHttpHeaderAuthentication.url;
|
|
5120
|
-
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
5121
|
-
requestOptions = auth_OAuth2.requestOptions;
|
|
5122
|
-
url = auth_OAuth2.url;
|
|
5123
|
-
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
5124
|
-
requestOptions = authDefault.requestOptions;
|
|
5125
|
-
url = authDefault.url;
|
|
5126
|
-
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
5127
|
-
const response = await fetch(url, requestOptions);
|
|
5128
|
-
const resp = this.handleResponse(response, 'GenericApiResponse');
|
|
5129
|
-
if (options === null || options === void 0 ? void 0 : options.responseHeadersCallback) {
|
|
5130
|
-
const headerCb = options.responseHeadersCallback;
|
|
5131
|
-
// on next tick, so we have time to handle the response
|
|
5132
|
-
setTimeout(() => {
|
|
5133
|
-
headerCb(Object.fromEntries(response.headers.entries()));
|
|
5134
|
-
}, 0);
|
|
5135
|
-
}
|
|
5136
|
-
return resp;
|
|
5137
|
-
}
|
|
5138
4646
|
/**
|
|
5139
4647
|
* White label admin only API to restore a deleted organization. All organization projects sharing the same deletion date as that of the organization will also be restored. If this is a trial organization that was never upgraded to a paid plan then the organization will be restored to its original trial state.
|
|
5140
4648
|
* @summary White Label Admin - Restore an organization
|