@thunderid/javascript 0.3.0 → 0.3.7
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/StorageManager.d.ts +2 -2
- package/dist/StorageManager.d.ts.map +1 -1
- package/dist/ThunderIDJavaScriptClient.d.ts +2 -12
- package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -1
- package/dist/api/{v2/executeEmbeddedRecoveryFlowV2.d.ts → executeEmbeddedRecoveryFlow.d.ts} +7 -7
- package/dist/api/executeEmbeddedRecoveryFlow.d.ts.map +1 -0
- package/dist/api/executeEmbeddedSignInFlow.d.ts +3 -3
- package/dist/api/executeEmbeddedSignInFlow.d.ts.map +1 -1
- package/dist/api/executeEmbeddedSignUpFlow.d.ts +4 -27
- package/dist/api/executeEmbeddedSignUpFlow.d.ts.map +1 -1
- package/dist/api/{v2/executeEmbeddedUserOnboardingFlowV2.d.ts → executeEmbeddedUserOnboardingFlow.d.ts} +6 -6
- package/dist/api/executeEmbeddedUserOnboardingFlow.d.ts.map +1 -0
- package/dist/api/{v2/getFlowMetaV2.d.ts → getFlowMeta.d.ts} +7 -7
- package/dist/api/getFlowMeta.d.ts.map +1 -0
- package/dist/api/getOrganizationUnitChildren.d.ts +86 -0
- package/dist/api/getOrganizationUnitChildren.d.ts.map +1 -0
- package/dist/cjs/index.cjs +1440 -2496
- package/dist/edge/index.js +1428 -2464
- package/dist/errors/exception.d.ts +1 -3
- package/dist/errors/exception.d.ts.map +1 -1
- package/dist/i18n/models/i18n.d.ts +3 -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 +29 -53
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1428 -2464
- package/dist/models/client.d.ts +3 -53
- package/dist/models/client.d.ts.map +1 -1
- package/dist/models/config.d.ts +1 -16
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/embedded-flow.d.ts +572 -92
- package/dist/models/embedded-flow.d.ts.map +1 -1
- package/dist/models/{v2/embedded-recovery-flow-v2.d.ts → embedded-recovery-flow.d.ts} +2 -3
- package/dist/models/embedded-recovery-flow.d.ts.map +1 -0
- package/dist/models/embedded-signin-flow.d.ts +310 -66
- package/dist/models/embedded-signin-flow.d.ts.map +1 -1
- package/dist/models/{v2/embedded-signup-flow-v2.d.ts → embedded-signup-flow.d.ts} +4 -5
- package/dist/models/embedded-signup-flow.d.ts.map +1 -0
- package/dist/models/extensions/components.d.ts +55 -0
- package/dist/models/extensions/components.d.ts.map +1 -0
- package/dist/models/{v2/flow-meta-v2.d.ts → flow-meta.d.ts} +1 -1
- package/dist/models/flow-meta.d.ts.map +1 -0
- package/dist/models/translation.d.ts.map +1 -0
- package/dist/models/{v2/vars.d.ts → vars.d.ts} +1 -1
- package/dist/models/vars.d.ts.map +1 -0
- package/dist/utils/buildValidatorFromRules.d.ts +31 -0
- package/dist/utils/buildValidatorFromRules.d.ts.map +1 -0
- package/dist/utils/containsMetaFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/countryCodeToFlagEmoji.d.ts.map +1 -0
- package/dist/utils/evaluateValidationRule.d.ts +42 -0
- package/dist/utils/evaluateValidationRule.d.ts.map +1 -0
- package/dist/utils/extractEmojiFromUri.d.ts.map +1 -0
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts +1 -1
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts.map +1 -1
- package/dist/utils/injectRequestedPermissions.d.ts.map +1 -0
- package/dist/utils/isEmojiUri.d.ts.map +1 -0
- package/dist/utils/isMetaFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/isTranslationFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/parseApiErrorMessage.d.ts.map +1 -1
- package/dist/utils/parseFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/{v2/resolveFlowTemplateLiterals.d.ts → resolveFlowTemplateLiterals.d.ts} +2 -2
- package/dist/utils/resolveFlowTemplateLiterals.d.ts.map +1 -0
- package/dist/utils/resolveLocaleDisplayName.d.ts.map +1 -0
- package/dist/utils/resolveLocaleEmoji.d.ts.map +1 -0
- package/dist/utils/{v2/resolveMeta.d.ts → resolveMeta.d.ts} +1 -1
- package/dist/utils/resolveMeta.d.ts.map +1 -0
- package/package.json +7 -7
- package/dist/api/createOrganization.d.ts +0 -130
- package/dist/api/createOrganization.d.ts.map +0 -1
- package/dist/api/getAllOrganizations.d.ts +0 -104
- package/dist/api/getAllOrganizations.d.ts.map +0 -1
- package/dist/api/getBrandingPreference.d.ts +0 -104
- package/dist/api/getBrandingPreference.d.ts.map +0 -1
- package/dist/api/getMeOrganizations.d.ts +0 -120
- package/dist/api/getMeOrganizations.d.ts.map +0 -1
- package/dist/api/getOrganization.d.ts +0 -110
- package/dist/api/getOrganization.d.ts.map +0 -1
- package/dist/api/initializeEmbeddedSignInFlow.d.ts +0 -52
- package/dist/api/initializeEmbeddedSignInFlow.d.ts.map +0 -1
- package/dist/api/updateOrganization.d.ts +0 -119
- package/dist/api/updateOrganization.d.ts.map +0 -1
- package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts.map +0 -1
- package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts +0 -22
- package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts.map +0 -1
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts +0 -22
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts.map +0 -1
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts.map +0 -1
- package/dist/api/v2/getFlowMetaV2.d.ts.map +0 -1
- package/dist/api/v2/getOrganizationUnitChildren.d.ts +0 -43
- package/dist/api/v2/getOrganizationUnitChildren.d.ts.map +0 -1
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts +0 -40
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts.map +0 -1
- package/dist/models/branding-preference.d.ts +0 -249
- package/dist/models/branding-preference.d.ts.map +0 -1
- package/dist/models/organization.d.ts +0 -34
- package/dist/models/organization.d.ts.map +0 -1
- package/dist/models/platforms.d.ts +0 -33
- package/dist/models/platforms.d.ts.map +0 -1
- package/dist/models/v2/embedded-flow-v2.d.ts +0 -550
- package/dist/models/v2/embedded-flow-v2.d.ts.map +0 -1
- package/dist/models/v2/embedded-recovery-flow-v2.d.ts.map +0 -1
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +0 -345
- package/dist/models/v2/embedded-signin-flow-v2.d.ts.map +0 -1
- package/dist/models/v2/embedded-signup-flow-v2.d.ts.map +0 -1
- package/dist/models/v2/extensions/components.d.ts +0 -89
- package/dist/models/v2/extensions/components.d.ts.map +0 -1
- package/dist/models/v2/flow-meta-v2.d.ts.map +0 -1
- package/dist/models/v2/organization-unit.d.ts +0 -103
- package/dist/models/v2/organization-unit.d.ts.map +0 -1
- package/dist/models/v2/translation.d.ts.map +0 -1
- package/dist/models/v2/vars.d.ts.map +0 -1
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts +0 -40
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts.map +0 -1
- package/dist/utils/identifyPlatform.d.ts +0 -31
- package/dist/utils/identifyPlatform.d.ts.map +0 -1
- package/dist/utils/resolveFieldType.d.ts +0 -21
- package/dist/utils/resolveFieldType.d.ts.map +0 -1
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts +0 -49
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts.map +0 -1
- package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts.map +0 -1
- package/dist/utils/v2/countryCodeToFlagEmoji.d.ts.map +0 -1
- package/dist/utils/v2/extractEmojiFromUri.d.ts.map +0 -1
- package/dist/utils/v2/injectRequestedPermissions.d.ts.map +0 -1
- package/dist/utils/v2/isEmojiUri.d.ts.map +0 -1
- package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts.map +0 -1
- package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts.map +0 -1
- package/dist/utils/v2/parseFlowTemplateLiteral.d.ts.map +0 -1
- package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts.map +0 -1
- package/dist/utils/v2/resolveLocaleDisplayName.d.ts.map +0 -1
- package/dist/utils/v2/resolveLocaleEmoji.d.ts.map +0 -1
- package/dist/utils/v2/resolveMeta.d.ts.map +0 -1
- /package/dist/models/{v2/translation.d.ts → translation.d.ts} +0 -0
- /package/dist/utils/{v2/containsMetaFlowTemplateLiteral.d.ts → containsMetaFlowTemplateLiteral.d.ts} +0 -0
- /package/dist/utils/{v2/countryCodeToFlagEmoji.d.ts → countryCodeToFlagEmoji.d.ts} +0 -0
- /package/dist/utils/{v2/extractEmojiFromUri.d.ts → extractEmojiFromUri.d.ts} +0 -0
- /package/dist/utils/{v2/injectRequestedPermissions.d.ts → injectRequestedPermissions.d.ts} +0 -0
- /package/dist/utils/{v2/isEmojiUri.d.ts → isEmojiUri.d.ts} +0 -0
- /package/dist/utils/{v2/isMetaFlowTemplateLiteral.d.ts → isMetaFlowTemplateLiteral.d.ts} +0 -0
- /package/dist/utils/{v2/isTranslationFlowTemplateLiteral.d.ts → isTranslationFlowTemplateLiteral.d.ts} +0 -0
- /package/dist/utils/{v2/parseFlowTemplateLiteral.d.ts → parseFlowTemplateLiteral.d.ts} +0 -0
- /package/dist/utils/{v2/resolveLocaleDisplayName.d.ts → resolveLocaleDisplayName.d.ts} +0 -0
- /package/dist/utils/{v2/resolveLocaleEmoji.d.ts → resolveLocaleEmoji.d.ts} +0 -0
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* Extended organization interface with additional properties
|
|
20
|
-
*/
|
|
21
|
-
export interface OrganizationDetails {
|
|
22
|
-
attributes?: Record<string, any>;
|
|
23
|
-
created?: string;
|
|
24
|
-
description?: string;
|
|
25
|
-
id: string;
|
|
26
|
-
lastModified?: string;
|
|
27
|
-
name: string;
|
|
28
|
-
orgHandle: string;
|
|
29
|
-
parent?: {
|
|
30
|
-
id: string;
|
|
31
|
-
ref: string;
|
|
32
|
-
};
|
|
33
|
-
permissions?: string[];
|
|
34
|
-
status?: string;
|
|
35
|
-
type?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Configuration for the getOrganization request
|
|
39
|
-
*/
|
|
40
|
-
export interface GetOrganizationConfig extends Omit<RequestInit, 'method'> {
|
|
41
|
-
/**
|
|
42
|
-
* The base URL for the API endpoint.
|
|
43
|
-
*/
|
|
44
|
-
baseUrl: string;
|
|
45
|
-
/**
|
|
46
|
-
* Optional custom fetcher function.
|
|
47
|
-
* If not provided, native fetch will be used
|
|
48
|
-
*/
|
|
49
|
-
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
50
|
-
/**
|
|
51
|
-
* The ID of the organization to retrieve
|
|
52
|
-
*/
|
|
53
|
-
organizationId: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Retrieves detailed information for a specific organization.
|
|
57
|
-
*
|
|
58
|
-
* @param config - Configuration object containing baseUrl, organizationId, and request config.
|
|
59
|
-
* @returns A promise that resolves with the organization details.
|
|
60
|
-
* @example
|
|
61
|
-
* ```typescript
|
|
62
|
-
* // Using default fetch
|
|
63
|
-
* try {
|
|
64
|
-
* const organization = await getOrganization({
|
|
65
|
-
* baseUrl: "https://localhost:8090",
|
|
66
|
-
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1"
|
|
67
|
-
* });
|
|
68
|
-
* console.log(organization);
|
|
69
|
-
* } catch (error) {
|
|
70
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
71
|
-
* console.error('Failed to get organization:', error.message);
|
|
72
|
-
* }
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```typescript
|
|
78
|
-
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
79
|
-
* try {
|
|
80
|
-
* const organization = await getOrganization({
|
|
81
|
-
* baseUrl: "https://localhost:8090",
|
|
82
|
-
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
83
|
-
* fetcher: async (url, config) => {
|
|
84
|
-
* const response = await httpClient({
|
|
85
|
-
* url,
|
|
86
|
-
* method: config.method,
|
|
87
|
-
* headers: config.headers,
|
|
88
|
-
* ...config
|
|
89
|
-
* });
|
|
90
|
-
* // Convert axios-like response to fetch-like Response
|
|
91
|
-
* return {
|
|
92
|
-
* ok: response.status >= 200 && response.status < 300,
|
|
93
|
-
* status: response.status,
|
|
94
|
-
* statusText: response.statusText,
|
|
95
|
-
* json: () => Promise.resolve(response.data),
|
|
96
|
-
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
97
|
-
* } as Response;
|
|
98
|
-
* }
|
|
99
|
-
* });
|
|
100
|
-
* console.log(organization);
|
|
101
|
-
* } catch (error) {
|
|
102
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
103
|
-
* console.error('Failed to get organization:', error.message);
|
|
104
|
-
* }
|
|
105
|
-
* }
|
|
106
|
-
* ```
|
|
107
|
-
*/
|
|
108
|
-
declare const getOrganization: ({ baseUrl, organizationId, fetcher, ...requestConfig }: GetOrganizationConfig) => Promise<OrganizationDetails>;
|
|
109
|
-
export default getOrganization;
|
|
110
|
-
//# sourceMappingURL=getOrganization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOrganization.d.ts","sourceRoot":"","sources":["../../src/api/getOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IACxE;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,QAAA,MAAM,eAAe,GAAU,wDAK5B,qBAAqB,KAAG,OAAO,CAAC,mBAAmB,CAmErD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { EmbeddedFlowExecuteRequestConfig } from '../models/embedded-flow';
|
|
19
|
-
import { EmbeddedSignInFlowInitiateResponse } from '../models/embedded-signin-flow';
|
|
20
|
-
/**
|
|
21
|
-
* Sends an authorization request to the specified OAuth2/OIDC authorization endpoint.
|
|
22
|
-
*
|
|
23
|
-
* @param requestConfig - Request configuration object containing URL and payload.
|
|
24
|
-
* @returns A promise that resolves with the authorization response.
|
|
25
|
-
* @throws ThunderIDAPIError when the request fails or URL is invalid.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```typescript
|
|
29
|
-
* try {
|
|
30
|
-
* const authResponse = await initializeEmbeddedSignInFlow({
|
|
31
|
-
* url: "https://localhost:8090/oauth2/authorize",
|
|
32
|
-
* payload: {
|
|
33
|
-
* response_type: "code",
|
|
34
|
-
* client_id: "your-client-id",
|
|
35
|
-
* redirect_uri: "https://your-app.com/callback",
|
|
36
|
-
* scope: "openid profile email",
|
|
37
|
-
* state: "random-state-value",
|
|
38
|
-
* code_challenge: "your-pkce-challenge",
|
|
39
|
-
* code_challenge_method: "S256"
|
|
40
|
-
* }
|
|
41
|
-
* });
|
|
42
|
-
* console.log(authResponse);
|
|
43
|
-
* } catch (error) {
|
|
44
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
45
|
-
* console.error('Authorization failed:', error.message);
|
|
46
|
-
* }
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
declare const initializeEmbeddedSignInFlow: ({ url, baseUrl, payload, ...requestConfig }: EmbeddedFlowExecuteRequestConfig) => Promise<EmbeddedSignInFlowInitiateResponse>;
|
|
51
|
-
export default initializeEmbeddedSignInFlow;
|
|
52
|
-
//# sourceMappingURL=initializeEmbeddedSignInFlow.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initializeEmbeddedSignInFlow.d.ts","sourceRoot":"","sources":["../../src/api/initializeEmbeddedSignInFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,EAAC,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAC,kCAAkC,EAAC,MAAM,gCAAgC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,4BAA4B,GAAU,6CAKzC,gCAAgC,KAAG,OAAO,CAAC,kCAAkC,CAsE/E,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { OrganizationDetails } from './getOrganization';
|
|
19
|
-
/**
|
|
20
|
-
* Configuration for the updateOrganization request
|
|
21
|
-
*/
|
|
22
|
-
export interface UpdateOrganizationConfig extends Omit<RequestInit, 'method' | 'body'> {
|
|
23
|
-
/**
|
|
24
|
-
* The base URL for the API endpoint.
|
|
25
|
-
*/
|
|
26
|
-
baseUrl: string;
|
|
27
|
-
/**
|
|
28
|
-
* Optional custom fetcher function.
|
|
29
|
-
* If not provided, native fetch will be used
|
|
30
|
-
*/
|
|
31
|
-
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
32
|
-
/**
|
|
33
|
-
* Array of patch operations to apply
|
|
34
|
-
*/
|
|
35
|
-
operations: {
|
|
36
|
-
operation: 'REPLACE' | 'ADD' | 'REMOVE';
|
|
37
|
-
path: string;
|
|
38
|
-
value?: any;
|
|
39
|
-
}[];
|
|
40
|
-
/**
|
|
41
|
-
* The ID of the organization to update
|
|
42
|
-
*/
|
|
43
|
-
organizationId: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Updates the organization information using the Organizations Management API.
|
|
47
|
-
*
|
|
48
|
-
* @param config - Configuration object with baseUrl, organizationId, operations and optional request config.
|
|
49
|
-
* @returns A promise that resolves with the updated organization information.
|
|
50
|
-
* @example
|
|
51
|
-
* ```typescript
|
|
52
|
-
* // Using the helper function to create operations automatically
|
|
53
|
-
* const operations = createPatchOperations({
|
|
54
|
-
* name: "Updated Organization Name", // Will use REPLACE
|
|
55
|
-
* description: "", // Will use REMOVE (empty string)
|
|
56
|
-
* customField: "Some value" // Will use REPLACE
|
|
57
|
-
* });
|
|
58
|
-
*
|
|
59
|
-
* await updateOrganization({
|
|
60
|
-
* baseUrl: "https://localhost:8090",
|
|
61
|
-
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
62
|
-
* operations
|
|
63
|
-
* });
|
|
64
|
-
*
|
|
65
|
-
* // Or manually specify operations
|
|
66
|
-
* await updateOrganization({
|
|
67
|
-
* baseUrl: "https://localhost:8090",
|
|
68
|
-
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
69
|
-
* operations: [
|
|
70
|
-
* { operation: "REPLACE", path: "/name", value: "Updated Organization Name" },
|
|
71
|
-
* { operation: "REMOVE", path: "/description" }
|
|
72
|
-
* ]
|
|
73
|
-
* });
|
|
74
|
-
* ```
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```typescript
|
|
78
|
-
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
79
|
-
* await updateOrganization({
|
|
80
|
-
* baseUrl: "https://localhost:8090",
|
|
81
|
-
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
82
|
-
* operations: [
|
|
83
|
-
* { operation: "REPLACE", path: "/name", value: "Updated Organization Name" }
|
|
84
|
-
* ],
|
|
85
|
-
* fetcher: async (url, config) => {
|
|
86
|
-
* const response = await httpClient({
|
|
87
|
-
* url,
|
|
88
|
-
* method: config.method,
|
|
89
|
-
* headers: config.headers,
|
|
90
|
-
* data: config.body,
|
|
91
|
-
* ...config
|
|
92
|
-
* });
|
|
93
|
-
* // Convert axios-like response to fetch-like Response
|
|
94
|
-
* return {
|
|
95
|
-
* ok: response.status >= 200 && response.status < 300,
|
|
96
|
-
* status: response.status,
|
|
97
|
-
* statusText: response.statusText,
|
|
98
|
-
* json: () => Promise.resolve(response.data),
|
|
99
|
-
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
100
|
-
* } as Response;
|
|
101
|
-
* }
|
|
102
|
-
* });
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
declare const updateOrganization: ({ baseUrl, organizationId, operations, fetcher, ...requestConfig }: UpdateOrganizationConfig) => Promise<OrganizationDetails>;
|
|
106
|
-
/**
|
|
107
|
-
* Helper function to convert field updates to patch operations format.
|
|
108
|
-
* Uses REMOVE operation when the value is empty, otherwise uses REPLACE.
|
|
109
|
-
*
|
|
110
|
-
* @param payload - Object containing field updates
|
|
111
|
-
* @returns Array of patch operations
|
|
112
|
-
*/
|
|
113
|
-
export declare const createPatchOperations: (payload: Record<string, any>) => {
|
|
114
|
-
operation: "REPLACE" | "REMOVE";
|
|
115
|
-
path: string;
|
|
116
|
-
value?: any;
|
|
117
|
-
}[];
|
|
118
|
-
export default updateOrganization;
|
|
119
|
-
//# sourceMappingURL=updateOrganization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateOrganization.d.ts","sourceRoot":"","sources":["../../src/api/updateOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAItD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,CAAC;IACpF;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,UAAU,EAAE;QACV,SAAS,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;QACxC,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,EAAE,CAAC;IACJ;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,QAAA,MAAM,kBAAkB,GAAU,oEAM/B,wBAAwB,KAAG,OAAO,CAAC,mBAAmB,CA8ExD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC3B;IACD,SAAS,EAAE,SAAS,GAAG,QAAQ,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,EAcG,CAAC;AAEL,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executeEmbeddedRecoveryFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedRecoveryFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kCAAkC,CAAC;AACxH,OAAO,EAAC,4BAA4B,EAAC,MAAM,2CAA2C,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,6BAA6B,GAAU,6CAK1C,kCAAkC,KAAG,OAAO,CAAC,4BAA4B,CAsE3E,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
-
import { EmbeddedSignInFlowResponse as EmbeddedSignInFlowResponseV2 } from '../../models/v2/embedded-signin-flow-v2';
|
|
20
|
-
declare const executeEmbeddedSignInFlowV2: ({ url, baseUrl, payload, authId, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedSignInFlowResponseV2>;
|
|
21
|
-
export default executeEmbeddedSignInFlowV2;
|
|
22
|
-
//# sourceMappingURL=executeEmbeddedSignInFlowV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executeEmbeddedSignInFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedSignInFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kCAAkC,CAAC;AACxH,OAAO,EACL,0BAA0B,IAAI,4BAA4B,EAE3D,MAAM,yCAAyC,CAAC;AAGjD,QAAA,MAAM,2BAA2B,GAAU,qDAMxC,kCAAkC,KAAG,OAAO,CAAC,4BAA4B,CAyH3E,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025-2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
-
import { EmbeddedSignUpFlowResponse as EmbeddedSignUpFlowResponseV2 } from '../../models/v2/embedded-signup-flow-v2';
|
|
20
|
-
declare const executeEmbeddedSignUpFlowV2: ({ url, baseUrl, payload, authId, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedSignUpFlowResponseV2>;
|
|
21
|
-
export default executeEmbeddedSignUpFlowV2;
|
|
22
|
-
//# sourceMappingURL=executeEmbeddedSignUpFlowV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executeEmbeddedSignUpFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedSignUpFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kCAAkC,CAAC;AACxH,OAAO,EACL,0BAA0B,IAAI,4BAA4B,EAE3D,MAAM,yCAAyC,CAAC;AAGjD,QAAA,MAAM,2BAA2B,GAAU,qDAMxC,kCAAkC,KAAG,OAAO,CAAC,4BAA4B,CAyH3E,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"executeEmbeddedUserOnboardingFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedUserOnboardingFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EACL,gCAAgC,IAAI,kCAAkC,EACtE,kBAAkB,EACnB,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,IAAI,CAAC,EAAE;QACL;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAExC;;WAEG;QACH,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;KACpB,CAAC;IAEF;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAE3B;;OAEG;IACH,UAAU,EAAE,YAAY,GAAG,UAAU,GAAG,OAAO,CAAC;IAEhD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,mCAAmC,GAAU,6CAKhD,kCAAkC,KAAG,OAAO,CAAC,kCAAkC,CAyEjF,CAAC;AAEF,eAAe,mCAAmC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFlowMetaV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/getFlowMetaV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,oBAAoB,EAAE,wBAAwB,EAAC,MAAM,8BAA8B,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,aAAa,GAAU,mEAQ1B,wBAAwB,KAAG,OAAO,CAAC,oBAAoB,CAoCzD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { GetOrganizationUnitChildrenConfig, OrganizationUnitListResponse } from '../../models/v2/organization-unit';
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves the child organization units of a given parent OU.
|
|
21
|
-
*
|
|
22
|
-
* @param config - Request configuration including `baseUrl`/`url`, `organizationUnitId`,
|
|
23
|
-
* and optional `limit`/`offset` pagination parameters.
|
|
24
|
-
* @returns A promise that resolves with the paginated list of child organization units.
|
|
25
|
-
*
|
|
26
|
-
* @throws {ThunderIDAPIError} When the server returns a non-OK response.
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* const children = await getOrganizationUnitChildren({
|
|
31
|
-
* baseUrl: 'https://localhost:8090',
|
|
32
|
-
* organizationUnitId: '0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1',
|
|
33
|
-
* limit: 10,
|
|
34
|
-
* offset: 0,
|
|
35
|
-
* });
|
|
36
|
-
* console.log(children.organizationUnits);
|
|
37
|
-
* ```
|
|
38
|
-
*
|
|
39
|
-
* @experimental This function targets the ThunderID V2 platform API
|
|
40
|
-
*/
|
|
41
|
-
declare const getOrganizationUnitChildren: ({ url, baseUrl, organizationUnitId, limit, offset, ...requestConfig }: GetOrganizationUnitChildrenConfig) => Promise<OrganizationUnitListResponse>;
|
|
42
|
-
export default getOrganizationUnitChildren;
|
|
43
|
-
//# sourceMappingURL=getOrganizationUnitChildren.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getOrganizationUnitChildren.d.ts","sourceRoot":"","sources":["../../../src/api/v2/getOrganizationUnitChildren.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,iCAAiC,EAAE,4BAA4B,EAAC,MAAM,mCAAmC,CAAC;AAElH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,2BAA2B,GAAU,uEAOxC,iCAAiC,KAAG,OAAO,CAAC,4BAA4B,CA2C1E,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* Constants related to OpenID Connect (OIDC) metadata and endpoints.
|
|
20
|
-
* This object contains all the standard OIDC endpoints and storage keys
|
|
21
|
-
* used throughout the application for authentication and authorization.
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* The constants are organized into two main sections:
|
|
25
|
-
* 1. Endpoints - Contains all OIDC standard endpoint paths
|
|
26
|
-
* 2. Storage - Contains keys used for storing OIDC-related data
|
|
27
|
-
*
|
|
28
|
-
* @example
|
|
29
|
-
* ```typescript
|
|
30
|
-
* // Using an endpoint
|
|
31
|
-
* const wellKnownEndpoint = OIDCDiscoveryConstants.Endpoints.WELL_KNOWN;
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
declare const OIDCDiscoveryConstants: {
|
|
35
|
-
readonly Endpoints: {
|
|
36
|
-
readonly WELL_KNOWN: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export default OIDCDiscoveryConstants;
|
|
40
|
-
//# sourceMappingURL=OIDCDiscoveryConstants.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OIDCDiscoveryConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/v2/OIDCDiscoveryConstants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,sBAAsB,EAAE;IAC5B,QAAQ,CAAC,SAAS,EAAE;QAClB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,CAAC;CAcM,CAAC;AAEX,eAAe,sBAAsB,CAAC"}
|