@faable/auth-sdk 1.0.2 → 1.0.4
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 +2 -10
- package/dist/FaableAuthApi.d.ts +1 -0
- package/dist/FaableAuthApi.js +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,20 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a aria-label="NPM version" href="https://www.npmjs.com/package/@faable/auth-sdk">
|
|
10
|
-
<img alt="" src="https://img.shields.io/npm/v/@faable/
|
|
10
|
+
<img alt="" src="https://img.shields.io/npm/v/@faable/auth-sdk.svg?style=for-the-badge&labelColor=000000">
|
|
11
11
|
</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
## Install
|
|
15
15
|
|
|
16
|
-
With Yarn:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
yarn add @faablecloud/auth-sdk
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
With NPM:
|
|
23
|
-
|
|
24
16
|
```bash
|
|
25
|
-
npm install @
|
|
17
|
+
npm install @faable/auth-sdk
|
|
26
18
|
```
|
package/dist/FaableAuthApi.d.ts
CHANGED
package/dist/FaableAuthApi.js
CHANGED
|
@@ -32,5 +32,12 @@ class FaableAuthApi {
|
|
|
32
32
|
return (await handleError(this.client.get(`/user/${user_id}`)))
|
|
33
33
|
.user_metadata;
|
|
34
34
|
}
|
|
35
|
+
async isUserMemberOfTeam(user_id, team_id) {
|
|
36
|
+
const members_res = await this.client.get(`/team/${team_id}/member/check/${user_id}`, {
|
|
37
|
+
validateStatus: () => true,
|
|
38
|
+
});
|
|
39
|
+
// Check access via status
|
|
40
|
+
return members_res.status == 200;
|
|
41
|
+
}
|
|
35
42
|
}
|
|
36
43
|
exports.FaableAuthApi = FaableAuthApi;
|