@faable/auth-sdk 1.0.9 → 1.0.11

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.
@@ -100,5 +100,21 @@ export declare class FaableAuthApi {
100
100
  updatedAt?: string;
101
101
  }[]>;
102
102
  };
103
+ listTeamMembers(params: {
104
+ query?: string;
105
+ }): Promise<{
106
+ all: () => Promise<{
107
+ id: string;
108
+ user: unknown;
109
+ team: unknown;
110
+ roles: unknown[];
111
+ metadata: {
112
+ [key: string]: unknown;
113
+ };
114
+ account: string;
115
+ createdAt: string;
116
+ updatedAt?: string;
117
+ }[]>;
118
+ }>;
103
119
  isUserMemberOfTeam(user_id: string, team_id: string): Promise<boolean>;
104
120
  }
@@ -45,7 +45,16 @@ class FaableAuthApi {
45
45
  return await handleError(this.client.get(`/team/${team_id}`));
46
46
  }
47
47
  listTeams(params) {
48
- return this.paginator.paginate({ url: "/user", params });
48
+ return this.paginator.paginate({ url: "/team", params });
49
+ }
50
+ async listTeamMembers(params) {
51
+ return this.paginator.paginate({
52
+ url: `/member`,
53
+ params: {
54
+ ...params,
55
+ expand: "team",
56
+ },
57
+ });
49
58
  }
50
59
  async isUserMemberOfTeam(user_id, team_id) {
51
60
  const members_res = await this.client.get(`/team/${team_id}/member/check/${user_id}`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faable/auth-sdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "author": "Marc Pomar <marc@faable.com>",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",