@faable/auth-sdk 1.0.6 → 1.0.8

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.
@@ -12,7 +12,7 @@ export declare class FaableAuthApi {
12
12
  }>;
13
13
  listUsers(params?: {
14
14
  email?: string;
15
- }): Promise<{
15
+ }): {
16
16
  all: () => Promise<{
17
17
  id: string;
18
18
  name?: string;
@@ -41,7 +41,7 @@ export declare class FaableAuthApi {
41
41
  createdAt: string;
42
42
  updatedAt?: string;
43
43
  }[]>;
44
- }>;
44
+ };
45
45
  getUser(user_id: any): Promise<{
46
46
  id: string;
47
47
  name?: string;
@@ -70,9 +70,22 @@ export declare class FaableAuthApi {
70
70
  createdAt: string;
71
71
  updatedAt?: string;
72
72
  }>;
73
+ getTeam(team_id: any): Promise<{
74
+ id: string;
75
+ name: string;
76
+ slug: string;
77
+ description: string;
78
+ logo_url: string;
79
+ metadata: {
80
+ [key: string]: unknown;
81
+ };
82
+ account: string;
83
+ createdAt: string;
84
+ updatedAt?: string;
85
+ }>;
73
86
  listTeams(params?: {
74
87
  user_id?: string;
75
- }): Promise<{
88
+ }): {
76
89
  all: () => Promise<{
77
90
  id: string;
78
91
  name: string;
@@ -86,6 +99,6 @@ export declare class FaableAuthApi {
86
99
  createdAt: string;
87
100
  updatedAt?: string;
88
101
  }[]>;
89
- }>;
102
+ };
90
103
  isUserMemberOfTeam(user_id: string, team_id: string): Promise<boolean>;
91
104
  }
@@ -35,13 +35,16 @@ class FaableAuthApi {
35
35
  return (await handleError(this.client.get(`/user/${user_id}`)))
36
36
  .user_metadata;
37
37
  }
38
- async listUsers(params = {}) {
38
+ listUsers(params = {}) {
39
39
  return this.paginator.paginate({ url: "/user", params });
40
40
  }
41
41
  async getUser(user_id) {
42
42
  return await handleError(this.client.get(`/user/${user_id}`));
43
43
  }
44
- async listTeams(params) {
44
+ async getTeam(team_id) {
45
+ return await handleError(this.client.get(`/team/${team_id}`));
46
+ }
47
+ listTeams(params) {
45
48
  return this.paginator.paginate({ url: "/user", params });
46
49
  }
47
50
  async isUserMemberOfTeam(user_id, team_id) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",