@thunderid/javascript 0.0.1

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.
Files changed (277) hide show
  1. package/LICENSE +201 -0
  2. package/dist/DefaultCacheStore.d.ts +31 -0
  3. package/dist/DefaultCacheStore.d.ts.map +1 -0
  4. package/dist/DefaultCrypto.d.ts +30 -0
  5. package/dist/DefaultCrypto.d.ts.map +1 -0
  6. package/dist/HttpClient.d.ts +65 -0
  7. package/dist/HttpClient.d.ts.map +1 -0
  8. package/dist/IsomorphicCrypto.d.ts +64 -0
  9. package/dist/IsomorphicCrypto.d.ts.map +1 -0
  10. package/dist/StorageManager.d.ts +66 -0
  11. package/dist/StorageManager.d.ts.map +1 -0
  12. package/dist/ThunderIDJavaScriptClient.d.ts +66 -0
  13. package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -0
  14. package/dist/__legacy__/client.d.ts +485 -0
  15. package/dist/__legacy__/client.d.ts.map +1 -0
  16. package/dist/__legacy__/helpers/authentication-helper.d.ts +38 -0
  17. package/dist/__legacy__/helpers/authentication-helper.d.ts.map +1 -0
  18. package/dist/__legacy__/helpers/index.d.ts +19 -0
  19. package/dist/__legacy__/helpers/index.d.ts.map +1 -0
  20. package/dist/__legacy__/models/client-config.d.ts +106 -0
  21. package/dist/__legacy__/models/client-config.d.ts.map +1 -0
  22. package/dist/__legacy__/models/index.d.ts +19 -0
  23. package/dist/__legacy__/models/index.d.ts.map +1 -0
  24. package/dist/api/createOrganization.d.ts +130 -0
  25. package/dist/api/createOrganization.d.ts.map +1 -0
  26. package/dist/api/executeEmbeddedSignInFlow.d.ts +22 -0
  27. package/dist/api/executeEmbeddedSignInFlow.d.ts.map +1 -0
  28. package/dist/api/executeEmbeddedSignUpFlow.d.ts +45 -0
  29. package/dist/api/executeEmbeddedSignUpFlow.d.ts.map +1 -0
  30. package/dist/api/getAllOrganizations.d.ts +104 -0
  31. package/dist/api/getAllOrganizations.d.ts.map +1 -0
  32. package/dist/api/getBrandingPreference.d.ts +104 -0
  33. package/dist/api/getBrandingPreference.d.ts.map +1 -0
  34. package/dist/api/getMeOrganizations.d.ts +120 -0
  35. package/dist/api/getMeOrganizations.d.ts.map +1 -0
  36. package/dist/api/getOrganization.d.ts +110 -0
  37. package/dist/api/getOrganization.d.ts.map +1 -0
  38. package/dist/api/getSchemas.d.ts +90 -0
  39. package/dist/api/getSchemas.d.ts.map +1 -0
  40. package/dist/api/getScim2Me.d.ts +90 -0
  41. package/dist/api/getScim2Me.d.ts.map +1 -0
  42. package/dist/api/getUserInfo.d.ts +38 -0
  43. package/dist/api/getUserInfo.d.ts.map +1 -0
  44. package/dist/api/initializeEmbeddedSignInFlow.d.ts +52 -0
  45. package/dist/api/initializeEmbeddedSignInFlow.d.ts.map +1 -0
  46. package/dist/api/updateMeProfile.d.ts +83 -0
  47. package/dist/api/updateMeProfile.d.ts.map +1 -0
  48. package/dist/api/updateOrganization.d.ts +119 -0
  49. package/dist/api/updateOrganization.d.ts.map +1 -0
  50. package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts +57 -0
  51. package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts.map +1 -0
  52. package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts +22 -0
  53. package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts.map +1 -0
  54. package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts +22 -0
  55. package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts.map +1 -0
  56. package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +89 -0
  57. package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts.map +1 -0
  58. package/dist/api/v2/getFlowMetaV2.d.ts +56 -0
  59. package/dist/api/v2/getFlowMetaV2.d.ts.map +1 -0
  60. package/dist/api/v2/getOrganizationUnitChildren.d.ts +43 -0
  61. package/dist/api/v2/getOrganizationUnitChildren.d.ts.map +1 -0
  62. package/dist/cjs/index.cjs +7693 -0
  63. package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +40 -0
  64. package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts.map +1 -0
  65. package/dist/constants/OIDCDiscoveryConstants.d.ts +65 -0
  66. package/dist/constants/OIDCDiscoveryConstants.d.ts.map +1 -0
  67. package/dist/constants/OIDCRequestConstants.d.ts +43 -0
  68. package/dist/constants/OIDCRequestConstants.d.ts.map +1 -0
  69. package/dist/constants/PKCEConstants.d.ts +45 -0
  70. package/dist/constants/PKCEConstants.d.ts.map +1 -0
  71. package/dist/constants/ScopeConstants.d.ts +43 -0
  72. package/dist/constants/ScopeConstants.d.ts.map +1 -0
  73. package/dist/constants/TokenConstants.d.ts +48 -0
  74. package/dist/constants/TokenConstants.d.ts.map +1 -0
  75. package/dist/constants/TokenExchangeConstants.d.ts +44 -0
  76. package/dist/constants/TokenExchangeConstants.d.ts.map +1 -0
  77. package/dist/constants/VendorConstants.d.ts +32 -0
  78. package/dist/constants/VendorConstants.d.ts.map +1 -0
  79. package/dist/constants/v2/OIDCDiscoveryConstants.d.ts +40 -0
  80. package/dist/constants/v2/OIDCDiscoveryConstants.d.ts.map +1 -0
  81. package/dist/edge/index.js +7568 -0
  82. package/dist/errors/ThunderIDAPIError.d.ts +59 -0
  83. package/dist/errors/ThunderIDAPIError.d.ts.map +1 -0
  84. package/dist/errors/ThunderIDError.d.ts +50 -0
  85. package/dist/errors/ThunderIDError.d.ts.map +1 -0
  86. package/dist/errors/ThunderIDRuntimeError.d.ts +51 -0
  87. package/dist/errors/ThunderIDRuntimeError.d.ts.map +1 -0
  88. package/dist/errors/exception.d.ts +27 -0
  89. package/dist/errors/exception.d.ts.map +1 -0
  90. package/dist/i18n/constants/TranslationBundleConstants.d.ts +35 -0
  91. package/dist/i18n/constants/TranslationBundleConstants.d.ts.map +1 -0
  92. package/dist/i18n/models/i18n.d.ts +127 -0
  93. package/dist/i18n/models/i18n.d.ts.map +1 -0
  94. package/dist/i18n/translations/en-US.d.ts +21 -0
  95. package/dist/i18n/translations/en-US.d.ts.map +1 -0
  96. package/dist/i18n/translations/fr-FR.d.ts +21 -0
  97. package/dist/i18n/translations/fr-FR.d.ts.map +1 -0
  98. package/dist/i18n/translations/hi-IN.d.ts +21 -0
  99. package/dist/i18n/translations/hi-IN.d.ts.map +1 -0
  100. package/dist/i18n/translations/index.d.ts +26 -0
  101. package/dist/i18n/translations/index.d.ts.map +1 -0
  102. package/dist/i18n/translations/ja-JP.d.ts +21 -0
  103. package/dist/i18n/translations/ja-JP.d.ts.map +1 -0
  104. package/dist/i18n/translations/pt-BR.d.ts +21 -0
  105. package/dist/i18n/translations/pt-BR.d.ts.map +1 -0
  106. package/dist/i18n/translations/pt-PT.d.ts +21 -0
  107. package/dist/i18n/translations/pt-PT.d.ts.map +1 -0
  108. package/dist/i18n/translations/si-LK.d.ts +21 -0
  109. package/dist/i18n/translations/si-LK.d.ts.map +1 -0
  110. package/dist/i18n/translations/ta-IN.d.ts +21 -0
  111. package/dist/i18n/translations/ta-IN.d.ts.map +1 -0
  112. package/dist/i18n/translations/te-IN.d.ts +21 -0
  113. package/dist/i18n/translations/te-IN.d.ts.map +1 -0
  114. package/dist/i18n/utils/getDefaultI18nBundles.d.ts +28 -0
  115. package/dist/i18n/utils/getDefaultI18nBundles.d.ts.map +1 -0
  116. package/dist/i18n/utils/normalizeTranslations.d.ts +42 -0
  117. package/dist/i18n/utils/normalizeTranslations.d.ts.map +1 -0
  118. package/dist/index.d.ts +143 -0
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +7568 -0
  121. package/dist/models/agent.d.ts +45 -0
  122. package/dist/models/agent.d.ts.map +1 -0
  123. package/dist/models/auth-code-response.d.ts +35 -0
  124. package/dist/models/auth-code-response.d.ts.map +1 -0
  125. package/dist/models/branding-preference.d.ts +249 -0
  126. package/dist/models/branding-preference.d.ts.map +1 -0
  127. package/dist/models/client.d.ts +213 -0
  128. package/dist/models/client.d.ts.map +1 -0
  129. package/dist/models/config.d.ts +483 -0
  130. package/dist/models/config.d.ts.map +1 -0
  131. package/dist/models/crypto.d.ts +101 -0
  132. package/dist/models/crypto.d.ts.map +1 -0
  133. package/dist/models/embedded-flow.d.ts +167 -0
  134. package/dist/models/embedded-flow.d.ts.map +1 -0
  135. package/dist/models/embedded-signin-flow.d.ts +100 -0
  136. package/dist/models/embedded-signin-flow.d.ts.map +1 -0
  137. package/dist/models/field.d.ts +32 -0
  138. package/dist/models/field.d.ts.map +1 -0
  139. package/dist/models/flow.d.ts +31 -0
  140. package/dist/models/flow.d.ts.map +1 -0
  141. package/dist/models/http.d.ts +46 -0
  142. package/dist/models/http.d.ts.map +1 -0
  143. package/dist/models/oauth-request.d.ts +24 -0
  144. package/dist/models/oauth-request.d.ts.map +1 -0
  145. package/dist/models/oauth-response.d.ts +19 -0
  146. package/dist/models/oauth-response.d.ts.map +1 -0
  147. package/dist/models/oidc-discovery.d.ts +370 -0
  148. package/dist/models/oidc-discovery.d.ts.map +1 -0
  149. package/dist/models/oidc-endpoints.d.ts +72 -0
  150. package/dist/models/oidc-endpoints.d.ts.map +1 -0
  151. package/dist/models/organization.d.ts +34 -0
  152. package/dist/models/organization.d.ts.map +1 -0
  153. package/dist/models/platforms.d.ts +38 -0
  154. package/dist/models/platforms.d.ts.map +1 -0
  155. package/dist/models/scim2-schema.d.ts +66 -0
  156. package/dist/models/scim2-schema.d.ts.map +1 -0
  157. package/dist/models/session.d.ts +32 -0
  158. package/dist/models/session.d.ts.map +1 -0
  159. package/dist/models/store.d.ts +84 -0
  160. package/dist/models/store.d.ts.map +1 -0
  161. package/dist/models/token-endpoint-auth.d.ts +30 -0
  162. package/dist/models/token-endpoint-auth.d.ts.map +1 -0
  163. package/dist/models/token.d.ts +181 -0
  164. package/dist/models/token.d.ts.map +1 -0
  165. package/dist/models/user.d.ts +34 -0
  166. package/dist/models/user.d.ts.map +1 -0
  167. package/dist/models/utility-types.d.ts +21 -0
  168. package/dist/models/utility-types.d.ts.map +1 -0
  169. package/dist/models/v2/embedded-flow-v2.d.ts +494 -0
  170. package/dist/models/v2/embedded-flow-v2.d.ts.map +1 -0
  171. package/dist/models/v2/embedded-recovery-flow-v2.d.ts +143 -0
  172. package/dist/models/v2/embedded-recovery-flow-v2.d.ts.map +1 -0
  173. package/dist/models/v2/embedded-signin-flow-v2.d.ts +340 -0
  174. package/dist/models/v2/embedded-signin-flow-v2.d.ts.map +1 -0
  175. package/dist/models/v2/embedded-signup-flow-v2.d.ts +272 -0
  176. package/dist/models/v2/embedded-signup-flow-v2.d.ts.map +1 -0
  177. package/dist/models/v2/extensions/components.d.ts +89 -0
  178. package/dist/models/v2/extensions/components.d.ts.map +1 -0
  179. package/dist/models/v2/flow-meta-v2.d.ts +299 -0
  180. package/dist/models/v2/flow-meta-v2.d.ts.map +1 -0
  181. package/dist/models/v2/organization-unit.d.ts +103 -0
  182. package/dist/models/v2/organization-unit.d.ts.map +1 -0
  183. package/dist/models/v2/translation.d.ts +35 -0
  184. package/dist/models/v2/translation.d.ts.map +1 -0
  185. package/dist/models/v2/vars.d.ts +36 -0
  186. package/dist/models/v2/vars.d.ts.map +1 -0
  187. package/dist/theme/createTheme.d.ts +23 -0
  188. package/dist/theme/createTheme.d.ts.map +1 -0
  189. package/dist/theme/types.d.ts +381 -0
  190. package/dist/theme/types.d.ts.map +1 -0
  191. package/dist/utils/arrayBufferToBase64url.d.ts +49 -0
  192. package/dist/utils/arrayBufferToBase64url.d.ts.map +1 -0
  193. package/dist/utils/base64Encode.d.ts +36 -0
  194. package/dist/utils/base64Encode.d.ts.map +1 -0
  195. package/dist/utils/base64urlToArrayBuffer.d.ts +56 -0
  196. package/dist/utils/base64urlToArrayBuffer.d.ts.map +1 -0
  197. package/dist/utils/bem.d.ts +47 -0
  198. package/dist/utils/bem.d.ts.map +1 -0
  199. package/dist/utils/deepMerge.d.ts +45 -0
  200. package/dist/utils/deepMerge.d.ts.map +1 -0
  201. package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts +48 -0
  202. package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts.map +1 -0
  203. package/dist/utils/extractPkceStorageKeyFromState.d.ts +33 -0
  204. package/dist/utils/extractPkceStorageKeyFromState.d.ts.map +1 -0
  205. package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +32 -0
  206. package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts.map +1 -0
  207. package/dist/utils/extractUserClaimsFromIdToken.d.ts +47 -0
  208. package/dist/utils/extractUserClaimsFromIdToken.d.ts.map +1 -0
  209. package/dist/utils/flattenUserSchema.d.ts +65 -0
  210. package/dist/utils/flattenUserSchema.d.ts.map +1 -0
  211. package/dist/utils/formatDate.d.ts +34 -0
  212. package/dist/utils/formatDate.d.ts.map +1 -0
  213. package/dist/utils/generateFlattenedUserProfile.d.ts +54 -0
  214. package/dist/utils/generateFlattenedUserProfile.d.ts.map +1 -0
  215. package/dist/utils/generatePkceStorageKey.d.ts +35 -0
  216. package/dist/utils/generatePkceStorageKey.d.ts.map +1 -0
  217. package/dist/utils/generateStateParamForRequestCorrelation.d.ts +35 -0
  218. package/dist/utils/generateStateParamForRequestCorrelation.d.ts.map +1 -0
  219. package/dist/utils/generateUserProfile.d.ts +56 -0
  220. package/dist/utils/generateUserProfile.d.ts.map +1 -0
  221. package/dist/utils/get.d.ts +30 -0
  222. package/dist/utils/get.d.ts.map +1 -0
  223. package/dist/utils/getAuthorizeRequestUrlParams.d.ts +61 -0
  224. package/dist/utils/getAuthorizeRequestUrlParams.d.ts.map +1 -0
  225. package/dist/utils/getLatestStateParam.d.ts +41 -0
  226. package/dist/utils/getLatestStateParam.d.ts.map +1 -0
  227. package/dist/utils/getRedirectBasedSignUpUrl.d.ts +30 -0
  228. package/dist/utils/getRedirectBasedSignUpUrl.d.ts.map +1 -0
  229. package/dist/utils/identifyPlatform.d.ts +31 -0
  230. package/dist/utils/identifyPlatform.d.ts.map +1 -0
  231. package/dist/utils/isEmpty.d.ts +49 -0
  232. package/dist/utils/isEmpty.d.ts.map +1 -0
  233. package/dist/utils/isRecognizedBaseUrlPattern.d.ts +33 -0
  234. package/dist/utils/isRecognizedBaseUrlPattern.d.ts.map +1 -0
  235. package/dist/utils/logger.d.ts +143 -0
  236. package/dist/utils/logger.d.ts.map +1 -0
  237. package/dist/utils/parseApiErrorMessage.d.ts +29 -0
  238. package/dist/utils/parseApiErrorMessage.d.ts.map +1 -0
  239. package/dist/utils/processOpenIDScopes.d.ts +42 -0
  240. package/dist/utils/processOpenIDScopes.d.ts.map +1 -0
  241. package/dist/utils/processUsername.d.ts +74 -0
  242. package/dist/utils/processUsername.d.ts.map +1 -0
  243. package/dist/utils/removeTrailingSlash.d.ts +32 -0
  244. package/dist/utils/removeTrailingSlash.d.ts.map +1 -0
  245. package/dist/utils/resolveFieldName.d.ts +20 -0
  246. package/dist/utils/resolveFieldName.d.ts.map +1 -0
  247. package/dist/utils/resolveFieldType.d.ts +21 -0
  248. package/dist/utils/resolveFieldType.d.ts.map +1 -0
  249. package/dist/utils/set.d.ts +31 -0
  250. package/dist/utils/set.d.ts.map +1 -0
  251. package/dist/utils/transformBrandingPreferenceToTheme.d.ts +49 -0
  252. package/dist/utils/transformBrandingPreferenceToTheme.d.ts.map +1 -0
  253. package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts +57 -0
  254. package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts.map +1 -0
  255. package/dist/utils/v2/countryCodeToFlagEmoji.d.ts +26 -0
  256. package/dist/utils/v2/countryCodeToFlagEmoji.d.ts.map +1 -0
  257. package/dist/utils/v2/extractEmojiFromUri.d.ts +32 -0
  258. package/dist/utils/v2/extractEmojiFromUri.d.ts.map +1 -0
  259. package/dist/utils/v2/isEmojiUri.d.ts +34 -0
  260. package/dist/utils/v2/isEmojiUri.d.ts.map +1 -0
  261. package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts +45 -0
  262. package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts.map +1 -0
  263. package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts +45 -0
  264. package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts.map +1 -0
  265. package/dist/utils/v2/parseFlowTemplateLiteral.d.ts +96 -0
  266. package/dist/utils/v2/parseFlowTemplateLiteral.d.ts.map +1 -0
  267. package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts +42 -0
  268. package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts.map +1 -0
  269. package/dist/utils/v2/resolveLocaleDisplayName.d.ts +30 -0
  270. package/dist/utils/v2/resolveLocaleDisplayName.d.ts.map +1 -0
  271. package/dist/utils/v2/resolveLocaleEmoji.d.ts +31 -0
  272. package/dist/utils/v2/resolveLocaleEmoji.d.ts.map +1 -0
  273. package/dist/utils/v2/resolveMeta.d.ts +35 -0
  274. package/dist/utils/v2/resolveMeta.d.ts.map +1 -0
  275. package/dist/utils/withVendorCSSClassPrefix.d.ts +33 -0
  276. package/dist/utils/withVendorCSSClassPrefix.d.ts.map +1 -0
  277. package/package.json +65 -0
