@thunderid/javascript 1.0.6 → 1.1.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/api/agents/createAgent.d.ts +28 -0
- package/dist/api/agents/createAgent.d.ts.map +1 -0
- package/dist/api/agents/deleteAgent.d.ts +27 -0
- package/dist/api/agents/deleteAgent.d.ts.map +1 -0
- package/dist/api/agents/getAgent.d.ts +28 -0
- package/dist/api/agents/getAgent.d.ts.map +1 -0
- package/dist/api/agents/getAgents.d.ts +23 -0
- package/dist/api/agents/getAgents.d.ts.map +1 -0
- package/dist/api/agents/updateAgent.d.ts +33 -0
- package/dist/api/agents/updateAgent.d.ts.map +1 -0
- package/dist/api/applications/createApplication.d.ts +28 -0
- package/dist/api/applications/createApplication.d.ts.map +1 -0
- package/dist/api/applications/deleteApplication.d.ts +27 -0
- package/dist/api/applications/deleteApplication.d.ts.map +1 -0
- package/dist/api/applications/getApplication.d.ts +28 -0
- package/dist/api/applications/getApplication.d.ts.map +1 -0
- package/dist/api/applications/getApplications.d.ts +24 -0
- package/dist/api/applications/getApplications.d.ts.map +1 -0
- package/dist/api/applications/updateApplication.d.ts +33 -0
- package/dist/api/applications/updateApplication.d.ts.map +1 -0
- package/dist/api/updateMeCredentials.d.ts +66 -0
- package/dist/api/updateMeCredentials.d.ts.map +1 -0
- package/dist/api/users/createUser.d.ts +28 -0
- package/dist/api/users/createUser.d.ts.map +1 -0
- package/dist/api/users/deleteUser.d.ts +27 -0
- package/dist/api/users/deleteUser.d.ts.map +1 -0
- package/dist/api/users/getUser.d.ts +28 -0
- package/dist/api/users/getUser.d.ts.map +1 -0
- package/dist/api/users/getUsers.d.ts +24 -0
- package/dist/api/users/getUsers.d.ts.map +1 -0
- package/dist/api/users/updateUser.d.ts +33 -0
- package/dist/api/users/updateUser.d.ts.map +1 -0
- package/dist/cjs/index.cjs +934 -0
- package/dist/constants/AgentQueryKeys.d.ts +10 -0
- package/dist/constants/AgentQueryKeys.d.ts.map +1 -0
- package/dist/constants/ApplicationQueryKeys.d.ts +10 -0
- package/dist/constants/ApplicationQueryKeys.d.ts.map +1 -0
- package/dist/constants/CredentialConstants.d.ts +22 -0
- package/dist/constants/CredentialConstants.d.ts.map +1 -0
- package/dist/constants/UserQueryKeys.d.ts +10 -0
- package/dist/constants/UserQueryKeys.d.ts.map +1 -0
- package/dist/edge/index.js +905 -1
- package/dist/i18n/models/i18n.d.ts +13 -0
- package/dist/i18n/models/i18n.d.ts.map +1 -1
- package/dist/i18n/translations/en-US.d.ts.map +1 -1
- package/dist/i18n/translations/fr-FR.d.ts.map +1 -1
- package/dist/i18n/translations/hi-IN.d.ts.map +1 -1
- package/dist/i18n/translations/ja-JP.d.ts.map +1 -1
- package/dist/i18n/translations/pt-BR.d.ts.map +1 -1
- package/dist/i18n/translations/pt-PT.d.ts.map +1 -1
- package/dist/i18n/translations/si-LK.d.ts.map +1 -1
- package/dist/i18n/translations/ta-IN.d.ts.map +1 -1
- package/dist/i18n/translations/te-IN.d.ts.map +1 -1
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +905 -1
- package/dist/models/agent-resource.d.ts +96 -0
- package/dist/models/agent-resource.d.ts.map +1 -0
- package/dist/models/api.d.ts +57 -0
- package/dist/models/api.d.ts.map +1 -0
- package/dist/models/application.d.ts +271 -0
- package/dist/models/application.d.ts.map +1 -0
- package/dist/models/config.d.ts +26 -1
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/managed-user.d.ts +44 -0
- package/dist/models/managed-user.d.ts.map +1 -0
- package/dist/utils/evaluateChangePasswordForm.d.ts +64 -0
- package/dist/utils/evaluateChangePasswordForm.d.ts.map +1 -0
- package/dist/utils/evaluatePasswordPolicy.d.ts +60 -0
- package/dist/utils/evaluatePasswordPolicy.d.ts.map +1 -0
- package/dist/utils/mapCredentialUpdateError.d.ts +31 -0
- package/dist/utils/mapCredentialUpdateError.d.ts.map +1 -0
- package/dist/utils/requestManagementResource.d.ts +41 -0
- package/dist/utils/requestManagementResource.d.ts.map +1 -0
- package/dist/utils/resolveChangeCredentialPolicy.d.ts +24 -0
- package/dist/utils/resolveChangeCredentialPolicy.d.ts.map +1 -0
- package/dist/utils/resolveResourceEndpoint.d.ts +1 -1
- package/dist/utils/resolveResourceEndpoint.d.ts.map +1 -1
- package/dist/utils/supportsCredential.d.ts +32 -0
- package/dist/utils/supportsCredential.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Agent, CreateAgentRequest } from '../../models/agent-resource';
|
|
2
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the createAgent request.
|
|
5
|
+
*/
|
|
6
|
+
export interface CreateAgentConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* The agent to create.
|
|
9
|
+
*/
|
|
10
|
+
payload: CreateAgentRequest;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates an agent.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration object.
|
|
16
|
+
* @returns A promise that resolves with the agent as the server stored it.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const agent = await createAgent({
|
|
21
|
+
* baseUrl: 'https://localhost:8090',
|
|
22
|
+
* payload: {ouId, type: 'default', name: 'Nightly Sync Worker'},
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const createAgent: ({ payload, ...config }: CreateAgentConfig) => Promise<Agent>;
|
|
27
|
+
export default createAgent;
|
|
28
|
+
//# sourceMappingURL=createAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAgent.d.ts","sourceRoot":"","sources":["../../../src/api/agents/createAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAE,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAChE;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,WAAW,GAAU,wBAAsB,iBAAiB,KAAG,OAAO,CAAC,KAAK,CAO9E,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the deleteAgent request.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeleteAgentConfig extends ManagementRequestConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Identifier of the agent to delete.
|
|
8
|
+
*/
|
|
9
|
+
agentId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Deletes an agent.
|
|
13
|
+
*
|
|
14
|
+
* @param config - Request configuration object.
|
|
15
|
+
* @returns A promise that resolves once the agent is deleted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* await deleteAgent({
|
|
20
|
+
* baseUrl: 'https://localhost:8090',
|
|
21
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare const deleteAgent: ({ agentId, ...config }: DeleteAgentConfig) => Promise<void>;
|
|
26
|
+
export default deleteAgent;
|
|
27
|
+
//# sourceMappingURL=deleteAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteAgent.d.ts","sourceRoot":"","sources":["../../../src/api/agents/deleteAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAChE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,WAAW,GAAU,wBAAsB,iBAAiB,KAAG,OAAO,CAAC,IAAI,CAO7E,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Agent } from '../../models/agent-resource';
|
|
2
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the getAgent request.
|
|
5
|
+
*/
|
|
6
|
+
export interface GetAgentConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier of the agent to retrieve.
|
|
9
|
+
*/
|
|
10
|
+
agentId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a single agent.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration object.
|
|
16
|
+
* @returns A promise that resolves with the agent.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const agent = await getAgent({
|
|
21
|
+
* baseUrl: 'https://localhost:8090',
|
|
22
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const getAgent: ({ agentId, ...config }: GetAgentConfig) => Promise<Agent>;
|
|
27
|
+
export default getAgent;
|
|
28
|
+
//# sourceMappingURL=getAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAgent.d.ts","sourceRoot":"","sources":["../../../src/api/agents/getAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,uBAAuB;IAC7D;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,QAAQ,GAAU,wBAAsB,cAAc,KAAG,OAAO,CAAC,KAAK,CAQxE,CAAC;AAEL,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AgentListResponse } from '../../models/agent-resource';
|
|
2
|
+
import { ApiFilteringParams, ManagementRequestConfig } from '../../models/api';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the getAgents request.
|
|
5
|
+
*/
|
|
6
|
+
export type GetAgentsConfig = ManagementRequestConfig & Pick<ApiFilteringParams, 'limit' | 'offset'>;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a page of agents.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Request configuration object.
|
|
11
|
+
* @returns A promise that resolves with the page of agents.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const {agents, totalResults} = await getAgents({
|
|
16
|
+
* baseUrl: 'https://localhost:8090',
|
|
17
|
+
* limit: 10,
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare const getAgents: ({ limit, offset, ...config }: GetAgentsConfig) => Promise<AgentListResponse>;
|
|
22
|
+
export default getAgents;
|
|
23
|
+
//# sourceMappingURL=getAgents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getAgents.d.ts","sourceRoot":"","sources":["../../../src/api/agents/getAgents.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAG7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,uBAAuB,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAErG;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,SAAS,GAAU,8BAA4B,eAAe,KAAG,OAAO,CAAC,iBAAiB,CAO5F,CAAC;AAEL,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Agent, UpdateAgentRequest } from '../../models/agent-resource';
|
|
2
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the updateAgent request.
|
|
5
|
+
*/
|
|
6
|
+
export interface UpdateAgentConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier of the agent to update.
|
|
9
|
+
*/
|
|
10
|
+
agentId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The agent's new state.
|
|
13
|
+
*/
|
|
14
|
+
payload: UpdateAgentRequest;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Updates an agent.
|
|
18
|
+
*
|
|
19
|
+
* @param config - Request configuration object.
|
|
20
|
+
* @returns A promise that resolves with the updated agent.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const agent = await updateAgent({
|
|
25
|
+
* baseUrl: 'https://localhost:8090',
|
|
26
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
27
|
+
* payload: {name: 'Renamed Agent'},
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare const updateAgent: ({ agentId, payload, ...config }: UpdateAgentConfig) => Promise<Agent>;
|
|
32
|
+
export default updateAgent;
|
|
33
|
+
//# sourceMappingURL=updateAgent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateAgent.d.ts","sourceRoot":"","sources":["../../../src/api/agents/updateAgent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,KAAK,EAAE,kBAAkB,EAAC,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,uBAAuB;IAChE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,WAAW,GAAU,iCAA+B,iBAAiB,KAAG,OAAO,CAAC,KAAK,CAQvF,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { Application, CreateApplicationRequest } from '../../models/application';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the createApplication request.
|
|
5
|
+
*/
|
|
6
|
+
export interface CreateApplicationConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* The application to create.
|
|
9
|
+
*/
|
|
10
|
+
payload: CreateApplicationRequest;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates an application.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration object.
|
|
16
|
+
* @returns A promise that resolves with the application as the server stored it.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const application = await createApplication({
|
|
21
|
+
* baseUrl: 'https://localhost:8090',
|
|
22
|
+
* payload: {name: 'My SPA', url: 'http://localhost:3000'},
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const createApplication: ({ payload, ...config }: CreateApplicationConfig) => Promise<Application>;
|
|
27
|
+
export default createApplication;
|
|
28
|
+
//# sourceMappingURL=createApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createApplication.d.ts","sourceRoot":"","sources":["../../../src/api/applications/createApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAC;AAG/E;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;IACtE;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,iBAAiB,GAAU,wBAAsB,uBAAuB,KAAG,OAAO,CAAC,WAAW,CAOhG,CAAC;AAEL,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the deleteApplication request.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeleteApplicationConfig extends ManagementRequestConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Identifier of the application to delete.
|
|
8
|
+
*/
|
|
9
|
+
applicationId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Deletes an application.
|
|
13
|
+
*
|
|
14
|
+
* @param config - Request configuration object.
|
|
15
|
+
* @returns A promise that resolves once the application is deleted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* await deleteApplication({
|
|
20
|
+
* baseUrl: 'https://localhost:8090',
|
|
21
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare const deleteApplication: ({ applicationId, ...config }: DeleteApplicationConfig) => Promise<void>;
|
|
26
|
+
export default deleteApplication;
|
|
27
|
+
//# sourceMappingURL=deleteApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteApplication.d.ts","sourceRoot":"","sources":["../../../src/api/applications/deleteApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;IACtE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,iBAAiB,GAAU,8BAA4B,uBAAuB,KAAG,OAAO,CAAC,IAAI,CAO/F,CAAC;AAEL,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { Application } from '../../models/application';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the getApplication request.
|
|
5
|
+
*/
|
|
6
|
+
export interface GetApplicationConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier of the application to retrieve.
|
|
9
|
+
*/
|
|
10
|
+
applicationId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a single application.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration object.
|
|
16
|
+
* @returns A promise that resolves with the application.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const application = await getApplication({
|
|
21
|
+
* baseUrl: 'https://localhost:8090',
|
|
22
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const getApplication: ({ applicationId, ...config }: GetApplicationConfig) => Promise<Application>;
|
|
27
|
+
export default getApplication;
|
|
28
|
+
//# sourceMappingURL=getApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getApplication.d.ts","sourceRoot":"","sources":["../../../src/api/applications/getApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAGrD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB;IACnE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,cAAc,GAAU,8BAA4B,oBAAoB,KAAG,OAAO,CAAC,WAAW,CAOhG,CAAC;AAEL,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApiFilteringParams, ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { ApplicationListResponse } from '../../models/application';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the getApplications request.
|
|
5
|
+
*/
|
|
6
|
+
export type GetApplicationsConfig = ManagementRequestConfig & Pick<ApiFilteringParams, 'limit' | 'offset'>;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a page of applications.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Request configuration object.
|
|
11
|
+
* @returns A promise that resolves with the page of applications.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const {applications, totalResults} = await getApplications({
|
|
16
|
+
* baseUrl: 'https://localhost:8090',
|
|
17
|
+
* limit: 10,
|
|
18
|
+
* offset: 0,
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const getApplications: ({ limit, offset, ...config }: GetApplicationsConfig) => Promise<ApplicationListResponse>;
|
|
23
|
+
export default getApplications;
|
|
24
|
+
//# sourceMappingURL=getApplications.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getApplications.d.ts","sourceRoot":"","sources":["../../../src/api/applications/getApplications.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAC,uBAAuB,EAAC,MAAM,0BAA0B,CAAC;AAGjE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,uBAAuB,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,QAAQ,CAAC,CAAC;AAE3G;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,eAAe,GAAU,8BAA4B,qBAAqB,KAAG,OAAO,CAAC,uBAAuB,CAO9G,CAAC;AAEL,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { Application, UpdateApplicationRequest } from '../../models/application';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the updateApplication request.
|
|
5
|
+
*/
|
|
6
|
+
export interface UpdateApplicationConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier of the application to update.
|
|
9
|
+
*/
|
|
10
|
+
applicationId: string;
|
|
11
|
+
/**
|
|
12
|
+
* The application's new state. Mutable fields are replaced, not merged.
|
|
13
|
+
*/
|
|
14
|
+
payload: UpdateApplicationRequest;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Updates an application.
|
|
18
|
+
*
|
|
19
|
+
* @param config - Request configuration object.
|
|
20
|
+
* @returns A promise that resolves with the updated application.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const application = await updateApplication({
|
|
25
|
+
* baseUrl: 'https://localhost:8090',
|
|
26
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
27
|
+
* payload: {...existing, name: 'Renamed'},
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare const updateApplication: ({ applicationId, payload, ...config }: UpdateApplicationConfig) => Promise<Application>;
|
|
32
|
+
export default updateApplication;
|
|
33
|
+
//# sourceMappingURL=updateApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateApplication.d.ts","sourceRoot":"","sources":["../../../src/api/applications/updateApplication.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAC,MAAM,0BAA0B,CAAC;AAG/E;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;IACtE;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,iBAAiB,GAAU,uCAAqC,uBAAuB,KAAG,OAAO,CAAC,WAAW,CAQ/G,CAAC;AAEL,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for the updateMeCredentials request
|
|
3
|
+
*/
|
|
4
|
+
export interface UpdateMeCredentialsConfig extends Omit<RequestInit, 'method' | 'body'> {
|
|
5
|
+
/**
|
|
6
|
+
* The base path of the API endpoint.
|
|
7
|
+
*/
|
|
8
|
+
baseUrl?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Optional custom fetcher function.
|
|
11
|
+
* If not provided, native fetch will be used
|
|
12
|
+
*/
|
|
13
|
+
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
14
|
+
/**
|
|
15
|
+
* The new values to set, keyed by credential name, whatever attribute the user's entity
|
|
16
|
+
* type schema declares `credential: true` (for example `password` or `pin`). One or more
|
|
17
|
+
* may be included in a single call. The server requires each value here to be a plain
|
|
18
|
+
* string, and the whole map to be wrapped under `attributes` on the wire, which this
|
|
19
|
+
* function does; do not pass a pre-wrapped `{attributes: ...}` object.
|
|
20
|
+
*/
|
|
21
|
+
payload: Record<string, string>;
|
|
22
|
+
/**
|
|
23
|
+
* The absolute API endpoint.
|
|
24
|
+
*/
|
|
25
|
+
url?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Updates one or more of the signed-in user's credentials at the
|
|
29
|
+
* /users/me/update-credentials endpoint.
|
|
30
|
+
*
|
|
31
|
+
* The endpoint responds with `204 No Content` on success, so this function resolves with
|
|
32
|
+
* `void` rather than a parsed body.
|
|
33
|
+
*
|
|
34
|
+
* @param config - Configuration object with URL, payload and optional request config.
|
|
35
|
+
* @returns A promise that resolves once the credentials have been updated.
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* // Using default fetch
|
|
39
|
+
* await updateMeCredentials({
|
|
40
|
+
* url: "https://localhost:8090/users/me/update-credentials",
|
|
41
|
+
* payload: {password: "n3wP@ssword!"}
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* // Using custom fetcher (e.g. an httpClient that attaches the access token)
|
|
48
|
+
* await updateMeCredentials({
|
|
49
|
+
* baseUrl: "https://localhost:8090",
|
|
50
|
+
* payload: {password: "n3wP@ssword!"},
|
|
51
|
+
* fetcher: async (url, config) => {
|
|
52
|
+
* const response = await httpClient({url, method: config.method, headers: config.headers, data: config.body});
|
|
53
|
+
* return {
|
|
54
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
55
|
+
* status: response.status,
|
|
56
|
+
* statusText: response.statusText,
|
|
57
|
+
* json: () => Promise.resolve(response.data),
|
|
58
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
59
|
+
* } as Response;
|
|
60
|
+
* }
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
declare const updateMeCredentials: ({ url, baseUrl, payload, fetcher, ...requestConfig }: UpdateMeCredentialsConfig) => Promise<void>;
|
|
65
|
+
export default updateMeCredentials;
|
|
66
|
+
//# sourceMappingURL=updateMeCredentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateMeCredentials.d.ts","sourceRoot":"","sources":["../../src/api/updateMeCredentials.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,CAAC;IACrF;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,QAAA,MAAM,mBAAmB,GAAU,sDAMhC,yBAAyB,KAAG,OAAO,CAAC,IAAI,CAwD1C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { CreateManagedUserRequest, ManagedUser } from '../../models/managed-user';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the createUser request.
|
|
5
|
+
*/
|
|
6
|
+
export interface CreateUserConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* The user to create.
|
|
9
|
+
*/
|
|
10
|
+
payload: CreateManagedUserRequest;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates a user.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration object.
|
|
16
|
+
* @returns A promise that resolves with the user as the server stored it.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const user = await createUser({
|
|
21
|
+
* baseUrl: 'https://localhost:8090',
|
|
22
|
+
* payload: {ouId, type: 'customer', attributes: {username: 'alice'}},
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const createUser: ({ payload, ...config }: CreateUserConfig) => Promise<ManagedUser>;
|
|
27
|
+
export default createUser;
|
|
28
|
+
//# sourceMappingURL=createUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createUser.d.ts","sourceRoot":"","sources":["../../../src/api/users/createUser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,wBAAwB,EAAE,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAGhF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC/D;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;CACnC;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,UAAU,GAAU,wBAAsB,gBAAgB,KAAG,OAAO,CAAC,WAAW,CAOlF,CAAC;AAEL,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for the deleteUser request.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeleteUserConfig extends ManagementRequestConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Identifier of the user to delete.
|
|
8
|
+
*/
|
|
9
|
+
userId: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Deletes a user.
|
|
13
|
+
*
|
|
14
|
+
* @param config - Request configuration object.
|
|
15
|
+
* @returns A promise that resolves once the user is deleted.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* await deleteUser({
|
|
20
|
+
* baseUrl: 'https://localhost:8090',
|
|
21
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare const deleteUser: ({ userId, ...config }: DeleteUserConfig) => Promise<void>;
|
|
26
|
+
export default deleteUser;
|
|
27
|
+
//# sourceMappingURL=deleteUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteUser.d.ts","sourceRoot":"","sources":["../../../src/api/users/deleteUser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAGzD;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC/D;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,UAAU,GAAU,uBAAqB,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAO1E,CAAC;AAEL,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { ManagedUser } from '../../models/managed-user';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the getUser request.
|
|
5
|
+
*/
|
|
6
|
+
export interface GetUserConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier of the user to retrieve.
|
|
9
|
+
*/
|
|
10
|
+
userId: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a single user, with its resolved `display` value.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Request configuration object.
|
|
16
|
+
* @returns A promise that resolves with the user.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* const user = await getUser({
|
|
21
|
+
* baseUrl: 'https://localhost:8090',
|
|
22
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const getUser: ({ userId, ...config }: GetUserConfig) => Promise<ManagedUser>;
|
|
27
|
+
export default getUser;
|
|
28
|
+
//# sourceMappingURL=getUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUser.d.ts","sourceRoot":"","sources":["../../../src/api/users/getUser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAGtD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,uBAAuB;IAC5D;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,OAAO,GAAU,uBAAqB,aAAa,KAAG,OAAO,CAAC,WAAW,CAQ3E,CAAC;AAEL,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ApiFilteringParams, ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { ManagedUserListResponse } from '../../models/managed-user';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the getUsers request.
|
|
5
|
+
*/
|
|
6
|
+
export type GetUsersConfig = ManagementRequestConfig & ApiFilteringParams;
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves a page of users. Each user carries its resolved `display` value.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Request configuration object.
|
|
11
|
+
* @returns A promise that resolves with the page of users.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const {users, totalResults} = await getUsers({
|
|
16
|
+
* baseUrl: 'https://localhost:8090',
|
|
17
|
+
* limit: 10,
|
|
18
|
+
* filter: 'username eq "alice"',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const getUsers: ({ filter, limit, offset, ...config }: GetUsersConfig) => Promise<ManagedUserListResponse>;
|
|
23
|
+
export default getUsers;
|
|
24
|
+
//# sourceMappingURL=getUsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUsers.d.ts","sourceRoot":"","sources":["../../../src/api/users/getUsers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAC;AAGlE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,kBAAkB,CAAC;AAE1E;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,QAAQ,GAAU,sCAAoC,cAAc,KAAG,OAAO,CAAC,uBAAuB,CAOxG,CAAC;AAEL,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ManagementRequestConfig } from '../../models/api';
|
|
2
|
+
import { ManagedUser, UpdateManagedUserRequest } from '../../models/managed-user';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for the updateUser request.
|
|
5
|
+
*/
|
|
6
|
+
export interface UpdateUserConfig extends ManagementRequestConfig {
|
|
7
|
+
/**
|
|
8
|
+
* The user's new state.
|
|
9
|
+
*/
|
|
10
|
+
payload: UpdateManagedUserRequest;
|
|
11
|
+
/**
|
|
12
|
+
* Identifier of the user to update.
|
|
13
|
+
*/
|
|
14
|
+
userId: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Updates a user.
|
|
18
|
+
*
|
|
19
|
+
* @param config - Request configuration object.
|
|
20
|
+
* @returns A promise that resolves with the updated user.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const user = await updateUser({
|
|
25
|
+
* baseUrl: 'https://localhost:8090',
|
|
26
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
27
|
+
* payload: {attributes: {givenName: 'Alice'}},
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare const updateUser: ({ userId, payload, ...config }: UpdateUserConfig) => Promise<ManagedUser>;
|
|
32
|
+
export default updateUser;
|
|
33
|
+
//# sourceMappingURL=updateUser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateUser.d.ts","sourceRoot":"","sources":["../../../src/api/users/updateUser.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,uBAAuB,EAAC,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAC,WAAW,EAAE,wBAAwB,EAAC,MAAM,2BAA2B,CAAC;AAGhF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;IAC/D;;OAEG;IACH,OAAO,EAAE,wBAAwB,CAAC;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU,GAAU,gCAA8B,gBAAgB,KAAG,OAAO,CAAC,WAAW,CAQ1F,CAAC;AAEL,eAAe,UAAU,CAAC"}
|