edge-impulse-api 1.93.19 → 1.93.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/build/browser/edge-impulse-api.d.ts +613 -15
  2. package/build/browser/edge-impulse-api.js +1381 -174
  3. package/build/browser/edge-impulse-api.js.map +1 -1
  4. package/build/library/sdk/api/deploymentApi.d.ts +31 -0
  5. package/build/library/sdk/api/deploymentApi.js +144 -0
  6. package/build/library/sdk/api/deploymentApi.js.map +1 -1
  7. package/build/library/sdk/api/organizationBlocksApi.d.ts +114 -0
  8. package/build/library/sdk/api/organizationBlocksApi.js +514 -0
  9. package/build/library/sdk/api/organizationBlocksApi.js.map +1 -1
  10. package/build/library/sdk/api/organizationDataApi.d.ts +13 -0
  11. package/build/library/sdk/api/organizationDataApi.js +68 -0
  12. package/build/library/sdk/api/organizationDataApi.js.map +1 -1
  13. package/build/library/sdk/api/projectsApi.d.ts +56 -0
  14. package/build/library/sdk/api/projectsApi.js +316 -0
  15. package/build/library/sdk/api/projectsApi.js.map +1 -1
  16. package/build/library/sdk/model/actorProjectApiKey.d.ts +2 -0
  17. package/build/library/sdk/model/actorProjectApiKey.js.map +1 -1
  18. package/build/library/sdk/model/addOrganizationExtensionBlockRequest.d.ts +59 -0
  19. package/build/library/sdk/model/addOrganizationExtensionBlockRequest.js +6 -0
  20. package/build/library/sdk/model/addOrganizationExtensionBlockRequest.js.map +1 -0
  21. package/build/library/sdk/model/addProjectActiveExtensionRequest.d.ts +3 -0
  22. package/build/library/sdk/model/addProjectActiveExtensionRequest.js +4 -0
  23. package/build/library/sdk/model/addProjectActiveExtensionRequest.js.map +1 -0
  24. package/build/library/sdk/model/addProjectApiKeyRequest.d.ts +6 -3
  25. package/build/library/sdk/model/addProjectApiKeyRequest.js +0 -2
  26. package/build/library/sdk/model/addProjectApiKeyRequest.js.map +1 -1
  27. package/build/library/sdk/model/apiKeyExtension.d.ts +4 -0
  28. package/build/library/sdk/model/apiKeyExtension.js +4 -0
  29. package/build/library/sdk/model/apiKeyExtension.js.map +1 -0
  30. package/build/library/sdk/model/buildPublicDeploymentJobRequest.d.ts +5 -0
  31. package/build/library/sdk/model/buildPublicDeploymentJobRequest.js +4 -0
  32. package/build/library/sdk/model/buildPublicDeploymentJobRequest.js.map +1 -0
  33. package/build/library/sdk/model/buildPublicDeploymentJobResponse.d.ts +20 -0
  34. package/build/library/sdk/model/buildPublicDeploymentJobResponse.js +4 -0
  35. package/build/library/sdk/model/buildPublicDeploymentJobResponse.js.map +1 -0
  36. package/build/library/sdk/model/createOrganizationBucketRequest.d.ts +3 -0
  37. package/build/library/sdk/model/createOrganizationBucketRequest.js +4 -0
  38. package/build/library/sdk/model/createOrganizationBucketRequest.js.map +1 -0
  39. package/build/library/sdk/model/createOrganizationBucketResponse.d.ts +18 -0
  40. package/build/library/sdk/model/createOrganizationBucketResponse.js +4 -0
  41. package/build/library/sdk/model/createOrganizationBucketResponse.js.map +1 -0
  42. package/build/library/sdk/model/deploymentHistory.d.ts +4 -0
  43. package/build/library/sdk/model/extension.d.ts +35 -0
  44. package/build/library/sdk/model/extension.js +6 -0
  45. package/build/library/sdk/model/extension.js.map +1 -0
  46. package/build/library/sdk/model/extensionVisibility.d.ts +7 -0
  47. package/build/library/sdk/model/extensionVisibility.js +6 -0
  48. package/build/library/sdk/model/extensionVisibility.js.map +1 -0
  49. package/build/library/sdk/model/getCurrentApiKeyInfoResponse.d.ts +14 -0
  50. package/build/library/sdk/model/getCurrentApiKeyInfoResponse.js +4 -0
  51. package/build/library/sdk/model/getCurrentApiKeyInfoResponse.js.map +1 -0
  52. package/build/library/sdk/model/getOrganizationExtensionBlockResponse.d.ts +12 -0
  53. package/build/library/sdk/model/getOrganizationExtensionBlockResponse.js +4 -0
  54. package/build/library/sdk/model/getOrganizationExtensionBlockResponse.js.map +1 -0
  55. package/build/library/sdk/model/getProjectActiveExtensionsResponse.d.ts +12 -0
  56. package/build/library/sdk/model/getProjectActiveExtensionsResponse.js +4 -0
  57. package/build/library/sdk/model/getProjectActiveExtensionsResponse.js.map +1 -0
  58. package/build/library/sdk/model/getPublicDeploymentStatusResponse.d.ts +33 -0
  59. package/build/library/sdk/model/getPublicDeploymentStatusResponse.js +4 -0
  60. package/build/library/sdk/model/getPublicDeploymentStatusResponse.js.map +1 -0
  61. package/build/library/sdk/model/jobLogItem.d.ts +7 -0
  62. package/build/library/sdk/model/jobLogItem.js +6 -0
  63. package/build/library/sdk/model/jobLogItem.js.map +1 -0
  64. package/build/library/sdk/model/jobLogsResponse.d.ts +2 -2
  65. package/build/library/sdk/model/listOrganizationExtensionBlocksResponse.d.ts +12 -0
  66. package/build/library/sdk/model/listOrganizationExtensionBlocksResponse.js +4 -0
  67. package/build/library/sdk/model/listOrganizationExtensionBlocksResponse.js.map +1 -0
  68. package/build/library/sdk/model/listProjectAvailableExtensionsResponse.d.ts +16 -0
  69. package/build/library/sdk/model/listProjectAvailableExtensionsResponse.js +4 -0
  70. package/build/library/sdk/model/listProjectAvailableExtensionsResponse.js.map +1 -0
  71. package/build/library/sdk/model/logStdoutResponse.d.ts +2 -2
  72. package/build/library/sdk/model/models.d.ts +20 -1
  73. package/build/library/sdk/model/models.js +23 -1
  74. package/build/library/sdk/model/models.js.map +1 -1
  75. package/build/library/sdk/model/projectApiKey.d.ts +2 -0
  76. package/build/library/sdk/model/projectApiKey.js.map +1 -1
  77. package/build/library/sdk/model/projectApiKeyRole.d.ts +2 -0
  78. package/build/library/sdk/model/projectApiKeyRole.js +6 -0
  79. package/build/library/sdk/model/projectApiKeyRole.js.map +1 -0
  80. package/build/library/sdk/model/projectExtension.d.ts +37 -0
  81. package/build/library/sdk/model/projectExtension.js +6 -0
  82. package/build/library/sdk/model/projectExtension.js.map +1 -0
  83. package/build/library/sdk/model/projectInfoResponse.d.ts +4 -0
  84. package/build/library/sdk/model/projectInfoResponse.js.map +1 -1
  85. package/build/library/sdk/model/removeProjectActiveExtensionResponse.d.ts +14 -0
  86. package/build/library/sdk/model/removeProjectActiveExtensionResponse.js +4 -0
  87. package/build/library/sdk/model/removeProjectActiveExtensionResponse.js.map +1 -0
  88. package/build/library/sdk/model/setKerasParameterRequest.d.ts +5 -0
  89. package/build/library/sdk/model/setKerasParameterRequest.js.map +1 -1
  90. package/build/library/sdk/model/storageProvider.d.ts +1 -1
  91. package/build/library/sdk/model/storageProvider.js +1 -1
  92. package/build/library/sdk/model/storageProvider.js.map +1 -1
  93. package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.d.ts +59 -0
  94. package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.js +6 -0
  95. package/build/library/sdk/model/updateOrganizationExtensionBlockRequest.js.map +1 -0
  96. package/build/library/sdk/model/updateProjectRequest.d.ts +4 -0
  97. package/build/library/sdk/model/updateProjectRequest.js.map +1 -1
  98. package/package.json +1 -1
  99. package/build/library/sdk/model/logStdoutResponseAllOfStdout.d.ts +0 -7
  100. package/build/library/sdk/model/logStdoutResponseAllOfStdout.js +0 -6
  101. package/build/library/sdk/model/logStdoutResponseAllOfStdout.js.map +0 -1
