@thunderid/node 1.4.0 → 1.6.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/dist/ThunderIDNodeClient.d.ts +33 -0
- package/dist/ThunderIDNodeClient.d.ts.map +1 -1
- package/dist/cjs/index.cjs +1034 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1031 -2
- package/dist/models/management.d.ts +337 -0
- package/dist/models/management.d.ts.map +1 -0
- package/dist/utils/createManagementClient.d.ts +13 -0
- package/dist/utils/createManagementClient.d.ts.map +1 -0
- package/dist/utils/managementCollections.d.ts +26 -0
- package/dist/utils/managementCollections.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BackchannelLogoutResult, ExtendedAuthorizeRequestUrlParams, IdToken, ManagedFlowListResponse, ManagedUserListResponse, ManagedUserTypeListResponse, OIDCEndpoints, Storage, ThunderIDJavaScriptClient, TokenExchangeRequestConfig, TokenResponse, User } from '@thunderid/javascript';
|
|
2
2
|
import { ThunderIDNodeConfig } from './models/config';
|
|
3
|
+
import { ThunderIDNodeManagementClient } from './models/management';
|
|
3
4
|
declare class ThunderIDNodeClient<T extends ThunderIDNodeConfig = ThunderIDNodeConfig> extends ThunderIDJavaScriptClient<T> {
|
|
4
5
|
private _nodeInstanceId;
|
|
5
6
|
private _handledLogoutTokens;
|
|
@@ -74,6 +75,38 @@ declare class ThunderIDNodeClient<T extends ThunderIDNodeConfig = ThunderIDNodeC
|
|
|
74
75
|
* `userId`. The access token stays on the server.
|
|
75
76
|
*/
|
|
76
77
|
private managementRequestConfig;
|
|
78
|
+
/**
|
|
79
|
+
* Returns the management operations (users, groups, roles, agents, and their sub-resources) bound
|
|
80
|
+
* to the session identified by `sessionId`.
|
|
81
|
+
*
|
|
82
|
+
* Every request is authorized with that session's access token, read at the time of each call; the
|
|
83
|
+
* token is never copied onto the returned object or exposed to the caller. Whether a call succeeds
|
|
84
|
+
* is the server's decision: the token needs the permissions the server requires for that resource.
|
|
85
|
+
*
|
|
86
|
+
* The collection URL comes from, in order: the `url` passed to the call, then `endpoints.<resource>`
|
|
87
|
+
* in the configuration, then `{baseUrl}/{collection}`.
|
|
88
|
+
*
|
|
89
|
+
* @param sessionId - The session whose access token authorizes the requests.
|
|
90
|
+
* @returns The session-bound management client.
|
|
91
|
+
* @throws {ThunderIDRuntimeError} `NODE-MANAGEMENT-RC-NF01`, from an operation, when the session
|
|
92
|
+
* has no access token. Raised before any request is sent.
|
|
93
|
+
* @throws {ThunderIDAPIError} From an operation, when the server rejects the request. HTTP 403 and
|
|
94
|
+
* 404 surface as `<operation>-ForbiddenError-001` and `<operation>-NotFoundError-001`.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const admin = client.management(sessionId);
|
|
99
|
+
* const {users, totalResults} = await admin.users.list({limit: 20});
|
|
100
|
+
* await admin.groups.addMembers(groupId, [{id: users[0].id, type: 'user'}]);
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
management(sessionId?: string): ThunderIDNodeManagementClient;
|
|
104
|
+
/**
|
|
105
|
+
* The URL inputs and bearer token for a management request made through {@link management}. Unlike
|
|
106
|
+
* {@link managementRequestConfig}, a session without an access token is refused here rather than
|
|
107
|
+
* sent to the server with an empty credential.
|
|
108
|
+
*/
|
|
109
|
+
private sessionManagementRequestConfig;
|
|
77
110
|
/**
|
|
78
111
|
* Retrieves one page of the user directory on behalf of the session identified by `userId`.
|
|
79
112
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThunderIDNodeClient.d.ts","sourceRoot":"","sources":["../src/ThunderIDNodeClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,uBAAuB,EACvB,iCAAiC,EAIjC,OAAO,EAIP,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,aAAa,EAGb,OAAO,EAE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