@stytch/vanilla-js 4.12.2 → 4.13.0

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 (320) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/b2b/adminPortal/package.json +6 -0
  3. package/dist/APINetworkClient.d.ts +6 -0
  4. package/dist/BootstrapDataManager.d.ts +38 -0
  5. package/dist/CaptchaProvider.d.ts +7 -0
  6. package/dist/ClientsideServicesProvider.d.ts +16 -0
  7. package/dist/HeadlessOAuthClient.d.ts +68 -0
  8. package/dist/NetworkClient.d.ts +25 -0
  9. package/dist/PKCEManager.d.ts +12 -0
  10. package/dist/StytchHeadlessClient.d.ts +45 -0
  11. package/dist/StytchUIClient.d.ts +86 -0
  12. package/dist/SubscriptionService.d.ts +111 -0
  13. package/dist/adminPortal/AdminPortalStyleConfig.d.ts +166 -0
  14. package/dist/adminPortal/AdminPortalWrapper.d.ts +6 -0
  15. package/dist/adminPortal/MainContainer.d.ts +4 -0
  16. package/dist/adminPortal/Router.d.ts +44 -0
  17. package/dist/adminPortal/StytchClientContext.d.ts +3 -0
  18. package/dist/adminPortal/components/Accordion.d.ts +6 -0
  19. package/dist/adminPortal/components/ActionMenu.d.ts +22 -0
  20. package/dist/adminPortal/components/Alert.d.ts +4 -0
  21. package/dist/adminPortal/components/Button.d.ts +6 -0
  22. package/dist/adminPortal/components/Code.d.ts +7 -0
  23. package/dist/adminPortal/components/CopyableText.d.ts +7 -0
  24. package/dist/adminPortal/components/DeleteConnection.d.ts +21 -0
  25. package/dist/adminPortal/components/EmbeddedTable.d.ts +3 -0
  26. package/dist/adminPortal/components/FlexBox.d.ts +1 -0
  27. package/dist/adminPortal/components/InfoIcon.d.ts +3 -0
  28. package/dist/adminPortal/components/Input.d.ts +5 -0
  29. package/dist/adminPortal/components/Label.d.ts +4 -0
  30. package/dist/adminPortal/components/ListEditor.d.ts +4 -0
  31. package/dist/adminPortal/components/MenuItem.d.ts +4 -0
  32. package/dist/adminPortal/components/Modal.d.ts +16 -0
  33. package/dist/adminPortal/components/PageLoadingIndicator.d.ts +2 -0
  34. package/dist/adminPortal/components/PaginatedTable.d.ts +4 -0
  35. package/dist/adminPortal/components/SearchBar.d.ts +3 -0
  36. package/dist/adminPortal/components/Select.d.ts +12 -0
  37. package/dist/adminPortal/components/SetDefaultConnection.d.ts +29 -0
  38. package/dist/adminPortal/components/SettingsContainer.d.ts +24 -0
  39. package/dist/adminPortal/components/SettingsList.d.ts +4 -0
  40. package/dist/adminPortal/components/SettingsListItem.d.ts +5 -0
  41. package/dist/adminPortal/components/SettingsSection.d.ts +6 -0
  42. package/dist/adminPortal/components/Table.d.ts +3 -0
  43. package/dist/adminPortal/components/TableActions.d.ts +5 -0
  44. package/dist/adminPortal/components/Tag.d.ts +5 -0
  45. package/dist/adminPortal/components/TagList.d.ts +4 -0
  46. package/dist/adminPortal/components/Toast.d.ts +5 -0
  47. package/dist/adminPortal/components/Tooltip.d.ts +2 -0
  48. package/dist/adminPortal/components/Typography.d.ts +4 -0
  49. package/dist/adminPortal/index.d.ts +3 -0
  50. package/dist/adminPortal/index.esm.js +5 -0
  51. package/dist/adminPortal/index.js +5 -0
  52. package/dist/adminPortal/makeAdminPortalComponentMountFn.d.ts +19 -0
  53. package/dist/adminPortal/shared/components/Accordion.d.ts +15 -0
  54. package/dist/adminPortal/shared/components/Button.d.ts +25 -0
  55. package/dist/adminPortal/shared/components/Code.d.ts +14 -0
  56. package/dist/adminPortal/shared/components/ContentSpacing.d.ts +6 -0
  57. package/dist/adminPortal/shared/components/CopyableText.d.ts +16 -0
  58. package/dist/adminPortal/shared/components/EmbeddedTable.d.ts +16 -0
  59. package/dist/adminPortal/shared/components/FlexBox.d.ts +11 -0
  60. package/dist/adminPortal/shared/components/InfoIcon.d.ts +7 -0
  61. package/dist/adminPortal/shared/components/Input.d.ts +28 -0
  62. package/dist/adminPortal/shared/components/Label.d.ts +10 -0
  63. package/dist/adminPortal/shared/components/ListEditor.d.ts +27 -0
  64. package/dist/adminPortal/shared/components/MenuItem.d.ts +14 -0
  65. package/dist/adminPortal/shared/components/Modal.d.ts +20 -0
  66. package/dist/adminPortal/shared/components/PaginatedTable.d.ts +30 -0
  67. package/dist/adminPortal/shared/components/SearchBar.d.ts +6 -0
  68. package/dist/adminPortal/shared/components/Select.d.ts +30 -0
  69. package/dist/adminPortal/shared/components/Table.d.ts +17 -0
  70. package/dist/adminPortal/shared/components/TableActions.d.ts +15 -0
  71. package/dist/adminPortal/shared/components/Tag.d.ts +4 -0
  72. package/dist/adminPortal/shared/components/Toast.d.ts +18 -0
  73. package/dist/adminPortal/shared/components/Tooltip.d.ts +12 -0
  74. package/dist/adminPortal/shared/components/Typography.d.ts +15 -0
  75. package/dist/adminPortal/shared/components/componentInjection.d.ts +48 -0
  76. package/dist/adminPortal/shared/components/constants.d.ts +3 -0
  77. package/dist/adminPortal/shared/components/types.d.ts +13 -0
  78. package/dist/adminPortal/shared/utils/clickToCopyUtils.d.ts +15 -0
  79. package/dist/adminPortal/shared/utils/composeStyles.d.ts +60 -0
  80. package/dist/adminPortal/shared/utils/keys.d.ts +74 -0
  81. package/dist/adminPortal/shared/utils/noop.d.ts +1 -0
  82. package/dist/adminPortal/shared/utils/tableUtils.d.ts +3 -0
  83. package/dist/adminPortal/shared/utils/uniqueIds.d.ts +2 -0
  84. package/dist/adminPortal/shared/utils/useToggleState.d.ts +7 -0
  85. package/dist/adminPortal/sso/AdminPortalSSO.d.ts +18 -0
  86. package/dist/adminPortal/sso/AppDetails.d.ts +5 -0
  87. package/dist/adminPortal/sso/AttributeMappingTable.d.ts +22 -0
  88. package/dist/adminPortal/sso/DetailsSection.d.ts +6 -0
  89. package/dist/adminPortal/sso/IdpInfo.d.ts +147 -0
  90. package/dist/adminPortal/sso/IdpSelect.d.ts +126 -0
  91. package/dist/adminPortal/sso/OrganizationUpdatesSection.d.ts +7 -0
  92. package/dist/adminPortal/sso/RoleAssignmentsSection.d.ts +6 -0
  93. package/dist/adminPortal/sso/SSOConnectionDetailsScreen.d.ts +4 -0
  94. package/dist/adminPortal/sso/SSOConnectionsScreen.d.ts +2 -0
  95. package/dist/adminPortal/sso/SSONewConnectionConfigureScreen.d.ts +5 -0
  96. package/dist/adminPortal/sso/SSONewConnectionScreen.d.ts +2 -0
  97. package/dist/adminPortal/sso/SSORouter.d.ts +44 -0
  98. package/dist/adminPortal/sso/TaggedConnection.d.ts +8 -0
  99. package/dist/adminPortal/sso/mountAdminPortalSSO.d.ts +15 -0
  100. package/dist/adminPortal/sso/useDisplayPagination.d.ts +14 -0
  101. package/dist/adminPortal/utils/Connection.d.ts +9 -0
  102. package/dist/adminPortal/utils/ConnectionType.d.ts +1 -0
  103. package/dist/adminPortal/utils/clickToCopyUtils.d.ts +5 -0
  104. package/dist/adminPortal/utils/collator.d.ts +1 -0
  105. package/dist/adminPortal/utils/organizationGetKey.d.ts +1 -0
  106. package/dist/adminPortal/utils/theme.d.ts +6 -0
  107. package/dist/adminPortal/utils/useAdminPortalConfig.d.ts +10 -0
  108. package/dist/adminPortal/utils/useApiNetworkClient.d.ts +2 -0
  109. package/dist/adminPortal/utils/useB2BInternals.d.ts +1 -0
  110. package/dist/adminPortal/utils/useFormState.d.ts +13 -0
  111. package/dist/adminPortal/utils/useMutateOrganization.d.ts +4 -0
  112. package/dist/adminPortal/utils/useMutateSsoConnection.d.ts +19 -0
  113. package/dist/adminPortal/utils/useMutateWithToast.d.ts +7 -0
  114. package/dist/adminPortal/utils/useNavigateAwayWarning.d.ts +1 -0
  115. package/dist/adminPortal/utils/useOrgInfo.d.ts +1 -0
  116. package/dist/adminPortal/utils/useRbac.d.ts +51 -0
  117. package/dist/adminPortal/utils/useRevalidateConnectionList.d.ts +1 -0
  118. package/dist/adminPortal/utils/useSsoConnections.d.ts +2 -0
  119. package/dist/adminPortal/utils/useStateSliceSetter.d.ts +2 -0
  120. package/dist/adminPortal/utils/useStytchClient.d.ts +1 -0
  121. package/dist/assets/CreateIcon.d.ts +6 -0
  122. package/dist/assets/amazon.d.ts +3 -0
  123. package/dist/assets/apple.d.ts +3 -0
  124. package/dist/assets/backArrow.d.ts +5 -0
  125. package/dist/assets/binance.d.ts +3 -0
  126. package/dist/assets/bitbucket.d.ts +3 -0
  127. package/dist/assets/check.d.ts +2 -0
  128. package/dist/assets/checkmark.d.ts +2 -0
  129. package/dist/assets/chevron.d.ts +3 -0
  130. package/dist/assets/coinbase.d.ts +4 -0
  131. package/dist/assets/confirmation.d.ts +2 -0
  132. package/dist/assets/copy.d.ts +3 -0
  133. package/dist/assets/cross.d.ts +2 -0
  134. package/dist/assets/discord.d.ts +3 -0
  135. package/dist/assets/errorIcon.d.ts +3 -0
  136. package/dist/assets/facebook.d.ts +3 -0
  137. package/dist/assets/figma.d.ts +3 -0
  138. package/dist/assets/genericWallet.d.ts +4 -0
  139. package/dist/assets/github.d.ts +3 -0
  140. package/dist/assets/gitlab.d.ts +3 -0
  141. package/dist/assets/gmail.d.ts +3 -0
  142. package/dist/assets/google.d.ts +3 -0
  143. package/dist/assets/linkedin.d.ts +3 -0
  144. package/dist/assets/metamask.d.ts +4 -0
  145. package/dist/assets/microsoft.d.ts +3 -0
  146. package/dist/assets/outlook.d.ts +3 -0
  147. package/dist/assets/passkeyAdded.d.ts +2 -0
  148. package/dist/assets/passkeys.d.ts +3 -0
  149. package/dist/assets/passkeysCollage.d.ts +2 -0
  150. package/dist/assets/passwordIcon.d.ts +5 -0
  151. package/dist/assets/pencil.d.ts +2 -0
  152. package/dist/assets/phantom.d.ts +3 -0
  153. package/dist/assets/salesforce.d.ts +3 -0
  154. package/dist/assets/slack.d.ts +3 -0
  155. package/dist/assets/snackbarError.d.ts +2 -0
  156. package/dist/assets/snackbarSuccess.d.ts +2 -0
  157. package/dist/assets/snapchat.d.ts +3 -0
  158. package/dist/assets/successIcon.d.ts +3 -0
  159. package/dist/assets/tiktok.d.ts +3 -0
  160. package/dist/assets/trash.d.ts +2 -0
  161. package/dist/assets/twitch.d.ts +3 -0
  162. package/dist/assets/twitter.d.ts +3 -0
  163. package/dist/assets/vessel.d.ts +4 -0
  164. package/dist/assets/warningIcon.d.ts +3 -0
  165. package/dist/assets/yahoo.d.ts +3 -0
  166. package/dist/assets/yahooLogo.d.ts +3 -0
  167. package/dist/b2b/HeadlessB2BOAuthClient.d.ts +100 -0
  168. package/dist/b2b/StytchB2BHeadlessClient.d.ts +51 -0
  169. package/dist/b2b/StytchB2BUIClient.d.ts +40 -0
  170. package/dist/b2b/index.d.ts +1 -189
  171. package/dist/b2b/index.esm.js +5598 -13879
  172. package/dist/b2b/index.headless.d.ts +1 -148
  173. package/dist/b2b/index.headless.esm.js +2 -5269
  174. package/dist/b2b/index.headless.js +98 -5253
  175. package/dist/b2b/index.js +5722 -13890
  176. package/dist/b2b/oneTap/B2BOneTapProvider.d.ts +39 -0
  177. package/dist/extractErrorMessage-BhKRYH2d.js +4493 -0
  178. package/dist/extractErrorMessage-DGmS9sVj.js +4534 -0
  179. package/dist/index.d.ts +1 -187
  180. package/dist/index.esm.js +1 -14827
  181. package/dist/index.headless-CULr-Rz6.js +1691 -0
  182. package/dist/index.headless-DTGN4xYi.js +1695 -0
  183. package/dist/index.headless.d.ts +1 -103
  184. package/dist/index.headless.esm.js +5086 -3920
  185. package/dist/index.headless.js +5135 -3907
  186. package/dist/index.js +1 -14807
  187. package/dist/internal-DA-B7n9p.js +5097 -0
  188. package/dist/internal-FLRZPR0F.js +5187 -0
  189. package/dist/oneTap/OneTapClient.d.ts +22 -0
  190. package/dist/oneTap/OneTapProvider.d.ts +36 -0
  191. package/dist/oneTap/navigatorSupportsFedCM.d.ts +1 -0
  192. package/dist/oneTap/positionModes.d.ts +6 -0
  193. package/dist/types.d.ts +18 -0
  194. package/dist/ui/CreateWebComponent.d.ts +20 -0
  195. package/dist/ui/b2b/App.d.ts +5 -0
  196. package/dist/ui/b2b/Container.d.ts +2 -0
  197. package/dist/ui/b2b/GlobalContextProvider.d.ts +82 -0
  198. package/dist/ui/b2b/MfaState.d.ts +50 -0
  199. package/dist/ui/b2b/clearStytchSearchParams.d.ts +1 -0
  200. package/dist/ui/b2b/generateProductComponentsOrdering.d.ts +13 -0
  201. package/dist/ui/b2b/getEnabledMethods.d.ts +5 -0
  202. package/dist/ui/b2b/hooks/useIsOnlyFloatingOneTap.d.ts +1 -0
  203. package/dist/ui/b2b/mfa.d.ts +70 -0
  204. package/dist/ui/b2b/reducer.d.ts +25 -0
  205. package/dist/ui/b2b/screens/Discovery.d.ts +2 -0
  206. package/dist/ui/b2b/screens/EmailConfirmation.d.ts +2 -0
  207. package/dist/ui/b2b/screens/MFAEnrollmentSelectionScreen.d.ts +2 -0
  208. package/dist/ui/b2b/screens/MagicLinkForm.d.ts +3 -0
  209. package/dist/ui/b2b/screens/Main.d.ts +2 -0
  210. package/dist/ui/b2b/screens/OAuthButtons.d.ts +15 -0
  211. package/dist/ui/b2b/screens/PasswordAuthenticate.d.ts +7 -0
  212. package/dist/ui/b2b/screens/PasswordEmailForm.d.ts +2 -0
  213. package/dist/ui/b2b/screens/PasswordForgotForm.d.ts +2 -0
  214. package/dist/ui/b2b/screens/PasswordResetConfirmation.d.ts +2 -0
  215. package/dist/ui/b2b/screens/PasswordResetForm.d.ts +2 -0
  216. package/dist/ui/b2b/screens/PasswordSetNew.d.ts +2 -0
  217. package/dist/ui/b2b/screens/PasswordUseButton.d.ts +2 -0
  218. package/dist/ui/b2b/screens/RecoveryCodeEntryScreen.d.ts +2 -0
  219. package/dist/ui/b2b/screens/RecoveryCodeSaveScreen.d.ts +2 -0
  220. package/dist/ui/b2b/screens/SMSOTPEnrollScreen.d.ts +3 -0
  221. package/dist/ui/b2b/screens/SMSOTPEntryScreen.d.ts +2 -0
  222. package/dist/ui/b2b/screens/SSOButtons.d.ts +6 -0
  223. package/dist/ui/b2b/screens/TOTPEnrollManualScreen.d.ts +2 -0
  224. package/dist/ui/b2b/screens/TOTPEnrollQRScreen.d.ts +2 -0
  225. package/dist/ui/b2b/screens/TOTPEntryScreen.d.ts +2 -0
  226. package/dist/ui/b2b/utils.d.ts +34 -0
  227. package/dist/ui/b2c/App.d.ts +11 -0
  228. package/dist/ui/b2c/Container.d.ts +2 -0
  229. package/dist/ui/b2c/GlobalContextProvider.d.ts +83 -0
  230. package/dist/ui/b2c/reducer.d.ts +23 -0
  231. package/dist/ui/b2c/screens/Crypto/ConnectWallet.d.ts +2 -0
  232. package/dist/ui/b2c/screens/Crypto/Error.d.ts +2 -0
  233. package/dist/ui/b2c/screens/Crypto/OtherWallets.d.ts +2 -0
  234. package/dist/ui/b2c/screens/Crypto/PasskeyConfirmation.d.ts +2 -0
  235. package/dist/ui/b2c/screens/Crypto/SetupNewWallet.d.ts +2 -0
  236. package/dist/ui/b2c/screens/Crypto/SignMessage.d.ts +2 -0
  237. package/dist/ui/b2c/screens/Crypto/Success.d.ts +2 -0
  238. package/dist/ui/b2c/screens/Crypto/WalletButtons.d.ts +4 -0
  239. package/dist/ui/b2c/screens/Main/LoginForm/MagicLinkForm.d.ts +2 -0
  240. package/dist/ui/b2c/screens/Main/LoginForm/OTPForm.d.ts +16 -0
  241. package/dist/ui/b2c/screens/Main/LoginForm/PasskeyButton.d.ts +2 -0
  242. package/dist/ui/b2c/screens/Main/LoginForm/PasswordForm.d.ts +2 -0
  243. package/dist/ui/b2c/screens/Main/LoginForm/index.d.ts +2 -0
  244. package/dist/ui/b2c/screens/Main/OAuthButtons.d.ts +2 -0
  245. package/dist/ui/b2c/screens/Main/index.d.ts +2 -0
  246. package/dist/ui/b2c/screens/Passkey/PasskeyRegistrationStart.d.ts +2 -0
  247. package/dist/ui/b2c/screens/Passkey/PasskeyRegistrationSuccess.d.ts +2 -0
  248. package/dist/ui/b2c/screens/Password/MagicLinkOption.d.ts +2 -0
  249. package/dist/ui/b2c/screens/Password/PasswordAuthenticate.d.ts +2 -0
  250. package/dist/ui/b2c/screens/Password/PasswordBreached.d.ts +2 -0
  251. package/dist/ui/b2c/screens/Password/PasswordDedupe.d.ts +2 -0
  252. package/dist/ui/b2c/screens/Password/PasswordForgot.d.ts +2 -0
  253. package/dist/ui/b2c/screens/Password/PasswordNewUser.d.ts +2 -0
  254. package/dist/ui/b2c/screens/Password/PasswordSecondaryMethod.d.ts +4 -0
  255. package/dist/ui/b2c/screens/Password/PasswordSetNew.d.ts +2 -0
  256. package/dist/ui/b2c/screens/Password/PasswordlessCreate.d.ts +2 -0
  257. package/dist/ui/b2c/screens/Password/ResetPassword.d.ts +2 -0
  258. package/dist/ui/b2c/screens/Secondary/EmailConfirmation.d.ts +6 -0
  259. package/dist/ui/b2c/screens/Secondary/OTPAuthenticate.d.ts +4 -0
  260. package/dist/ui/b2c/screens/Secondary/OTPConfirmation.d.ts +2 -0
  261. package/dist/ui/b2c/screens/Secondary/PasswordCreateAuthenticate.d.ts +2 -0
  262. package/dist/ui/b2c/utils.d.ts +1 -0
  263. package/dist/ui/components/AlertBox.d.ts +8 -0
  264. package/dist/ui/components/AnimatedContainer.d.ts +5 -0
  265. package/dist/ui/components/B2BOneTap.d.ts +2 -0
  266. package/dist/ui/components/Button.d.ts +5 -0
  267. package/dist/ui/components/CircularProgress.d.ts +12 -0
  268. package/dist/ui/components/Confirmation.d.ts +2 -0
  269. package/dist/ui/components/CountrySelector.d.ts +7 -0
  270. package/dist/ui/components/Divider.d.ts +2 -0
  271. package/dist/ui/components/EditableRow.d.ts +15 -0
  272. package/dist/ui/components/EmailConfirmation.d.ts +11 -0
  273. package/dist/ui/components/EmailInput.d.ts +7 -0
  274. package/dist/ui/components/ErrorScreen.d.ts +2 -0
  275. package/dist/ui/components/ErrorText.d.ts +4 -0
  276. package/dist/ui/components/Flex.d.ts +40 -0
  277. package/dist/ui/components/InlineButton.d.ts +7 -0
  278. package/dist/ui/components/Input.d.ts +1 -0
  279. package/dist/ui/components/InsetContainer.d.ts +1 -0
  280. package/dist/ui/components/Loading.d.ts +3 -0
  281. package/dist/ui/components/LoadingBar.d.ts +4 -0
  282. package/dist/ui/components/MainContainer.d.ts +3 -0
  283. package/dist/ui/components/OAuthB2BButton.d.ts +14 -0
  284. package/dist/ui/components/OAuthButton.d.ts +14 -0
  285. package/dist/ui/components/OTPControl.d.ts +8 -0
  286. package/dist/ui/components/OTPEntry.d.ts +11 -0
  287. package/dist/ui/components/OTPInput.d.ts +6 -0
  288. package/dist/ui/components/OneTap.d.ts +18 -0
  289. package/dist/ui/components/OneTapErrorMessages.d.ts +7 -0
  290. package/dist/ui/components/PasswordError.d.ts +17 -0
  291. package/dist/ui/components/PasswordInput.d.ts +6 -0
  292. package/dist/ui/components/PasswordStrengthCheck.d.ts +4 -0
  293. package/dist/ui/components/PhoneInput.d.ts +10 -0
  294. package/dist/ui/components/SentOTPEntry.d.ts +10 -0
  295. package/dist/ui/components/Snackbar.d.ts +2 -0
  296. package/dist/ui/components/SubmitButton.d.ts +8 -0
  297. package/dist/ui/components/TOTPEntry.d.ts +8 -0
  298. package/dist/ui/components/Text.d.ts +9 -0
  299. package/dist/ui/components/VerifyEmailConfirmation.d.ts +10 -0
  300. package/dist/ui/components/WalletButton.d.ts +8 -0
  301. package/dist/ui/hooks/useIsMounted.d.ts +3 -0
  302. package/dist/ui/hooks/useIsOnlyFloatingOneTap.d.ts +1 -0
  303. package/dist/ui/hooks/usePromptPasskey.d.ts +7 -0
  304. package/dist/ui/theme.d.ts +112 -0
  305. package/dist/utils/Optional.d.ts +3 -0
  306. package/dist/utils/assertUnreachable.d.ts +1 -0
  307. package/dist/utils/crypto.d.ts +60 -0
  308. package/dist/utils/deepEqual.d.ts +1 -0
  309. package/dist/utils/extractErrorMessage.d.ts +1 -0
  310. package/dist/utils/extractErrorType.d.ts +1 -0
  311. package/dist/utils/index.d.ts +28 -0
  312. package/dist/utils/internal.d.ts +34 -0
  313. package/dist/utils/isTruthy.d.ts +3 -0
  314. package/dist/utils/oauthProviderType.d.ts +7 -0
  315. package/dist/utils/passkeys.d.ts +8 -0
  316. package/package.json +18 -16
  317. package/dist/b2b/index.esm.d.ts +0 -190
  318. package/dist/b2b/index.headless.esm.d.ts +0 -149
  319. package/dist/index.esm.d.ts +0 -188
  320. package/dist/index.headless.esm.d.ts +0 -104
