@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,30 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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 { Config } from '../models/config';
19
+ /**
20
+ * Utility to generate the redirect-based sign-up URL for ThunderID.
21
+ *
22
+ * If the baseUrl is recognized (standard ThunderID pattern), constructs the sign-up URL.
23
+ * Otherwise, returns an empty string.
24
+ *
25
+ * @param baseUrl - The base URL of the ThunderID identity server (string or undefined)
26
+ * @returns The sign-up URL if baseUrl is recognized, otherwise an empty string
27
+ */
28
+ declare const getRedirectBasedSignUpUrl: (config: Config) => string;
29
+ export default getRedirectBasedSignUpUrl;
30
+ //# sourceMappingURL=getRedirectBasedSignUpUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getRedirectBasedSignUpUrl.d.ts","sourceRoot":"","sources":["../../src/utils/getRedirectBasedSignUpUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AAGxC;;;;;;;;GAQG;AACH,QAAA,MAAM,yBAAyB,GAAI,QAAQ,MAAM,KAAG,MAoCnD,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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 { Config } from '../models/config';
19
+ import { Platform } from '../models/platforms';
20
+ /**
21
+ * Identifies the platform based on the given base URL.
22
+ *
23
+ * If the URL is recognized and matches the ThunderID domain, returns Platform.ThunderID.
24
+ * Otherwise, returns Platform.IdentityServer.
25
+ *
26
+ * @param baseUrl - The base URL to check
27
+ * @returns Platform enum value
28
+ */
29
+ declare const identifyPlatform: (config: Config) => Platform;
30
+ export default identifyPlatform;
31
+ //# sourceMappingURL=identifyPlatform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifyPlatform.d.ts","sourceRoot":"","sources":["../../src/utils/identifyPlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAC,QAAQ,EAAC,MAAM,qBAAqB,CAAC;AAE7C;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,GAAI,QAAQ,MAAM,KAAG,QA2B1C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,49 @@
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
+ * Checks if a value is considered empty.
20
+ *
21
+ * A value is considered empty if it is:
22
+ * - null
23
+ * - undefined
24
+ * - empty string ("")
25
+ * - string containing only whitespace characters
26
+ * - empty array ([])
27
+ * - empty object ({})
28
+ *
29
+ * @param value - The value to check
30
+ * @returns true if the value is empty, false otherwise
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * isEmpty(null); // true
35
+ * isEmpty(undefined); // true
36
+ * isEmpty(""); // true
37
+ * isEmpty(" "); // true
38
+ * isEmpty("hello"); // false
39
+ * isEmpty([]); // true
40
+ * isEmpty([1, 2, 3]); // false
41
+ * isEmpty({}); // true
42
+ * isEmpty({ name: "John" }); // false
43
+ * isEmpty(0); // false
44
+ * isEmpty(false); // false
45
+ * ```
46
+ */
47
+ declare const isEmpty: (value: any) => boolean;
48
+ export default isEmpty;
49
+ //# sourceMappingURL=isEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isEmpty.d.ts","sourceRoot":"","sources":["../../src/utils/isEmpty.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,OAAO,GAAI,OAAO,GAAG,KAAG,OAkB7B,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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
+ * Utility to determine if sensible ThunderID fallbacks can be used based on the given base URL.
20
+ *
21
+ * This checks if the URL follows the standard ThunderID pattern: /t/{orgHandle}
22
+ * Returns true if sensible fallbacks (like deriving organization handle, tenant, etc.) can be used, false otherwise.
23
+ *
24
+ * @param baseUrl - The base URL of the ThunderID identity server (string or undefined)
25
+ * @returns boolean - true if sensible fallbacks can be used, false otherwise
26
+ *
27
+ * @example
28
+ * isRecognizedBaseUrlPattern('https://dev.asgardeo.io/t/dxlab'); // true
29
+ * isRecognizedBaseUrlPattern('https://custom.example.com/auth'); // false
30
+ */
31
+ declare const isRecognizedBaseUrlPattern: (baseUrl: string | undefined) => boolean;
32
+ export default isRecognizedBaseUrlPattern;
33
+ //# sourceMappingURL=isRecognizedBaseUrlPattern.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isRecognizedBaseUrlPattern.d.ts","sourceRoot":"","sources":["../../src/utils/isRecognizedBaseUrlPattern.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,0BAA0B,GAAI,SAAS,MAAM,GAAG,SAAS,KAAG,OAmCjE,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -0,0 +1,143 @@
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
+ * Log levels enum
20
+ */
21
+ export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
22
+ /**
23
+ * Logger configuration interface
24
+ */
25
+ export interface LoggerConfig {
26
+ /** Custom log formatter function */
27
+ formatter?: (level: LogLevel, message: string, ...args: any[]) => void;
28
+ /** Minimum log level to output */
29
+ level: LogLevel;
30
+ /** Custom prefix for all log messages */
31
+ prefix?: string;
32
+ /** Whether to include log level in output */
33
+ showLevel?: boolean;
34
+ /** Whether to include timestamps */
35
+ timestamps?: boolean;
36
+ }
37
+ /**
38
+ * Universal logger class that works in both browser and Node.js environments
39
+ */
40
+ declare class Logger {
41
+ private config;
42
+ constructor(config?: Partial<LoggerConfig>);
43
+ /**
44
+ * Update logger configuration
45
+ */
46
+ configure(config: Partial<LoggerConfig>): void;
47
+ /**
48
+ * Get current configuration
49
+ */
50
+ getConfig(): LoggerConfig;
51
+ /**
52
+ * Check if a log level should be output
53
+ */
54
+ private shouldLog;
55
+ /**
56
+ * Get timestamp string
57
+ */
58
+ private static getTimestamp;
59
+ /**
60
+ * Get log level string
61
+ */
62
+ private static getLevelString;
63
+ /**
64
+ * Format message for Node.js terminal
65
+ */
66
+ private formatForNode;
67
+ /**
68
+ * Log message using appropriate method
69
+ */
70
+ private logMessage;
71
+ /**
72
+ * Log to browser console with styling
73
+ */
74
+ private logToBrowser;
75
+ /**
76
+ * Log to Node.js console
77
+ */
78
+ private logToNode;
79
+ /**
80
+ * Log debug message
81
+ */
82
+ debug(message: string, ...args: any[]): void;
83
+ /**
84
+ * Log info message
85
+ */
86
+ info(message: string, ...args: any[]): void;
87
+ /**
88
+ * Log warning message
89
+ */
90
+ warn(message: string, ...args: any[]): void;
91
+ /**
92
+ * Log error message
93
+ */
94
+ error(message: string, ...args: any[]): void;
95
+ /**
96
+ * Create a child logger with additional prefix
97
+ */
98
+ child(prefix: string): Logger;
99
+ /**
100
+ * Set log level
101
+ */
102
+ setLevel(level: LogLevel): void;
103
+ /**
104
+ * Get current log level
105
+ */
106
+ getLevel(): LogLevel;
107
+ }
108
+ /**
109
+ * Default logger instance
110
+ */
111
+ declare const logger: Logger;
112
+ /**
113
+ * Create a new logger instance with custom configuration
114
+ */
115
+ export declare const createLogger: (config?: Partial<LoggerConfig>) => Logger;
116
+ /**
117
+ * Default export - global logger instance
118
+ */
119
+ export default logger;
120
+ /**
121
+ * Named exports for convenience
122
+ */
123
+ export declare const debug: (message: string, ...args: any[]) => void;
124
+ export declare const info: (message: string, ...args: any[]) => void;
125
+ export declare const warn: (message: string, ...args: any[]) => void;
126
+ export declare const error: (message: string, ...args: any[]) => void;
127
+ /**
128
+ * Configure the default logger
129
+ */
130
+ export declare const configure: (config: Partial<LoggerConfig>) => void;
131
+ /**
132
+ * Create component-specific loggers
133
+ */
134
+ export declare const createComponentLogger: (component: string) => Logger;
135
+ /**
136
+ * Create package-specific logger
137
+ */
138
+ export declare const createPackageLogger: (packageName: string) => Logger;
139
+ /**
140
+ * Create package component logger (package + component)
141
+ */
142
+ export declare const createPackageComponentLogger: (packageName: string, component: string) => Logger;
143
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACvE,kCAAkC;IAClC,KAAK,EAAE,QAAQ,CAAC;IAChB,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AA8ED;;GAEG;AACH,cAAM,MAAM;IACV,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM;IAI9C;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI;IAI9C;;OAEG;IACH,SAAS,IAAI,YAAY;IAIzB;;OAEG;IACH,OAAO,CAAC,SAAS;IAIjB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAI3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,cAAc;IAe7B;;OAEG;IACH,OAAO,CAAC,aAAa;IA2CrB;;OAEG;IACH,OAAO,CAAC,UAAU;IAsBlB;;OAEG;IACH,OAAO,CAAC,YAAY;IAoEpB;;OAEG;IACH,OAAO,CAAC,SAAS;IA2BjB;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI5C;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3C;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI3C;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAI5C;;OAEG;IACH,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAQ7B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B;;OAEG;IACH,QAAQ,IAAI,QAAQ;CAGrB;AAED;;GAEG;AACH,QAAA,MAAM,MAAM,EAAE,MAAqB,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,OAAO,CAAC,YAAY,CAAC,KAAG,MAA4B,CAAC;AAE3F;;GAEG;AACH,eAAe,MAAM,CAAC;AAEtB;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,EAAE,KAAG,IAAsC,CAAC;AAC/F,eAAO,MAAM,IAAI,GAAI,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,EAAE,KAAG,IAAqC,CAAC;AAC7F,eAAO,MAAM,IAAI,GAAI,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,EAAE,KAAG,IAAqC,CAAC;AAC7F,eAAO,MAAM,KAAK,GAAI,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,EAAE,KAAG,IAAsC,CAAC;AAE/F;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,OAAO,CAAC,YAAY,CAAC,KAAG,IAAgC,CAAC;AAE3F;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM,KAAG,MAAiC,CAAC;AAE5F;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,aAAa,MAAM,KAAG,MAMtD,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,4BAA4B,GAAI,aAAa,MAAM,EAAE,WAAW,MAAM,KAAG,MAGrF,CAAC"}
@@ -0,0 +1,29 @@
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
+ * Attempts to extract a human-readable message from a structured API error response body.
20
+ *
21
+ * The backend returns errors in the following form:
22
+ * {"code":"...","message":{"key":"...","defaultValue":"..."},"description":{"key":"...","defaultValue":"..."}}
23
+ *
24
+ * Returns `description.defaultValue` if present, then `message.defaultValue`, and falls back
25
+ * to the raw `errorText` when the response is not a recognised structured error.
26
+ */
27
+ declare const parseApiErrorMessage: (errorText: string) => string;
28
+ export default parseApiErrorMessage;
29
+ //# sourceMappingURL=parseApiErrorMessage.d.ts.map
@@ -0,0 +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,MAajD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,42 @@
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
+ * Processes OpenID scopes to ensure they are in the correct format.
20
+ * If the input is a string, it returns it as is.
21
+ * If the input is an array, it joins the elements into a single string separated by spaces.
22
+ * If the input is neither, it throws an error.
23
+ *
24
+ * Default scopes are only injected when no scopes are configured (undefined, empty string,
25
+ * or empty array). If the caller explicitly provides scopes, those are used as-is.
26
+ *
27
+ * @param scopes - The OpenID scopes to process, which can be a string, an array of strings,
28
+ * or undefined/null when not configured.
29
+ * @returns A string of OpenID scopes separated by spaces.
30
+ *
31
+ * @example
32
+ * ```typescript
33
+ * processOpenIDScopes("openid profile email"); // returns "openid profile email"
34
+ * processOpenIDScopes(["openid", "profile", "email"]); // returns "openid profile email"
35
+ * processOpenIDScopes(undefined); // returns default scopes
36
+ * processOpenIDScopes(123); // throws ThunderIDRuntimeError
37
+ * processOpenIDScopes({}); // throws ThunderIDRuntimeError
38
+ * ```
39
+ */
40
+ declare const processOpenIDScopes: (scopes: string | string[] | undefined | null) => string;
41
+ export default processOpenIDScopes;
42
+ //# sourceMappingURL=processOpenIDScopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processOpenIDScopes.d.ts","sourceRoot":"","sources":["../../src/utils/processOpenIDScopes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,mBAAmB,GAAI,QAAQ,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,KAAG,MA8B3E,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,74 @@
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
+ * Removes userstore prefixes from a username if they exist.
20
+ * This is commonly used to clean usernames returned from SCIM2 endpoints
21
+ * that include userstore prefixes like "DEFAULT/", "ASGARDEO_USER/", "PRIMARY/", etc.
22
+ *
23
+ * @param username - The username string to process
24
+ * @returns The username without the userstore prefix, or the original username if no prefix exists
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const cleanUsername = removeUserstorePrefix("DEFAULT/john.doe");
29
+ * console.log(cleanUsername); // "john.doe"
30
+ *
31
+ * const thunderidUser = removeUserstorePrefix("ASGARDEO_USER/jane.doe");
32
+ * console.log(thunderidUser); // "jane.doe"
33
+ *
34
+ * const primaryUser = removeUserstorePrefix("PRIMARY/admin");
35
+ * console.log(primaryUser); // "admin"
36
+ *
37
+ * const alreadyClean = removeUserstorePrefix("user.name");
38
+ * console.log(alreadyClean); // "user.name"
39
+ *
40
+ * const emptyInput = removeUserstorePrefix("");
41
+ * console.log(emptyInput); // ""
42
+ * ```
43
+ */
44
+ export declare const removeUserstorePrefix: (username?: string) => string;
45
+ /**
46
+ * Processes a user object to remove userstore prefixes from username fields.
47
+ * This is a helper function for processing user objects returned from SCIM2 endpoints.
48
+ * Handles various username field variations: username, userName, and user_name.
49
+ *
50
+ * @param user - The user object to process
51
+ * @returns The user object with processed username fields
52
+ *
53
+ * @example
54
+ * ```typescript
55
+ * const user = { username: "DEFAULT/john.doe", email: "john@example.com" };
56
+ * const processedUser = processUserUsername(user);
57
+ * console.log(processedUser.username); // "john.doe"
58
+ *
59
+ * const camelCaseUser = { userName: "ASGARDEO_USER/jane.doe", email: "jane@example.com" };
60
+ * const processedCamelCaseUser = processUserUsername(camelCaseUser);
61
+ * console.log(processedCamelCaseUser.userName); // "jane.doe"
62
+ *
63
+ * const snakeCaseUser = { user_name: "PRIMARY/admin", email: "admin@example.com" };
64
+ * const processedSnakeCaseUser = processUserUsername(snakeCaseUser);
65
+ * console.log(processedSnakeCaseUser.user_name); // "admin"
66
+ * ```
67
+ */
68
+ declare const processUsername: <T extends {
69
+ userName?: string;
70
+ user_name?: string;
71
+ username?: string;
72
+ }>(user: T) => T;
73
+ export default processUsername;
74
+ //# sourceMappingURL=processUsername.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"processUsername.d.ts","sourceRoot":"","sources":["../../src/utils/processUsername.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AASH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM,KAAG,MAMzD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,eAAe,GAAI,CAAC,SAAS;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAC,EAAE,MAAM,CAAC,KAAG,CAuBxG,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,32 @@
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
+ * Removes a trailing slash from a path string if it exists.
20
+ *
21
+ * @param path - The string path to process
22
+ * @returns The path without a trailing slash
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * removeTrailingSlash('/path/to/something/') // returns '/path/to/something'
27
+ * removeTrailingSlash('/path/to/something') // returns '/path/to/something'
28
+ * ```
29
+ */
30
+ declare const removeTrailingSlash: (path: string) => string;
31
+ export default removeTrailingSlash;
32
+ //# sourceMappingURL=removeTrailingSlash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"removeTrailingSlash.d.ts","sourceRoot":"","sources":["../../src/utils/removeTrailingSlash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MAAyD,CAAC;AAEtG,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,20 @@
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
+ declare const resolveFieldName: (field: any) => string;
19
+ export default resolveFieldName;
20
+ //# sourceMappingURL=resolveFieldName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveFieldName.d.ts","sourceRoot":"","sources":["../../src/utils/resolveFieldName.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,QAAA,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,MAWtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,21 @@
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 { FieldType } from '../models/field';
19
+ declare const resolveFieldType: (field: any) => FieldType;
20
+ export default resolveFieldType;
21
+ //# sourceMappingURL=resolveFieldType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveFieldType.d.ts","sourceRoot":"","sources":["../../src/utils/resolveFieldType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAE1C,QAAA,MAAM,gBAAgB,GAAI,OAAO,GAAG,KAAG,SAmBtC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,31 @@
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
+ * Sets the value at path of object. If a portion of path doesn't exist,
20
+ * it's created. Arrays are created for missing index properties while
21
+ * objects are created for all other missing properties.
22
+ * Similar to Lodash's set() function
23
+ *
24
+ * @param object - The object to modify
25
+ * @param path - The path of the property to set
26
+ * @param value - The value to set
27
+ * @returns The object
28
+ */
29
+ declare const set: (object: any, path: string | string[], value: any) => any;
30
+ export default set;
31
+ //# sourceMappingURL=set.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../src/utils/set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;;;;;GAUG;AACH,QAAA,MAAM,GAAG,GAAI,QAAQ,GAAG,EAAE,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,GAAG,KAAG,GAmB/D,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -0,0 +1,49 @@
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 { BrandingPreference } from '../models/branding-preference';
19
+ import { Theme } from '../theme/types';
20
+ /**
21
+ * Transforms branding preference response to Theme object
22
+ *
23
+ * @param brandingPreference - The branding preference response from getBrandingPreference
24
+ * @param forceTheme - Optional parameter to force a specific theme ('light' or 'dark'),
25
+ * if not provided, will use the activeTheme from branding preference
26
+ * @returns Theme object that can be used with the theme system
27
+ *
28
+ * The function extracts the following from branding preference:
29
+ * - Colors (primary, secondary, background, text, alerts, etc.)
30
+ * - Border radius from buttons and inputs
31
+ * - Images (logo and favicon with their URLs, titles, and alt text)
32
+ * - Typography settings
33
+ *
34
+ * @example
35
+ * ```typescript
36
+ * const brandingPreference = await getBrandingPreference({ baseUrl: "..." });
37
+ * const theme = transformBrandingPreferenceToTheme(brandingPreference);
38
+ *
39
+ * // Access image URLs via CSS variables
40
+ * // Logo: var(--wso2-image-logo-url)
41
+ * // Favicon: var(--wso2-image-favicon-url)
42
+ *
43
+ * // Force light theme regardless of branding preference activeTheme
44
+ * const lightTheme = transformBrandingPreferenceToTheme(brandingPreference, 'light');
45
+ * ```
46
+ */
47
+ export declare const transformBrandingPreferenceToTheme: (brandingPreference: BrandingPreference, forceTheme?: "light" | "dark") => Theme;
48
+ export default transformBrandingPreferenceToTheme;
49
+ //# sourceMappingURL=transformBrandingPreferenceToTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transformBrandingPreferenceToTheme.d.ts","sourceRoot":"","sources":["../../src/utils/transformBrandingPreferenceToTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,kBAAkB,EAA8B,MAAM,+BAA+B,CAAC;AAE9F,OAAO,EAAC,KAAK,EAAc,MAAM,gBAAgB,CAAC;AAuJlD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,kCAAkC,GAC7C,oBAAoB,kBAAkB,EACtC,aAAa,OAAO,GAAG,MAAM,KAC5B,KAsCF,CAAC;AAEF,eAAe,kCAAkC,CAAC"}