@@ -63,7 +63,7 @@ export class ApiClient {
63
63
) ;
64
64
}
65
65
66
- private getAccessToken = async ( ) => {
66
+ private getAccessToken = async ( ) : Promise < string | undefined > => {
67
67
if ( ! this . hasCredentials ( ) ) {
68
68
return undefined ;
69
69
}
@@ -145,7 +145,7 @@ export class ApiClient {
145
145
// the username and password (for example, encodes `_` to %5F, which is wrong).
146
146
return {
147
147
client : { client_id : clientId } ,
148
- clientAuth : ( _as , client , _body , headers ) => {
148
+ clientAuth : ( _as , client , _body , headers ) : void => {
149
149
const credentials = Buffer . from ( `${ clientId } :${ clientSecret } ` ) . toString ( "base64" ) ;
150
150
headers . set ( "Authorization" , `Basic ${ credentials } ` ) ;
151
151
} ,
@@ -305,6 +305,7 @@ export class ApiClient {
305
305
}
306
306
307
307
// DO NOT EDIT. This is auto-generated code.
308
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
308
309
async listClustersForAllProjects ( options ?: FetchOptions < operations [ "listClustersForAllProjects" ] > ) {
309
310
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/clusters" , options ) ;
310
311
if ( error ) {
@@ -313,6 +314,7 @@ export class ApiClient {
313
314
return data ;
314
315
}
315
316
317
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
316
318
async listProjects ( options ?: FetchOptions < operations [ "listProjects" ] > ) {
317
319
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/groups" , options ) ;
318
320
if ( error ) {
@@ -321,6 +323,7 @@ export class ApiClient {
321
323
return data ;
322
324
}
323
325
326
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
324
327
async createProject ( options : FetchOptions < operations [ "createProject" ] > ) {
325
328
const { data, error, response } = await this . client . POST ( "/api/atlas/v2/groups" , options ) ;
326
329
if ( error ) {
@@ -329,13 +332,15 @@ export class ApiClient {
329
332
return data ;
330
333
}
331
334
335
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
332
336
async deleteProject ( options : FetchOptions < operations [ "deleteProject" ] > ) {
333
337
const { error, response } = await this . client . DELETE ( "/api/atlas/v2/groups/{groupId}" , options ) ;
334
338
if ( error ) {
335
339
throw ApiClientError . fromError ( response , error ) ;
336
340
}
337
341
}
338
342
343
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
339
344
async getProject ( options : FetchOptions < operations [ "getProject" ] > ) {
340
345
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/groups/{groupId}" , options ) ;
341
346
if ( error ) {
@@ -344,6 +349,7 @@ export class ApiClient {
344
349
return data ;
345
350
}
346
351
352
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
347
353
async listProjectIpAccessLists ( options : FetchOptions < operations [ "listProjectIpAccessLists" ] > ) {
348
354
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/groups/{groupId}/accessList" , options ) ;
349
355
if ( error ) {
@@ -352,6 +358,7 @@ export class ApiClient {
352
358
return data ;
353
359
}
354
360
361
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
355
362
async createProjectIpAccessList ( options : FetchOptions < operations [ "createProjectIpAccessList" ] > ) {
356
363
const { data, error, response } = await this . client . POST ( "/api/atlas/v2/groups/{groupId}/accessList" , options ) ;
357
364
if ( error ) {
@@ -360,6 +367,7 @@ export class ApiClient {
360
367
return data ;
361
368
}
362
369
370
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
363
371
async deleteProjectIpAccessList ( options : FetchOptions < operations [ "deleteProjectIpAccessList" ] > ) {
364
372
const { error, response } = await this . client . DELETE (
365
373
"/api/atlas/v2/groups/{groupId}/accessList/{entryValue}" ,
@@ -370,6 +378,7 @@ export class ApiClient {
370
378
}
371
379
}
372
380
381
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
373
382
async listAlerts ( options : FetchOptions < operations [ "listAlerts" ] > ) {
374
383
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/groups/{groupId}/alerts" , options ) ;
375
384
if ( error ) {
@@ -378,6 +387,7 @@ export class ApiClient {
378
387
return data ;
379
388
}
380
389
390
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
381
391
async listClusters ( options : FetchOptions < operations [ "listClusters" ] > ) {
382
392
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/groups/{groupId}/clusters" , options ) ;
383
393
if ( error ) {
@@ -386,6 +396,7 @@ export class ApiClient {
386
396
return data ;
387
397
}
388
398
399
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
389
400
async createCluster ( options : FetchOptions < operations [ "createCluster" ] > ) {
390
401
const { data, error, response } = await this . client . POST ( "/api/atlas/v2/groups/{groupId}/clusters" , options ) ;
391
402
if ( error ) {
@@ -394,6 +405,7 @@ export class ApiClient {
394
405
return data ;
395
406
}
396
407
408
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
397
409
async deleteCluster ( options : FetchOptions < operations [ "deleteCluster" ] > ) {
398
410
const { error, response } = await this . client . DELETE (
399
411
"/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" ,
@@ -404,18 +416,19 @@ export class ApiClient {
404
416
}
405
417
}
406
418
419
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
407
420
async getCluster ( options : FetchOptions < operations [ "getCluster" ] > ) {
408
421
const { data, error, response } = await this . client . GET (
409
422
"/api/atlas/v2/groups/{groupId}/clusters/{clusterName}" ,
410
423
options
411
424
) ;
412
-
413
425
if ( error ) {
414
426
throw ApiClientError . fromError ( response , error ) ;
415
427
}
416
428
return data ;
417
429
}
418
430
431
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
419
432
async listDatabaseUsers ( options : FetchOptions < operations [ "listDatabaseUsers" ] > ) {
420
433
const { data, error, response } = await this . client . GET (
421
434
"/api/atlas/v2/groups/{groupId}/databaseUsers" ,
@@ -427,6 +440,7 @@ export class ApiClient {
427
440
return data ;
428
441
}
429
442
443
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
430
444
async createDatabaseUser ( options : FetchOptions < operations [ "createDatabaseUser" ] > ) {
431
445
const { data, error, response } = await this . client . POST (
432
446
"/api/atlas/v2/groups/{groupId}/databaseUsers" ,
@@ -438,6 +452,7 @@ export class ApiClient {
438
452
return data ;
439
453
}
440
454
455
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
441
456
async deleteDatabaseUser ( options : FetchOptions < operations [ "deleteDatabaseUser" ] > ) {
442
457
const { error, response } = await this . client . DELETE (
443
458
"/api/atlas/v2/groups/{groupId}/databaseUsers/{databaseName}/{username}" ,
@@ -448,6 +463,7 @@ export class ApiClient {
448
463
}
449
464
}
450
465
466
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
451
467
async listFlexClusters ( options : FetchOptions < operations [ "listFlexClusters" ] > ) {
452
468
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/groups/{groupId}/flexClusters" , options ) ;
453
469
if ( error ) {
@@ -456,6 +472,7 @@ export class ApiClient {
456
472
return data ;
457
473
}
458
474
475
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
459
476
async createFlexCluster ( options : FetchOptions < operations [ "createFlexCluster" ] > ) {
460
477
const { data, error, response } = await this . client . POST (
461
478
"/api/atlas/v2/groups/{groupId}/flexClusters" ,
@@ -467,6 +484,7 @@ export class ApiClient {
467
484
return data ;
468
485
}
469
486
487
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
470
488
async deleteFlexCluster ( options : FetchOptions < operations [ "deleteFlexCluster" ] > ) {
471
489
const { error, response } = await this . client . DELETE (
472
490
"/api/atlas/v2/groups/{groupId}/flexClusters/{name}" ,
@@ -477,6 +495,7 @@ export class ApiClient {
477
495
}
478
496
}
479
497
498
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
480
499
async getFlexCluster ( options : FetchOptions < operations [ "getFlexCluster" ] > ) {
481
500
const { data, error, response } = await this . client . GET (
482
501
"/api/atlas/v2/groups/{groupId}/flexClusters/{name}" ,
@@ -488,6 +507,7 @@ export class ApiClient {
488
507
return data ;
489
508
}
490
509
510
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
491
511
async listOrganizations ( options ?: FetchOptions < operations [ "listOrganizations" ] > ) {
492
512
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/orgs" , options ) ;
493
513
if ( error ) {
@@ -496,6 +516,7 @@ export class ApiClient {
496
516
return data ;
497
517
}
498
518
519
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
499
520
async listOrganizationProjects ( options : FetchOptions < operations [ "listOrganizationProjects" ] > ) {
500
521
const { data, error, response } = await this . client . GET ( "/api/atlas/v2/orgs/{orgId}/groups" , options ) ;
501
522
if ( error ) {
0 commit comments