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
|
@@ -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
|