@faable/auth-sdk 1.2.0 → 1.3.0

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.
@@ -335,5 +335,165 @@ export declare class FaableAuthApi extends FaableApi {
335
335
  }>>;
336
336
  };
337
337
  isUserMemberOfTeam(user_id: string, team_id: string): Promise<boolean>;
338
+ listConections(): {
339
+ all: () => Promise<{
340
+ id: string;
341
+ connection_name: string;
342
+ connection_type: string;
343
+ authorize_url?: string | null | undefined;
344
+ client_id: string;
345
+ client_secret: string;
346
+ scope: string[];
347
+ authorize_params: {
348
+ [key: string]: string;
349
+ };
350
+ account: string;
351
+ metadata: {
352
+ [key: string]: unknown;
353
+ };
354
+ createdAt: string;
355
+ updatedAt?: string | undefined;
356
+ }[]>;
357
+ first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
358
+ id: string;
359
+ connection_name: string;
360
+ connection_type: string;
361
+ authorize_url?: string | null | undefined;
362
+ client_id: string;
363
+ client_secret: string;
364
+ scope: string[];
365
+ authorize_params: {
366
+ [key: string]: string;
367
+ };
368
+ account: string;
369
+ metadata: {
370
+ [key: string]: unknown;
371
+ };
372
+ createdAt: string;
373
+ updatedAt?: string | undefined;
374
+ }>>;
375
+ pass: (params?: {
376
+ cursor?: string | undefined;
377
+ pageSize?: string | undefined;
378
+ } | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
379
+ id: string;
380
+ connection_name: string;
381
+ connection_type: string;
382
+ authorize_url?: string | null | undefined;
383
+ client_id: string;
384
+ client_secret: string;
385
+ scope: string[];
386
+ authorize_params: {
387
+ [key: string]: string;
388
+ };
389
+ account: string;
390
+ metadata: {
391
+ [key: string]: unknown;
392
+ };
393
+ createdAt: string;
394
+ updatedAt?: string | undefined;
395
+ }>>;
396
+ };
397
+ getConection(connection_id: string): Promise<{
398
+ id: string;
399
+ connection_name: string;
400
+ connection_type: string;
401
+ authorize_url?: string | null | undefined;
402
+ client_id: string;
403
+ client_secret: string;
404
+ scope: string[];
405
+ authorize_params: {
406
+ [key: string]: string;
407
+ };
408
+ account: string;
409
+ metadata: {
410
+ [key: string]: unknown;
411
+ };
412
+ createdAt: string;
413
+ updatedAt?: string | undefined;
414
+ }>;
415
+ listClients(): {
416
+ all: () => Promise<{
417
+ id: string;
418
+ name: string;
419
+ description: string;
420
+ client_id: string;
421
+ client_secret: string;
422
+ callbacks: string[];
423
+ logout_urls: string[];
424
+ refresh_token: {
425
+ expiration_mode: "expire" | "not-expire";
426
+ infinite_token_lifetime: boolean;
427
+ token_lifetime: number;
428
+ };
429
+ account: string;
430
+ metadata: {
431
+ [key: string]: unknown;
432
+ };
433
+ createdAt: string;
434
+ updatedAt?: string | undefined;
435
+ }[]>;
436
+ first: () => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
437
+ id: string;
438
+ name: string;
439
+ description: string;
440
+ client_id: string;
441
+ client_secret: string;
442
+ callbacks: string[];
443
+ logout_urls: string[];
444
+ refresh_token: {
445
+ expiration_mode: "expire" | "not-expire";
446
+ infinite_token_lifetime: boolean;
447
+ token_lifetime: number;
448
+ };
449
+ account: string;
450
+ metadata: {
451
+ [key: string]: unknown;
452
+ };
453
+ createdAt: string;
454
+ updatedAt?: string | undefined;
455
+ }>>;
456
+ pass: (params?: {
457
+ cursor?: string | undefined;
458
+ pageSize?: string | undefined;
459
+ } | undefined) => Promise<import("@faable/sdk-base/dist/helpers/paginator.js").Page<{
460
+ id: string;
461
+ name: string;
462
+ description: string;
463
+ client_id: string;
464
+ client_secret: string;
465
+ callbacks: string[];
466
+ logout_urls: string[];
467
+ refresh_token: {
468
+ expiration_mode: "expire" | "not-expire";
469
+ infinite_token_lifetime: boolean;
470
+ token_lifetime: number;
471
+ };
472
+ account: string;
473
+ metadata: {
474
+ [key: string]: unknown;
475
+ };
476
+ createdAt: string;
477
+ updatedAt?: string | undefined;
478
+ }>>;
479
+ };
480
+ getClient(client_id: string): Promise<{
481
+ id: string;
482
+ connection_name: string;
483
+ connection_type: string;
484
+ authorize_url?: string | null | undefined;
485
+ client_id: string;
486
+ client_secret: string;
487
+ scope: string[];
488
+ authorize_params: {
489
+ [key: string]: string;
490
+ };
491
+ account: string;
492
+ metadata: {
493
+ [key: string]: unknown;
494
+ };
495
+ createdAt: string;
496
+ updatedAt?: string | undefined;
497
+ }>;
338
498
  }
339
499
  export {};
@@ -59,4 +59,16 @@ export class FaableAuthApi extends FaableApi {
59
59
  isUserMemberOfTeam(user_id, team_id) {
60
60
  return this.fetcher.check(`/team/${team_id}/member/check/${user_id}`);
61
61
  }
62
+ listConections() {
63
+ return this.paginator({ url: "/connection" });
64
+ }
65
+ getConection(connection_id) {
66
+ return this.fetcher.get(`/connection/${connection_id}`);
67
+ }
68
+ listClients() {
69
+ return this.paginator({ url: "/client" });
70
+ }
71
+ getClient(client_id) {
72
+ return this.fetcher.get(`/client/${client_id}`);
73
+ }
62
74
  }
@@ -115,6 +115,18 @@ export interface paths {
115
115
  };
116
116
  };
117
117
  };
118
+ /**
119
+ * Delete an Account
120
+ * @description Delete an Account
121
+ */
122
+ delete: {
123
+ parameters: {
124
+ path: {
125
+ account_id: string;
126
+ };
127
+ };
128
+ responses: {};
129
+ };
118
130
  };
119
131
  "/account/host/{host}": {
120
132
  /**
@@ -6,3 +6,5 @@ export type Team = components["schemas"]["Team"];
6
6
  export type TeamMember = components["schemas"]["TeamMember"];
7
7
  export type TeamCreate = components["schemas"]["TeamCreate"];
8
8
  export type AuthAccount = components["schemas"]["AuthAccount"];
9
+ export type Connection = components["schemas"]["Connection"];
10
+ export type Client = components["schemas"]["Client"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",