edge-impulse-api 1.72.8 → 1.72.10

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.
@@ -72,6 +72,7 @@ import { UpdateProjectRequest } from '../model/updateProjectRequest';
72
72
  import { UserTierEnum } from '../model/userTierEnum';
73
73
  import { Authentication } from '../model/models';
74
74
  import { ApiKeyAuth, OAuth } from '../model/models';
75
+ import { RequestFile } from './apis';
75
76
  export declare enum AdminApiApiKeys {
76
77
  ApiKeyAuthentication = 0,
77
78
  JWTAuthentication = 1,
@@ -214,6 +215,9 @@ type adminListTrashbinUserS3FilesQueryParams = {
214
215
  sourceBucket: 'ingestion' | 'cdn' | 'user-data';
215
216
  continuationToken?: string;
216
217
  };
218
+ export type adminUploadOauthClientLogoFormParams = {
219
+ image: RequestFile;
220
+ };
217
221
  export type AdminApiOpts = {
218
222
  extraHeaders?: {
219
223
  [name: string]: string;
@@ -408,6 +412,16 @@ export declare class AdminApi {
408
412
  [name: string]: string;
409
413
  };
410
414
  }): Promise<GenericApiResponse>;
415
+ /**
416
+ * Delete the logo for an existing OAuth client. This endpoint allows deleting the client\'s logo.
417
+ * @summary Delete OAuth client logo
418
+ * @param clientId Client ID
419
+ */
420
+ adminDeleteOauthClientLogo(clientId: number, options?: {
421
+ headers: {
422
+ [name: string]: string;
423
+ };
424
+ }): Promise<GenericApiResponse>;
411
425
  /**
412
426
  * Admin-only API to delete an organization. The deletion process varies based on the `fullDelete` parameter: **Soft Delete** (default, `fullDelete=false`): - Organization is marked as deleted in the database - Organization remains hidden from the product - All data is preserved and recoverable - No data is removed from S3 or FSx **Full Delete** (`fullDelete=true`): 1. Immediate soft deletion - Organization is marked as deleted and hidden from the product - Access is immediately revoked for all organization members 2. Data preservation - S3 and FSx assets are moved to a trash bin 3. Scheduled permanent deletion - A 30-day grace period begins - After 30 days, all organization data and S3 and FSx assets are permanently deleted - During the grace period: - Deletion can be cancelled by administrators - Data can be recovered if needed - Progress can be monitored via admin API
413
427
  * @summary Delete an organization
@@ -1265,5 +1279,16 @@ export declare class AdminApi {
1265
1279
  [name: string]: string;
1266
1280
  };
1267
1281
  }): Promise<GenericApiResponse>;
1282
+ /**
1283
+ * Upload a logo for an existing OAuth client. This endpoint allows updating the client\'s logo.
1284
+ * @summary Upload OAuth client logo
1285
+ * @param clientId Client ID
1286
+ * @param image
1287
+ */
1288
+ adminUploadOauthClientLogo(clientId: number, params: adminUploadOauthClientLogoFormParams, options?: {
1289
+ headers: {
1290
+ [name: string]: string;
1291
+ };
1292
+ }): Promise<GenericApiResponse>;
1268
1293
  }
1269
1294
  export {};
@@ -1334,6 +1334,81 @@ class AdminApi {
1334
1334
  });
1335
1335
  });
1336
1336
  }