@@ -16,6 +16,7 @@ import { AddApiKeyResponse } from '../model/addApiKeyResponse';
16
16
  import { AddCollaboratorRequest } from '../model/addCollaboratorRequest';
17
17
  import { AddHmacKeyRequest } from '../model/addHmacKeyRequest';
18
18
  import { AddIngestionOnlyProjectApiKeyRequest } from '../model/addIngestionOnlyProjectApiKeyRequest';
19
+ import { AddProjectActiveExtensionRequest } from '../model/addProjectActiveExtensionRequest';
19
20
  import { AddProjectApiKeyRequest } from '../model/addProjectApiKeyRequest';
20
21
  import { ConvertParquetToCsvResponse } from '../model/convertParquetToCsvResponse';
21
22
  import { CreateProjectRequest } from '../model/createProjectRequest';
@@ -26,8 +27,10 @@ import { EntityCreatedResponse } from '../model/entityCreatedResponse';
26
27
  import { GenericApiResponse } from '../model/genericApiResponse';
27
28
  import { GetAIActionResponse } from '../model/getAIActionResponse';
28
29
  import { GetCsvWizardUploadedFileInfo } from '../model/getCsvWizardUploadedFileInfo';
30
+ import { GetCurrentApiKeyInfoResponse } from '../model/getCurrentApiKeyInfoResponse';
29
31
  import { GetHmacDevkeyResponse } from '../model/getHmacDevkeyResponse';
