edge-impulse-api 1.93.20 → 1.93.22
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/browser/edge-impulse-api.d.ts +471 -3
- package/build/browser/edge-impulse-api.js +1449 -497
- package/build/browser/edge-impulse-api.js.map +1 -1
- package/build/library/sdk/api/organizationBlocksApi.d.ts +114 -0
- package/build/library/sdk/api/organizationBlocksApi.js +514 -0
- package/build/library/sdk/api/organizationBlocksApi.js.map +1 -1
- package/build/library/sdk/api/projectsApi.d.ts +56 -0
- package/build/library/sdk/api/projectsApi.js +316 -0
- package/build/library/sdk/api/projectsApi.js.map +1 -1
- package/build/library/sdk/model/actorProjectApiKey.d.ts +2 -0
- package/build/library/sdk/model/actorProjectApiKey.js.map +1 -1
- package/build/library/sdk/model/addOrganizationExtensionBlockRequest.d.ts +59 -0
- package/build/library/sdk/model/addOrganizationExtensionBlockRequest.js +6 -0
- package/build/library/sdk/model/addOrganizationExtensionBlockRequest.js.map +1 -0
- package/build/library/sdk/model/addProjectActiveExtensionRequest.d.ts +3 -0
- package/build/library/sdk/model/addProjectActiveExtensionRequest.js +4 -0
- package/build/library/sdk/model/addProjectActiveExtensionRequest.js.map +1 -0
- package/build/library/sdk/model/addProjectApiKeyRequest.d.ts +6 -3
- package/build/library/sdk/model/addProjectApiKeyRequest.js +0 -2
- package/build/library/sdk/model/addProjectApiKeyRequest.js.map +1 -1
- package/build/library/sdk/model/apiKeyExtension.d.ts +4 -0
- package/build/library/sdk/model/apiKeyExtension.js +4 -0
- package/build/library/sdk/model/apiKeyExtension.js.map +1 -0
- package/build/library/sdk/model/extension.d.ts +35 -0
- package/build/library/sdk/model/extension.js +6 -0
- package/build/library/sdk/model/extension.js.map +1 -0
- package/build/library/sdk/model/extensionVisibility.d.ts +7 -0
- package/build/library/sdk/model/extensionVisibility.js +6 -0
- package/build/library/sdk/model/extensionVisibility.js.map +1 -0
- package/build/library/sdk/model/getCurrentApiKeyInfoResponse.d.ts +14 -0
- package/build/library/sdk/model/getCurrentApiKeyInfoResponse.js +4 -0
- package/build/library/sdk/model/getCurrentApiKeyInfoResponse.js.map +1 -0
- package/build/library/sdk/model/getOrganizationExtensionBlockResponse.d.ts +12 -0
- package/build/library/sdk/model/getOrganizationExtensionBlockResponse.js +4 -0
- package/build/library/sdk/model/getOrganizationExtensionBlockResponse.js.map +1 -0
- package/build/library/sdk/model/getProjectActiveExtensionsResponse.d.ts +12 -0
- package/build/library/sdk/model/getProjectActiveExtensionsResponse.js +4 -0
- package/build/library/sdk/model/getProjectActiveExtensionsResponse.js.map +1 -0
- package/build/library/sdk/model/listOrganizationExtensionBlocksResponse.d.ts +12 -0
- package/build/library/sdk/model/listOrganizationExtensionBlocksResponse.js +4 -0
- package/build/library/sdk/model/listOrganizationExtensionBlocksResponse.js.map +1 -0
- package/build/library/sdk/model/listProjectAvailableExtensionsResponse.d.ts +16 -0
- package/build/library/sdk/model/listProjectAvailableExtensionsResponse.js +4 -0
- package/build/library/sdk/model/listProjectAvailableExtensionsResponse.js.map +1 -0
- package/build/library/sdk/model/models.d.ts +14 -0
- package/build/library/sdk/model/models.js +14 -0
- package/build/library/sdk/model/models.js.map +1 -1
- package/build/library/sdk/model/projectApiKey.d.ts +2 -0
- package/build/library/sdk/model/projectApiKey.js.map +1 -1
- package/build/library/sdk/model/projectApiKeyRole.d.ts +2 -0
- package/build/library/sdk/model/projectApiKeyRole.js +6 -0
- package/build/library/sdk/model/projectApiKeyRole.js.map +1 -0
- package/build/library/sdk/model/projectExtension.d.ts +37 -0
- package/build/library/sdk/model/projectExtension.js +6 -0
- package/build/library/sdk/model/projectExtension.js.map +1 -0
- package/build/library/sdk/model/projectInfoResponse.d.ts +4 -0
- package/build/library/sdk/model/projectInfoResponse.js.map +1 -1
- package/build/library/sdk/model/removeProjectActiveExtensionResponse.d.ts +14 -0
- package/build/library/sdk/model/removeProjectActiveExtensionResponse.js +4 -0
- package/build/library/sdk/model/removeProjectActiveExtensionResponse.js.map +1 -0
- package/build/library/sdk/model/setKerasParameterRequest.d.ts +5 -0
- package/build/library/sdk/model/setKerasParameterRequest.js.map +1 -1
- package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.d.ts +59 -0
- package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.js +6 -0
- package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.js.map +1 -0
- package/build/library/sdk/model/updateProjectRequest.d.ts +4 -0
- package/build/library/sdk/model/updateProjectRequest.js.map +1 -1
- package/package.json +1 -1
|
@@ -356,6 +356,171 @@ class OrganizationBlocksApi {
|
|
|
356
356
|
const response = await fetch(url, requestOptions);
|
|
357
357
|
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
358
358
|
}
|
|
359
|
+
/**
|
|
360
|
+
* Adds an extension block.
|
|
361
|
+
* @summary Add extension block
|
|
362
|
+
* @param organizationId Organization ID
|
|
363
|
+
* @param name Extension block name.
|
|
364
|
+
* @param description Extension block description.
|
|
365
|
+
* @param url URL loaded by the extension.
|
|
366
|
+
* @param navbarLocation Studio navigation location for the extension.
|
|
367
|
+
* @param requiredApiKeyRole
|
|
368
|
+
* @param onlyAvailableInProjectId Required if \\\"visibility\\\" is \\\"project\\\". If set, this extension is scoped to this specific project.
|
|
369
|
+
* @param repositoryUrl Optional source repository URL for the extension.
|
|
370
|
+
* @param logo Optional logo image for the extension.
|
|
371
|
+
* @param navbarIcon Optional Font Awesome icon class for the navigation item.
|
|
372
|
+
* @param visibility
|
|
373
|
+
* @param publicProjectTierAvailability
|
|
374
|
+
* @param indBlockNoLongerAvailable Whether this extension is no longer available.
|
|
375
|
+
* @param blockNoLongerAvailableReason Reason this extension is no longer available.
|
|
376
|
+
*/
|
|
377
|
+
async addOrganizationExtensionBlock(organizationId, params, options = { headers: {} }) {
|
|
378
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension'
|
|
379
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
380
|
+
let queryParameters = {};
|
|
381
|
+
let localVarHeaderParams = {
|
|
382
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
383
|
+
'Content-Type': 'application/json',
|
|
384
|
+
...this.defaultHeaders,
|
|
385
|
+
};
|
|
386
|
+
const produces = ['application/json'];
|
|
387
|
+
// give precedence to 'application/json'
|
|
388
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
389
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
393
|
+
}
|
|
394
|
+
let localVarFormParams;
|
|
395
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
396
|
+
if (organizationId === null || organizationId === undefined) {
|
|
397
|
+
throw new Error('Required parameter organizationId was null or undefined when calling addOrganizationExtensionBlock.');
|
|
398
|
+
}
|
|
399
|
+
// verify required parameter 'name' is not null or undefined
|
|
400
|
+
if (params.name === null || params.name === undefined) {
|
|
401
|
+
throw new Error('Required parameter params.name was null or undefined when calling addOrganizationExtensionBlock.');
|
|
402
|
+
}
|
|
403
|
+
// verify required parameter 'description' is not null or undefined
|
|
404
|
+
if (params.description === null || params.description === undefined) {
|
|
405
|
+
throw new Error('Required parameter params.description was null or undefined when calling addOrganizationExtensionBlock.');
|
|
406
|
+
}
|
|
407
|
+
// verify required parameter 'url' is not null or undefined
|
|
408
|
+
if (params.url === null || params.url === undefined) {
|
|
409
|
+
throw new Error('Required parameter params.url was null or undefined when calling addOrganizationExtensionBlock.');
|
|
410
|
+
}
|
|
411
|
+
// verify required parameter 'navbarLocation' is not null or undefined
|
|
412
|
+
if (params.navbarLocation === null || params.navbarLocation === undefined) {
|
|
413
|
+
throw new Error('Required parameter params.navbarLocation was null or undefined when calling addOrganizationExtensionBlock.');
|
|
414
|
+
}
|
|
415
|
+
// verify required parameter 'requiredApiKeyRole' is not null or undefined
|
|
416
|
+
if (params.requiredApiKeyRole === null || params.requiredApiKeyRole === undefined) {
|
|
417
|
+
throw new Error('Required parameter params.requiredApiKeyRole was null or undefined when calling addOrganizationExtensionBlock.');
|
|
418
|
+
}
|
|
419
|
+
localVarHeaderParams = {
|
|
420
|
+
...localVarHeaderParams,
|
|
421
|
+
...options.headers,
|
|
422
|
+
...this.opts.extraHeaders,
|
|
423
|
+
};
|
|
424
|
+
if (params.name !== undefined) {
|
|
425
|
+
if (params.name !== null && params.name !== undefined) {
|
|
426
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'name', (0, models_1.serializeFormDataValue)(params.name, 'string'));
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
if (params.onlyAvailableInProjectId !== undefined) {
|
|
430
|
+
if (params.onlyAvailableInProjectId !== null && params.onlyAvailableInProjectId !== undefined) {
|
|
431
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'onlyAvailableInProjectId', (0, models_1.serializeFormDataValue)(params.onlyAvailableInProjectId, 'number'));
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
if (params.description !== undefined) {
|
|
435
|
+
if (params.description !== null && params.description !== undefined) {
|
|
436
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'description', (0, models_1.serializeFormDataValue)(params.description, 'string'));
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
if (params.url !== undefined) {
|
|
440
|
+
if (params.url !== null && params.url !== undefined) {
|
|
441
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'url', (0, models_1.serializeFormDataValue)(params.url, 'string'));
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
if (params.repositoryUrl !== undefined) {
|
|
445
|
+
if (params.repositoryUrl !== null && params.repositoryUrl !== undefined) {
|
|
446
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'repositoryUrl', (0, models_1.serializeFormDataValue)(params.repositoryUrl, 'string'));
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
if (params.logo !== undefined) {
|
|
450
|
+
localVarFormParams = (0, models_1.ensureFormData)(localVarFormParams);
|
|
451
|
+
const logoFiles = Array.isArray(params.logo) ? params.logo : [params.logo];
|
|
452
|
+
const Blob = globalThis.Blob || require('buffer').Blob;
|
|
453
|
+
for (const f of logoFiles) {
|
|
454
|
+
localVarFormParams.append('logo', new Blob([new Uint8Array(f.value)], {
|
|
455
|
+
type: f.options.contentType
|
|
456
|
+
}), f.options.filename);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
if (params.navbarIcon !== undefined) {
|
|
460
|
+
if (params.navbarIcon !== null && params.navbarIcon !== undefined) {
|
|
461
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarIcon', (0, models_1.serializeFormDataValue)(params.navbarIcon, 'string'));
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
if (params.navbarLocation !== undefined) {
|
|
465
|
+
if (params.navbarLocation !== null && params.navbarLocation !== undefined) {
|
|
466
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarLocation', (0, models_1.serializeFormDataValue)(params.navbarLocation, 'string'));
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
if (params.requiredApiKeyRole !== undefined) {
|
|
470
|
+
if (params.requiredApiKeyRole !== null && params.requiredApiKeyRole !== undefined) {
|
|
471
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'requiredApiKeyRole', (0, models_1.serializeFormDataValue)(params.requiredApiKeyRole, 'ProjectApiKeyRole'));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
if (params.visibility !== undefined) {
|
|
475
|
+
if (params.visibility !== null && params.visibility !== undefined) {
|
|
476
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'visibility', (0, models_1.serializeFormDataValue)(params.visibility, 'ExtensionVisibility'));
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (params.publicProjectTierAvailability !== undefined) {
|
|
480
|
+
if (params.publicProjectTierAvailability !== null && params.publicProjectTierAvailability !== undefined) {
|
|
481
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'publicProjectTierAvailability', (0, models_1.serializeFormDataValue)(params.publicProjectTierAvailability, 'PublicProjectTierAvailability'));
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (params.indBlockNoLongerAvailable !== undefined) {
|
|
485
|
+
if (params.indBlockNoLongerAvailable !== null && params.indBlockNoLongerAvailable !== undefined) {
|
|
486
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'indBlockNoLongerAvailable', (0, models_1.serializeFormDataValue)(params.indBlockNoLongerAvailable, 'boolean'));
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
if (params.blockNoLongerAvailableReason !== undefined) {
|
|
490
|
+
if (params.blockNoLongerAvailableReason !== null && params.blockNoLongerAvailableReason !== undefined) {
|
|
491
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'blockNoLongerAvailableReason', (0, models_1.serializeFormDataValue)(params.blockNoLongerAvailableReason, 'string'));
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
const queryString = Object.entries(queryParameters)
|
|
495
|
+
.filter(([, value]) => value !== undefined)
|
|
496
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
497
|
+
.join('&');
|
|
498
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
499
|
+
let localVarRequestOptions = {
|
|
500
|
+
method: 'POST',
|
|
501
|
+
headers: { ...localVarHeaderParams },
|
|
502
|
+
};
|
|
503
|
+
let requestOptions = localVarRequestOptions;
|
|
504
|
+
let url = localVarUrl;
|
|
505
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
506
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
507
|
+
url = auth_ApiKeyAuthentication.url;
|
|
508
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
509
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
510
|
+
url = auth_JWTAuthentication.url;
|
|
511
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
512
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
513
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
514
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
515
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
516
|
+
url = auth_OAuth2.url;
|
|
517
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
518
|
+
requestOptions = authDefault.requestOptions;
|
|
519
|
+
url = authDefault.url;
|
|
520
|
+
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
521
|
+
const response = await fetch(url, requestOptions);
|
|
522
|
+
return this.handleResponse(response, 'EntityCreatedResponse');
|
|
523
|
+
}
|
|
359
524
|
/**
|
|
360
525
|
* Adds a secret.
|
|
361
526
|
* @summary Add secret
|
|
@@ -696,6 +861,74 @@ class OrganizationBlocksApi {
|
|
|
696
861
|
const response = await fetch(url, requestOptions);
|
|
697
862
|
return this.handleResponse(response, 'GenericApiResponse');
|
|
698
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Deletes an extension block.
|
|
866
|
+
* @summary Delete extension block
|
|
867
|
+
* @param organizationId Organization ID
|
|
868
|
+
* @param extensionId Extension ID
|
|
869
|
+
*/
|
|
870
|
+
async deleteOrganizationExtensionBlock(organizationId, extensionId, options = { headers: {} }) {
|
|
871
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension/{extensionId}'
|
|
872
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
873
|
+
.replace('{' + 'extensionId' + '}', encodeURIComponent(String(extensionId)));
|
|
874
|
+
let queryParameters = {};
|
|
875
|
+
let localVarHeaderParams = {
|
|
876
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
877
|
+
'Content-Type': 'application/json',
|
|
878
|
+
...this.defaultHeaders,
|
|
879
|
+
};
|
|
880
|
+
const produces = ['application/json'];
|
|
881
|
+
// give precedence to 'application/json'
|
|
882
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
883
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
884
|
+
}
|
|
885
|
+
else {
|
|
886
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
887
|
+
}
|
|
888
|
+
let localVarFormParams;
|
|
889
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
890
|
+
if (organizationId === null || organizationId === undefined) {
|
|
891
|
+
throw new Error('Required parameter organizationId was null or undefined when calling deleteOrganizationExtensionBlock.');
|
|
892
|
+
}
|
|
893
|
+
// verify required parameter 'extensionId' is not null or undefined
|
|
894
|
+
if (extensionId === null || extensionId === undefined) {
|
|
895
|
+
throw new Error('Required parameter extensionId was null or undefined when calling deleteOrganizationExtensionBlock.');
|
|
896
|
+
}
|
|
897
|
+
localVarHeaderParams = {
|
|
898
|
+
...localVarHeaderParams,
|
|
899
|
+
...options.headers,
|
|
900
|
+
...this.opts.extraHeaders,
|
|
901
|
+
};
|
|
902
|
+
const queryString = Object.entries(queryParameters)
|
|
903
|
+
.filter(([, value]) => value !== undefined)
|
|
904
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
905
|
+
.join('&');
|
|
906
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
907
|
+
let localVarRequestOptions = {
|
|
908
|
+
method: 'DELETE',
|
|
909
|
+
headers: { ...localVarHeaderParams },
|
|
910
|
+
};
|
|
911
|
+
let requestOptions = localVarRequestOptions;
|
|
912
|
+
let url = localVarUrl;
|
|
913
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
914
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
915
|
+
url = auth_ApiKeyAuthentication.url;
|
|
916
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
917
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
918
|
+
url = auth_JWTAuthentication.url;
|
|
919
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
920
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
921
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
922
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
923
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
924
|
+
url = auth_OAuth2.url;
|
|
925
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
926
|
+
requestOptions = authDefault.requestOptions;
|
|
927
|
+
url = authDefault.url;
|
|
928
|
+
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
929
|
+
const response = await fetch(url, requestOptions);
|
|
930
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
931
|
+
}
|
|
699
932
|
/**
|
|
700
933
|
* Deletes a secret
|
|
701
934
|
* @summary Delete secret
|
|
@@ -1308,6 +1541,74 @@ class OrganizationBlocksApi {
|
|
|
1308
1541
|
const response = await fetch(url, requestOptions);
|
|
1309
1542
|
return this.handleResponse(response, 'GetOrganizationDspBlockResponse');
|
|
1310
1543
|
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Gets an extension block.
|
|
1546
|
+
* @summary Get extension block
|
|
1547
|
+
* @param organizationId Organization ID
|
|
1548
|
+
* @param extensionId Extension ID
|
|
1549
|
+
*/
|
|
1550
|
+
async getOrganizationExtensionBlock(organizationId, extensionId, options = { headers: {} }) {
|
|
1551
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension/{extensionId}'
|
|
1552
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
1553
|
+
.replace('{' + 'extensionId' + '}', encodeURIComponent(String(extensionId)));
|
|
1554
|
+
let queryParameters = {};
|
|
1555
|
+
let localVarHeaderParams = {
|
|
1556
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1557
|
+
'Content-Type': 'application/json',
|
|
1558
|
+
...this.defaultHeaders,
|
|
1559
|
+
};
|
|
1560
|
+
const produces = ['application/json'];
|
|
1561
|
+
// give precedence to 'application/json'
|
|
1562
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1563
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1564
|
+
}
|
|
1565
|
+
else {
|
|
1566
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1567
|
+
}
|
|
1568
|
+
let localVarFormParams;
|
|
1569
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
1570
|
+
if (organizationId === null || organizationId === undefined) {
|
|
1571
|
+
throw new Error('Required parameter organizationId was null or undefined when calling getOrganizationExtensionBlock.');
|
|
1572
|
+
}
|
|
1573
|
+
// verify required parameter 'extensionId' is not null or undefined
|
|
1574
|
+
if (extensionId === null || extensionId === undefined) {
|
|
1575
|
+
throw new Error('Required parameter extensionId was null or undefined when calling getOrganizationExtensionBlock.');
|
|
1576
|
+
}
|
|
1577
|
+
localVarHeaderParams = {
|
|
1578
|
+
...localVarHeaderParams,
|
|
1579
|
+
...options.headers,
|
|
1580
|
+
...this.opts.extraHeaders,
|
|
1581
|
+
};
|
|
1582
|
+
const queryString = Object.entries(queryParameters)
|
|
1583
|
+
.filter(([, value]) => value !== undefined)
|
|
1584
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1585
|
+
.join('&');
|
|
1586
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1587
|
+
let localVarRequestOptions = {
|
|
1588
|
+
method: 'GET',
|
|
1589
|
+
headers: { ...localVarHeaderParams },
|
|
1590
|
+
};
|
|
1591
|
+
let requestOptions = localVarRequestOptions;
|
|
1592
|
+
let url = localVarUrl;
|
|
1593
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1594
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1595
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1596
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1597
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1598
|
+
url = auth_JWTAuthentication.url;
|
|
1599
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1600
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1601
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1602
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1603
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1604
|
+
url = auth_OAuth2.url;
|
|
1605
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1606
|
+
requestOptions = authDefault.requestOptions;
|
|
1607
|
+
url = authDefault.url;
|
|
1608
|
+
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
1609
|
+
const response = await fetch(url, requestOptions);
|
|
1610
|
+
return this.handleResponse(response, 'GetOrganizationExtensionBlockResponse');
|
|
1611
|
+
}
|
|
1311
1612
|
/**
|
|
1312
1613
|
* Gets a transfer learning block.
|
|
1313
1614
|
* @summary Get transfer learning block
|
|
@@ -1636,6 +1937,68 @@ class OrganizationBlocksApi {
|
|
|
1636
1937
|
const response = await fetch(url, requestOptions);
|
|
1637
1938
|
return this.handleResponse(response, 'ListOrganizationDspBlocksResponse');
|
|
1638
1939
|
}
|
|
1940
|
+
/**
|
|
1941
|
+
* Retrieve all extension blocks for this organization.
|
|
1942
|
+
* @summary Get extension blocks
|
|
1943
|
+
* @param organizationId Organization ID
|
|
1944
|
+
*/
|
|
1945
|
+
async listOrganizationExtensionBlocks(organizationId, options = { headers: {} }) {
|
|
1946
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension'
|
|
1947
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)));
|
|
1948
|
+
let queryParameters = {};
|
|
1949
|
+
let localVarHeaderParams = {
|
|
1950
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
1951
|
+
'Content-Type': 'application/json',
|
|
1952
|
+
...this.defaultHeaders,
|
|
1953
|
+
};
|
|
1954
|
+
const produces = ['application/json'];
|
|
1955
|
+
// give precedence to 'application/json'
|
|
1956
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
1957
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
1958
|
+
}
|
|
1959
|
+
else {
|
|
1960
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
1961
|
+
}
|
|
1962
|
+
let localVarFormParams;
|
|
1963
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
1964
|
+
if (organizationId === null || organizationId === undefined) {
|
|
1965
|
+
throw new Error('Required parameter organizationId was null or undefined when calling listOrganizationExtensionBlocks.');
|
|
1966
|
+
}
|
|
1967
|
+
localVarHeaderParams = {
|
|
1968
|
+
...localVarHeaderParams,
|
|
1969
|
+
...options.headers,
|
|
1970
|
+
...this.opts.extraHeaders,
|
|
1971
|
+
};
|
|
1972
|
+
const queryString = Object.entries(queryParameters)
|
|
1973
|
+
.filter(([, value]) => value !== undefined)
|
|
1974
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
1975
|
+
.join('&');
|
|
1976
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
1977
|
+
let localVarRequestOptions = {
|
|
1978
|
+
method: 'GET',
|
|
1979
|
+
headers: { ...localVarHeaderParams },
|
|
1980
|
+
};
|
|
1981
|
+
let requestOptions = localVarRequestOptions;
|
|
1982
|
+
let url = localVarUrl;
|
|
1983
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
1984
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
1985
|
+
url = auth_ApiKeyAuthentication.url;
|
|
1986
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
1987
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
1988
|
+
url = auth_JWTAuthentication.url;
|
|
1989
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
1990
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
1991
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
1992
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
1993
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
1994
|
+
url = auth_OAuth2.url;
|
|
1995
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
1996
|
+
requestOptions = authDefault.requestOptions;
|
|
1997
|
+
url = authDefault.url;
|
|
1998
|
+
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
1999
|
+
const response = await fetch(url, requestOptions);
|
|
2000
|
+
return this.handleResponse(response, 'ListOrganizationExtensionBlocksResponse');
|
|
2001
|
+
}
|
|
1639
2002
|
/**
|
|
1640
2003
|
* Retrieve all secrets.
|
|
1641
2004
|
* @summary Get secrets
|
|
@@ -2206,6 +2569,157 @@ class OrganizationBlocksApi {
|
|
|
2206
2569
|
const response = await fetch(url, requestOptions);
|
|
2207
2570
|
return this.handleResponse(response, 'GenericApiResponse');
|
|
2208
2571
|
}
|
|
2572
|
+
/**
|
|
2573
|
+
* Updates an extension block. Only values in the body will be updated.
|
|
2574
|
+
* @summary Update extension block
|
|
2575
|
+
* @param organizationId Organization ID
|
|
2576
|
+
* @param extensionId Extension ID
|
|
2577
|
+
* @param name Extension block name.
|
|
2578
|
+
* @param onlyAvailableInProjectId Required if \\\"visibility\\\" is \\\"project\\\". If set, this extension is scoped to this specific project.
|
|
2579
|
+
* @param description Extension block description.
|
|
2580
|
+
* @param url URL loaded by the extension.
|
|
2581
|
+
* @param repositoryUrl Optional source repository URL for the extension.
|
|
2582
|
+
* @param logo Optional logo image for the extension.
|
|
2583
|
+
* @param navbarIcon Optional Font Awesome icon class for the navigation item.
|
|
2584
|
+
* @param navbarLocation Studio navigation location for the extension.
|
|
2585
|
+
* @param requiredApiKeyRole
|
|
2586
|
+
* @param visibility
|
|
2587
|
+
* @param publicProjectTierAvailability
|
|
2588
|
+
* @param indBlockNoLongerAvailable Whether this extension is no longer available.
|
|
2589
|
+
* @param blockNoLongerAvailableReason Reason this extension is no longer available.
|
|
2590
|
+
*/
|
|
2591
|
+
async updateOrganizationExtensionBlock(organizationId, extensionId, params, options = { headers: {} }) {
|
|
2592
|
+
const localVarPath = this.basePath + '/api/organizations/{organizationId}/extension/{extensionId}'
|
|
2593
|
+
.replace('{' + 'organizationId' + '}', encodeURIComponent(String(organizationId)))
|
|
2594
|
+
.replace('{' + 'extensionId' + '}', encodeURIComponent(String(extensionId)));
|
|
2595
|
+
let queryParameters = {};
|
|
2596
|
+
let localVarHeaderParams = {
|
|
2597
|
+
'User-Agent': 'edgeimpulse-api nodejs',
|
|
2598
|
+
'Content-Type': 'application/json',
|
|
2599
|
+
...this.defaultHeaders,
|
|
2600
|
+
};
|
|
2601
|
+
const produces = ['application/json'];
|
|
2602
|
+
// give precedence to 'application/json'
|
|
2603
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
2604
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
2605
|
+
}
|
|
2606
|
+
else {
|
|
2607
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
2608
|
+
}
|
|
2609
|
+
let localVarFormParams;
|
|
2610
|
+
// verify required parameter 'organizationId' is not null or undefined
|
|
2611
|
+
if (organizationId === null || organizationId === undefined) {
|
|
2612
|
+
throw new Error('Required parameter organizationId was null or undefined when calling updateOrganizationExtensionBlock.');
|
|
2613
|
+
}
|
|
2614
|
+
// verify required parameter 'extensionId' is not null or undefined
|
|
2615
|
+
if (extensionId === null || extensionId === undefined) {
|
|
2616
|
+
throw new Error('Required parameter extensionId was null or undefined when calling updateOrganizationExtensionBlock.');
|
|
2617
|
+
}
|
|
2618
|
+
localVarHeaderParams = {
|
|
2619
|
+
...localVarHeaderParams,
|
|
2620
|
+
...options.headers,
|
|
2621
|
+
...this.opts.extraHeaders,
|
|
2622
|
+
};
|
|
2623
|
+
if (params.name !== undefined) {
|
|
2624
|
+
if (params.name !== null && params.name !== undefined) {
|
|
2625
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'name', (0, models_1.serializeFormDataValue)(params.name, 'string'));
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
if (params.onlyAvailableInProjectId !== undefined) {
|
|
2629
|
+
if (params.onlyAvailableInProjectId !== null && params.onlyAvailableInProjectId !== undefined) {
|
|
2630
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'onlyAvailableInProjectId', (0, models_1.serializeFormDataValue)(params.onlyAvailableInProjectId, 'number'));
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
if (params.description !== undefined) {
|
|
2634
|
+
if (params.description !== null && params.description !== undefined) {
|
|
2635
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'description', (0, models_1.serializeFormDataValue)(params.description, 'string'));
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
if (params.url !== undefined) {
|
|
2639
|
+
if (params.url !== null && params.url !== undefined) {
|
|
2640
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'url', (0, models_1.serializeFormDataValue)(params.url, 'string'));
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2643
|
+
if (params.repositoryUrl !== undefined) {
|
|
2644
|
+
if (params.repositoryUrl !== null && params.repositoryUrl !== undefined) {
|
|
2645
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'repositoryUrl', (0, models_1.serializeFormDataValue)(params.repositoryUrl, 'string'));
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
if (params.logo !== undefined) {
|
|
2649
|
+
localVarFormParams = (0, models_1.ensureFormData)(localVarFormParams);
|
|
2650
|
+
const logoFiles = Array.isArray(params.logo) ? params.logo : [params.logo];
|
|
2651
|
+
const Blob = globalThis.Blob || require('buffer').Blob;
|
|
2652
|
+
for (const f of logoFiles) {
|
|
2653
|
+
localVarFormParams.append('logo', new Blob([new Uint8Array(f.value)], {
|
|
2654
|
+
type: f.options.contentType
|
|
2655
|
+
}), f.options.filename);
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2658
|
+
if (params.navbarIcon !== undefined) {
|
|
2659
|
+
if (params.navbarIcon !== null && params.navbarIcon !== undefined) {
|
|
2660
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarIcon', (0, models_1.serializeFormDataValue)(params.navbarIcon, 'string'));
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
if (params.navbarLocation !== undefined) {
|
|
2664
|
+
if (params.navbarLocation !== null && params.navbarLocation !== undefined) {
|
|
2665
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'navbarLocation', (0, models_1.serializeFormDataValue)(params.navbarLocation, 'string'));
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
if (params.requiredApiKeyRole !== undefined) {
|
|
2669
|
+
if (params.requiredApiKeyRole !== null && params.requiredApiKeyRole !== undefined) {
|
|
2670
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'requiredApiKeyRole', (0, models_1.serializeFormDataValue)(params.requiredApiKeyRole, 'ProjectApiKeyRole'));
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
if (params.visibility !== undefined) {
|
|
2674
|
+
if (params.visibility !== null && params.visibility !== undefined) {
|
|
2675
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'visibility', (0, models_1.serializeFormDataValue)(params.visibility, 'ExtensionVisibility'));
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
if (params.publicProjectTierAvailability !== undefined) {
|
|
2679
|
+
if (params.publicProjectTierAvailability !== null && params.publicProjectTierAvailability !== undefined) {
|
|
2680
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'publicProjectTierAvailability', (0, models_1.serializeFormDataValue)(params.publicProjectTierAvailability, 'PublicProjectTierAvailability'));
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
if (params.indBlockNoLongerAvailable !== undefined) {
|
|
2684
|
+
if (params.indBlockNoLongerAvailable !== null && params.indBlockNoLongerAvailable !== undefined) {
|
|
2685
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'indBlockNoLongerAvailable', (0, models_1.serializeFormDataValue)(params.indBlockNoLongerAvailable, 'boolean'));
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
if (params.blockNoLongerAvailableReason !== undefined) {
|
|
2689
|
+
if (params.blockNoLongerAvailableReason !== null && params.blockNoLongerAvailableReason !== undefined) {
|
|
2690
|
+
localVarFormParams = (0, models_1.appendFormField)(localVarFormParams, 'blockNoLongerAvailableReason', (0, models_1.serializeFormDataValue)(params.blockNoLongerAvailableReason, 'string'));
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
const queryString = Object.entries(queryParameters)
|
|
2694
|
+
.filter(([, value]) => value !== undefined)
|
|
2695
|
+
.map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
|
|
2696
|
+
.join('&');
|
|
2697
|
+
let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
|
|
2698
|
+
let localVarRequestOptions = {
|
|
2699
|
+
method: 'POST',
|
|
2700
|
+
headers: { ...localVarHeaderParams },
|
|
2701
|
+
};
|
|
2702
|
+
let requestOptions = localVarRequestOptions;
|
|
2703
|
+
let url = localVarUrl;
|
|
2704
|
+
const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
|
|
2705
|
+
requestOptions = auth_ApiKeyAuthentication.requestOptions;
|
|
2706
|
+
url = auth_ApiKeyAuthentication.url;
|
|
2707
|
+
const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
|
|
2708
|
+
requestOptions = auth_JWTAuthentication.requestOptions;
|
|
2709
|
+
url = auth_JWTAuthentication.url;
|
|
2710
|
+
const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
|
|
2711
|
+
requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
|
|
2712
|
+
url = auth_JWTHttpHeaderAuthentication.url;
|
|
2713
|
+
const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
|
|
2714
|
+
requestOptions = auth_OAuth2.requestOptions;
|
|
2715
|
+
url = auth_OAuth2.url;
|
|
2716
|
+
const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
|
|
2717
|
+
requestOptions = authDefault.requestOptions;
|
|
2718
|
+
url = authDefault.url;
|
|
2719
|
+
(0, models_1.applyFormParams)(requestOptions, localVarFormParams);
|
|
2720
|
+
const response = await fetch(url, requestOptions);
|
|
2721
|
+
return this.handleResponse(response, 'GenericApiResponse');
|
|
2722
|
+
}
|
|
2209
2723
|
/**
|
|
2210
2724
|
* Updates a transfer learning block. Only values in the body will be updated.
|
|
2211
2725
|
* @summary Update transfer learning block
|