@@ -0,0 +1,494 @@
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 as EmbeddedFlowExecuteRequestConfigV1 } from '../embedded-flow';
19
+ /**
20
+ * Component types supported by the ThunderID embedded flow API.
21
+ *
22
+ * These types define the different UI components that can be rendered
23
+ * as part of the embedded authentication flows. Each type corresponds
24
+ * to a specific UI element with its own behavior and properties.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * // Check component type to render appropriate UI
29
+ * if (component.type === EmbeddedFlowComponentType.TextInput) {
30
+ * // Render text input field
31
+ * } else if (component.type === EmbeddedFlowComponentType.Action) {
32
+ * // Render button/action
33
+ * }
34
+ * ```
35
+ *
36
+ * @experimental This API may change in future versions
37
+ */
38
+ export declare enum EmbeddedFlowComponentType {
39
+ /** Interactive action component (buttons, links) for user interactions */
40
+ Action = "ACTION",
41
+ /** Container block component that groups other components */
42
+ Block = "BLOCK",
43
+ /** Consent component for displaying consent purposes and attributes */
44
+ Consent = "CONSENT",
45
+ /** Copyable text display component that shows text with a copy-to-clipboard action */
46
+ CopyableText = "COPYABLE_TEXT",
47
+ /** Divider component for visual separation of content */
48
+ Divider = "DIVIDER",
49
+ /** Email input field with validation for email addresses. */
50
+ EmailInput = "EMAIL_INPUT",
51
+ /** Icon display component for rendering named vector icons */
52
+ Icon = "ICON",
53
+ /** Image display component for logos and illustrations */
54
+ Image = "IMAGE",
55
+ /** One-time password input field for multi-factor authentication */
56
+ OtpInput = "OTP_INPUT",
57
+ /** Organization unit tree picker for selecting an OU */
58
+ OuSelect = "OU_SELECT",
59
+ /** Password input field with masking for sensitive data */
60
+ PasswordInput = "PASSWORD_INPUT",
61
+ /** Phone number input field with country code support */
62
+ PhoneInput = "PHONE_INPUT",
63
+ /** Rich text display component that renders formatted HTML content */
64
+ RichText = "RICH_TEXT",
65
+ /** Select/dropdown input component for single choice selection */
66
+ Select = "SELECT",
67
+ /** Stack layout component for arranging children in a row or column */
68
+ Stack = "STACK",
69
+ /** Text display component for labels, headings, and messages */
70
+ Text = "TEXT",
71
+ /** Standard text input field for user data entry */
72
+ TextInput = "TEXT_INPUT",
73
+ /** Timer component for displaying a countdown */
74
+ Timer = "TIMER"
75
+ }
76
+ /**
77
+ * Action variant types for buttons and interactive elements.
78
+ *
79
+ * @experimental This API may change in future versions
80
+ */
81
+ export declare enum EmbeddedFlowActionVariant {
82
+ /** Danger action button for destructive operations */
83
+ Danger = "DANGER",
84
+ /** Info action button for informational purposes */
85
+ Info = "INFO",
86
+ /** Link-styled action button */
87
+ Link = "LINK",
88
+ /** Outlined action button for secondary emphasis */
89
+ Outlined = "OUTLINED",
90
+ /** Primary action button with highest visual emphasis */
91
+ Primary = "PRIMARY",
92
+ /** Secondary action button with moderate visual emphasis */
93
+ Secondary = "SECONDARY",
94
+ /** Success action button for positive confirmations */
95
+ Success = "SUCCESS",
96
+ /** Tertiary action button with minimal visual emphasis */
97
+ Tertiary = "TERTIARY",
98
+ /** Warning action button for cautionary actions */
99
+ Warning = "WARNING"
100
+ }
101
+ /**
102
+ * Text variant types for typography components.
103
+ *
104
+ * @experimental This API may change in future versions
105
+ */
106
+ export declare enum EmbeddedFlowTextVariant {
107
+ /** Primary body text for main content */
108
+ Body1 = "BODY_1",
109
+ /** Secondary body text for supplementary content */
110
+ Body2 = "BODY_2",
111
+ /** Text styled for button labels */
112
+ ButtonText = "BUTTON_TEXT",
113
+ /** Small caption text for annotations and descriptions */
114
+ Caption = "CAPTION",
115
+ /** Largest heading level for main titles */
116
+ Heading1 = "HEADING_1",
117
+ /** Second level heading for major sections */
118
+ Heading2 = "HEADING_2",
119
+ /** Third level heading for subsections */
120
+ Heading3 = "HEADING_3",
121
+ /** Fourth level heading for minor sections */
122
+ Heading4 = "HEADING_4",
123
+ /** Fifth level heading for detailed sections */
124
+ Heading5 = "HEADING_5",
125
+ /** Smallest heading level for fine-grained sections */
126
+ Heading6 = "HEADING_6",
127
+ /** Overline text for labels and categories */
128
+ Overline = "OVERLINE",
129
+ /** Primary subtitle text with larger emphasis */
130
+ Subtitle1 = "SUBTITLE_1",
131
+ /** Secondary subtitle text with moderate emphasis */
132
+ Subtitle2 = "SUBTITLE_2"
133
+ }
134
+ /**
135
+ * Event types for action components.
136
+ *
137
+ * @experimental This API may change in future versions
138
+ */
139
+ export declare enum EmbeddedFlowEventType {
140
+ /** Navigate back to the previous step */
141
+ Back = "BACK",
142
+ /** Cancel the current operation */
143
+ Cancel = "CANCEL",
144
+ /** Navigate to a different flow step or page */
145
+ Navigate = "NAVIGATE",
146
+ /** Reset form fields to initial state */
147
+ Reset = "RESET",
148
+ /** Submit form data to the server */
149
+ Submit = "SUBMIT",
150
+ /** Trigger an action or event */
151
+ Trigger = "TRIGGER"
152
+ }
153
+ /**
154
+ * Enhanced component interface for embedded flow components.
155
+ *
156
+ * This interface provides better support for modern form handling and user experience.
157
+ * It includes properties for labels, placeholders, and required field validation
158
+ * that are directly provided by the API response.
159
+ *
160
+ * @example
161
+ * ```typescript
162
+ * const component: EmbeddedFlowComponent = {
163
+ * id: 'username_field',
164
+ * type: EmbeddedFlowComponentType.TextInput,
165
+ * label: 'Username',
166
+ * placeholder: 'Enter your username',
167
+ * required: true,
168
+ * variant: 'TEXT',
169
+ * eventType: 'SUBMIT',
170
+ * components: []
171
+ * };
172
+ * ```
173
+ *
174
+ * @experimental This interface may change in future versions
175
+ */
176
+ export interface EmbeddedFlowComponent {
177
+ /**
178
+ * Alignment of children along the cross axis (for Stack components).
179
+ */
180
+ align?: string;
181
+ /**
182
+ * Alternative text for Image components.
183
+ */
184
+ alt?: string;
185
+ /**
186
+ * Icon color, CSS color value (for Icon components).
187
+ */
188
+ color?: string;
189
+ /**
190
+ * Nested child components for container components like Block and Stack.
191
+ */
192
+ components?: EmbeddedFlowComponent[];
193
+ /**
194
+ * Layout direction for Stack components ('row' | 'column').
195
+ */
196
+ direction?: string;
197
+ /**
198
+ * Icon to render at the end of an Action button (URL string).
199
+ */
200
+ endIcon?: string;
201
+ /**
202
+ * Event type for action components that defines the interaction behavior.
203
+ * Only relevant for Action components.
204
+ */
205
+ eventType?: EmbeddedFlowEventType | string;
206
+ /**
207
+ * Gap between children in Stack components (number, maps to spacing units).
208
+ */
209
+ gap?: number;
210
+ /**
211
+ * Height of the component (for Image components, can be string with units or number for pixels).
212
+ * The value depends on the component type (e.g., for Image components).
213
+ */
214
+ height?: string | number;
215
+ /**
216
+ * Unique identifier for the component
217
+ */
218
+ id: string;
219
+ /**
220
+ * Number of items across the main axis (for Stack grid-like layouts).
221
+ */
222
+ items?: string | number;
223
+ /**
224
+ * Justification of children along the main axis (for Stack components).
225
+ */
226
+ justify?: string;
227
+ /**
228
+ * Display label for the component (e.g., field label, button text).
229
+ * Supports internationalization and may contain template strings.
230
+ */
231
+ label?: string;
232
+ /**
233
+ * Icon name for Icon components (e.g., lucide-react icon names like 'ArrowLeftRight').
234
+ */
235
+ name?: string;
236
+ /**
237
+ * Options for SELECT components.
238
+ * Each option can be a string value or an object with value and label.
239
+ */
240
+ options?: (string | {
241
+ label: string;
242
+ value: string;
243
+ })[];
244
+ /**
245
+ * Placeholder text for input components.
246
+ * Provides helpful hints to users about expected input format.
247
+ */
248
+ placeholder?: string;
249
+ /**
250
+ * Reference identifier for the component (e.g., field name, action ref)
251
+ */
252
+ ref?: string;
253
+ /**
254
+ * Indicates whether this component represents a required field.
255
+ * Used for form validation and UI indicators.
256
+ */
257
+ required?: boolean;
258
+ /**
259
+ * Icon size in pixels (for Icon components).
260
+ */
261
+ size?: number;
262
+ /**
263
+ * Data source key for dynamic components (e.g., COPYABLE_TEXT).
264
+ * References a key in additionalData whose value is resolved at render time.
265
+ */
266
+ source?: string;
267
+ /**
268
+ * Image source URL (for Image components).
269
+ */
270
+ src?: string;
271
+ /**
272
+ * Icon to render at the start of an Action button (URL string).
273
+ */
274
+ startIcon?: string;
275
+ /**
276
+ * Component type that determines rendering behavior
277
+ */
278
+ type: EmbeddedFlowComponentType | string;
279
+ /**
280
+ * Component variant that affects visual styling and behavior.
281
+ * The value depends on the component type (e.g., button variants, text variants).
282
+ */
283
+ variant?: EmbeddedFlowActionVariant | EmbeddedFlowTextVariant | string;
284
+ /**
285
+ * Width of the component (for Image components, can be string with units or number for pixels).
286
+ * The value depends on the component type (e.g., for Image components).
287
+ */
288
+ width?: string | number;
289
+ }
290
+ /**
291
+ * Response data structure for embedded flow API.
292
+ *
293
+ * This interface defines the structure of data returned by the API,
294
+ * which includes both legacy input/action arrays for backward compatibility
295
+ * and the new meta.components structure for modern component-driven UIs.
296
+ *
297
+ * The key improvement is the meta.components field, which provides
298
+ * a rich component tree with proper labels, placeholders, and hierarchy
299
+ * that can be directly rendered without additional transformation.
300
+ *
301
+ * @example
302
+ * ```typescript
303
+ * const response: EmbeddedFlowResponseData = {
304
+ * // Legacy format (for backward compatibility)
305
+ * inputs: [
306
+ * { ref: 'input_001', identifier: 'username', type: 'TEXT_INPUT', required: true }
307
+ * ],
308
+ * actions: [
309
+ * { ref: 'action_001', nextNode: 'basic_auth', eventType: 'SUBMIT' }
310
+ * ],
311
+ * // Modern format (recommended)
312
+ * meta: {
313
+ * components: [
314
+ * {
315
+ * id: 'text_001',
316
+ * type: 'TEXT',
317
+ * label: '{{ t(signin:heading.label) }}',
318
+ * variant: 'HEADING_1'
319
+ * },
320
+ * {
321
+ * id: 'block_001',
322
+ * type: 'BLOCK',
323
+ * components: [
324
+ * {
325
+ * id: 'input_001',
326
+ * type: 'TEXT_INPUT',
327
+ * label: '{{ t(signin:fields.username.label) }}',
328
+ * placeholder: '{{ t(signin:fields.username.placeholder) }}',
329
+ * required: true
330
+ * },
331
+ * {
332
+ * id: 'action_001',
333
+ * type: 'ACTION',
334
+ * label: '{{ t(signin:buttons.submit.label) }}',
335
+ * variant: 'PRIMARY',
336
+ * eventType: 'ACTIVATE'
337
+ * }
338
+ * ]
339
+ * }
340
+ * ]
341
+ * }
342
+ * };
343
+ * ```
344
+ *
345
+ * @experimental This structure may change in future versions
346
+ */
347
+ export interface EmbeddedFlowResponseData {
348
+ /**
349
+ * Legacy action definitions for backward compatibility.
350
+ * @deprecated Use meta.components for new implementations
351
+ */
352
+ actions?: {
353
+ /** Event type for the action (SUBMIT, ACTIVATE, etc.) */
354
+ eventType?: string;
355
+ /** Next flow node to navigate to (optional) */
356
+ nextNode?: string;
357
+ /** Reference identifier for the action */
358
+ ref: string;
359
+ }[];
360
+ /**
361
+ * Additional data dictionary for dynamic flow response properties.
362
+ * Can be used to pass custom data like passkey challenges, server alerts, etc.
363
+ */
364
+ additionalData?: Record<string, any>;
365
+ /**
366
+ * Legacy input definitions for backward compatibility.
367
+ * @deprecated Use meta.components for new implementations
368
+ */
369
+ inputs?: {
370
+ /** Field identifier used in form submission */
371
+ identifier: string;
372
+ /** Reference identifier for the input */
373
+ ref: string;
374
+ /** Whether this input is required for form submission */
375
+ required: boolean;
376
+ /** Input type (TEXT_INPUT, PASSWORD_INPUT, etc.) */
377
+ type: string;
378
+ }[];
379
+ /**
380
+ * Modern component-driven metadata structure.
381
+ * This contains the complete UI component tree with proper
382
+ * hierarchy, labels, and configuration that can be directly rendered.
383
+ *
384
+ * **This is the primary data source for implementations.**
385
+ * The legacy inputs/actions arrays are maintained only for backward compatibility.
386
+ */
387
+ meta?: {
388
+ /** Array of components that define the complete UI structure */
389
+ components: EmbeddedFlowComponent[];
390
+ };
391
+ /**
392
+ * Optional redirect URL for flow completion or external authentication.
393
+ */
394
+ redirectURL?: string;
395
+ }
396
+ /**
397
+ * Individual consent attribute/element decision.
398
+ *
399
+ * @experimental This interface may change in future versions
400
+ */
401
+ export interface ConsentAttributeElement {
402
+ /** Whether the user approved collection of this attribute */
403
+ approved: boolean;
404
+ /** The name of the attribute being consented */
405
+ name: string;
406
+ }
407
+ /**
408
+ * Consent decision for a single purpose.
409
+ *
410
+ * @experimental This interface may change in future versions
411
+ */
412
+ export interface ConsentPurposeDecision {
413
+ /** Whether the user approved this purpose */
414
+ approved: boolean;
415
+ /** Per-attribute decisions for this purpose */
416
+ elements: ConsentAttributeElement[];
417
+ /** The name of the consent purpose */
418
+ purposeName: string;
419
+ }
420
+ /**
421
+ * Full consent decisions structure sent to the backend when user submits the consent form.
422
+ *
423
+ * @experimental This interface may change in future versions
424
+ */
425
+ export interface ConsentDecisions {
426
+ /** Array of per-purpose decisions */
427
+ purposes: ConsentPurposeDecision[];
428
+ }
429
+ /**
430
+ * Single consent purpose data returned by the backend in additionalData.consent_prompt.
431
+ *
432
+ * @experimental This interface may change in future versions
433
+ */
434
+ export interface ConsentPurposeData {
435
+ /** Optional human-readable description of the purpose */
436
+ description?: string;
437
+ /** Attributes that are always required and cannot be declined */
438
+ essential: string[];
439
+ /** Attributes that the user can optionally decline */
440
+ optional: string[];
441
+ /** Unique identifier for the purpose */
442
+ purposeId: string;
443
+ /** Human-readable purpose name */
444
+ purposeName?: string;
445
+ }
446
+ /**
447
+ * Consent prompt data structure stored in additionalData.consent_prompt.
448
+ *
449
+ * @experimental This interface may change in future versions
450
+ */
451
+ export interface ConsentPromptData {
452
+ /** Array of consent purposes requiring user review */
453
+ purposes: ConsentPurposeData[];
454
+ }
455
+ /**
456
+ * Extended request configuration for ThunderID V2 embedded flow operations.
457
+ *
458
+ * This interface extends the base request configuration with V2-specific
459
+ * properties required for the enhanced embedded flow API. The authId parameter
460
+ * is particularly important for the V2 OAuth2 flow completion process.
461
+ *
462
+ * @template T The type of the payload data being sent with the request
463
+ *
464
+ * @example
465
+ * ```typescript
466
+ * const config: EmbeddedFlowExecuteRequestConfigV2 = {
467
+ * baseUrl: 'https://api.asgardeo.io/t/myorg',
468
+ * payload: {
469
+ * flowType: 'AUTHENTICATION',
470
+ * inputs: { username: 'user@example.com' }
471
+ * },
472
+ * authId: 'auth_12345', // V2-specific for OAuth completion
473
+ * headers: {
474
+ * 'Authorization': 'Bearer token'
475
+ * }
476
+ * };
477
+ * ```
478
+ *
479
+ * @experimental This configuration is part of the new ThunderID V2 platform
480
+ */
481
+ export interface EmbeddedFlowExecuteRequestConfig<T = any> extends EmbeddedFlowExecuteRequestConfigV1<T> {
482
+ /**
483
+ * Authentication ID used for OAuth2 flow completion in V2 API.
484
+ *
485
+ * When the embedded flow completes successfully and returns an assertion,
486
+ * this authId is used to complete the OAuth2 authorization flow by calling
487
+ * the `/oauth2/auth/callback` endpoint. This enables seamless transition from
488
+ * embedded flow to traditional OAuth2 flow completion.
489
+ *
490
+ * @example "auth_abc123def456"
491
+ */
492
+ authId?: string;
493
+ }
494
+ //# sourceMappingURL=embedded-flow-v2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedded-flow-v2.d.ts","sourceRoot":"","sources":["../../../src/models/v2/embedded-flow-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kBAAkB,CAAC;AAExG;;;;;;;;;;;;;;;;;;GAkBG;AACH,oBAAY,yBAAyB;IACnC,0EAA0E;IAC1E,MAAM,WAAW;IAEjB,6DAA6D;IAC7D,KAAK,UAAU;IAEf,uEAAuE;IACvE,OAAO,YAAY;IAEnB,sFAAsF;IACtF,YAAY,kBAAkB;IAE9B,yDAAyD;IACzD,OAAO,YAAY;IAEnB,6DAA6D;IAC7D,UAAU,gBAAgB;IAE1B,8DAA8D;IAC9D,IAAI,SAAS;IAEb,0DAA0D;IAC1D,KAAK,UAAU;IAEf,oEAAoE;IACpE,QAAQ,cAAc;IAEtB,wDAAwD;IACxD,QAAQ,cAAc;IAEtB,2DAA2D;IAC3D,aAAa,mBAAmB;IAEhC,yDAAyD;IACzD,UAAU,gBAAgB;IAE1B,sEAAsE;IACtE,QAAQ,cAAc;IAEtB,kEAAkE;IAClE,MAAM,WAAW;IAEjB,uEAAuE;IACvE,KAAK,UAAU;IAEf,gEAAgE;IAChE,IAAI,SAAS;IAEb,oDAAoD;IACpD,SAAS,eAAe;IAExB,iDAAiD;IACjD,KAAK,UAAU;CAChB;AAED;;;;GAIG;AACH,oBAAY,yBAAyB;IACnC,sDAAsD;IACtD,MAAM,WAAW;IAEjB,oDAAoD;IACpD,IAAI,SAAS;IAEb,gCAAgC;IAChC,IAAI,SAAS;IAEb,oDAAoD;IACpD,QAAQ,aAAa;IAErB,yDAAyD;IACzD,OAAO,YAAY;IAEnB,4DAA4D;IAC5D,SAAS,cAAc;IAEvB,uDAAuD;IACvD,OAAO,Y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nB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,sDAAsD;IACtD,QAAQ,EAAE,kBAAkB,EAAE,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gCAAgC,CAAC,CAAC,GAAG,GAAG,CAAE,SAAQ,kCAAkC,CAAC,CAAC,CAAC;IACtG;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,143 @@
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 { EmbeddedFlowType } from '../embedded-flow';
19
+ /**
20
+ * Status enumeration for the embedded recovery flow operations.
21
+ *
22
+ * @experimental Part of the new ThunderID API
23
+ */
24
+ export declare enum EmbeddedRecoveryFlowStatus {
25
+ /**
26
+ * Recovery flow completed successfully.
27
+ */
28
+ Complete = "COMPLETE",
29
+ /**
30
+ * Recovery flow encountered an error and cannot proceed.
31
+ *
32
+ * @see {@link EmbeddedRecoveryFlowErrorResponse} for error response structure
33
+ */
34
+ Error = "ERROR",
35
+ /**
36
+ * Recovery flow requires additional user input.
37
+ */
38
+ Incomplete = "INCOMPLETE"
39
+ }
40
+ /**
41
+ * Type enumeration for embedded recovery flow responses.
42
+ *
43
+ * @experimental Part of the new ThunderID API
44
+ */
45
+ export declare enum EmbeddedRecoveryFlowType {
46
+ /**
47
+ * Response requires external redirection.
48
+ */
49
+ Redirection = "REDIRECTION",
50
+ /**
51
+ * Response contains view components for rendering.
52
+ */
53
+ View = "VIEW"
54
+ }
55
+ /**
56
+ * Response structure for the embedded recovery flow.
57
+ *
58
+ * @experimental Part of the new ThunderID API
59
+ */
60
+ export interface EmbeddedRecoveryFlowResponse {
61
+ /**
62
+ * Per-step challenge token for replay protection.
63
+ * Must be included in the next request to continue this flow.
64
+ */
65
+ challengeToken?: string;
66
+ /**
67
+ * Flow data containing UI components for the current step.
68
+ */
69
+ data: {
70
+ /**
71
+ * Additional data from the flow step.
72
+ */
73
+ additionalData?: Record<string, any>;
74
+ /**
75
+ * UI components to render for the current step.
76
+ */
77
+ components?: any[];
78
+ /**
79
+ * Redirect URL if type is REDIRECTION.
80
+ */
81
+ redirectURL?: string;
82
+ };
83
+ /**
84
+ * Unique identifier for this recovery flow execution.
85
+ */
86
+ executionId: string;
87
+ /**
88
+ * Optional reason for failure when flowStatus is ERROR.
89
+ */
90
+ failureReason?: string;
91
+ /**
92
+ * Current status of the recovery flow.
93
+ */
94
+ flowStatus: EmbeddedRecoveryFlowStatus;
95
+ /**
96
+ * Type of response, indicating the expected user interaction.
97
+ */
98
+ type: EmbeddedRecoveryFlowType;
99
+ }
100
+ /**
101
+ * Request payload for initiating the embedded recovery flow.
102
+ *
103
+ * @experimental Part of the new ThunderID API
104
+ */
105
+ export interface EmbeddedRecoveryFlowInitiateRequest {
106
+ applicationId?: string;
107
+ flowType: EmbeddedFlowType.Recovery;
108
+ }
109
+ /**
110
+ * Request payload for executing steps in the embedded recovery flow.
111
+ *
112
+ * @experimental Part of the new ThunderID API
113
+ */
114
+ export interface EmbeddedRecoveryFlowRequest extends Partial<EmbeddedRecoveryFlowInitiateRequest> {
115
+ action?: string;
116
+ challengeToken?: string;
117
+ executionId?: string;
118
+ inputs?: Record<string, any>;
119
+ }
120
+ /**
121
+ * Error response structure for the embedded recovery flow.
122
+ *
123
+ * @experimental Part of the new ThunderID API
124
+ */
125
+ export interface EmbeddedRecoveryFlowErrorResponse {
126
+ /**
127
+ * Additional response data, typically empty for error responses.
128
+ */
129
+ data: Record<string, any>;
130
+ /**
131
+ * Unique identifier for the recovery flow instance that failed.
132
+ */
133
+ executionId: string;
134
+ /**
135
+ * Human-readable explanation of why the recovery operation failed.
136
+ */
137
+ failureReason: string;
138
+ /**
139
+ * Status of the recovery flow — always ERROR for this interface.
140
+ */
141
+ flowStatus: EmbeddedRecoveryFlowStatus;
142
+ }
143
+ //# sourceMappingURL=embedded-recovery-flow-v2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedded-recovery-flow-v2.d.ts","sourceRoot":"","sources":["../../../src/models/v2/embedded-recovery-flow-v2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,oBAAY,0BAA0B;IACpC;;OAEG;IACH,QAAQ,aAAa;IAErB;;;;OAIG;IACH,KAAK,UAAU;IAEf;;OAEG;IACH,UAAU,eAAe;CAC1B;AAED;;;;GAIG;AACH,oBAAY,wBAAwB;IAClC;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,IAAI,SAAS;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE;QACJ;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAErC;;WAEG;QACH,UAAU,CAAC,EAAE,GAAG,EAAE,CAAC;QAEnB;;WAEG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IAEF;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OA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