30
32
  import { GetModelVariantsResponse } from '../model/getModelVariantsResponse';
33
+ import { GetProjectActiveExtensionsResponse } from '../model/getProjectActiveExtensionsResponse';
31
34
  import { GetSyntheticDataConfigResponse } from '../model/getSyntheticDataConfigResponse';
32
35
  import { GetTargetConstraintsResponse } from '../model/getTargetConstraintsResponse';
33
36
  import { LastModificationDateResponse } from '../model/lastModificationDateResponse';
@@ -35,6 +38,7 @@ import { ListAIActionsResponse } from '../model/listAIActionsResponse';
35
38
  import { ListApiKeysResponse } from '../model/listApiKeysResponse';
36
39
  import { ListEmailResponse } from '../model/listEmailResponse';
37
40
  import { ListHmacKeysResponse } from '../model/listHmacKeysResponse';
41
+ import { ListProjectAvailableExtensionsResponse } from '../model/listProjectAvailableExtensionsResponse';
38
42
  import { ListProjectsResponse } from '../model/listProjectsResponse';
39
43
  import { ListPublicProjectTypesResponse } from '../model/listPublicProjectTypesResponse';
40
44
  import { ListPublicProjectsResponse } from '../model/listPublicProjectsResponse';
@@ -50,6 +54,7 @@ import { ProjectInfoResponse } from '../model/projectInfoResponse';
50
54
  import { ProjectInfoSummaryResponse } from '../model/projectInfoSummaryResponse';
51
55
  import { ProjectTrainingDataSummaryResponse } from '../model/projectTrainingDataSummaryResponse';
52
56
  import { RemoveCollaboratorRequest } from '../model/removeCollaboratorRequest';
57
+ import { RemoveProjectActiveExtensionResponse } from '../model/removeProjectActiveExtensionResponse';
53
58
  import { SetAIActionsOrderRequest } from '../model/setAIActionsOrderRequest';
54
59
  import { SetProjectComputeTimeRequest } from '../model/setProjectComputeTimeRequest';
55
60
  import { SetProjectDspFileSizeRequest } from '../model/setProjectDspFileSizeRequest';
