@faable/auth-sdk 1.1.2 → 1.2.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.
package/README.md CHANGED
@@ -13,7 +13,7 @@
13
13
 
14
14
  Programmatically perform FaableAuth administrative tasks though our REST API.
15
15
 
16
- > ⚠️ Use server side only. Otherwise administrative credentials may be exposed in client side.
16
+ > ⚠️ Use this library in server side only. Otherwise administrative credentials may be exposed.
17
17
 
18
18
  ## Install
19
19
 
@@ -15,6 +15,7 @@ export declare class FaableAuthApi extends FaableApi {
15
15
  id: string;
16
16
  name: string;
17
17
  domain: string;
18
+ slug: string;
18
19
  logo_src?: string | null | undefined;
19
20
  callback_hostnames: string[];
20
21
  token_signature: string;
@@ -39,7 +40,7 @@ export declare class FaableAuthApi extends FaableApi {
39
40
  phone_verified: boolean;
40
41
  country_iso?: string | null | undefined;
41
42
  birth_date?: string | null | undefined;
42
- locale: string;
43
+ locale?: string | undefined;
43
44
  region?: string | null | undefined;
44
45
  picture?: string | null | undefined;
45
46
  logins_count: number;
@@ -52,6 +53,9 @@ export declare class FaableAuthApi extends FaableApi {
52
53
  [key: string]: unknown;
53
54
  };
54
55
  account: string;
56
+ metadata: {
57
+ [key: string]: unknown;
58
+ };
55
59
  createdAt: string;
56
60
  updatedAt?: string | undefined;
57
61
  }[]>;
@@ -67,7 +71,7 @@ export declare class FaableAuthApi extends FaableApi {
67
71
  phone_verified: boolean;
68
72
  country_iso?: string | null | undefined;
69
73
  birth_date?: string | null | undefined;
70
- locale: string;
74
+ locale?: string | undefined;
71
75
  region?: string | null | undefined;
72
76
  picture?: string | null | undefined;
73
77
  logins_count: number;
@@ -80,6 +84,9 @@ export declare class FaableAuthApi extends FaableApi {
80
84
  [key: string]: unknown;
81
85
  };
82
86
  account: string;
87
+ metadata: {
88
+ [key: string]: unknown;
89
+ };
83
90
  createdAt: string;
84
91
  updatedAt?: string | undefined;
85
92
  }>>;
@@ -98,7 +105,7 @@ export declare class FaableAuthApi extends FaableApi {
98
105
  phone_verified: boolean;
99
106
  country_iso?: string | null | undefined;
100
107
  birth_date?: string | null | undefined;
101
- locale: string;
108
+ locale?: string | undefined;
102
109
  region?: string | null | undefined;
103
110
  picture?: string | null | undefined;
104
111
  logins_count: number;
@@ -111,6 +118,9 @@ export declare class FaableAuthApi extends FaableApi {
111
118
  [key: string]: unknown;
112
119
  };
113
120
  account: string;
121
+ metadata: {
122
+ [key: string]: unknown;
123
+ };
114
124
  createdAt: string;
115
125
  updatedAt?: string | undefined;
116
126
  }>>;
@@ -127,7 +137,7 @@ export declare class FaableAuthApi extends FaableApi {
127
137
  phone_verified: boolean;
128
138
  country_iso?: string | null | undefined;
129
139
  birth_date?: string | null | undefined;
130
- locale: string;
140
+ locale?: string | undefined;
131
141
  region?: string | null | undefined;
132
142
  picture?: string | null | undefined;
133
143
  logins_count: number;
@@ -140,6 +150,9 @@ export declare class FaableAuthApi extends FaableApi {
140
150
  [key: string]: unknown;
141
151
  };
142
152
  account: string;
153
+ metadata: {
154
+ [key: string]: unknown;
155
+ };
143
156
  createdAt: string;
144
157
  updatedAt?: string | undefined;
145
158
  }>;
@@ -155,7 +168,7 @@ export declare class FaableAuthApi extends FaableApi {
155
168
  phone_verified: boolean;
156
169
  country_iso?: string | null | undefined;
157
170
  birth_date?: string | null | undefined;
158
- locale: string;
171
+ locale?: string | undefined;
159
172
  region?: string | null | undefined;
160
173
  picture?: string | null | undefined;
161
174
  logins_count: number;
@@ -168,6 +181,9 @@ export declare class FaableAuthApi extends FaableApi {
168
181
  [key: string]: unknown;
169
182
  };
170
183
  account: string;
184
+ metadata: {
185
+ [key: string]: unknown;
186
+ };
171
187
  createdAt: string;
172
188
  updatedAt?: string | undefined;
173
189
  }>;
@@ -183,7 +199,7 @@ export declare class FaableAuthApi extends FaableApi {
183
199
  phone_verified: boolean;
184
200
  country_iso?: string | null | undefined;
185
201
  birth_date?: string | null | undefined;
186
- locale: string;
202
+ locale?: string | undefined;
187
203
  region?: string | null | undefined;
188
204
  picture?: string | null | undefined;
189
205
  logins_count: number;
@@ -196,6 +212,9 @@ export declare class FaableAuthApi extends FaableApi {
196
212
  [key: string]: unknown;
197
213
  };
198
214
  account: string;
215
+ metadata: {
216
+ [key: string]: unknown;
217
+ };
199
218
  createdAt: string;
200
219
  updatedAt?: string | undefined;
201
220
  }>;
@@ -205,23 +224,24 @@ export declare class FaableAuthApi extends FaableApi {
205
224
  slug: string;
206
225
  description: string | null;
207
226
  logo_url: string | null;
227
+ account: string;
208
228
  metadata: {
209
229
  [key: string]: unknown;
210
230
  };
211
- account: string;
212
231
  createdAt: string;
213
232
  updatedAt?: string | undefined;
214
233
  }>;
234
+ deleteTeam(team_id: string): Promise<any>;
215
235
  createTeam(data: TeamCreate): Promise<{
216
236
  id: string;
217
237
  name: string;
218
238
  slug: string;
219
239
  description: string | null;
220
240
  logo_url: string | null;
241
+ account: string;
221
242
  metadata: {
222
243
  [key: string]: unknown;
223
244
  };
224
- account: string;
225
245
  createdAt: string;
226
246
  updatedAt?: string | undefined;
227
247
  }>;
@@ -234,10 +254,10 @@ export declare class FaableAuthApi extends FaableApi {
234
254
  slug: string;
235
255
  description: string | null;
236
256
  logo_url: string | null;
257
+ account: string;
237
258
  metadata: {
238
259
  [key: string]: unknown;
239
260
  };
240
- account: string;
241
261
  createdAt: string;
242
262
  updatedAt?: string | undefined;
243
263
  }[]>;
@@ -247,10 +267,10 @@ export declare class FaableAuthApi extends FaableApi {
247
267
  slug: string;
248
268
  description: string | null;
249
269
  logo_url: string | null;
270
+ account: string;
250
271
  metadata: {
251
272
  [key: string]: unknown;
252
273
  };
253
- account: string;
254
274
  createdAt: string;
255
275
  updatedAt?: string | undefined;
256
276
  }>>;
@@ -263,10 +283,10 @@ export declare class FaableAuthApi extends FaableApi {
263
283
  slug: string;
264
284
  description: string | null;
265
285
  logo_url: string | null;
286
+ account: string;
266
287
  metadata: {
267
288
  [key: string]: unknown;
268
289
  };
269
- account: string;
270
290
  createdAt: string;
271
291
  updatedAt?: string | undefined;
272
292
  }>>;
@@ -279,10 +299,10 @@ export declare class FaableAuthApi extends FaableApi {
279
299
  user: unknown;
280
300
  team: unknown;
281
301
  roles: unknown[];
302
+ account: string;
282
303
  metadata: {
283
304
  [key: string]: unknown;
284
305
  };
285
- account: string;
286
306
  createdAt: string;
287
307
  updatedAt?: string | undefined;
288
308
  }[]>;
@@ -291,10 +311,10 @@ export declare class FaableAuthApi extends FaableApi {
291
311
  user: unknown;
292
312
  team: unknown;
293
313
  roles: unknown[];
314
+ account: string;
294
315
  metadata: {
295
316
  [key: string]: unknown;
296
317
  };
297
- account: string;
298
318
  createdAt: string;
299
319
  updatedAt?: string | undefined;
300
320
  }>>;
@@ -306,10 +326,10 @@ export declare class FaableAuthApi extends FaableApi {
306
326
  user: unknown;
307
327
  team: unknown;
308
328
  roles: unknown[];
329
+ account: string;
309
330
  metadata: {
310
331
  [key: string]: unknown;
311
332
  };
312
- account: string;
313
333
  createdAt: string;
314
334
  updatedAt?: string | undefined;
315
335
  }>>;
@@ -41,6 +41,9 @@ export class FaableAuthApi extends FaableApi {
41
41
  getTeam(team_id) {
42
42
  return this.fetcher.get(`/team/${team_id}`);
43
43
  }
44
+ deleteTeam(team_id) {
45
+ return this.fetcher.delete(`/team/${team_id}`);
46
+ }
44
47
  createTeam(data) {
45
48
  return this.fetcher.post(`/team`, data);
46
49
  }
@@ -49,11 +52,8 @@ export class FaableAuthApi extends FaableApi {
49
52
  }
50
53
  listTeamMembers(params) {
51
54
  return this.paginator({
52
- url: `/member`,
53
- params: {
54
- ...params,
55
- expand: "team",
56
- },
55
+ url: `/teammember`,
56
+ params,
57
57
  });
58
58
  }
59
59
  isUserMemberOfTeam(user_id, team_id) {