1337
+ /**
1338
+ * Delete the logo for an existing OAuth client. This endpoint allows deleting the client\'s logo.
1339
+ * @summary Delete OAuth client logo
1340
+ * @param clientId Client ID
1341
+ */
1342
+ async adminDeleteOauthClientLogo(clientId, options = { headers: {} }) {
1343
+ const localVarPath = this.basePath + '/api/admin/oauth/clients/{clientId}/logo'
1344
+ .replace('{' + 'clientId' + '}', encodeURIComponent(String(clientId)));
1345
+ let localVarQueryParameters = {};
1346
+ let localVarHeaderParams = Object.assign({
1347
+ 'User-Agent': 'edgeimpulse-api nodejs'
1348
+ }, this.defaultHeaders);
1349
+ const produces = ['application/json'];
1350
+ // give precedence to 'application/json'
1351
+ if (produces.indexOf('application/json') >= 0) {
1352
+ localVarHeaderParams.Accept = 'application/json';
1353
+ }
1354
+ else {
1355
+ localVarHeaderParams.Accept = produces.join(',');
1356
+ }
1357
+ let localVarFormParams = {};
1358
+ // verify required parameter 'clientId' is not null or undefined
1359
+ if (clientId === null || clientId === undefined) {
1360
+ throw new Error('Required parameter clientId was null or undefined when calling adminDeleteOauthClientLogo.');
1361
+ }
1362
+ Object.assign(localVarHeaderParams, options.headers);
1363
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
1364
+ let localVarUseFormData = false;
1365
+ let localVarRequestOptions = {
1366
+ method: 'DELETE',
1367
+ qs: localVarQueryParameters,
1368
+ headers: localVarHeaderParams,
1369
+ uri: localVarPath,
1370
+ useQuerystring: this._useQuerystring,
1371
+ agentOptions: { keepAlive: false },
1372
+ json: true,
1373
+ };
1374
+ let authenticationPromise = Promise.resolve();
1375
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
1376
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
1377
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
1378
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
1379
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
1380
+ return authenticationPromise.then(() => {
1381
+ if (Object.keys(localVarFormParams).length) {
1382
+ if (localVarUseFormData) {
1383
+ localVarRequestOptions.formData = localVarFormParams;
1384
+ }
1385
+ else {
1386
+ localVarRequestOptions.form = localVarFormParams;
1387
+ }
1388
+ }
1389
+ return new Promise((resolve, reject) => {
1390
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
1391
+ if (error) {
1392
+ reject(error);
1393
+ }
1394
+ else {
1395
+ body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
1396
+ if (typeof body.success === 'boolean' && !body.success) {
1397
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1398
+ reject(new Error(body.error || errString));
1399
+ }
1400
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
1401
+ resolve(body);
1402
+ }
1403
+ else {
1404
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
1405
+ reject(errString);
1406
+ }
1407
+ }
1408
+ });
1409
+ });
1410
+ });
1411
+ }
1337
1412
  /**
1338
1413
  * Admin-only API to delete an organization. The deletion process varies based on the `fullDelete` parameter: **Soft Delete** (default, `fullDelete=false`): - Organization is marked as deleted in the database - Organization remains hidden from the product - All data is preserved and recoverable - No data is removed from S3 or FSx **Full Delete** (`fullDelete=true`): 1. Immediate soft deletion - Organization is marked as deleted and hidden from the product - Access is immediately revoked for all organization members 2. Data preservation - S3 and FSx assets are moved to a trash bin 3. Scheduled permanent deletion - A 30-day grace period begins - After 30 days, all organization data and S3 and FSx assets are permanently deleted - During the grace period: - Deletion can be cancelled by administrators - Data can be recovered if needed - Progress can be monitored via admin API
1339
1414
  * @summary Delete an organization
@@ -7518,6 +7593,90 @@ class AdminApi {
7518
7593
  });
7519
7594
  });
7520
7595
  }
7596
+ /**
7597
+ * Upload a logo for an existing OAuth client. This endpoint allows updating the client\'s logo.
7598
+ * @summary Upload OAuth client logo
7599
+ * @param clientId Client ID
7600
+ * @param image
7601
+ */
7602
+ async adminUploadOauthClientLogo(clientId, params, options = { headers: {} }) {
7603
+ const localVarPath = this.basePath + '/api/admin/oauth/clients/{clientId}/logo'
7604
+ .replace('{' + 'clientId' + '}', encodeURIComponent(String(clientId)));
7605
+ let localVarQueryParameters = {};
7606
+ let localVarHeaderParams = Object.assign({
7607
+ 'User-Agent': 'edgeimpulse-api nodejs'
7608
+ }, this.defaultHeaders);
7609
+ const produces = ['application/json'];
7610
+ // give precedence to 'application/json'
7611
+ if (produces.indexOf('application/json') >= 0) {
7612
+ localVarHeaderParams.Accept = 'application/json';
7613
+ }
7614
+ else {
7615
+ localVarHeaderParams.Accept = produces.join(',');
7616
+ }
7617
+ let localVarFormParams = {};
7618
+ // verify required parameter 'clientId' is not null or undefined
7619
+ if (clientId === null || clientId === undefined) {
7620
+ throw new Error('Required parameter clientId was null or undefined when calling adminUploadOauthClientLogo.');
7621
+ }
7622
+ // verify required parameter 'image' is not null or undefined
7623
+ if (params.image === null || params.image === undefined) {
7624
+ throw new Error('Required parameter params.image was null or undefined when calling adminUploadOauthClientLogo.');
7625
+ }
7626
+ Object.assign(localVarHeaderParams, options.headers);
7627
+ Object.assign(localVarHeaderParams, this.opts.extraHeaders);
7628
+ let localVarUseFormData = false;
7629
+ if (params.image !== undefined) {
7630
+ localVarFormParams['image'] = params.image;
7631
+ }
7632
+ localVarUseFormData = true;
7633
+ let localVarRequestOptions = {
7634
+ method: 'POST',
7635
+ qs: localVarQueryParameters,
7636
+ headers: localVarHeaderParams,
7637
+ uri: localVarPath,
7638
+ useQuerystring: this._useQuerystring,
7639
+ agentOptions: { keepAlive: false },
7640
+ json: true,
7641
+ };
7642
+ let authenticationPromise = Promise.resolve();
7643
+ authenticationPromise = authenticationPromise.then(() => this.authentications.ApiKeyAuthentication.applyToRequest(localVarRequestOptions));
7644
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTAuthentication.applyToRequest(localVarRequestOptions));
7645
+ authenticationPromise = authenticationPromise.then(() => this.authentications.JWTHttpHeaderAuthentication.applyToRequest(localVarRequestOptions));
7646
+ authenticationPromise = authenticationPromise.then(() => this.authentications.OAuth2.applyToRequest(localVarRequestOptions));
7647
+ authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
7648
+ return authenticationPromise.then(() => {
7649
+ if (Object.keys(localVarFormParams).length) {
7650
+ if (localVarUseFormData) {
7651
+ localVarRequestOptions.formData = localVarFormParams;
7652
+ }
7653
+ else {
7654
+ localVarRequestOptions.form = localVarFormParams;
7655
+ }
7656
+ }
7657
+ return new Promise((resolve, reject) => {
7658
+ localVarRequest(localVarRequestOptions, (error, response, body) => {
7659
+ if (error) {
7660
+ reject(error);
7661
+ }
7662
+ else {
7663
+ body = models_1.ObjectSerializer.deserialize(body, "GenericApiResponse");
7664
+ if (typeof body.success === 'boolean' && !body.success) {
7665
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
7666
+ reject(new Error(body.error || errString));
7667
+ }
7668
+ else if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
7669
+ resolve(body);
7670
+ }
7671
+ else {
7672
+ const errString = `Failed to call "${localVarPath}", returned ${response.statusCode}: ` + response.body;
7673
+ reject(errString);
7674
+ }
7675
+ }
7676
+ });
7677
+ });
7678
+ });
7679
+ }
7521
7680
  }
7522
7681
  exports.AdminApi = AdminApi;
7523
7682
  //# sourceMappingURL=adminApi.js.map