@faable/auth-sdk 1.0.11 → 1.0.13
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.
- package/dist/FaableAuthApi.d.ts +16 -2
- package/dist/FaableAuthApi.js +4 -1
- package/package.json +1 -1
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from "axios";
|
|
2
|
+
import { TeamCreate } from "./types";
|
|
2
3
|
import { FaablePaginator } from "./paginator";
|
|
3
4
|
export declare class FaableAuthApi {
|
|
4
5
|
client: AxiosInstance;
|
|
@@ -83,6 +84,19 @@ export declare class FaableAuthApi {
|
|
|
83
84
|
createdAt: string;
|
|
84
85
|
updatedAt?: string;
|
|
85
86
|
}>;
|
|
87
|
+
createTeam(data: TeamCreate): Promise<{
|
|
88
|
+
id: string;
|
|
89
|
+
name: string;
|
|
90
|
+
slug: string;
|
|
91
|
+
description: string;
|
|
92
|
+
logo_url: string;
|
|
93
|
+
metadata: {
|
|
94
|
+
[key: string]: unknown;
|
|
95
|
+
};
|
|
96
|
+
account: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
updatedAt?: string;
|
|
99
|
+
}>;
|
|
86
100
|
listTeams(params?: {
|
|
87
101
|
user_id?: string;
|
|
88
102
|
}): {
|
|
@@ -102,7 +116,7 @@ export declare class FaableAuthApi {
|
|
|
102
116
|
};
|
|
103
117
|
listTeamMembers(params: {
|
|
104
118
|
query?: string;
|
|
105
|
-
}):
|
|
119
|
+
}): {
|
|
106
120
|
all: () => Promise<{
|
|
107
121
|
id: string;
|
|
108
122
|
user: unknown;
|
|
@@ -115,6 +129,6 @@ export declare class FaableAuthApi {
|
|
|
115
129
|
createdAt: string;
|
|
116
130
|
updatedAt?: string;
|
|
117
131
|
}[]>;
|
|
118
|
-
}
|
|
132
|
+
};
|
|
119
133
|
isUserMemberOfTeam(user_id: string, team_id: string): Promise<boolean>;
|
|
120
134
|
}
|
package/dist/FaableAuthApi.js
CHANGED
|
@@ -44,10 +44,13 @@ class FaableAuthApi {
|
|
|
44
44
|
async getTeam(team_id) {
|
|
45
45
|
return await handleError(this.client.get(`/team/${team_id}`));
|
|
46
46
|
}
|
|
47
|
+
async createTeam(data) {
|
|
48
|
+
return handleError(this.client.post(`/team`, data));
|
|
49
|
+
}
|
|
47
50
|
listTeams(params) {
|
|
48
51
|
return this.paginator.paginate({ url: "/team", params });
|
|
49
52
|
}
|
|
50
|
-
|
|
53
|
+
listTeamMembers(params) {
|
|
51
54
|
return this.paginator.paginate({
|
|
52
55
|
url: `/member`,
|
|
53
56
|
params: {
|