@@ -0,0 +1,22 @@
1
+ import { accounts, CredentialResponse, PromptMomentNotification } from 'google-one-tap';
2
+ import { OneTapStyleConfig } from '@stytch/core/public';
3
+ type OneTapNotShownReason = ReturnType<PromptMomentNotification['getNotDisplayedReason']> | ReturnType<PromptMomentNotification['getSkippedReason']>;
4
+ export type OneTapRenderResult = {
5
+ success: true;
6
+ } | {
7
+ success: false;
8
+ reason: OneTapNotShownReason;
9
+ };
10
+ export declare class GoogleOneTapClient {
11
+ private _googleClient;
12
+ private _clientId;
13
+ constructor(_googleClient: accounts['id'], _clientId: string);
14
+ cancel(): void;
15
+ render({ callback, onOneTapCancelled, style, }: {
16
+ callback: (response: CredentialResponse) => void;
17
+ onOneTapCancelled?: (showError?: boolean) => void;
18
+ style: OneTapStyleConfig;
19
+ }): Promise<OneTapRenderResult>;
20
+ styleFrame(shouldRenderEmbeddedOneTap: boolean): void;
21
+ }
22
+ export {};
@@ -0,0 +1,36 @@
1
+ import { GoogleOneTapClient } from './OneTapClient';
2
+ import { CredentialResponse } from 'google-one-tap';
3
+ import { ClientsideServicesProvider } from '../ClientsideServicesProvider';
4
+ export declare const loadGoogleOneTapClient: () => Promise<google.accounts['id']>;
5
+ type OneTapNotLoadedReason = 'oauth_config_not_found' | 'no_login_redirect_urls_set' | 'no_signup_redirect_urls_set' | string;
6
+ type OneTapLoadResult = {
7
+ success: true;
8
+ client: GoogleOneTapClient;
9
+ } | {
10
+ success: false;
11
+ reason: OneTapNotLoadedReason;
12
+ };
13
+ export declare class OneTapProvider {
14
+ private _publicToken;
15
+ private clientsideServices;
16
+ private googleConfig?;
17
+ constructor(_publicToken: string, clientsideServices: ClientsideServicesProvider);
18
+ createOneTapClient(): Promise<OneTapLoadResult>;
19
+ createOnSuccessHandler: ({ loginRedirectUrl, signupRedirectUrl, onSuccess, }: {
20
+ loginRedirectUrl?: string | undefined;
21
+ signupRedirectUrl?: string | undefined;
22
+ onSuccess: (redirect_url: string) => void;
23
+ }) => (response: CredentialResponse) => Promise<void>;
24
+ private fetchGoogleStart;
25
+ private submitGoogleOneTapToken;
26
+ RedirectOnSuccess: (redirect_url: string) => void;
27
+ static WillGoogleOneTapShowBannerForUA(ua: string): boolean;
28
+ /**
29
+ * Google One Tap will show a banner on the bottom of the screen on certain mobile devices
30
+ * This logic is controlled via some sniffing of the useragent string on startup
31
+ * These specific strings were extracted from the One Tap minified source code
32
+ * See the linked PR for details and screenshots
33
+ */
34
+ static WillGoogleOneTapShowEmbedded(): boolean;
35
+ }
36
+ export {};
@@ -0,0 +1 @@
1
+ export declare const navigatorSupportsFedCM: boolean;
@@ -0,0 +1,6 @@
1
+ import { StringLiteralFromEnum } from '@stytch/core';
2
+ import { OneTapPositions } from '@stytch/core/public';
3
+ export declare const getConfiguredEmbeddedMode: (position: StringLiteralFromEnum<OneTapPositions> | undefined) => boolean | "force";
4
+ export declare const getShouldRenderEmbeddedOneTap: (position: StringLiteralFromEnum<OneTapPositions> | undefined) => boolean;
5
+ export declare const getShouldRenderFloatingOneTap: (position: StringLiteralFromEnum<OneTapPositions> | undefined) => boolean;
6
+ export declare const getRenderedOneTapMode: (position: StringLiteralFromEnum<OneTapPositions> | undefined) => false | "embedded" | "floating";
@@ -0,0 +1,18 @@
1
+ import { StytchUIClient } from './StytchUIClient';
2
+ import { StytchLoginConfig, StyleConfig, Callbacks, StytchB2BUIConfig } from '@stytch/core/public';
3
+ import { StytchB2BUIClient } from './b2b/StytchB2BUIClient';
4
+ export type SDKConfig = {
5
+ client: StytchUIClient;
6
+ config: StytchLoginConfig;
7
+ styles?: StyleConfig;
8
+ callbacks?: Callbacks;
9
+ };
10
+ export type B2BSDKConfig = {
11
+ client: StytchB2BUIClient;
12
+ config: StytchB2BUIConfig;
13
+ styles?: StyleConfig;
14
+ callbacks?: Callbacks;
15
+ };
16
+ export type ResetPasswordSDKConfig = SDKConfig & {
17
+ passwordResetToken: string;
18
+ };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ export interface IReactWebComponent<P> extends HTMLElement {
3
+ render(props: P): void;
4
+ }
5
+ type IReactWebComponentConstructor<P> = new (params: P) => IReactWebComponent<P>;
6
+ /**
7
+ * An opinionated React Component to Web Component binder.
8
+ * High-level points:
9
+ * - All React props are passed as props on the div, no attributes involved
10
+ * - No support for incremental updates of props
11
+ */
12
+ export declare function CreateWebComponent<P extends React.JSX.IntrinsicAttributes & object>(ReactComponent: React.ComponentType<P>, webComponentName: string): IReactWebComponentConstructor<P>;
13
+ export declare function CreateShadowWebComponent<P extends React.JSX.IntrinsicAttributes & object>(ReactComponent: React.ComponentType<P>, webComponentName: string): IReactWebComponentConstructor<P>;
14
+ /**
15
+ * Web Components aren't really isomorphic at all
16
+ * but it's important to delay the construction & definition of the WC class until we are on the clientside
17
+ * because the HTMLElement we extend from, and the customElement registry we modify, don't exist on the server
18
+ */
19
+ export declare function CreateSSRSafeWebComponent<P extends React.JSX.IntrinsicAttributes & object>(ReactComponent: React.ComponentType<P>, webComponentName: string): (props: P) => IReactWebComponent<P>;
20
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { B2BSDKConfig } from '../../types';
3
+ export declare const AppContainer: ({ client, styles, callbacks, config }: B2BSDKConfig) => React.JSX.Element;
4
+ export declare const B2B_UI_SCREEN_WEB_COMPONENT_NAME = "stytch-b2b-ui";
5
+ export declare const B2BUILoginComponent: (props: B2BSDKConfig) => import("../CreateWebComponent").IReactWebComponent<B2BSDKConfig>;
@@ -0,0 +1,2 @@
1
+ declare const AppContainer: () => JSX.Element;
2
+ export default AppContainer;
@@ -0,0 +1,82 @@
1
+ import React from 'react';
2
+ import { StytchB2BUIClient } from '../../b2b/StytchB2BUIClient';
3
+ import { StringLiteralFromEnum } from '@stytch/core';
4
+ import { AuthFlowType, Callbacks, DiscoveredOrganization, OrganizationBySlugMatch, StytchB2BUIConfig } from '@stytch/core/public';
5
+ import { MfaState } from './MfaState';
6
+ import { Action } from './reducer';
7
+ export declare enum AppScreens {
8
+ Main = "Main",
9
+ EmailConfirmation = "Email Confirmation",
10
+ LoggedIn = "Logged In",
11
+ Discovery = "Discovery",
12
+ Error = "Error",
13
+ PasswordEmailForm = "Password Email",
14
+ PasswordAuthenticate = "Password Authenticate",
15
+ PasswordResetForm = "Password Reset Form",
16
+ PasswordResetVerifyConfirmation = "Password Reset Verify Confirmation",
17
+ PasswordForgotForm = "Password Forgot Form",
18
+ PasswordSetNewConfirmation = "Password Set New Confirmation",
19
+ MFAEnrollmentSelection = "MFA Enrollment Selection",
20
+ RecoveryCodeEntry = "Recovery Code Entry",
21
+ RecoveryCodeSave = "Recovery Code Save",
22
+ SMSOTPEnrollment = "SMS OTP Enrollment",
23
+ SMSOTPEntry = "SMS OTP Entry",
24
+ TOTPEnrollmentManual = "TOTP Enrollment Manual",
25
+ TOTPEnrollmentQRCode = "TOTP Enrollment QR Code",
26
+ TOTPEntry = "TOTP Entry"
27
+ }
28
+ export declare enum ErrorType {
29
+ Default = 0,
30
+ EmailMagicLink = 1,
31
+ Organization = 2
32
+ }
33
+ export type MagicLinkState = {
34
+ email: string;
35
+ };
36
+ export type DiscoveryState = {
37
+ email: string;
38
+ intermediateSessionToken: string;
39
+ discoveredOrganizations: DiscoveredOrganization[];
40
+ };
41
+ export type PasswordState = {
42
+ email: string;
43
+ };
44
+ export type FormState = {
45
+ magicLinkState: MagicLinkState;
46
+ discoveryState: DiscoveryState;
47
+ passwordState: PasswordState;
48
+ };
49
+ export type FlowState = {
50
+ type: StringLiteralFromEnum<AuthFlowType>;
51
+ organization: null | OrganizationBySlugMatch;
52
+ };
53
+ export type AppState = {
54
+ screen: AppScreens;
55
+ formState: FormState;
56
+ flowState: FlowState;
57
+ mfa: MfaState;
58
+ errorType: ErrorType;
59
+ };
60
+ export type AppContext = {
61
+ client: StytchB2BUIClient;
62
+ config: StytchB2BUIConfig;
63
+ callbacks?: Callbacks;
64
+ state: [AppState, React.Dispatch<Action>];
65
+ };
66
+ export declare const DEFAULT_STATE: AppState;
67
+ export declare const DEFAULT_CONFIG: StytchB2BUIConfig;
68
+ export declare const GlobalContext: React.Context<AppContext>;
69
+ export type GlobalContextProviderProps = {
70
+ children: React.ReactNode;
71
+ client: StytchB2BUIClient;
72
+ config: StytchB2BUIConfig;
73
+ callbacks?: Callbacks;
74
+ initialState?: AppState;
75
+ };
76
+ export declare const GlobalContextProvider: ({ children, client, config, callbacks, initialState, }: GlobalContextProviderProps) => React.JSX.Element;
77
+ export declare const useGlobalContext: () => AppContext;
78
+ export declare const useStytch: () => StytchB2BUIClient;
79
+ export declare const useGlobalReducer: () => [AppState, React.Dispatch<Action>];
80
+ export declare const useConfig: () => StytchB2BUIConfig;
81
+ export declare const useErrorCallback: () => (error: import("@stytch/core/public").StytchSDKUIError) => void;
82
+ export declare const useEventCallback: () => (event: import("@stytch/core/public").StytchEvent) => void;
@@ -0,0 +1,50 @@
1
+ import { B2BMFAProducts } from '@stytch/core/public';
2
+ import { CountryCode } from '@stytch/core';
3
+ import { AppScreens } from './GlobalContextProvider';
4
+ export interface MfaState {
5
+ primaryInfo: {
6
+ enrolledMfaMethods: B2BMFAProducts[];
7
+ memberId: string;
8
+ memberPhoneNumber: string | null;
9
+ organizationId: string;
10
+ organizationMfaOptionsSupported: B2BMFAProducts[];
11
+ postAuthScreen: AppScreens;
12
+ } | null;
13
+ isEnrolling: boolean;
14
+ smsOtp: {
15
+ isSending: boolean;
16
+ sendError: unknown;
17
+ codeExpiration: Date | null;
18
+ formattedDestination: string | null;
19
+ enrolledNumber: {
20
+ phoneNumber: string;
21
+ countryCode: CountryCode;
22
+ } | null;
23
+ };
24
+ totp: {
25
+ isCreating: boolean;
26
+ createError: unknown;
27
+ enrollment: {
28
+ secret: string;
29
+ qrCode: string;
30
+ recoveryCodes: string[];
31
+ method: 'qr' | 'manual';
32
+ } | null;
33
+ };
34
+ }
35
+ export declare const DEFAULT_MFA_STATE: {
36
+ readonly primaryInfo: null;
37
+ readonly isEnrolling: false;
38
+ readonly smsOtp: {
39
+ readonly isSending: false;
40
+ readonly sendError: null;
41
+ readonly codeExpiration: null;
42
+ readonly formattedDestination: null;
43
+ readonly enrolledNumber: null;
44
+ };
45
+ readonly totp: {
46
+ readonly isCreating: false;
47
+ readonly createError: null;
48
+ readonly enrollment: null;
49
+ };
50
+ };
@@ -0,0 +1 @@
1
+ export declare const clearStytchSearchParams: () => void;
@@ -0,0 +1,13 @@
1
+ import { StringLiteralFromEnum } from '@stytch/core';
2
+ import { B2BProducts } from '@stytch/core/public';
3
+ import { FlowState } from './GlobalContextProvider';
4
+ export declare enum Component {
5
+ MagicLinkEmailForm = "MagicLinkEmailForm",
6
+ MagicLinkEmailDiscoveryForm = "MagicLinkEmailDiscoveryForm",
7
+ OAuthButtons = "OAuthButtons",
8
+ SSOButtons = "SSOButtons",
9
+ PasswordsEmailForm = "PasswordsEmailForm",
10
+ PasswordEMLCombined = "PasswordEMLCombined",
11
+ Divider = "Divider"
12
+ }
13
+ export declare const generateProductComponentsOrdering: (products: StringLiteralFromEnum<B2BProducts>[], flowState: FlowState) => Component[];
@@ -0,0 +1,5 @@
1
+ export declare const getEnabledMethods: <TMethod>({ allMethods, orgSupportedMethods, uiIncludedMethods, }: {
2
+ allMethods: readonly TMethod[];
3
+ orgSupportedMethods: readonly TMethod[];
4
+ uiIncludedMethods: readonly TMethod[] | undefined;
5
+ }) => Set<TMethod>;
@@ -0,0 +1 @@
1
+ export declare const useIsOnlyFloatingOneTap: () => boolean;
@@ -0,0 +1,70 @@
1
+ import { CountryCode, StringLiteralFromEnum } from '@stytch/core';
2
+ import { B2BAuthenticateResponseWithMFA, B2BMFAProducts, B2BSMSSendResponse, B2BTOTPCreateResponse } from '@stytch/core/public';
3
+ import { Optional } from '../../utils/Optional';
4
+ import { AppState } from './GlobalContextProvider';
5
+ type PrimaryAuthenticateSuccessAction = {
6
+ type: 'primary_authenticate_success';
7
+ response: B2BAuthenticateResponseWithMFA;
8
+ includedMfaMethods: readonly StringLiteralFromEnum<B2BMFAProducts>[] | undefined;
9
+ resetTokenType?: string;
10
+ };
11
+ type StartEnrollmentAction = {
12
+ type: 'mfa/start_enrollment';
13
+ method: StringLiteralFromEnum<B2BMFAProducts>;
14
+ };
15
+ type TotpAuthenticateAction = {
16
+ type: 'totp/authenticate_success';
17
+ };
18
+ type TotpCreateAction = {
19
+ type: 'totp/create';
20
+ } | {
21
+ type: 'totp/create_success';
22
+ response: B2BTOTPCreateResponse;
23
+ memberId: string;
24
+ organizationId: string;
25
+ } | {
26
+ type: 'totp/create_error';
27
+ error: unknown;
28
+ };
29
+ type TotpNavigateToEntryAction = {
30
+ type: 'totp/navigate_to_entry';
31
+ };
32
+ type TotpShowCodeAction = {
33
+ type: 'totp/show_code';
34
+ method?: 'qr' | 'manual';
35
+ };
36
+ type RecoveryCodeAuthenticateAction = {
37
+ type: 'recovery_code/authenticate_success';
38
+ };
39
+ type RecoveryCodeNavigateToEntryAction = {
40
+ type: 'recovery_code/navigate_to_entry';
41
+ };
42
+ type RecoveryCodeSaveAcknowledgeAction = {
43
+ type: 'recovery_code/save_acknowledge';
44
+ };
45
+ type SmsOtpAuthenticateAction = {
46
+ type: 'sms_otp/authenticate_success';
47
+ };
48
+ type SmsOtpSendAction = {
49
+ type: 'sms_otp/send';
50
+ } | ({
51
+ type: 'sms_otp/send_success';
52
+ response: B2BSMSSendResponse;
53
+ } & Optional<{
54
+ phoneNumber: string;
55
+ countryCode: CountryCode;
56
+ formattedPhoneNumber: string;
57
+ }>) | {
58
+ type: 'sms_otp/send_error';
59
+ error: unknown;
60
+ } | {
61
+ type: 'sms_otp/format_destination';
62
+ formattedPhoneNumber: string;
63
+ };
64
+ type SmsOtpNavigateToEntryAction = {
65
+ type: 'sms_otp/navigate_to_entry';
66
+ };
67
+ export type MfaAction = PrimaryAuthenticateSuccessAction | RecoveryCodeAuthenticateAction | RecoveryCodeNavigateToEntryAction | RecoveryCodeSaveAcknowledgeAction | SmsOtpAuthenticateAction | SmsOtpNavigateToEntryAction | SmsOtpSendAction | StartEnrollmentAction | TotpAuthenticateAction | TotpCreateAction | TotpNavigateToEntryAction | TotpShowCodeAction;
68
+ export declare const B2B_MFA_METHODS: readonly [B2BMFAProducts.totp, B2BMFAProducts.smsOtp];
69
+ export declare const mfaReducer: (state: AppState, action: MfaAction) => AppState;
70
+ export {};
@@ -0,0 +1,25 @@
1
+ import { AppScreens, AppState, ErrorType } from './GlobalContextProvider';
2
+ import { DiscoveredOrganization, OrganizationBySlugMatch } from '@stytch/core/public';
3
+ import { MfaAction } from './mfa';
4
+ export type Action = {
5
+ type: 'transition';
6
+ screen: AppScreens;
7
+ } | {
8
+ type: 'set_error_message_and_transition';
9
+ errorType: ErrorType;
10
+ } | {
11
+ type: 'set_magic_link_email';
12
+ email: string;
13
+ } | {
14
+ type: 'set_organization';
15
+ organization: OrganizationBySlugMatch;
16
+ } | {
17
+ type: 'set_password_state';
18
+ email: string;
19
+ } | {
20
+ type: 'set_discovery_state';
21
+ email: string;
22
+ discoveredOrganizations: DiscoveredOrganization[];
23
+ intermediateSessionToken: string;
24
+ } | MfaAction;
25
+ export declare const reducer: (state: AppState, action: Action) => AppState;
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const Discovery: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EmailConfirmation: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const MFAEnrollmentSelectionScreen: () => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const MagicLinkEmailForm: () => React.JSX.Element;
3
+ export declare const MagicLinkEmailDiscoveryForm: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const MainScreen: () => React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { B2BOAuthProviders } from '@stytch/core/public';
3
+ export declare const getCustomScopesForProvider: (oauthProvider: {
4
+ type: B2BOAuthProviders;
5
+ oneTap: boolean;
6
+ customScopes: string[];
7
+ providerParams: Record<string, string>;
8
+ }, oauthOptionsCustomScopes: string[] | undefined) => string[];
9
+ export declare const getProviderParamsForProvider: (oauthProvider: {
10
+ type: B2BOAuthProviders;
11
+ oneTap: boolean;
12
+ customScopes: string[];
13
+ providerParams: Record<string, string>;
14
+ }, oauthOptionsProviderParams: Record<string, string> | undefined) => Record<string, string>;
15
+ export declare const OAuthButtons: () => React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const GetHelpText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
3
+ size?: ("body" | "header" | "helper") | undefined;
4
+ color?: ("error" | "success" | "primary" | "secondary") | undefined;
5
+ align?: "center" | "left" | "right" | undefined;
6
+ }, never>;
7
+ export declare const PasswordsAuthenticate: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PasswordsEmailForm: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PasswordsForgotForm: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PasswordResetConfirmation: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PasswordResetForm: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PasswordSetNew: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const PasswordUseButton: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const RecoveryCodeEntryScreen: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const RecoveryCodeSaveScreen: () => React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare const supportedErrorTypeMap: Record<string, string>;
3
+ export declare const SMSOTPEnrollScreen: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const SMSOTPEntryScreen: () => React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const SSOButton: ({ display_name, connection_id }: {
3
+ connection_id: string;
4
+ display_name: string;
5
+ }) => React.JSX.Element;
6
+ export declare const SSOButtons: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TOTPEnrollManualScreen: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TOTPEnrollQRScreen: () => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const TOTPEntryScreen: () => React.JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { SWRMutationHook } from 'swr/mutation';
2
+ import { B2BAuthenticateResponseWithMFA, StytchB2BUIConfig } from '@stytch/core/public';
3
+ import { OrganizationBySlugMatch } from '@stytch/core/public';
4
+ import { Action } from './reducer';
5
+ export declare const useMutate: SWRMutationHook;
6
+ /**
7
+ *
8
+ * This hook triggers a request to retrieve the organization from the slug.
9
+ * The hook only triggers the request if the SDK is being used in an organization flow,
10
+ * and a slug pattern is present. The hook returns an isSearching boolean that can be used
11
+ * to display a loading state while the search is in progress.
12
+ */
13
+ export declare const useExtractSlug: () => {
14
+ isSearching: boolean;
15
+ slug: string | null;
16
+ pattern: string | null | undefined;
17
+ };
18
+ export declare const useBootstrap: () => import("@stytch/core").BootstrapData;
19
+ export declare const onAuthenticateSuccess: (data: B2BAuthenticateResponseWithMFA, dispatch: React.Dispatch<Action>, config: StytchB2BUIConfig) => void;
20
+ export declare const usePasswordInput: () => {
21
+ stytch: import("../../b2b").StytchB2BUIClient;
22
+ onError: (error: import("@stytch/core/public").StytchSDKUIError) => void;
23
+ email: string;
24
+ setEmail: import("react").Dispatch<import("react").SetStateAction<string>>;
25
+ password: string;
26
+ setPassword: import("react").Dispatch<import("react").SetStateAction<string>>;
27
+ organization: OrganizationBySlugMatch | null;
28
+ errorMessage: string;
29
+ setErrorMessage: import("react").Dispatch<import("react").SetStateAction<string>>;
30
+ isSubmitting: boolean;
31
+ setIsSubmitting: import("react").Dispatch<import("react").SetStateAction<boolean>>;
32
+ submitPassword: (organization_id: string) => void;
33
+ handleNonMemberReset: () => void;
34
+ };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { SDKConfig, ResetPasswordSDKConfig } from '../../types';
3
+ export declare const AppContainer: ({ client, config, styles, callbacks }: SDKConfig) => React.JSX.Element;
4
+ export declare const ResetPasswordContainer: ({ client, config, styles, callbacks, passwordResetToken, }: ResetPasswordSDKConfig) => React.JSX.Element;
5
+ export declare const PasskeyRegistrationContainer: ({ client, config, styles, callbacks }: SDKConfig) => React.JSX.Element;
6
+ export declare const UI_SCREEN_WEB_COMPONENT_NAME = "stytch-ui";
7
+ export declare const UI_RESET_PASSWORD_WEB_COMPONENT_NAME = "stytch-reset-password";
8
+ export declare const UI_PASSKEY_REGISTRATION_WEB_COMPONENT_NAME = "stytch-passkey-registration";
9
+ export declare const UILoginComponent: (props: SDKConfig) => import("../CreateWebComponent").IReactWebComponent<SDKConfig>;
10
+ export declare const UIResetPasswordComponent: (props: ResetPasswordSDKConfig) => import("../CreateWebComponent").IReactWebComponent<ResetPasswordSDKConfig>;
11
+ export declare const UIPasskeyRegistrationComponent: (props: SDKConfig) => import("../CreateWebComponent").IReactWebComponent<SDKConfig>;
@@ -0,0 +1,2 @@
1
+ declare const AppContainer: () => null | JSX.Element;
2
+ export default AppContainer;
@@ -0,0 +1,83 @@
1
+ import React from 'react';
2
+ import { StytchUIClient } from '../../StytchUIClient';
3
+ import { DeepRequired } from '../../utils';
4
+ import { StytchLoginConfig, OTPMethods, Wallets, StyleConfig, Callbacks } from '@stytch/core/public';
5
+ import { Action } from './reducer';
6
+ export declare enum AppScreens {
7
+ Main = "Main",
8
+ PasskeyRegistrationStart = "Register New Passkey",
9
+ PasskeyRegistrationSuccess = "Passkey Registration Success",
10
+ PasskeyConfirmation = "Passkey Confirmation",
11
+ PasswordCreateOrLogin = "Password",
12
+ PasswordResetForm = "Password Reset Form",
13
+ PasswordForgot = "Password Forgot",
14
+ PasswordBreached = "Password Breached",
15
+ PasswordSetNew = "Password Set New",
16
+ PasswordDedupe = "Password Dedupe",
17
+ PasswordConfirmation = "Password Confirmation",
18
+ EmailConfirmation = "Email Confirmation",
19
+ OTPAuthenticate = "OTP Authenticate",
20
+ OTPConfirmation = "OTP Confirmation",
21
+ CryptoConnect = "Crypto Connect",
22
+ CryptoSignMessage = "Crypto Sign Message",
23
+ CryptoOtherScreen = "Crypto Other Screen",
24
+ CryptoSetupWallet = "Crypto Setup Wallet",
25
+ CryptoError = "Crypto Error",
26
+ CryptoConfirmation = "Crypto Confirmation"
27
+ }
28
+ export type MagicLinkState = {
29
+ email: string;
30
+ };
31
+ export type OTPState = {
32
+ type: OTPMethods;
33
+ methodId: string;
34
+ otpDestination: string;
35
+ };
36
+ export type PasswordState = {
37
+ email: string;
38
+ type: 'new' | 'passwordless' | 'password';
39
+ };
40
+ export type CryptoState = {
41
+ walletAddress: string;
42
+ walletOption: Wallets;
43
+ walletChallenge: string;
44
+ };
45
+ export type ResetPasswordState = {
46
+ token: string;
47
+ };
48
+ export type FormState = {
49
+ magicLinkState: MagicLinkState;
50
+ otpState: OTPState;
51
+ cryptoState: CryptoState;
52
+ passwordState: PasswordState;
53
+ resetPasswordState: ResetPasswordState;
54
+ errorMessage: string | undefined;
55
+ };
56
+ export type AppState = {
57
+ screen: AppScreens;
58
+ formState: FormState;
59
+ };
60
+ export type AppContext = {
61
+ client: StytchUIClient;
62
+ config: StytchLoginConfig;
63
+ callbacks?: Callbacks;
64
+ state: [AppState, React.Dispatch<Action>];
65
+ };
66
+ export declare const DEFAULT_STATE: AppState;
67
+ export declare const DEFAULT_CONFIG: StytchLoginConfig;
68
+ export declare const DEFAULT_STYLE_CONFIG: Omit<DeepRequired<StyleConfig>, 'inputs'>;
69
+ export declare const GlobalContext: React.Context<AppContext>;
70
+ export type GlobalContextProviderProps = {
71
+ children: React.ReactNode;
72
+ client: StytchUIClient;
73
+ config: StytchLoginConfig;
74
+ callbacks?: Callbacks;
75
+ initialState?: AppState;
76
+ };
77
+ export declare const GlobalContextProvider: ({ children, client, config, callbacks, initialState, }: GlobalContextProviderProps) => React.JSX.Element;
78
+ export declare const useGlobalContext: () => AppContext;
79
+ export declare const useStytch: () => StytchUIClient;
80
+ export declare const useGlobalReducer: () => [AppState, React.Dispatch<Action>];
81
+ export declare const useConfig: () => StytchLoginConfig;
82
+ export declare const useErrorCallback: () => (error: import("@stytch/core/public").StytchSDKUIError) => void;
83
+ export declare const useEventCallback: () => (event: import("@stytch/core/public").StytchEvent) => void;