@@ -136,6 +141,17 @@ export declare class ProjectsApi {
136
141
  [name: string]: string;
137
142
  };
138
143
  }): Promise<EntityCreatedResponse>;
144
+ /**
145
+ * Adds an extension to a project. This API is only available through JWT token authentication.
146
+ * @summary Add extension to project
147
+ * @param projectId Project ID
148
+ * @param addProjectActiveExtensionRequest
149
+ */
150
+ addProjectActiveExtension(projectId: number, addProjectActiveExtensionRequest: AddProjectActiveExtensionRequest, options?: {
151
+ headers: {
152
+ [name: string]: string;
153
+ };
154
+ }): Promise<GenericApiResponse>;
139
155
  /**
140
156
  * Add an API key. If you set `developmentKey` to `true` this flag will be removed from the current development API key. For OAuth-based third-party integrations, prefer `/api/{projectId}/apikeys/ingestiononly`.
141
157
  * @summary Add API key
@@ -294,6 +310,15 @@ export declare class ProjectsApi {
294
310
  [name: string]: string;
295
311
  };
296
312
  }): Promise<GetCsvWizardUploadedFileInfo>;
313
+ /**
314
+ * Only available when authenticating with a project API key. Returns the current role and project ID that you\'re authenticated with.
315
+ * @summary Get info about current API key
316
+ */
317
+ getCurrentApiKeyInfo(options?: {
318
+ headers: {
319
+ [name: string]: string;
320
+ };
321
+ }): Promise<GetCurrentApiKeyInfoResponse>;
297
322
  /**
298
323
  * Retrieve the HMAC development key for a project. This key are specifically marked to be used during development. This key can be `undefined` if no development keys are set.
299
324
  * @summary Get HMAC development key
@@ -325,6 +350,16 @@ export declare class ProjectsApi {
325
350
  [name: string]: string;
326
351
  };
327
352
  }): Promise<GetAIActionResponse>;
353
+ /**
354
+ * Lists all extensions that are active for this project.
355
+ * @summary List active extensions
356
+ * @param projectId Project ID
357
+ */
358
+ getProjectActiveExtensions(projectId: number, options?: {
359
+ headers: {
360
+ [name: string]: string;
361
+ };
362
+ }): Promise<GetProjectActiveExtensionsResponse>;
328
363
  /**
329
364
  * Get a list of axes that are present in the training data.
330
365
  * @summary Get data axes summary
@@ -491,6 +526,16 @@ export declare class ProjectsApi {
491
526
  [name: string]: string;
492
527
  };
493
528
  }): Promise<ListApiKeysResponse>;
529
+ /**
530
+ * Lists all available extensions that can be added to this project.
531
+ * @summary List available extensions
532
+ * @param projectId Project ID
533
+ */
534
+ listProjectAvailableExtensions(projectId: number, options?: {
535
+ headers: {
536
+ [name: string]: string;
537
+ };
538
+ }): Promise<ListProjectAvailableExtensionsResponse>;
494
539
  /**
495
540
  * Retrieve all HMAC keys.
496
541
  * @summary Get HMAC keys
@@ -598,6 +643,17 @@ export declare class ProjectsApi {
598
643
  [name: string]: string;
599
644
  };
600
645
  }): Promise<GenericApiResponse>;
646
+ /**
647
+ * Removes an existing extension from a project.
648
+ * @summary Remove extension from project
649
+ * @param projectId Project ID
650
+ * @param extensionId Extension ID
651
+ */
652
+ removeProjectActiveExtension(projectId: number, extensionId: number, options?: {
653
+ headers: {
654
+ [name: string]: string;
655
+ };
656
+ }): Promise<RemoveProjectActiveExtensionResponse>;
601
657
  /**
602
658
  * Revoke an API key. Note that if you revoke the development API key some services (such as automatic provisioning of devices through the serial daemon) will no longer work.
603
659
  * @summary Revoke API key
@@ -166,6 +166,74 @@ class ProjectsApi {
166
166
  const response = await fetch(url, requestOptions);
167
167
  return this.handleResponse(response, 'EntityCreatedResponse');
168
168
  }
169
+ /**
170
+ * Adds an extension to a project. This API is only available through JWT token authentication.
171
+ * @summary Add extension to project
172
+ * @param projectId Project ID
173
+ * @param addProjectActiveExtensionRequest
174
+ */
175
+ async addProjectActiveExtension(projectId, addProjectActiveExtensionRequest, options = { headers: {} }) {
176
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/active/add'
177
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
178
+ let queryParameters = {};
179
+ let localVarHeaderParams = {
180
+ 'User-Agent': 'edgeimpulse-api nodejs',
181
+ 'Content-Type': 'application/json',
182
+ ...this.defaultHeaders,
183
+ };
184
+ const produces = ['application/json'];
185
+ // give precedence to 'application/json'
186
+ if (produces.indexOf('application/json') >= 0) {
187
+ localVarHeaderParams.Accept = 'application/json';
188
+ }
189
+ else {
190
+ localVarHeaderParams.Accept = produces.join(',');
191
+ }
192
+ let localVarFormParams;
193
+ // verify required parameter 'projectId' is not null or undefined
194
+ if (projectId === null || projectId === undefined) {
195
+ throw new Error('Required parameter projectId was null or undefined when calling addProjectActiveExtension.');
196
+ }
197
+ // verify required parameter 'addProjectActiveExtensionRequest' is not null or undefined
198
+ if (addProjectActiveExtensionRequest === null || addProjectActiveExtensionRequest === undefined) {
199
+ throw new Error('Required parameter addProjectActiveExtensionRequest was null or undefined when calling addProjectActiveExtension.');
200
+ }
201
+ localVarHeaderParams = {
202
+ ...localVarHeaderParams,
203
+ ...options.headers,
204
+ ...this.opts.extraHeaders,
205
+ };
206
+ const queryString = Object.entries(queryParameters)
207
+ .filter(([, value]) => value !== undefined)
208
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
209
+ .join('&');
210
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
211
+ let localVarRequestOptions = {
212
+ method: 'POST',
213
+ headers: { ...localVarHeaderParams },
214
+ };
215
+ localVarRequestOptions.body = JSON.stringify(addProjectActiveExtensionRequest);
216
+ let requestOptions = localVarRequestOptions;
217
+ let url = localVarUrl;
218
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
219
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
220
+ url = auth_ApiKeyAuthentication.url;
221
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
222
+ requestOptions = auth_JWTAuthentication.requestOptions;
223
+ url = auth_JWTAuthentication.url;
224
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
225
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
226
+ url = auth_JWTHttpHeaderAuthentication.url;
227
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
228
+ requestOptions = auth_OAuth2.requestOptions;
229
+ url = auth_OAuth2.url;
230
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
231
+ requestOptions = authDefault.requestOptions;
232
+ url = authDefault.url;
233
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
234
+ const response = await fetch(url, requestOptions);
235
+ return this.handleResponse(response, 'GenericApiResponse');
236
+ }
169
237
  /**
170
238
  * Add an API key. If you set `developmentKey` to `true` this flag will be removed from the current development API key. For OAuth-based third-party integrations, prefer `/api/{projectId}/apikeys/ingestiononly`.
171
239
  * @summary Add API key
@@ -1153,6 +1221,62 @@ class ProjectsApi {
1153
1221
  const response = await fetch(url, requestOptions);
1154
1222
  return this.handleResponse(response, 'GetCsvWizardUploadedFileInfo');
1155
1223
  }
1224
+ /**
1225
+ * Only available when authenticating with a project API key. Returns the current role and project ID that you\'re authenticated with.
1226
+ * @summary Get info about current API key
1227
+ */
1228
+ async getCurrentApiKeyInfo(options = { headers: {} }) {
1229
+ const localVarPath = this.basePath + '/api/projects/api-key-info';
1230
+ let queryParameters = {};
1231
+ let localVarHeaderParams = {
1232
+ 'User-Agent': 'edgeimpulse-api nodejs',
1233
+ 'Content-Type': 'application/json',
1234
+ ...this.defaultHeaders,
1235
+ };
1236
+ const produces = ['application/json'];
1237
+ // give precedence to 'application/json'
1238
+ if (produces.indexOf('application/json') >= 0) {
1239
+ localVarHeaderParams.Accept = 'application/json';
1240
+ }
1241
+ else {
1242
+ localVarHeaderParams.Accept = produces.join(',');
1243
+ }
1244
+ let localVarFormParams;
1245
+ localVarHeaderParams = {
1246
+ ...localVarHeaderParams,
1247
+ ...options.headers,
1248
+ ...this.opts.extraHeaders,
1249
+ };
1250
+ const queryString = Object.entries(queryParameters)
1251
+ .filter(([, value]) => value !== undefined)
1252
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
1253
+ .join('&');
1254
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
1255
+ let localVarRequestOptions = {
1256
+ method: 'GET',
1257
+ headers: { ...localVarHeaderParams },
1258
+ };
1259
+ let requestOptions = localVarRequestOptions;
1260
+ let url = localVarUrl;
1261
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
1262
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
1263
+ url = auth_ApiKeyAuthentication.url;
1264
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
1265
+ requestOptions = auth_JWTAuthentication.requestOptions;
1266
+ url = auth_JWTAuthentication.url;
1267
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
1268
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
1269
+ url = auth_JWTHttpHeaderAuthentication.url;
1270
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
1271
+ requestOptions = auth_OAuth2.requestOptions;
1272
+ url = auth_OAuth2.url;
1273
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
1274
+ requestOptions = authDefault.requestOptions;
1275
+ url = authDefault.url;
1276
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1277
+ const response = await fetch(url, requestOptions);
1278
+ return this.handleResponse(response, 'GetCurrentApiKeyInfoResponse');
1279
+ }
1156
1280
  /**
1157
1281
  * Retrieve the HMAC development key for a project. This key are specifically marked to be used during development. This key can be `undefined` if no development keys are set.
1158
1282
  * @summary Get HMAC development key
@@ -1343,6 +1467,68 @@ class ProjectsApi {
1343
1467
  const response = await fetch(url, requestOptions);
1344
1468
  return this.handleResponse(response, 'GetAIActionResponse');
1345
1469
  }
1470
+ /**
1471
+ * Lists all extensions that are active for this project.
1472
+ * @summary List active extensions
1473
+ * @param projectId Project ID
1474
+ */
1475
+ async getProjectActiveExtensions(projectId, options = { headers: {} }) {
1476
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/active'
1477
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
1478
+ let queryParameters = {};
1479
+ let localVarHeaderParams = {
1480
+ 'User-Agent': 'edgeimpulse-api nodejs',
1481
+ 'Content-Type': 'application/json',
1482
+ ...this.defaultHeaders,
1483
+ };
1484
+ const produces = ['application/json'];
1485
+ // give precedence to 'application/json'
1486
+ if (produces.indexOf('application/json') >= 0) {
1487
+ localVarHeaderParams.Accept = 'application/json';
1488
+ }
1489
+ else {
1490
+ localVarHeaderParams.Accept = produces.join(',');
1491
+ }
1492
+ let localVarFormParams;
1493
+ // verify required parameter 'projectId' is not null or undefined
1494
+ if (projectId === null || projectId === undefined) {
1495
+ throw new Error('Required parameter projectId was null or undefined when calling getProjectActiveExtensions.');
1496
+ }
1497
+ localVarHeaderParams = {
1498
+ ...localVarHeaderParams,
1499
+ ...options.headers,
1500
+ ...this.opts.extraHeaders,
1501
+ };
1502
+ const queryString = Object.entries(queryParameters)
1503
+ .filter(([, value]) => value !== undefined)
1504
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
1505
+ .join('&');
1506
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
1507
+ let localVarRequestOptions = {
1508
+ method: 'GET',
1509
+ headers: { ...localVarHeaderParams },
1510
+ };
1511
+ let requestOptions = localVarRequestOptions;
1512
+ let url = localVarUrl;
1513
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
1514
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
1515
+ url = auth_ApiKeyAuthentication.url;
1516
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
1517
+ requestOptions = auth_JWTAuthentication.requestOptions;
1518
+ url = auth_JWTAuthentication.url;
1519
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
1520
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
1521
+ url = auth_JWTHttpHeaderAuthentication.url;
1522
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
1523
+ requestOptions = auth_OAuth2.requestOptions;
1524
+ url = auth_OAuth2.url;
1525
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
1526
+ requestOptions = authDefault.requestOptions;
1527
+ url = authDefault.url;
1528
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
1529
+ const response = await fetch(url, requestOptions);
1530
+ return this.handleResponse(response, 'GetProjectActiveExtensionsResponse');
1531
+ }
1346
1532
  /**
1347
1533
  * Get a list of axes that are present in the training data.
1348
1534
  * @summary Get data axes summary
@@ -2359,6 +2545,68 @@ class ProjectsApi {
2359
2545
  const response = await fetch(url, requestOptions);
2360
2546
  return this.handleResponse(response, 'ListApiKeysResponse');
2361
2547
  }
2548
+ /**
2549
+ * Lists all available extensions that can be added to this project.
2550
+ * @summary List available extensions
2551
+ * @param projectId Project ID
2552
+ */
2553
+ async listProjectAvailableExtensions(projectId, options = { headers: {} }) {
2554
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/available'
2555
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)));
2556
+ let queryParameters = {};
2557
+ let localVarHeaderParams = {
2558
+ 'User-Agent': 'edgeimpulse-api nodejs',
2559
+ 'Content-Type': 'application/json',
2560
+ ...this.defaultHeaders,
2561
+ };
2562
+ const produces = ['application/json'];
2563
+ // give precedence to 'application/json'
2564
+ if (produces.indexOf('application/json') >= 0) {
2565
+ localVarHeaderParams.Accept = 'application/json';
2566
+ }
2567
+ else {
2568
+ localVarHeaderParams.Accept = produces.join(',');
2569
+ }
2570
+ let localVarFormParams;
2571
+ // verify required parameter 'projectId' is not null or undefined
2572
+ if (projectId === null || projectId === undefined) {
2573
+ throw new Error('Required parameter projectId was null or undefined when calling listProjectAvailableExtensions.');
2574
+ }
2575
+ localVarHeaderParams = {
2576
+ ...localVarHeaderParams,
2577
+ ...options.headers,
2578
+ ...this.opts.extraHeaders,
2579
+ };
2580
+ const queryString = Object.entries(queryParameters)
2581
+ .filter(([, value]) => value !== undefined)
2582
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
2583
+ .join('&');
2584
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
2585
+ let localVarRequestOptions = {
2586
+ method: 'GET',
2587
+ headers: { ...localVarHeaderParams },
2588
+ };
2589
+ let requestOptions = localVarRequestOptions;
2590
+ let url = localVarUrl;
2591
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
2592
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
2593
+ url = auth_ApiKeyAuthentication.url;
2594
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
2595
+ requestOptions = auth_JWTAuthentication.requestOptions;
2596
+ url = auth_JWTAuthentication.url;
2597
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
2598
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
2599
+ url = auth_JWTHttpHeaderAuthentication.url;
2600
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
2601
+ requestOptions = auth_OAuth2.requestOptions;
2602
+ url = auth_OAuth2.url;
2603
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
2604
+ requestOptions = authDefault.requestOptions;
2605
+ url = authDefault.url;
2606
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
2607
+ const response = await fetch(url, requestOptions);
2608
+ return this.handleResponse(response, 'ListProjectAvailableExtensionsResponse');
2609
+ }
2362
2610
  /**
2363
2611
  * Retrieve all HMAC keys.
2364
2612
  * @summary Get HMAC keys
@@ -2975,6 +3223,74 @@ class ProjectsApi {
2975
3223
  const response = await fetch(url, requestOptions);
2976
3224
  return this.handleResponse(response, 'GenericApiResponse');
2977
3225
  }
3226
+ /**
3227
+ * Removes an existing extension from a project.
3228
+ * @summary Remove extension from project
3229
+ * @param projectId Project ID
3230
+ * @param extensionId Extension ID
3231
+ */
3232
+ async removeProjectActiveExtension(projectId, extensionId, options = { headers: {} }) {
3233
+ const localVarPath = this.basePath + '/api/{projectId}/extensions/active/{extensionId}'
3234
+ .replace('{' + 'projectId' + '}', encodeURIComponent(String(projectId)))
3235
+ .replace('{' + 'extensionId' + '}', encodeURIComponent(String(extensionId)));
3236
+ let queryParameters = {};
3237
+ let localVarHeaderParams = {
3238
+ 'User-Agent': 'edgeimpulse-api nodejs',
3239
+ 'Content-Type': 'application/json',
3240
+ ...this.defaultHeaders,
3241
+ };
3242
+ const produces = ['application/json'];
3243
+ // give precedence to 'application/json'
3244
+ if (produces.indexOf('application/json') >= 0) {
3245
+ localVarHeaderParams.Accept = 'application/json';
3246
+ }
3247
+ else {
3248
+ localVarHeaderParams.Accept = produces.join(',');
3249
+ }
3250
+ let localVarFormParams;
3251
+ // verify required parameter 'projectId' is not null or undefined
3252
+ if (projectId === null || projectId === undefined) {
3253
+ throw new Error('Required parameter projectId was null or undefined when calling removeProjectActiveExtension.');
3254
+ }
3255
+ // verify required parameter 'extensionId' is not null or undefined
3256
+ if (extensionId === null || extensionId === undefined) {
3257
+ throw new Error('Required parameter extensionId was null or undefined when calling removeProjectActiveExtension.');
3258
+ }
3259
+ localVarHeaderParams = {
3260
+ ...localVarHeaderParams,
3261
+ ...options.headers,
3262
+ ...this.opts.extraHeaders,
3263
+ };
3264
+ const queryString = Object.entries(queryParameters)
3265
+ .filter(([, value]) => value !== undefined)
3266
+ .map(([key, value]) => `${key}=${encodeURIComponent(String(value))}`)
3267
+ .join('&');
3268
+ let localVarUrl = localVarPath + (queryString ? `?${queryString}` : '');
3269
+ let localVarRequestOptions = {
3270
+ method: 'DELETE',
3271
+ headers: { ...localVarHeaderParams },
3272
+ };
3273
+ let requestOptions = localVarRequestOptions;
3274
+ let url = localVarUrl;
3275
+ const auth_ApiKeyAuthentication = await this.authentications.ApiKeyAuthentication.applyToRequest(requestOptions, url);
3276
+ requestOptions = auth_ApiKeyAuthentication.requestOptions;
3277
+ url = auth_ApiKeyAuthentication.url;
3278
+ const auth_JWTAuthentication = await this.authentications.JWTAuthentication.applyToRequest(requestOptions, url);
3279
+ requestOptions = auth_JWTAuthentication.requestOptions;
3280
+ url = auth_JWTAuthentication.url;
3281
+ const auth_JWTHttpHeaderAuthentication = await this.authentications.JWTHttpHeaderAuthentication.applyToRequest(requestOptions, url);
3282
+ requestOptions = auth_JWTHttpHeaderAuthentication.requestOptions;
3283
+ url = auth_JWTHttpHeaderAuthentication.url;
3284
+ const auth_OAuth2 = await this.authentications.OAuth2.applyToRequest(requestOptions, url);
3285
+ requestOptions = auth_OAuth2.requestOptions;
3286
+ url = auth_OAuth2.url;
3287
+ const authDefault = await this.authentications.default.applyToRequest(requestOptions, url);
3288
+ requestOptions = authDefault.requestOptions;
3289
+ url = authDefault.url;
3290
+ (0, models_1.applyFormParams)(requestOptions, localVarFormParams);
3291
+ const response = await fetch(url, requestOptions);
3292
+ return this.handleResponse(response, 'RemoveProjectActiveExtensionResponse');
3293
+ }
2978
3294
  /**
2979
3295
  * Revoke an API key. Note that if you revoke the development API key some services (such as automatic provisioning of devices through the serial daemon) will no longer work.
2980
3296
  * @summary Revoke API key