@profcomff/api-uilib 2024.7.2-5.1 → 2024.7.25
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 +5 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,22 +8,11 @@
|
|
|
8
8
|
## Использование
|
|
9
9
|
|
|
10
10
|
```ts
|
|
11
|
-
import {
|
|
11
|
+
import { client } from @profcomff/api-uilib;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// Setup token for requests to API
|
|
18
|
-
// It is optional, only for routes with authention
|
|
19
|
-
setupAuth("myApiTokenHere");
|
|
20
|
-
|
|
21
|
-
// Make request
|
|
22
|
-
const me_with_scopes = await apiClient.GET("/auth/me", {
|
|
23
|
-
params: {
|
|
24
|
-
query: {
|
|
25
|
-
info: ["session_scopes"]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
13
|
+
const me = await client.GET('/auth/me', {
|
|
14
|
+
params: {
|
|
15
|
+
info: ["groups", "indirect_groups", "session_scopes", "user_scopes", "auth_methods"],
|
|
16
|
+
},
|
|
28
17
|
});
|
|
29
18
|
```
|