@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,45 @@
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
+ * Interface representing the configuration for an agent.
20
+ */
21
+ export interface AgentConfig {
22
+ /**
23
+ * The unique identifier for the agent
24
+ */
25
+ agentID: string;
26
+ /**
27
+ * The secret credential for the agent
28
+ */
29
+ agentSecret: string;
30
+ /**
31
+ * The authenticator name to match during the embedded sign-in flow.
32
+ * Defaults to {@link AgentConfig.DEFAULT_AUTHENTICATOR_NAME} if not provided.
33
+ */
34
+ authenticatorName?: string;
35
+ }
36
+ /**
37
+ * Namespace that holds constants related to {@link AgentConfig}.
38
+ */
39
+ export declare namespace AgentConfig {
40
+ /**
41
+ * Default authenticator name used when none is specified.
42
+ */
43
+ const DEFAULT_AUTHENTICATOR_NAME = "Username & Password";
44
+ }
45
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/models/agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,yBAAiB,WAAW,CAAC;IAC3B;;OAEG;IACI,MAAM,0BAA0B,wBAAwB,CAAC;CACjE"}
@@ -0,0 +1,35 @@
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
+ * Interface representing the authorization code response from the OAuth2/OIDC flow.
20
+ */
21
+ export interface AuthCodeResponse {
22
+ /**
23
+ * The authorization code returned from the authorization endpoint
24
+ */
25
+ code: string;
26
+ /**
27
+ * The session state identifier
28
+ */
29
+ session_state: string;
30
+ /**
31
+ * The state parameter returned from the authorization endpoint
32
+ */
33
+ state: string;
34
+ }
35
+ //# sourceMappingURL=auth-code-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-code-response.d.ts","sourceRoot":"","sources":["../../src/models/auth-code-response.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,249 @@
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
+ * Interface for color configuration with multiple variants.
20
+ */
21
+ export interface ColorVariants {
22
+ contrastText?: string;
23
+ dark?: string;
24
+ inverted?: string;
25
+ light?: string;
26
+ main?: string;
27
+ }
28
+ /**
29
+ * Interface for text color configuration.
30
+ */
31
+ export interface TextColors {
32
+ primary?: string;
33
+ secondary?: string;
34
+ }
35
+ /**
36
+ * Interface for button styling configuration.
37
+ */
38
+ export interface ButtonStyle {
39
+ base?: {
40
+ background?: {
41
+ backgroundColor?: string;
42
+ };
43
+ border?: {
44
+ borderColor?: string;
45
+ borderRadius?: string;
46
+ };
47
+ font?: {
48
+ color?: string;
49
+ };
50
+ };
51
+ }
52
+ /**
53
+ * Interface for buttons configuration.
54
+ */
55
+ export interface ButtonsConfig {
56
+ externalConnection?: ButtonStyle;
57
+ primary?: ButtonStyle;
58
+ secondary?: ButtonStyle;
59
+ }
60
+ /**
61
+ * Interface for color palette configuration.
62
+ */
63
+ export interface ColorsConfig {
64
+ alerts?: {
65
+ error?: ColorVariants;
66
+ info?: ColorVariants;
67
+ neutral?: ColorVariants;
68
+ warning?: ColorVariants;
69
+ };
70
+ background?: {
71
+ body?: ColorVariants;
72
+ surface?: ColorVariants;
73
+ };
74
+ illustrations?: {
75
+ accent1?: ColorVariants;
76
+ accent2?: ColorVariants;
77
+ accent3?: ColorVariants;
78
+ primary?: ColorVariants;
79
+ secondary?: ColorVariants;
80
+ };
81
+ outlined?: {
82
+ default?: string;
83
+ };
84
+ primary?: ColorVariants;
85
+ secondary?: ColorVariants;
86
+ text?: TextColors;
87
+ }
88
+ /**
89
+ * Interface for footer configuration.
90
+ */
91
+ export interface FooterConfig {
92
+ border?: {
93
+ borderColor?: string;
94
+ };
95
+ font?: {
96
+ color?: string;
97
+ };
98
+ }
99
+ /**
100
+ * Interface for image configuration.
101
+ */
102
+ export interface ImageConfig {
103
+ altText?: string;
104
+ imgURL?: string;
105
+ title?: string;
106
+ }
107
+ /**
108
+ * Interface for images configuration.
109
+ */
110
+ export interface ImagesConfig {
111
+ favicon?: Partial<ImageConfig>;
112
+ logo?: Partial<ImageConfig>;
113
+ myAccountLogo?: Partial<ImageConfig>;
114
+ }
115
+ /**
116
+ * Interface for input styling configuration.
117
+ */
118
+ export interface InputsConfig {
119
+ base?: {
120
+ background?: {
121
+ backgroundColor?: string;
122
+ };
123
+ border?: {
124
+ borderColor?: string;
125
+ borderRadius?: string;
126
+ };
127
+ font?: {
128
+ color?: string;
129
+ };
130
+ labels?: {
131
+ font?: {
132
+ color?: string;
133
+ };
134
+ };
135
+ };
136
+ }
137
+ /**
138
+ * Interface for login box configuration.
139
+ */
140
+ export interface LoginBoxConfig {
141
+ background?: {
142
+ backgroundColor?: string;
143
+ };
144
+ border?: {
145
+ borderColor?: string;
146
+ borderRadius?: string;
147
+ borderWidth?: string;
148
+ };
149
+ font?: {
150
+ color?: string;
151
+ };
152
+ }
153
+ /**
154
+ * Interface for login page configuration.
155
+ */
156
+ export interface LoginPageConfig {
157
+ background?: {
158
+ backgroundColor?: string;
159
+ };
160
+ font?: {
161
+ color?: string;
162
+ };
163
+ }
164
+ /**
165
+ * Interface for typography configuration.
166
+ */
167
+ export interface TypographyConfig {
168
+ font?: {
169
+ color?: string;
170
+ fontFamily?: string;
171
+ importURL?: string;
172
+ };
173
+ heading?: {
174
+ font?: {
175
+ color?: string;
176
+ };
177
+ };
178
+ }
179
+ /**
180
+ * Interface for theme variant configuration (LIGHT/DARK).
181
+ */
182
+ export interface ThemeVariant {
183
+ buttons?: ButtonsConfig;
184
+ colors?: ColorsConfig;
185
+ footer?: FooterConfig;
186
+ images?: ImagesConfig;
187
+ inputs?: InputsConfig;
188
+ loginBox?: LoginBoxConfig;
189
+ loginPage?: LoginPageConfig;
190
+ typography?: TypographyConfig;
191
+ }
192
+ /**
193
+ * Interface for branding preference layout configuration.
194
+ */
195
+ export interface BrandingLayout {
196
+ activeLayout?: string;
197
+ sideImg?: {
198
+ altText?: string;
199
+ imgURL?: string;
200
+ };
201
+ }
202
+ /**
203
+ * Interface for organization details configuration.
204
+ */
205
+ export interface BrandingOrganizationDetails {
206
+ displayName?: string;
207
+ supportEmail?: string;
208
+ }
209
+ /**
210
+ * Interface for URL configurations.
211
+ */
212
+ export interface UrlsConfig {
213
+ cookiePolicyURL?: string;
214
+ privacyPolicyURL?: string;
215
+ selfSignUpURL?: string;
216
+ termsOfUseURL?: string;
217
+ }
218
+ /**
219
+ * Interface for branding preference theme configuration.
220
+ */
221
+ export interface BrandingTheme {
222
+ DARK?: ThemeVariant;
223
+ LIGHT?: ThemeVariant;
224
+ activeTheme?: string;
225
+ }
226
+ /**
227
+ * Interface for branding preference configuration.
228
+ */
229
+ export interface BrandingPreferenceConfig {
230
+ configs?: {
231
+ isBrandingEnabled?: boolean;
232
+ removeDefaultBranding?: boolean;
233
+ selfSignUpEnabled?: boolean;
234
+ };
235
+ layout?: BrandingLayout;
236
+ organizationDetails?: BrandingOrganizationDetails;
237
+ theme?: BrandingTheme;
238
+ urls?: UrlsConfig;
239
+ }
240
+ /**
241
+ * Interface for branding preference configuration.
242
+ */
243
+ export interface BrandingPreference {
244
+ locale?: string;
245
+ name?: string;
246
+ preference?: BrandingPreferenceConfig;
247
+ type?: string;
248
+ }
249
+ //# sourceMappingURL=branding-preference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branding-preference.d.ts","sourceRoot":"","sources":["../../src/models/branding-preference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE;QACL,UAAU,CAAC,EAAE;YACX,eAAe,CAAC,EAAE,MAAM,CAAC;SAC1B,CAAC;QACF,MAAM,CAAC,EAAE;YACP,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,YAAY,CAAC,EAAE,MAAM,CAAC;SACvB,CAAC;QACF,IAAI,CAAC,EAAE;YACL,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,kBAAkB,CAAC,EAAE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C,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;IAClD,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,213 @@
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 { SignInOptions, SignOutOptions, SignUpOptions } from './config';
19
+ import { EmbeddedFlowExecuteRequestConfig, EmbeddedFlowExecuteRequestPayload, EmbeddedFlowExecuteResponse } from './embedded-flow';
20
+ import { EmbeddedSignInFlowHandleRequestPayload } from './embedded-signin-flow';
21
+ import { Organization, AllOrganizationsApiResponse } from './organization';
22
+ import { Storage } from './store';
23
+ import { TokenExchangeRequestConfig, TokenResponse } from './token';
24
+ import { User, UserProfile } from './user';
25
+ /**
26
+ * Interface defining the core functionality for ThunderID authentication clients.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * class ThunderIDNodeClient implements ThunderIDClient<NodeConfig> {
31
+ * // Implement interface methods
32
+ * }
33
+ * ```
34
+ */
35
+ export interface ThunderIDClient<T> {
36
+ /**
37
+ * Clears the session for the specified session ID.
38
+ * @param sessionId - Optional session ID to clear the session for.
39
+ */
40
+ clearSession(sessionId?: string): void;
41
+ /**
42
+ * Decodes a JWT token and returns its payload.
43
+ * @param token - The JWT token to be decoded.
44
+ * @returns A promise that resolves to the decoded token payload.
45
+ */
46
+ decodeJwtToken<R = Record<string, unknown>>(token: string): Promise<R>;
47
+ /**
48
+ * Swaps the current access token with a new one based on the provided configuration (with a grant type).
49
+ * @param config - Configuration for the token exchange request.
50
+ * @param sessionId - Optional session ID to be used for the token exchange.
51
+ */
52
+ exchangeToken(config: TokenExchangeRequestConfig, sessionId?: string): Promise<TokenResponse | Response>;
53
+ /**
54
+ * Retrieves the access token for the current session.
55
+ * @param sessionId - Optional session ID to retrieve the access token for a specific session.
56
+ * @returns A promise that resolves to the access token string.
57
+ */
58
+ getAccessToken(sessionId?: string): Promise<string>;
59
+ /**
60
+ * Gets all organizations available to the user.
61
+ * @param options - Optional parameters for the request.
62
+ * @param sessionId - Optional session ID to be used for the request.
63
+ */
64
+ getAllOrganizations(options?: any, sessionId?: string): Promise<AllOrganizationsApiResponse>;
65
+ /**
66
+ * Gets the client configuration.
67
+ * @returns The client configuration.
68
+ */
69
+ getConfiguration(): T;
70
+ /**
71
+ * Gets the current organization of the user.
72
+ *
73
+ * @returns The current organization if available, otherwise null.
74
+ */
75
+ getCurrentOrganization(sessionId?: string): Promise<Organization | null>;
76
+ /**
77
+ * Gets the current signed-in user's associated organizations.
78
+ *
79
+ * @returns Associated organizations.
80
+ */
81
+ getMyOrganizations(options?: any, sessionId?: string): Promise<Organization[]>;
82
+ /**
83
+ * Gets user information from the session.
84
+ *
85
+ * @returns User object containing user details.
86
+ */
87
+ getUser(options?: any): Promise<User>;
88
+ /**
89
+ * Fetches the user profile along with its schemas and a flattened version of the profile.
90
+ *
91
+ * @returns A promise resolving to a UserProfile object containing the user's profile information.
92
+ */
93
+ getUserProfile(options?: any): Promise<UserProfile>;
94
+ /**
95
+ * Initializes the authentication client with provided configuration.
96
+ *
97
+ * @param config - SDK Client instance configuration options.
98
+ * @param storage - Optional storage instance to persist data (e.g., session, user profile).
99
+ * @returns Promise resolving to boolean indicating success.
100
+ */
101
+ initialize(config: T, storage?: Storage): Promise<boolean>;
102
+ /**
103
+ * Checks if the client is currently loading.
104
+ * This can be used to determine if the client is in the process of initializing or fetching user data.
105
+ *
106
+ * @returns Boolean indicating if the client is loading.
107
+ */
108
+ isLoading(): boolean;
109
+ /**
110
+ * Checks if a user is signed in.
111
+ * FIXME: This should be integrated with the existing isSignedIn method which returns a Promise.
112
+ *
113
+ * @returns Boolean indicating sign-in status.
114
+ */
115
+ isSignedIn(): Promise<boolean>;
116
+ /**
117
+ * Re-initializes the client with a new configuration.
118
+ *
119
+ * @remarks
120
+ * This can be partial configuration to update only specific fields.
121
+ *
122
+ * @param config - New configuration to re-initialize the client with.
123
+ * @returns Promise resolving to boolean indicating success.
124
+ */
125
+ reInitialize(config: Partial<T>): Promise<boolean>;
126
+ /**
127
+ * Initiates an embedded recovery flow for the user (e.g. password reset).
128
+ *
129
+ * @param payload - The payload containing the necessary information to execute the embedded recovery flow.
130
+ * @returns A promise that resolves to an EmbeddedFlowExecuteResponse containing the flow execution details.
131
+ */
132
+ recover(payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse>;
133
+ /**
134
+ * Sets the session data for the specified session ID.
135
+ * @param sessionData - The session data to be set.
136
+ * @param sessionId - Optional session ID to set the session data for.
137
+ */
138
+ setSession(sessionData: Record<string, unknown>, sessionId?: string): Promise<void>;
139
+ /**
140
+ * Initiates the sign-in process for the user.
141
+ *
142
+ * @param options - Optional sign-in options like additional parameters to be sent in the authorize request, etc.
143
+ * @param sessionId - Optional session ID to be used for sign-in.
144
+ * @param onSignInSuccess - Callback function to be executed upon successful sign-in.
145
+ * @returns Promise resolving the user upon successful sign in.
146
+ */
147
+ signIn(options?: SignInOptions, sessionId?: string, onSignInSuccess?: (afterSignInUrl: string) => void): Promise<User>;
148
+ /**
149
+ * Initiates an embedded (App-Native) sign-in flow for the user.
150
+ *
151
+ * @param payload - The payload containing the necessary information to execute the embedded sign-in flow.
152
+ * @param request - The request object containing URL and parameters for the sign-in flow HTTP request.
153
+ * @param sessionId - Optional session ID to be used for sign-in.
154
+ * @param onSignInSuccess - Callback function to be executed upon successful sign-in.
155
+ * @returns A promise that resolves to an EmbeddedFlowExecuteResponse containing the flow execution details.
156
+ */
157
+ signIn(payload: EmbeddedSignInFlowHandleRequestPayload, request: EmbeddedFlowExecuteRequestConfig<EmbeddedSignInFlowHandleRequestPayload>, sessionId?: string, onSignInSuccess?: (afterSignInUrl: string) => void): Promise<User>;
158
+ /**
159
+ * Try signing in silently in the background without any user interactions.
160
+ *
161
+ * @remarks This approach uses a passive auth request (prompt=none) sent from an iframe which might pose issues in cross-origin scenarios.
162
+ * Make sure you are aware of the limitations and browser compatibility issues.
163
+ *
164
+ * @param options - Optional sign-in options like additional parameters to be sent in the authorize request, etc.
165
+ * @returns A promise that resolves to the user if sign-in is successful, or false if not.
166
+ */
167
+ signInSilently(options?: SignInOptions): Promise<User | boolean>;
168
+ /**
169
+ * Signs out the currently signed-in user.
170
+ *
171
+ * @param options - Optional sign-out options like additional parameters to be sent in the sign-out request, etc.
172
+ * @param afterSignOut - Callback function to be executed after sign-out is complete.
173
+ * @returns A promise that resolves to true if sign-out is successful
174
+ */
175
+ signOut(options?: SignOutOptions, afterSignOut?: (afterSignOutUrl: string) => void): Promise<string>;
176
+ /**
177
+ * Signs out the currently signed-in user with an optional session ID.
178
+ *
179
+ * @param options - Optional sign-out options like additional parameters to be sent in the sign-out request, etc.
180
+ * @param sessionId - Optional session ID to be used for sign-out.
181
+ * This can be useful in scenarios where multiple sessions are managed.
182
+ * @param afterSignOut - Callback function to be executed after sign-out is complete.
183
+ * @returns A promise that resolves to true if sign-out is successful
184
+ */
185
+ signOut(options?: SignOutOptions, sessionId?: string, afterSignOut?: (afterSignOutUrl: string) => void): Promise<string>;
186
+ /**
187
+ * Initiates a redirection-based sign-up process for the user.
188
+ *
189
+ * @param options - Optional sign-up options like additional parameters to be sent in the sign-up request, etc.
190
+ * @returns Promise resolving to the user upon successful sign up.
191
+ */
192
+ signUp(options?: SignUpOptions): Promise<void>;
193
+ /**
194
+ * Initiates an embedded (App-Native) sign-up flow for the user.
195
+ *
196
+ * @param payload - The payload containing the necessary information to execute the embedded sign-up flow.
197
+ * @returns A promise that resolves to an EmbeddedFlowExecuteResponse containing the flow execution details.
198
+ */
199
+ signUp(payload: EmbeddedFlowExecuteRequestPayload): Promise<EmbeddedFlowExecuteResponse>;
200
+ /**
201
+ * Switches the current organization to the specified one.
202
+ * @param organization - The organization to switch to.
203
+ * @returns A promise that resolves when the switch is complete.
204
+ */
205
+ switchOrganization(organization: Organization, sessionId?: string): Promise<TokenResponse | Response>;
206
+ /**
207
+ * Updates the user profile with the provided payload.
208
+ * @param payload - The new user profile data.
209
+ * @param userId - Optional user ID to specify which user's profile to update.
210
+ */
211
+ updateUserProfile(payload: any, userId?: string): Promise<User>;
212
+ }
213
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/models/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AACtE,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,sCAAsC,EAAC,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAC,YAAY,EAAE,2BAA2B,EAAC,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAChC,OAAO,EAAC,0BAA0B,EAAE,aAAa,EAAC,MAAM,SAAS,C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