@thunderid/javascript 0.3.0 → 0.3.6
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 -7
- 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/getBrandingPreference.d.ts.map +1 -1
- package/dist/api/{v2/getFlowMetaV2.d.ts → getFlowMeta.d.ts} +7 -7
- package/dist/api/getFlowMeta.d.ts.map +1 -0
- package/dist/api/{v2/getOrganizationUnitChildren.d.ts → getOrganizationUnitChildren.d.ts} +1 -1
- package/dist/api/getOrganizationUnitChildren.d.ts.map +1 -0
- package/dist/cjs/index.cjs +1096 -1342
- package/dist/edge/index.js +1084 -1319
- 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 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1084 -1319
- package/dist/models/client.d.ts +3 -28
- package/dist/models/client.d.ts.map +1 -1
- package/dist/models/config.d.ts +1 -1
- 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/organization-unit.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/initializeEmbeddedSignInFlow.d.ts +0 -52
- package/dist/api/initializeEmbeddedSignInFlow.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.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/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.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/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/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/organization-unit.d.ts → organization-unit.d.ts} +0 -0
- /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
|
@@ -0,0 +1,42 @@
|
|
|
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 { ValidationRule, ValidationRuleType } from '../models/embedded-flow';
|
|
19
|
+
/**
|
|
20
|
+
* Default i18n fallback keys returned when a `ValidationRule.message` is not provided.
|
|
21
|
+
* Match the server-side defaults so a flow author who omits `message` sees the same
|
|
22
|
+
* string regardless of whether the rule was evaluated client-side or server-side.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_VALIDATION_MESSAGE_KEYS: Record<ValidationRuleType, string>;
|
|
25
|
+
/**
|
|
26
|
+
* Evaluates a single validation rule against the given input value.
|
|
27
|
+
*
|
|
28
|
+
* Returns `null` when the rule passes, or the rule's `message` (or the default
|
|
29
|
+
* fallback key if `message` is absent) when it fails.
|
|
30
|
+
*
|
|
31
|
+
* Behavior notes:
|
|
32
|
+
* - **regex**: an invalid regex pattern (one that cannot be compiled) is treated as
|
|
33
|
+
* **passing** on the client. This is lenient — the server is authoritative and
|
|
34
|
+
* will still enforce the rule if it can compile the pattern. Failing closed in the
|
|
35
|
+
* SDK risks denial-of-service for misconfigured flows.
|
|
36
|
+
* - **minLength / maxLength**: compared against `value.length`. A non-numeric `value`
|
|
37
|
+
* on the rule is treated as the rule passing.
|
|
38
|
+
* - Unknown rule types are treated as passing (forward compatibility with future types).
|
|
39
|
+
*/
|
|
40
|
+
declare const evaluateValidationRule: (rule: ValidationRule, value: string) => string | null;
|
|
41
|
+
export default evaluateValidationRule;
|
|
42
|
+
//# sourceMappingURL=evaluateValidationRule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluateValidationRule.d.ts","sourceRoot":"","sources":["../../src/utils/evaluateValidationRule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,cAAc,EAAE,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAE3E;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAI9E,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,sBAAsB,GAAI,MAAM,cAAc,EAAE,OAAO,MAAM,KAAG,MAAM,GAAG,IAgC9E,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractEmojiFromUri.d.ts","sourceRoot":"","sources":["../../src/utils/extractEmojiFromUri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,mBAAmB,GAAI,KAAK,MAAM,KAAG,MAM1C,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -22,7 +22,7 @@ import { Config } from '../models/config';
|
|
|
22
22
|
* If the baseUrl is recognized (standard ThunderID pattern), constructs the sign-up URL.
|
|
23
23
|
* Otherwise, returns an empty string.
|
|
24
24
|
*
|
|
25
|
-
* @param
|
|
25
|
+
* @param config - The ThunderID client configuration
|
|
26
26
|
* @returns The sign-up URL if baseUrl is recognized, otherwise an empty string
|
|
27
27
|
*/
|
|
28
28
|
declare const getRedirectBasedSignUpUrl: (config: Config) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRedirectBasedSignUpUrl.d.ts","sourceRoot":"","sources":["../../src/utils/getRedirectBasedSignUpUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"getRedirectBasedSignUpUrl.d.ts","sourceRoot":"","sources":["../../src/utils/getRedirectBasedSignUpUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAExC;;;;;;;;GAQG;AACH,QAAA,MAAM,yBAAyB,GAAI,QAAQ,MAAM,KAAG,MAkCnD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectRequestedPermissions.d.ts","sourceRoot":"","sources":["../../src/utils/injectRequestedPermissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,QAAA,MAAM,0BAA0B,GAAI,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CA4B5F,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEmojiUri.d.ts","sourceRoot":"","sources":["../../src/utils/isEmojiUri.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,OAAsE,CAAC;AAEzG,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isMetaFlowTemplateLiteral.d.ts","sourceRoot":"","sources":["../../src/utils/isMetaFlowTemplateLiteral.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,eAAO,MAAM,kCAAkC,QAAkC,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,sCAAsC,QAAoC,CAAC;AAExF;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isTranslationFlowTemplateLiteral.d.ts","sourceRoot":"","sources":["../../src/utils/isTranslationFlowTemplateLiteral.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;GAGG;AACH,eAAO,MAAM,yCAAyC,QAA+B,CAAC;AAEtF;;GAEG;AACH,eAAO,MAAM,6CAA6C,QAAiC,CAAC;AAE5F;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,gCAAgC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseApiErrorMessage.d.ts","sourceRoot":"","sources":["../../src/utils/parseApiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"parseApiErrorMessage.d.ts","sourceRoot":"","sources":["../../src/utils/parseApiErrorMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,MAejD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseFlowTemplateLiteral.d.ts","sourceRoot":"","sources":["../../src/utils/parseFlowTemplateLiteral.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,QAA0B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,4BAA4B,QAAuB,CAAC;AAEjE;;;;;;GAMG;AACH,oBAAY,uBAAuB;IACjC,uFAAuF;IACvF,IAAI,SAAS;IACb,oDAAoD;IACpD,WAAW,MAAM;IACjB,qDAAqD;IACrD,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC;IACtB,0DAA0D;IAC1D,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC;AAE5G;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,yBAAyB,CAmB3F"}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { TranslationFn } from '
|
|
19
|
-
import { ResolveFlowTemplateLiteralsOptions } from '
|
|
18
|
+
import { TranslationFn } from '../models/translation';
|
|
19
|
+
import { ResolveFlowTemplateLiteralsOptions } from '../models/vars';
|
|
20
20
|
/**
|
|
21
21
|
* Resolves all flow template literal expressions in a string.
|
|
22
22
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveFlowTemplateLiterals.d.ts","sourceRoot":"","sources":["../../src/utils/resolveFlowTemplateLiterals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,EAAC,aAAa,EAAC,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAC,kCAAkC,EAAC,MAAM,gBAAgB,CAAC;AAOlE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,OAAO,UAAU,2BAA2B,CAAC,GAAG,SAAS,aAAa,GAAG,aAAa,EAC3F,IAAI,EAAE,MAAM,GAAG,SAAS,EACxB,EAAC,CAAC,EAAE,IAAI,EAAC,EAAE,kCAAkC,CAAC,GAAG,CAAC,GACjD,MAAM,CAoBR"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveLocaleDisplayName.d.ts","sourceRoot":"","sources":["../../src/utils/resolveLocaleDisplayName.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAO9F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveLocaleEmoji.d.ts","sourceRoot":"","sources":["../../src/utils/resolveLocaleEmoji.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAiDH;;;;;;;;;;GAUG;AACH,iBAAS,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAYlD;AACD,eAAe,kBAAkB,CAAC"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FlowMetadataResponse } from '
|
|
18
|
+
import { FlowMetadataResponse } from '../models/flow-meta';
|
|
19
19
|
/**
|
|
20
20
|
* Resolves a dot-path expression against a FlowMetadataResponse object.
|
|
21
21
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveMeta.d.ts","sourceRoot":"","sources":["../../src/utils/resolveMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAapF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thunderid/javascript",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "JavaScript Ecosystem SDK for ThunderID",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"thunderid",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"agnostic",
|
|
10
10
|
"js"
|
|
11
11
|
],
|
|
12
|
-
"homepage": "https://github.com/thunder-id/
|
|
12
|
+
"homepage": "https://github.com/thunder-id/javascript-sdks/tree/main/packages/javascript#readme",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/thunder-id/thunderid/issues"
|
|
15
15
|
},
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
"types": "dist/index.d.ts",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/thunder-id/
|
|
36
|
-
"directory": "
|
|
35
|
+
"url": "https://github.com/thunder-id/javascript-sdks",
|
|
36
|
+
"directory": "packages/javascript"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
+
"@thunderid/eslint-plugin": "0.0.2",
|
|
40
|
+
"@thunderid/prettier-config": "0.0.2",
|
|
39
41
|
"@types/node": "24.7.2",
|
|
40
42
|
"eslint": "9.39.4",
|
|
41
43
|
"prettier": "3.6.2",
|
|
42
44
|
"rimraf": "6.1.3",
|
|
43
45
|
"rolldown": "1.0.0-beta.45",
|
|
44
46
|
"typescript": "5.9.3",
|
|
45
|
-
"vitest": "4.1.8"
|
|
46
|
-
"@thunderid/eslint-plugin": "^0.0.0",
|
|
47
|
-
"@thunderid/prettier-config": "^0.0.0"
|
|
47
|
+
"vitest": "4.1.8"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"jose": "5.2.0",
|
|
@@ -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 +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 +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"}
|
|
@@ -1,33 +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
|
-
* Enumeration of supported identity platforms.
|
|
20
|
-
*
|
|
21
|
-
* - `ThunderID`: Represents the ThunderID identity platform.
|
|
22
|
-
* - `IdentityServer`: Represents WSO2 Identity Server (on-prem or custom domains).
|
|
23
|
-
* - `Unknown`: Used when the platform cannot be determined from the configuration.
|
|
24
|
-
*/
|
|
25
|
-
export declare enum Platform {
|
|
26
|
-
/** ThunderID identity platform */
|
|
27
|
-
ThunderID = "THUNDERID",
|
|
28
|
-
/** WSO2 Identity Server (on-prem or custom domains) */
|
|
29
|
-
IdentityServer = "IDENTITY_SERVER",
|
|
30
|
-
/** Unknown or unsupported platform */
|
|
31
|
-
Unknown = "UNKNOWN"
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=platforms.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platforms.d.ts","sourceRoot":"","sources":["../../src/models/platforms.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,oBAAY,QAAQ;IAClB,kCAAkC;IAClC,SAAS,cAAc;IACvB,uDAAuD;IACvD,cAAc,oBAAoB;IAClC,sCAAsC;IACtC,OAAO,YAAY;CACpB"}
|