authhero 5.8.1 → 5.9.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 (386) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +97 -97
  3. package/dist/authhero.d.ts +17622 -72311
  4. package/dist/authhero.mjs +5587 -5593
  5. package/dist/stats.html +1 -1
  6. package/dist/tsconfig.types.tsbuildinfo +1 -0
  7. package/dist/types/adapters/cache/in-memory.d.ts +52 -0
  8. package/dist/types/adapters/cache/index.d.ts +2 -0
  9. package/dist/types/adapters/index.d.ts +1 -0
  10. package/dist/types/authentication-flows/auth0-migration.d.ts +53 -0
  11. package/dist/types/authentication-flows/authorization-code.d.ts +23 -0
  12. package/dist/types/authentication-flows/client-credentials.d.ts +16 -0
  13. package/dist/types/authentication-flows/common.d.ts +253 -0
  14. package/dist/types/authentication-flows/connection.d.ts +17 -0
  15. package/dist/types/authentication-flows/mfa.d.ts +49 -0
  16. package/dist/types/authentication-flows/passkey-enrollment.d.ts +19 -0
  17. package/dist/types/authentication-flows/password.d.ts +24 -0
  18. package/dist/types/authentication-flows/passwordless.d.ts +571 -0
  19. package/dist/types/authentication-flows/refresh-token-migration.d.ts +17 -0
  20. package/dist/types/authentication-flows/refresh-token.d.ts +15 -0
  21. package/dist/types/authentication-flows/resume.d.ts +22 -0
  22. package/dist/types/authentication-flows/silent.d.ts +25 -0
  23. package/dist/types/authentication-flows/ticket.d.ts +7 -0
  24. package/dist/types/authentication-flows/try-connection.d.ts +33 -0
  25. package/dist/types/authentication-flows/universal.d.ts +19 -0
  26. package/dist/types/build-hash.d.ts +7 -0
  27. package/dist/types/client/client-bundle.d.ts +1 -0
  28. package/dist/types/client/form-handler.d.ts +9 -0
  29. package/dist/types/client/incognito-handler.d.ts +5 -0
  30. package/dist/types/client/index.d.ts +1 -0
  31. package/dist/types/client/input-otp.d.ts +12 -0
  32. package/dist/types/client/password-toggle.d.ts +10 -0
  33. package/dist/types/client/user-agent-detector.d.ts +22 -0
  34. package/dist/types/components/AccountChangeEmailPage.d.ts +14 -0
  35. package/dist/types/components/AccountForm.d.ts +17 -0
  36. package/dist/types/components/AccountPage.d.ts +15 -0
  37. package/dist/types/components/AppLogo.d.ts +8 -0
  38. package/dist/types/components/AuthLayout.d.ts +18 -0
  39. package/dist/types/components/Button.d.ts +12 -0
  40. package/dist/types/components/ChangeEmailForm.d.ts +14 -0
  41. package/dist/types/components/ChangeEmailPage.d.ts +15 -0
  42. package/dist/types/components/ContinueForm.d.ts +13 -0
  43. package/dist/types/components/EmailValidatedForm.d.ts +12 -0
  44. package/dist/types/components/EmailValidatedPage.d.ts +11 -0
  45. package/dist/types/components/EnterCodeForm.d.ts +13 -0
  46. package/dist/types/components/EnterCodePage.d.ts +14 -0
  47. package/dist/types/components/EnterPasswordForm.d.ts +14 -0
  48. package/dist/types/components/EnterPasswordPage.d.ts +13 -0
  49. package/dist/types/components/ErrorMessage.d.ts +6 -0
  50. package/dist/types/components/Footer.d.ts +9 -0
  51. package/dist/types/components/ForgotPasswordForm.d.ts +14 -0
  52. package/dist/types/components/ForgotPasswordPage.d.ts +13 -0
  53. package/dist/types/components/ForgotPasswordSentPage.d.ts +11 -0
  54. package/dist/types/components/Form.d.ts +6 -0
  55. package/dist/types/components/FormNodePage.d.ts +16 -0
  56. package/dist/types/components/GoBack.d.ts +5 -0
  57. package/dist/types/components/GoogleLogo.d.ts +4 -0
  58. package/dist/types/components/Icon.d.ts +8 -0
  59. package/dist/types/components/IconEye.d.ts +8 -0
  60. package/dist/types/components/IconEyeSlash.d.ts +8 -0
  61. package/dist/types/components/IconPen.d.ts +7 -0
  62. package/dist/types/components/IdentifierForm.d.ts +16 -0
  63. package/dist/types/components/IdentifierPage.d.ts +15 -0
  64. package/dist/types/components/ImpersonateForm.d.ts +14 -0
  65. package/dist/types/components/ImpersonationPage.d.ts +13 -0
  66. package/dist/types/components/InvalidSessionPage.d.ts +11 -0
  67. package/dist/types/components/Layout.d.ts +11 -0
  68. package/dist/types/components/LoginForm.d.ts +15 -0
  69. package/dist/types/components/MessagePage.d.ts +13 -0
  70. package/dist/types/components/PasswordInput.d.ts +6 -0
  71. package/dist/types/components/PreSignUpConfirmationPage.d.ts +12 -0
  72. package/dist/types/components/PreSignUpPage.d.ts +12 -0
  73. package/dist/types/components/ResetPasswordForm.d.ts +14 -0
  74. package/dist/types/components/ResetPasswordPage.d.ts +12 -0
  75. package/dist/types/components/SignUpForm.d.ts +15 -0
  76. package/dist/types/components/SignUpPage.d.ts +14 -0
  77. package/dist/types/components/SocialButton.d.ts +10 -0
  78. package/dist/types/components/Spinner.d.ts +6 -0
  79. package/dist/types/components/Trans.d.ts +8 -0
  80. package/dist/types/components/UnverifiedEmailPage.d.ts +11 -0
  81. package/dist/types/components/UserNotFoundPage.d.ts +12 -0
  82. package/dist/types/components/VippsLogo.d.ts +4 -0
  83. package/dist/types/components/index.d.ts +34 -0
  84. package/dist/types/components/stories/AccountForm.stories.d.ts +13 -0
  85. package/dist/types/components/stories/AuthLayout.stories.d.ts +27 -0
  86. package/dist/types/components/stories/ChangeEmailForm.stories.d.ts +11 -0
  87. package/dist/types/components/stories/ContinueForm.stories.d.ts +10 -0
  88. package/dist/types/components/stories/EnterCodeForm.stories.d.ts +9 -0
  89. package/dist/types/components/stories/EnterPasswordForm.stories.d.ts +22 -0
  90. package/dist/types/components/stories/IdentifierForm.stories.d.ts +42 -0
  91. package/dist/types/components/stories/IdentifierPage.stories.d.ts +33 -0
  92. package/dist/types/components/stories/ImpersonateForm.stories.d.ts +11 -0
  93. package/dist/types/components/stories/LoginForm.stories.d.ts +12 -0
  94. package/dist/types/components/ui/button.d.ts +12 -0
  95. package/dist/types/components/ui/card.d.ts +30 -0
  96. package/dist/types/components/ui/input-otp.d.ts +31 -0
  97. package/dist/types/components/ui/input.d.ts +15 -0
  98. package/dist/types/components/ui/label.d.ts +9 -0
  99. package/dist/types/constants/defaultBranding.d.ts +2 -0
  100. package/dist/types/constants/defaultTheme.d.ts +2 -0
  101. package/dist/types/constants/index.d.ts +2 -0
  102. package/dist/types/constants.d.ts +15 -0
  103. package/dist/types/email-services/index.d.ts +3 -0
  104. package/dist/types/email-services/mailgun.d.ts +18 -0
  105. package/dist/types/email-services/postmark.d.ts +14 -0
  106. package/dist/types/email-services/resend.d.ts +14 -0
  107. package/dist/types/emails/defaults/Layout.d.ts +12 -0
  108. package/dist/types/emails/defaults/PrimaryButton.d.ts +11 -0
  109. package/dist/types/emails/defaults/ResetEmail.d.ts +1 -0
  110. package/dist/types/emails/defaults/ResetEmailByCode.d.ts +1 -0
  111. package/dist/types/emails/defaults/UserInvitation.d.ts +1 -0
  112. package/dist/types/emails/defaults/VerifyEmail.d.ts +1 -0
  113. package/dist/types/emails/defaults/VerifyEmailByCode.d.ts +1 -0
  114. package/dist/types/emails/defaults/WelcomeEmail.d.ts +1 -0
  115. package/dist/types/emails/defaults/compiled.d.ts +2 -0
  116. package/dist/types/emails/defaults/index.d.ts +6 -0
  117. package/dist/types/emails/defaults/subjects.d.ts +2 -0
  118. package/dist/types/emails/index.d.ts +70 -0
  119. package/dist/types/emails/render.d.ts +41 -0
  120. package/dist/types/errors/is-unique-constraint-error.d.ts +8 -0
  121. package/dist/types/errors/json-http-exception.d.ts +5 -0
  122. package/dist/types/errors/redirect-exception.d.ts +6 -0
  123. package/dist/types/generated/locale-types.d.ts +690 -0
  124. package/dist/types/helpers/cache-wrapper.d.ts +23 -0
  125. package/dist/types/helpers/client-assertion.d.ts +49 -0
  126. package/dist/types/helpers/client-keys.d.ts +27 -0
  127. package/dist/types/helpers/client.d.ts +496 -0
  128. package/dist/types/helpers/dcr/constraint-enforcement.d.ts +24 -0
  129. package/dist/types/helpers/dcr/metadata-mapping.d.ts +83 -0
  130. package/dist/types/helpers/dcr/mint-iat.d.ts +14 -0
  131. package/dist/types/helpers/dcr/mint-token.d.ts +7 -0
  132. package/dist/types/helpers/dcr/validate-connect-origin.d.ts +20 -0
  133. package/dist/types/helpers/dcr/verify-token.d.ts +8 -0
  134. package/dist/types/helpers/default-destinations.d.ts +55 -0
  135. package/dist/types/helpers/entity-hooks-wrapper.d.ts +43 -0
  136. package/dist/types/helpers/hook-events.d.ts +20 -0
  137. package/dist/types/helpers/hook-user-payload.d.ts +8 -0
  138. package/dist/types/helpers/hrd.d.ts +3 -0
  139. package/dist/types/helpers/logging.d.ts +65 -0
  140. package/dist/types/helpers/outbox-cleanup.d.ts +10 -0
  141. package/dist/types/helpers/outbox-destinations/index.d.ts +2 -0
  142. package/dist/types/helpers/outbox-destinations/log-streams.d.ts +66 -0
  143. package/dist/types/helpers/outbox-destinations/logs.d.ts +20 -0
  144. package/dist/types/helpers/outbox-destinations/registration-finalizer.d.ts +29 -0
  145. package/dist/types/helpers/outbox-destinations/webhooks.d.ts +57 -0
  146. package/dist/types/helpers/outbox-relay.d.ts +34 -0
  147. package/dist/types/helpers/password-policy.d.ts +54 -0
  148. package/dist/types/helpers/request-object.d.ts +40 -0
  149. package/dist/types/helpers/run-outbox-relay.d.ts +58 -0
  150. package/dist/types/helpers/saml.d.ts +1 -0
  151. package/dist/types/helpers/scope-claims.d.ts +4 -0
  152. package/dist/types/helpers/scopes-permissions.d.ts +38 -0
  153. package/dist/types/helpers/server-timing.d.ts +12 -0
  154. package/dist/types/helpers/service-token.d.ts +54 -0
  155. package/dist/types/helpers/set-tenant-id.d.ts +15 -0
  156. package/dist/types/helpers/signing-keys.d.ts +16 -0
  157. package/dist/types/helpers/try-connection-client.d.ts +15 -0
  158. package/dist/types/helpers/user-linking.d.ts +14 -0
  159. package/dist/types/helpers/user-session-cleanup.d.ts +21 -0
  160. package/dist/types/helpers/users.d.ts +46 -0
  161. package/dist/types/helpers/wait-until.d.ts +21 -0
  162. package/dist/types/hooks/addDataHooks.d.ts +16 -0
  163. package/dist/types/hooks/code-executor/local.d.ts +13 -0
  164. package/dist/types/hooks/codehooks.d.ts +70 -0
  165. package/dist/types/hooks/formhooks.d.ts +99 -0
  166. package/dist/types/hooks/helpers/token-api.d.ts +17 -0
  167. package/dist/types/hooks/index.d.ts +20 -0
  168. package/dist/types/hooks/link-users.d.ts +29 -0
  169. package/dist/types/hooks/pagehooks.d.ts +16 -0
  170. package/dist/types/hooks/post-user-login.d.ts +29 -0
  171. package/dist/types/hooks/pre-defined/account-linking.d.ts +73 -0
  172. package/dist/types/hooks/pre-defined/ensure-username.d.ts +86 -0
  173. package/dist/types/hooks/pre-defined/index.d.ts +23 -0
  174. package/dist/types/hooks/pre-defined/set-preferred-username.d.ts +26 -0
  175. package/dist/types/hooks/templatehooks.d.ts +29 -0
  176. package/dist/types/hooks/user-deletion.d.ts +14 -0
  177. package/dist/types/hooks/user-registration.d.ts +88 -0
  178. package/dist/types/hooks/user-update.d.ts +16 -0
  179. package/dist/types/hooks/validate-signup.d.ts +34 -0
  180. package/dist/types/hooks/webhooks.d.ts +35 -0
  181. package/dist/types/i18n/index.d.ts +77 -0
  182. package/dist/types/index.d.ts +15791 -0
  183. package/dist/types/locales/index.d.ts +9 -0
  184. package/dist/types/middlewares/apply-config.d.ts +14 -0
  185. package/dist/types/middlewares/authentication.d.ts +26 -0
  186. package/dist/types/middlewares/client-info.d.ts +8 -0
  187. package/dist/types/middlewares/index.d.ts +6 -0
  188. package/dist/types/middlewares/outbox.d.ts +24 -0
  189. package/dist/types/middlewares/register-component.d.ts +10 -0
  190. package/dist/types/middlewares/tenant.d.ts +12 -0
  191. package/dist/types/migration-providers/auth0.d.ts +3 -0
  192. package/dist/types/migration-providers/index.d.ts +5 -0
  193. package/dist/types/migration-providers/types.d.ts +32 -0
  194. package/dist/types/routes/auth-api/account.d.ts +36 -0
  195. package/dist/types/routes/auth-api/authenticate.d.ts +31 -0
  196. package/dist/types/routes/auth-api/authorize.d.ts +239 -0
  197. package/dist/types/routes/auth-api/callback.d.ts +234 -0
  198. package/dist/types/routes/auth-api/connect-start.d.ts +52 -0
  199. package/dist/types/routes/auth-api/dbconnections.d.ts +43 -0
  200. package/dist/types/routes/auth-api/index.d.ts +1580 -0
  201. package/dist/types/routes/auth-api/logout.d.ts +20 -0
  202. package/dist/types/routes/auth-api/oidc-logout.d.ts +52 -0
  203. package/dist/types/routes/auth-api/passwordless.d.ts +154 -0
  204. package/dist/types/routes/auth-api/register/index.d.ts +159 -0
  205. package/dist/types/routes/auth-api/register/shared.d.ts +30 -0
  206. package/dist/types/routes/auth-api/revoke.d.ts +73 -0
  207. package/dist/types/routes/auth-api/token.d.ts +412 -0
  208. package/dist/types/routes/auth-api/userinfo.d.ts +84 -0
  209. package/dist/types/routes/auth-api/well-known.d.ts +74 -0
  210. package/dist/types/routes/management-api/action-executions.d.ts +90 -0
  211. package/dist/types/routes/management-api/action-triggers.d.ts +118 -0
  212. package/dist/types/routes/management-api/actions.d.ts +673 -0
  213. package/dist/types/routes/management-api/analytics.d.ts +18 -0
  214. package/dist/types/routes/management-api/attack-protection.d.ts +189 -0
  215. package/dist/types/routes/management-api/authentication-methods.d.ts +115 -0
  216. package/dist/types/routes/management-api/branding.d.ts +402 -0
  217. package/dist/types/routes/management-api/client-grants.d.ts +183 -0
  218. package/dist/types/routes/management-api/client-registration-tokens.d.ts +35 -0
  219. package/dist/types/routes/management-api/clients.d.ts +995 -0
  220. package/dist/types/routes/management-api/connections.d.ts +872 -0
  221. package/dist/types/routes/management-api/custom-domains.d.ts +266 -0
  222. package/dist/types/routes/management-api/email-templates.d.ts +205 -0
  223. package/dist/types/routes/management-api/emails.d.ts +124 -0
  224. package/dist/types/routes/management-api/failed-events.d.ts +146 -0
  225. package/dist/types/routes/management-api/flows.d.ts +438 -0
  226. package/dist/types/routes/management-api/forms.d.ts +4090 -0
  227. package/dist/types/routes/management-api/guardian.d.ts +211 -0
  228. package/dist/types/routes/management-api/hook-code.d.ts +142 -0
  229. package/dist/types/routes/management-api/hooks.d.ts +405 -0
  230. package/dist/types/routes/management-api/index.d.ts +13210 -0
  231. package/dist/types/routes/management-api/keys.d.ts +98 -0
  232. package/dist/types/routes/management-api/log-streams.d.ts +170 -0
  233. package/dist/types/routes/management-api/logs.d.ts +159 -0
  234. package/dist/types/routes/management-api/migration-sources.d.ts +173 -0
  235. package/dist/types/routes/management-api/organizations.d.ts +896 -0
  236. package/dist/types/routes/management-api/prompts.d.ts +150 -0
  237. package/dist/types/routes/management-api/refresh_tokens.d.ts +66 -0
  238. package/dist/types/routes/management-api/resource-servers.d.ts +321 -0
  239. package/dist/types/routes/management-api/roles.d.ts +260 -0
  240. package/dist/types/routes/management-api/sessions.d.ts +78 -0
  241. package/dist/types/routes/management-api/stats.d.ts +44 -0
  242. package/dist/types/routes/management-api/tenants.d.ts +546 -0
  243. package/dist/types/routes/management-api/themes.d.ts +265 -0
  244. package/dist/types/routes/management-api/tickets.d.ts +75 -0
  245. package/dist/types/routes/management-api/users-by-email.d.ts +23 -0
  246. package/dist/types/routes/management-api/users.d.ts +1085 -0
  247. package/dist/types/routes/saml/index.d.ts +64 -0
  248. package/dist/types/routes/saml/samlp.d.ts +64 -0
  249. package/dist/types/routes/setup.d.ts +6 -0
  250. package/dist/types/routes/universal-login/account-change-email-confirmation.d.ts +30 -0
  251. package/dist/types/routes/universal-login/account-change-email-verify.d.ts +66 -0
  252. package/dist/types/routes/universal-login/account-change-email.d.ts +58 -0
  253. package/dist/types/routes/universal-login/account.d.ts +64 -0
  254. package/dist/types/routes/universal-login/common.d.ts +1482 -0
  255. package/dist/types/routes/universal-login/continue.d.ts +37 -0
  256. package/dist/types/routes/universal-login/enter-password.d.ts +49 -0
  257. package/dist/types/routes/universal-login/error-handler.d.ts +14 -0
  258. package/dist/types/routes/universal-login/error-page.d.ts +32 -0
  259. package/dist/types/routes/universal-login/error.d.ts +20 -0
  260. package/dist/types/routes/universal-login/flow-api.d.ts +381 -0
  261. package/dist/types/routes/universal-login/flow-widget.d.ts +23 -0
  262. package/dist/types/routes/universal-login/forgot-password.d.ts +32 -0
  263. package/dist/types/routes/universal-login/form-node.d.ts +74 -0
  264. package/dist/types/routes/universal-login/identifier.d.ts +55 -0
  265. package/dist/types/routes/universal-login/impersonate.d.ts +71 -0
  266. package/dist/types/routes/universal-login/index.d.ts +748 -0
  267. package/dist/types/routes/universal-login/info.d.ts +20 -0
  268. package/dist/types/routes/universal-login/invalid-session.d.ts +19 -0
  269. package/dist/types/routes/universal-login/otp-challenge.d.ts +54 -0
  270. package/dist/types/routes/universal-login/pre-signup-sent.d.ts +19 -0
  271. package/dist/types/routes/universal-login/pre-signup.d.ts +32 -0
  272. package/dist/types/routes/universal-login/reset-password.d.ts +39 -0
  273. package/dist/types/routes/universal-login/sanitization-utils.d.ts +55 -0
  274. package/dist/types/routes/universal-login/screen-api.d.ts +20 -0
  275. package/dist/types/routes/universal-login/screens/accept-invitation.d.ts +13 -0
  276. package/dist/types/routes/universal-login/screens/account-delete.d.ts +14 -0
  277. package/dist/types/routes/universal-login/screens/account-helpers.d.ts +13 -0
  278. package/dist/types/routes/universal-login/screens/account-linked.d.ts +14 -0
  279. package/dist/types/routes/universal-login/screens/account-mfa-phone-enrollment.d.ts +10 -0
  280. package/dist/types/routes/universal-login/screens/account-mfa-totp-enrollment.d.ts +10 -0
  281. package/dist/types/routes/universal-login/screens/account-passkeys.d.ts +10 -0
  282. package/dist/types/routes/universal-login/screens/account-profile.d.ts +14 -0
  283. package/dist/types/routes/universal-login/screens/account-security.d.ts +14 -0
  284. package/dist/types/routes/universal-login/screens/account.d.ts +14 -0
  285. package/dist/types/routes/universal-login/screens/connect-consent.d.ts +9 -0
  286. package/dist/types/routes/universal-login/screens/connect-tenant-select.d.ts +13 -0
  287. package/dist/types/routes/universal-login/screens/email-otp-challenge.d.ts +14 -0
  288. package/dist/types/routes/universal-login/screens/enter-password.d.ts +14 -0
  289. package/dist/types/routes/universal-login/screens/forgot-password.d.ts +11 -0
  290. package/dist/types/routes/universal-login/screens/identifier.d.ts +14 -0
  291. package/dist/types/routes/universal-login/screens/impersonate.d.ts +15 -0
  292. package/dist/types/routes/universal-login/screens/index.d.ts +29 -0
  293. package/dist/types/routes/universal-login/screens/login-passwordless-identifier.d.ts +17 -0
  294. package/dist/types/routes/universal-login/screens/login.d.ts +17 -0
  295. package/dist/types/routes/universal-login/screens/magic-link-sent.d.ts +11 -0
  296. package/dist/types/routes/universal-login/screens/mfa-login-options.d.ts +21 -0
  297. package/dist/types/routes/universal-login/screens/mfa-phone-challenge.d.ts +14 -0
  298. package/dist/types/routes/universal-login/screens/mfa-phone-enrollment.d.ts +14 -0
  299. package/dist/types/routes/universal-login/screens/mfa-totp-challenge.d.ts +14 -0
  300. package/dist/types/routes/universal-login/screens/mfa-totp-enrollment.d.ts +17 -0
  301. package/dist/types/routes/universal-login/screens/passkey-challenge.d.ts +16 -0
  302. package/dist/types/routes/universal-login/screens/passkey-enrollment-nudge.d.ts +17 -0
  303. package/dist/types/routes/universal-login/screens/passkey-enrollment.d.ts +11 -0
  304. package/dist/types/routes/universal-login/screens/passkey-utils.d.ts +100 -0
  305. package/dist/types/routes/universal-login/screens/registry.d.ts +28 -0
  306. package/dist/types/routes/universal-login/screens/reset-password-code.d.ts +18 -0
  307. package/dist/types/routes/universal-login/screens/reset-password.d.ts +36 -0
  308. package/dist/types/routes/universal-login/screens/signup.d.ts +14 -0
  309. package/dist/types/routes/universal-login/screens/sms-otp-challenge.d.ts +14 -0
  310. package/dist/types/routes/universal-login/screens/try-connection-result.d.ts +12 -0
  311. package/dist/types/routes/universal-login/screens/types.d.ts +167 -0
  312. package/dist/types/routes/universal-login/signup.d.ts +54 -0
  313. package/dist/types/routes/universal-login/u2-form-node.d.ts +93 -0
  314. package/dist/types/routes/universal-login/u2-index.d.ts +173 -0
  315. package/dist/types/routes/universal-login/u2-routes.d.ts +98 -0
  316. package/dist/types/routes/universal-login/u2-widget-page.d.ts +187 -0
  317. package/dist/types/routes/universal-login/universal-login-template.d.ts +55 -0
  318. package/dist/types/routes/universal-login/validate-email.d.ts +20 -0
  319. package/dist/types/routes/universal-login/widget-routes.d.ts +81 -0
  320. package/dist/types/seed.d.ts +86 -0
  321. package/dist/types/state-machines/index.d.ts +1 -0
  322. package/dist/types/state-machines/login-session.d.ts +173 -0
  323. package/dist/types/storybook-utils/HonoJSXWrapper.d.ts +43 -0
  324. package/dist/types/strategies/apple.d.ts +24 -0
  325. package/dist/types/strategies/facebook.d.ts +20 -0
  326. package/dist/types/strategies/github.d.ts +23 -0
  327. package/dist/types/strategies/google-oauth2.d.ts +43 -0
  328. package/dist/types/strategies/index.d.ts +69 -0
  329. package/dist/types/strategies/internal-oauth2.d.ts +17 -0
  330. package/dist/types/strategies/microsoft.d.ts +24 -0
  331. package/dist/types/strategies/oauth2.d.ts +38 -0
  332. package/dist/types/strategies/oidc.d.ts +38 -0
  333. package/dist/types/strategies/saml.d.ts +9 -0
  334. package/dist/types/strategies/vipps.d.ts +16 -0
  335. package/dist/types/styles/index.d.ts +9 -0
  336. package/dist/types/styles/tailwind.d.ts +1 -0
  337. package/dist/types/types/Auth0Client.d.ts +9 -0
  338. package/dist/types/types/AuthError.d.ts +14 -0
  339. package/dist/types/types/AuthHeroConfig.d.ts +415 -0
  340. package/dist/types/types/Bindings.d.ts +51 -0
  341. package/dist/types/types/GrantFlowResult.d.ts +22 -0
  342. package/dist/types/types/Hooks.d.ts +240 -0
  343. package/dist/types/types/IdToken.d.ts +30 -0
  344. package/dist/types/types/UserInfo.d.ts +8 -0
  345. package/dist/types/types/Variables.d.ts +33 -0
  346. package/dist/types/types/auth0/Query.d.ts +12 -0
  347. package/dist/types/types/auth0/Totals.d.ts +11 -0
  348. package/dist/types/types/auth0/UserResponse.d.ts +46 -0
  349. package/dist/types/types/auth0/index.d.ts +3 -0
  350. package/dist/types/types/index.d.ts +6 -0
  351. package/dist/types/types/saml.d.ts +1 -0
  352. package/dist/types/utils/append-log.d.ts +10 -0
  353. package/dist/types/utils/auth-header.d.ts +18 -0
  354. package/dist/types/utils/auth0-upstream.d.ts +60 -0
  355. package/dist/types/utils/authIframe.d.ts +11 -0
  356. package/dist/types/utils/client-info.d.ts +47 -0
  357. package/dist/types/utils/color.d.ts +23 -0
  358. package/dist/types/utils/connections.d.ts +11 -0
  359. package/dist/types/utils/cookies.d.ts +28 -0
  360. package/dist/types/utils/crypto.d.ts +2 -0
  361. package/dist/types/utils/deep-merge.d.ts +6 -0
  362. package/dist/types/utils/encryption.d.ts +22 -0
  363. package/dist/types/utils/entity-id.d.ts +13 -0
  364. package/dist/types/utils/fetchAll.d.ts +60 -0
  365. package/dist/types/utils/form-post.d.ts +1 -0
  366. package/dist/types/utils/id-token-hash.d.ts +1 -0
  367. package/dist/types/utils/incognito.d.ts +11 -0
  368. package/dist/types/utils/instance-to-json.d.ts +8 -0
  369. package/dist/types/utils/ip.d.ts +8 -0
  370. package/dist/types/utils/is-valid-redirect-url.d.ts +4 -0
  371. package/dist/types/utils/jwk-alg.d.ts +20 -0
  372. package/dist/types/utils/jwks.d.ts +41 -0
  373. package/dist/types/utils/jwt.d.ts +15 -0
  374. package/dist/types/utils/organization-id.d.ts +2 -0
  375. package/dist/types/utils/otp.d.ts +1 -0
  376. package/dist/types/utils/refresh-token-format.d.ts +20 -0
  377. package/dist/types/utils/safe-compare.d.ts +1 -0
  378. package/dist/types/utils/sort.d.ts +4 -0
  379. package/dist/types/utils/ssrf-fetch.d.ts +44 -0
  380. package/dist/types/utils/ulid.d.ts +1 -0
  381. package/dist/types/utils/url.d.ts +16 -0
  382. package/dist/types/utils/user-id.d.ts +2 -0
  383. package/dist/types/utils/username-password-provider.d.ts +67 -0
  384. package/dist/types/utils/username.d.ts +11 -0
  385. package/dist/types/variables.d.ts +4 -0
  386. package/package.json +11 -11
@@ -0,0 +1,49 @@
1
+ import { LoadClientKeysOptions, ClientWithKeys } from "./client-keys";
2
+ declare const ASSERTION_TYPE = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer";
3
+ export type ClientAssertionMethod = "private_key_jwt" | "client_secret_jwt";
4
+ export declare class ClientAssertionError extends Error {
5
+ code: "invalid_client" | "invalid_request" | "unsupported_alg" | "missing_keys";
6
+ constructor(code: "invalid_client" | "invalid_request" | "unsupported_alg" | "missing_keys", message: string);
7
+ }
8
+ export interface ClientAssertionClient extends ClientWithKeys {
9
+ client_id: string;
10
+ client_secret?: string | undefined;
11
+ }
12
+ export interface VerifyClientAssertionOptions extends LoadClientKeysOptions {
13
+ /**
14
+ * Acceptable values for the `aud` claim. Per RFC 7523 §3 the assertion's
15
+ * audience MUST identify the authorization server, typically as the token
16
+ * endpoint URL or the issuer. We accept either.
17
+ */
18
+ acceptedAudiences: string[];
19
+ /** Clock-skew leeway in seconds. Defaults to 30. */
20
+ leewaySeconds?: number;
21
+ /** Override Date.now() for tests. */
22
+ now?: () => number;
23
+ }
24
+ export interface VerifiedClientAssertion {
25
+ /** The authenticated client_id (extracted from the assertion's `sub`). */
26
+ clientId: string;
27
+ /** Which authentication method was actually used. */
28
+ method: ClientAssertionMethod;
29
+ /** Optional jti claim — useful if callers want to enforce replay protection. */
30
+ jti?: string;
31
+ /** The full verified payload, in case callers need other claims. */
32
+ payload: Record<string, unknown>;
33
+ }
34
+ /**
35
+ * Verify an RFC 7523 client assertion JWT. Used by the `/oauth/token` endpoint
36
+ * to authenticate clients that registered with `token_endpoint_auth_method`
37
+ * = `private_key_jwt` or `client_secret_jwt`.
38
+ *
39
+ * The caller has already resolved the client (typically via the assertion's
40
+ * `iss`/`sub` claim or an explicit `client_id` form param). This function
41
+ * verifies that the assertion is signed by a key the client owns and that the
42
+ * standard claims are correct.
43
+ *
44
+ * @throws ClientAssertionError when the assertion is malformed, signed with
45
+ * an unsupported alg, signed with a key the client doesn't own, or fails
46
+ * any of the iss/sub/aud/exp checks.
47
+ */
48
+ export declare function verifyClientAssertion(assertion: string, client: ClientAssertionClient, opts: VerifyClientAssertionOptions): Promise<VerifiedClientAssertion>;
49
+ export { ASSERTION_TYPE as CLIENT_ASSERTION_TYPE };
@@ -0,0 +1,27 @@
1
+ import { Jwk } from "@authhero/adapter-interfaces";
2
+ import { SsrfFetchOptions } from "../utils/ssrf-fetch";
3
+ export interface LoadClientKeysOptions {
4
+ fetch?: SsrfFetchOptions;
5
+ }
6
+ /**
7
+ * Subset of Client fields the JWKS loader actually reads. Narrower than
8
+ * `Client` so callers can pass `EnrichedClient` (which redefines the
9
+ * `connections` field shape) without structural mismatch.
10
+ */
11
+ export interface ClientWithKeys {
12
+ client_metadata?: Record<string, string> | undefined;
13
+ registration_metadata?: Record<string, unknown> | undefined;
14
+ }
15
+ /**
16
+ * Resolve a client's JWS verification keys. Per RFC 7591 §2 a client may
17
+ * publish keys inline (`jwks`) or by reference (`jwks_uri`). Inline takes
18
+ * precedence when both are present.
19
+ *
20
+ * jwks is stored on `client.registration_metadata.jwks` (DCR forward-compat
21
+ * field); jwks_uri is stored on `client.client_metadata.jwks_uri`.
22
+ *
23
+ * Returns an empty array when the client has neither — callers must decide
24
+ * whether that's allowed for the alg in question (HS* algs don't need it;
25
+ * asymmetric algs do).
26
+ */
27
+ export declare function loadClientJwks(client: ClientWithKeys, opts?: LoadClientKeysOptions): Promise<Jwk[]>;
@@ -0,0 +1,496 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ import { Bindings } from "../types";
3
+ /**
4
+ * EnrichedClient combines a Client with its associated Tenant and Connections.
5
+ *
6
+ * Instead of fetching this combined data through a special adapter,
7
+ * use the getEnrichedClient helper function which fetches the entities
8
+ * separately and composes them.
9
+ */
10
+ export declare const enrichedClientSchema: z.ZodObject<{
11
+ created_at: z.ZodString;
12
+ updated_at: z.ZodString;
13
+ name: z.ZodString;
14
+ description: z.ZodOptional<z.ZodString>;
15
+ global: z.ZodDefault<z.ZodBoolean>;
16
+ client_secret: z.ZodOptional<z.ZodDefault<z.ZodString>>;
17
+ app_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
18
+ native: "native";
19
+ spa: "spa";
20
+ regular_web: "regular_web";
21
+ non_interactive: "non_interactive";
22
+ resource_server: "resource_server";
23
+ express_configuration: "express_configuration";
24
+ rms: "rms";
25
+ box: "box";
26
+ cloudbees: "cloudbees";
27
+ concur: "concur";
28
+ dropbox: "dropbox";
29
+ mscrm: "mscrm";
30
+ echosign: "echosign";
31
+ egnyte: "egnyte";
32
+ newrelic: "newrelic";
33
+ office365: "office365";
34
+ salesforce: "salesforce";
35
+ sentry: "sentry";
36
+ sharepoint: "sharepoint";
37
+ slack: "slack";
38
+ springcm: "springcm";
39
+ zendesk: "zendesk";
40
+ zoom: "zoom";
41
+ sso_integration: "sso_integration";
42
+ oag: "oag";
43
+ }>>>;
44
+ logo_uri: z.ZodOptional<z.ZodString>;
45
+ is_first_party: z.ZodDefault<z.ZodBoolean>;
46
+ oidc_conformant: z.ZodDefault<z.ZodBoolean>;
47
+ auth0_conformant: z.ZodDefault<z.ZodBoolean>;
48
+ callbacks: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
49
+ allowed_origins: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
50
+ web_origins: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
51
+ client_aliases: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
52
+ allowed_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
53
+ allowed_logout_urls: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
54
+ session_transfer: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
55
+ oidc_logout: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
56
+ grant_types: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
57
+ jwt_configuration: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
58
+ signing_keys: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
59
+ encryption_key: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
60
+ sso: z.ZodDefault<z.ZodBoolean>;
61
+ sso_disabled: z.ZodDefault<z.ZodBoolean>;
62
+ cross_origin_authentication: z.ZodDefault<z.ZodBoolean>;
63
+ cross_origin_loc: z.ZodOptional<z.ZodString>;
64
+ custom_login_page_on: z.ZodDefault<z.ZodBoolean>;
65
+ custom_login_page: z.ZodOptional<z.ZodString>;
66
+ custom_login_page_preview: z.ZodOptional<z.ZodString>;
67
+ form_template: z.ZodOptional<z.ZodString>;
68
+ addons: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
69
+ token_endpoint_auth_method: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
70
+ none: "none";
71
+ client_secret_post: "client_secret_post";
72
+ client_secret_basic: "client_secret_basic";
73
+ client_secret_jwt: "client_secret_jwt";
74
+ private_key_jwt: "private_key_jwt";
75
+ }>>>;
76
+ client_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>>;
77
+ hide_sign_up_disabled_error: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
78
+ mobile: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
79
+ initiate_login_uri: z.ZodOptional<z.ZodString>;
80
+ native_social_login: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
81
+ refresh_token: z.ZodOptional<z.ZodDefault<z.ZodObject<{
82
+ rotation_type: z.ZodOptional<z.ZodEnum<{
83
+ rotating: "rotating";
84
+ "non-rotating": "non-rotating";
85
+ }>>;
86
+ leeway: z.ZodOptional<z.ZodNumber>;
87
+ expiration_type: z.ZodOptional<z.ZodEnum<{
88
+ expiring: "expiring";
89
+ "non-expiring": "non-expiring";
90
+ }>>;
91
+ token_lifetime: z.ZodOptional<z.ZodNumber>;
92
+ infinite_token_lifetime: z.ZodOptional<z.ZodBoolean>;
93
+ idle_token_lifetime: z.ZodOptional<z.ZodNumber>;
94
+ infinite_idle_token_lifetime: z.ZodOptional<z.ZodBoolean>;
95
+ }, z.core.$strip>>>;
96
+ default_organization: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
97
+ organization_usage: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
98
+ deny: "deny";
99
+ allow: "allow";
100
+ require: "require";
101
+ }>>>;
102
+ organization_require_behavior: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
103
+ no_prompt: "no_prompt";
104
+ pre_login_prompt: "pre_login_prompt";
105
+ post_login_prompt: "post_login_prompt";
106
+ }>>>;
107
+ client_authentication_methods: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
108
+ require_pushed_authorization_requests: z.ZodDefault<z.ZodBoolean>;
109
+ require_proof_of_possession: z.ZodDefault<z.ZodBoolean>;
110
+ signed_request_object: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
111
+ compliance_level: z.ZodOptional<z.ZodEnum<{
112
+ none: "none";
113
+ fapi1_adv_pkj_par: "fapi1_adv_pkj_par";
114
+ fapi1_adv_mtls_par: "fapi1_adv_mtls_par";
115
+ fapi2_sp_pkj_mtls: "fapi2_sp_pkj_mtls";
116
+ fapi2_sp_mtls_mtls: "fapi2_sp_mtls_mtls";
117
+ }>>;
118
+ par_request_expiry: z.ZodOptional<z.ZodNumber>;
119
+ token_quota: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
120
+ owner_user_id: z.ZodOptional<z.ZodString>;
121
+ registration_type: z.ZodOptional<z.ZodEnum<{
122
+ manual: "manual";
123
+ open_dcr: "open_dcr";
124
+ iat_dcr: "iat_dcr";
125
+ }>>;
126
+ registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
127
+ user_linking_mode: z.ZodOptional<z.ZodEnum<{
128
+ builtin: "builtin";
129
+ off: "off";
130
+ }>>;
131
+ client_id: z.ZodString;
132
+ tenant: z.ZodObject<{
133
+ created_at: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
134
+ updated_at: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
135
+ audience: z.ZodString;
136
+ friendly_name: z.ZodString;
137
+ picture_url: z.ZodOptional<z.ZodString>;
138
+ support_email: z.ZodOptional<z.ZodString>;
139
+ support_url: z.ZodOptional<z.ZodString>;
140
+ sender_email: z.ZodString;
141
+ sender_name: z.ZodString;
142
+ session_lifetime: z.ZodOptional<z.ZodNumber>;
143
+ idle_session_lifetime: z.ZodOptional<z.ZodNumber>;
144
+ ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
145
+ idle_ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
146
+ session_cookie: z.ZodOptional<z.ZodObject<{
147
+ mode: z.ZodOptional<z.ZodEnum<{
148
+ persistent: "persistent";
149
+ "non-persistent": "non-persistent";
150
+ }>>;
151
+ }, z.core.$strip>>;
152
+ allowed_logout_urls: z.ZodOptional<z.ZodArray<z.ZodString>>;
153
+ default_redirection_uri: z.ZodOptional<z.ZodString>;
154
+ default_client_id: z.ZodOptional<z.ZodString>;
155
+ enabled_locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
156
+ default_directory: z.ZodOptional<z.ZodString>;
157
+ error_page: z.ZodOptional<z.ZodNullable<z.ZodObject<{
158
+ html: z.ZodOptional<z.ZodString>;
159
+ show_log_link: z.ZodOptional<z.ZodBoolean>;
160
+ url: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strip>>>;
162
+ flags: z.ZodOptional<z.ZodObject<{
163
+ allow_changing_enable_sso: z.ZodOptional<z.ZodBoolean>;
164
+ allow_legacy_delegation_grant_types: z.ZodOptional<z.ZodBoolean>;
165
+ allow_legacy_ro_grant_types: z.ZodOptional<z.ZodBoolean>;
166
+ allow_legacy_tokeninfo_endpoint: z.ZodOptional<z.ZodBoolean>;
167
+ change_pwd_flow_v1: z.ZodOptional<z.ZodBoolean>;
168
+ custom_domains_provisioning: z.ZodOptional<z.ZodBoolean>;
169
+ dashboard_insights_view: z.ZodOptional<z.ZodBoolean>;
170
+ dashboard_log_streams_next: z.ZodOptional<z.ZodBoolean>;
171
+ disable_clickjack_protection_headers: z.ZodOptional<z.ZodBoolean>;
172
+ disable_fields_map_fix: z.ZodOptional<z.ZodBoolean>;
173
+ disable_impersonation: z.ZodOptional<z.ZodBoolean>;
174
+ disable_management_api_sms_obfuscation: z.ZodOptional<z.ZodBoolean>;
175
+ enable_adfs_waad_email_verification: z.ZodOptional<z.ZodBoolean>;
176
+ enable_apis_section: z.ZodOptional<z.ZodBoolean>;
177
+ enable_client_connections: z.ZodOptional<z.ZodBoolean>;
178
+ enable_custom_domain_in_emails: z.ZodOptional<z.ZodBoolean>;
179
+ enable_dynamic_client_registration: z.ZodOptional<z.ZodBoolean>;
180
+ dcr_require_initial_access_token: z.ZodOptional<z.ZodBoolean>;
181
+ dcr_allowed_grant_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
182
+ allow_http_return_to: z.ZodOptional<z.ZodArray<z.ZodString>>;
183
+ enable_idtoken_api2: z.ZodOptional<z.ZodBoolean>;
184
+ enable_legacy_logs_search_v2: z.ZodOptional<z.ZodBoolean>;
185
+ enable_legacy_profile: z.ZodOptional<z.ZodBoolean>;
186
+ enable_pipeline2: z.ZodOptional<z.ZodBoolean>;
187
+ enable_public_signup_user_exists_error: z.ZodOptional<z.ZodBoolean>;
188
+ enable_sso: z.ZodOptional<z.ZodBoolean>;
189
+ enforce_client_authentication_on_passwordless_start: z.ZodOptional<z.ZodBoolean>;
190
+ genai_trial: z.ZodOptional<z.ZodBoolean>;
191
+ improved_signup_bot_detection_in_classic: z.ZodOptional<z.ZodBoolean>;
192
+ mfa_show_factor_list_on_enrollment: z.ZodOptional<z.ZodBoolean>;
193
+ no_disclose_enterprise_connections: z.ZodOptional<z.ZodBoolean>;
194
+ remove_alg_from_jwks: z.ZodOptional<z.ZodBoolean>;
195
+ revoke_refresh_token_grant: z.ZodOptional<z.ZodBoolean>;
196
+ trust_azure_adfs_email_verified_connection_property: z.ZodOptional<z.ZodBoolean>;
197
+ use_scope_descriptions_for_consent: z.ZodOptional<z.ZodBoolean>;
198
+ inherit_global_permissions_in_organizations: z.ZodOptional<z.ZodBoolean>;
199
+ }, z.core.$strip>>;
200
+ sandbox_version: z.ZodOptional<z.ZodString>;
201
+ legacy_sandbox_version: z.ZodOptional<z.ZodString>;
202
+ sandbox_versions_available: z.ZodOptional<z.ZodArray<z.ZodString>>;
203
+ change_password: z.ZodOptional<z.ZodObject<{
204
+ enabled: z.ZodOptional<z.ZodBoolean>;
205
+ html: z.ZodOptional<z.ZodString>;
206
+ }, z.core.$strip>>;
207
+ guardian_mfa_page: z.ZodOptional<z.ZodObject<{
208
+ enabled: z.ZodOptional<z.ZodBoolean>;
209
+ html: z.ZodOptional<z.ZodString>;
210
+ }, z.core.$strip>>;
211
+ device_flow: z.ZodOptional<z.ZodObject<{
212
+ charset: z.ZodOptional<z.ZodEnum<{
213
+ base20: "base20";
214
+ digits: "digits";
215
+ }>>;
216
+ mask: z.ZodOptional<z.ZodString>;
217
+ }, z.core.$strip>>;
218
+ default_token_quota: z.ZodOptional<z.ZodNullable<z.ZodObject<{
219
+ clients: z.ZodOptional<z.ZodObject<{
220
+ client_credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
221
+ }, z.core.$strip>>;
222
+ organizations: z.ZodOptional<z.ZodObject<{
223
+ client_credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
224
+ }, z.core.$strip>>;
225
+ }, z.core.$strip>>>;
226
+ default_audience: z.ZodOptional<z.ZodString>;
227
+ default_organization: z.ZodOptional<z.ZodString>;
228
+ sessions: z.ZodOptional<z.ZodObject<{
229
+ oidc_logout_prompt_enabled: z.ZodOptional<z.ZodBoolean>;
230
+ }, z.core.$strip>>;
231
+ oidc_logout: z.ZodOptional<z.ZodObject<{
232
+ rp_logout_end_session_endpoint_discovery: z.ZodOptional<z.ZodBoolean>;
233
+ }, z.core.$strip>>;
234
+ allow_organization_name_in_authentication_api: z.ZodOptional<z.ZodBoolean>;
235
+ customize_mfa_in_postlogin_action: z.ZodOptional<z.ZodBoolean>;
236
+ acr_values_supported: z.ZodOptional<z.ZodArray<z.ZodString>>;
237
+ mtls: z.ZodOptional<z.ZodNullable<z.ZodObject<{
238
+ enable_endpoint_aliases: z.ZodOptional<z.ZodBoolean>;
239
+ }, z.core.$strip>>>;
240
+ pushed_authorization_requests_supported: z.ZodOptional<z.ZodBoolean>;
241
+ authorization_response_iss_parameter_supported: z.ZodOptional<z.ZodBoolean>;
242
+ attack_protection: z.ZodOptional<z.ZodObject<{
243
+ breached_password_detection: z.ZodOptional<z.ZodObject<{
244
+ enabled: z.ZodOptional<z.ZodBoolean>;
245
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
246
+ admin_notification_frequency: z.ZodOptional<z.ZodArray<z.ZodString>>;
247
+ method: z.ZodOptional<z.ZodString>;
248
+ stage: z.ZodOptional<z.ZodObject<{
249
+ "pre-user-registration": z.ZodOptional<z.ZodObject<{
250
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
251
+ }, z.core.$strip>>;
252
+ "pre-change-password": z.ZodOptional<z.ZodObject<{
253
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ }, z.core.$strip>>;
255
+ }, z.core.$strip>>;
256
+ }, z.core.$strip>>;
257
+ brute_force_protection: z.ZodOptional<z.ZodObject<{
258
+ enabled: z.ZodOptional<z.ZodBoolean>;
259
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
260
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
261
+ mode: z.ZodOptional<z.ZodString>;
262
+ max_attempts: z.ZodOptional<z.ZodNumber>;
263
+ }, z.core.$strip>>;
264
+ suspicious_ip_throttling: z.ZodOptional<z.ZodObject<{
265
+ enabled: z.ZodOptional<z.ZodBoolean>;
266
+ shields: z.ZodOptional<z.ZodArray<z.ZodString>>;
267
+ allowlist: z.ZodOptional<z.ZodArray<z.ZodString>>;
268
+ stage: z.ZodOptional<z.ZodObject<{
269
+ "pre-login": z.ZodOptional<z.ZodObject<{
270
+ max_attempts: z.ZodOptional<z.ZodNumber>;
271
+ rate: z.ZodOptional<z.ZodNumber>;
272
+ }, z.core.$strip>>;
273
+ "pre-user-registration": z.ZodOptional<z.ZodObject<{
274
+ max_attempts: z.ZodOptional<z.ZodNumber>;
275
+ rate: z.ZodOptional<z.ZodNumber>;
276
+ }, z.core.$strip>>;
277
+ }, z.core.$strip>>;
278
+ }, z.core.$strip>>;
279
+ }, z.core.$strip>>;
280
+ mfa: z.ZodOptional<z.ZodObject<{
281
+ policy: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
282
+ never: "never";
283
+ always: "always";
284
+ }>>>;
285
+ factors: z.ZodOptional<z.ZodObject<{
286
+ sms: z.ZodDefault<z.ZodBoolean>;
287
+ otp: z.ZodDefault<z.ZodBoolean>;
288
+ email: z.ZodDefault<z.ZodBoolean>;
289
+ push_notification: z.ZodDefault<z.ZodBoolean>;
290
+ webauthn_roaming: z.ZodDefault<z.ZodBoolean>;
291
+ webauthn_platform: z.ZodDefault<z.ZodBoolean>;
292
+ recovery_code: z.ZodDefault<z.ZodBoolean>;
293
+ duo: z.ZodDefault<z.ZodBoolean>;
294
+ }, z.core.$strip>>;
295
+ sms_provider: z.ZodOptional<z.ZodObject<{
296
+ provider: z.ZodOptional<z.ZodEnum<{
297
+ twilio: "twilio";
298
+ vonage: "vonage";
299
+ aws_sns: "aws_sns";
300
+ phone_message_hook: "phone_message_hook";
301
+ }>>;
302
+ }, z.core.$strip>>;
303
+ twilio: z.ZodOptional<z.ZodObject<{
304
+ sid: z.ZodOptional<z.ZodString>;
305
+ auth_token: z.ZodOptional<z.ZodString>;
306
+ from: z.ZodOptional<z.ZodString>;
307
+ messaging_service_sid: z.ZodOptional<z.ZodString>;
308
+ }, z.core.$strip>>;
309
+ phone_message: z.ZodOptional<z.ZodObject<{
310
+ message: z.ZodOptional<z.ZodString>;
311
+ }, z.core.$strip>>;
312
+ }, z.core.$strip>>;
313
+ id: z.ZodString;
314
+ is_control_plane: z.ZodOptional<z.ZodBoolean>;
315
+ }, z.core.$strip>;
316
+ connections: z.ZodArray<z.ZodObject<{
317
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
318
+ updated_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
319
+ id: z.ZodOptional<z.ZodString>;
320
+ name: z.ZodString;
321
+ display_name: z.ZodOptional<z.ZodString>;
322
+ strategy: z.ZodString;
323
+ options: z.ZodDefault<z.ZodPreprocess<z.ZodObject<{
324
+ kid: z.ZodOptional<z.ZodString>;
325
+ team_id: z.ZodOptional<z.ZodString>;
326
+ realms: z.ZodOptional<z.ZodString>;
327
+ authentication_method: z.ZodOptional<z.ZodString>;
328
+ client_id: z.ZodOptional<z.ZodString>;
329
+ client_secret: z.ZodOptional<z.ZodString>;
330
+ app_secret: z.ZodOptional<z.ZodString>;
331
+ scope: z.ZodOptional<z.ZodString>;
332
+ authorization_endpoint: z.ZodOptional<z.ZodString>;
333
+ token_endpoint: z.ZodOptional<z.ZodString>;
334
+ userinfo_endpoint: z.ZodOptional<z.ZodString>;
335
+ jwks_uri: z.ZodOptional<z.ZodString>;
336
+ discovery_url: z.ZodOptional<z.ZodString>;
337
+ issuer: z.ZodOptional<z.ZodString>;
338
+ token_endpoint_auth_method: z.ZodOptional<z.ZodEnum<{
339
+ client_secret_post: "client_secret_post";
340
+ client_secret_basic: "client_secret_basic";
341
+ }>>;
342
+ provider: z.ZodOptional<z.ZodString>;
343
+ from: z.ZodOptional<z.ZodString>;
344
+ twilio_sid: z.ZodOptional<z.ZodString>;
345
+ twilio_token: z.ZodOptional<z.ZodString>;
346
+ icon_url: z.ZodOptional<z.ZodString>;
347
+ domain_aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
348
+ callback_url: z.ZodOptional<z.ZodString>;
349
+ passwordPolicy: z.ZodOptional<z.ZodEnum<{
350
+ none: "none";
351
+ low: "low";
352
+ fair: "fair";
353
+ good: "good";
354
+ excellent: "excellent";
355
+ }>>;
356
+ password_complexity_options: z.ZodOptional<z.ZodObject<{
357
+ min_length: z.ZodOptional<z.ZodNumber>;
358
+ }, z.core.$strip>>;
359
+ password_history: z.ZodOptional<z.ZodObject<{
360
+ enable: z.ZodOptional<z.ZodBoolean>;
361
+ size: z.ZodOptional<z.ZodNumber>;
362
+ }, z.core.$strip>>;
363
+ password_no_personal_info: z.ZodOptional<z.ZodObject<{
364
+ enable: z.ZodOptional<z.ZodBoolean>;
365
+ }, z.core.$strip>>;
366
+ password_dictionary: z.ZodOptional<z.ZodObject<{
367
+ enable: z.ZodOptional<z.ZodBoolean>;
368
+ dictionary: z.ZodOptional<z.ZodArray<z.ZodString>>;
369
+ }, z.core.$strip>>;
370
+ disable_signup: z.ZodOptional<z.ZodBoolean>;
371
+ brute_force_protection: z.ZodOptional<z.ZodBoolean>;
372
+ import_mode: z.ZodOptional<z.ZodBoolean>;
373
+ configuration: z.ZodOptional<z.ZodObject<{
374
+ token_endpoint: z.ZodOptional<z.ZodString>;
375
+ userinfo_endpoint: z.ZodOptional<z.ZodString>;
376
+ client_id: z.ZodOptional<z.ZodString>;
377
+ client_secret: z.ZodOptional<z.ZodString>;
378
+ realm: z.ZodOptional<z.ZodString>;
379
+ }, z.core.$strip>>;
380
+ attributes: z.ZodOptional<z.ZodObject<{
381
+ email: z.ZodOptional<z.ZodObject<{
382
+ identifier: z.ZodOptional<z.ZodObject<{
383
+ active: z.ZodOptional<z.ZodBoolean>;
384
+ }, z.core.$strip>>;
385
+ signup: z.ZodOptional<z.ZodObject<{
386
+ status: z.ZodOptional<z.ZodEnum<{
387
+ optional: "optional";
388
+ required: "required";
389
+ disabled: "disabled";
390
+ }>>;
391
+ verification: z.ZodOptional<z.ZodObject<{
392
+ active: z.ZodOptional<z.ZodBoolean>;
393
+ }, z.core.$strip>>;
394
+ }, z.core.$strip>>;
395
+ validation: z.ZodOptional<z.ZodObject<{
396
+ allowed: z.ZodOptional<z.ZodBoolean>;
397
+ }, z.core.$strip>>;
398
+ unique: z.ZodOptional<z.ZodBoolean>;
399
+ profile_required: z.ZodOptional<z.ZodBoolean>;
400
+ verification_method: z.ZodOptional<z.ZodEnum<{
401
+ code: "code";
402
+ link: "link";
403
+ }>>;
404
+ }, z.core.$strip>>;
405
+ username: z.ZodOptional<z.ZodObject<{
406
+ identifier: z.ZodOptional<z.ZodObject<{
407
+ active: z.ZodOptional<z.ZodBoolean>;
408
+ }, z.core.$strip>>;
409
+ signup: z.ZodOptional<z.ZodObject<{
410
+ status: z.ZodOptional<z.ZodEnum<{
411
+ optional: "optional";
412
+ required: "required";
413
+ disabled: "disabled";
414
+ }>>;
415
+ }, z.core.$strip>>;
416
+ validation: z.ZodOptional<z.ZodObject<{
417
+ max_length: z.ZodOptional<z.ZodNumber>;
418
+ min_length: z.ZodOptional<z.ZodNumber>;
419
+ allowed_types: z.ZodOptional<z.ZodObject<{
420
+ email: z.ZodOptional<z.ZodBoolean>;
421
+ phone_number: z.ZodOptional<z.ZodBoolean>;
422
+ }, z.core.$strip>>;
423
+ }, z.core.$strip>>;
424
+ profile_required: z.ZodOptional<z.ZodBoolean>;
425
+ }, z.core.$strip>>;
426
+ phone_number: z.ZodOptional<z.ZodObject<{
427
+ identifier: z.ZodOptional<z.ZodObject<{
428
+ active: z.ZodOptional<z.ZodBoolean>;
429
+ }, z.core.$strip>>;
430
+ signup: z.ZodOptional<z.ZodObject<{
431
+ status: z.ZodOptional<z.ZodEnum<{
432
+ optional: "optional";
433
+ required: "required";
434
+ disabled: "disabled";
435
+ }>>;
436
+ }, z.core.$strip>>;
437
+ }, z.core.$strip>>;
438
+ }, z.core.$strip>>;
439
+ authentication_methods: z.ZodOptional<z.ZodObject<{
440
+ password: z.ZodOptional<z.ZodObject<{
441
+ enabled: z.ZodOptional<z.ZodBoolean>;
442
+ }, z.core.$strip>>;
443
+ passkey: z.ZodOptional<z.ZodObject<{
444
+ enabled: z.ZodOptional<z.ZodBoolean>;
445
+ }, z.core.$strip>>;
446
+ }, z.core.$strip>>;
447
+ passkey_options: z.ZodOptional<z.ZodObject<{
448
+ challenge_ui: z.ZodOptional<z.ZodEnum<{
449
+ both: "both";
450
+ autofill: "autofill";
451
+ button: "button";
452
+ }>>;
453
+ local_enrollment_enabled: z.ZodOptional<z.ZodBoolean>;
454
+ progressive_enrollment_enabled: z.ZodOptional<z.ZodBoolean>;
455
+ }, z.core.$strip>>;
456
+ requires_username: z.ZodOptional<z.ZodBoolean>;
457
+ validation: z.ZodOptional<z.ZodObject<{
458
+ username: z.ZodOptional<z.ZodObject<{
459
+ min: z.ZodOptional<z.ZodNumber>;
460
+ max: z.ZodOptional<z.ZodNumber>;
461
+ }, z.core.$strip>>;
462
+ }, z.core.$strip>>;
463
+ set_user_root_attributes: z.ZodOptional<z.ZodEnum<{
464
+ on_each_login: "on_each_login";
465
+ on_first_login: "on_first_login";
466
+ never_on_login: "never_on_login";
467
+ }>>;
468
+ }, z.core.$strip>>>;
469
+ enabled_clients: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
470
+ response_type: z.ZodOptional<z.ZodCustom<import("@authhero/adapter-interfaces").AuthorizationResponseType, import("@authhero/adapter-interfaces").AuthorizationResponseType>>;
471
+ response_mode: z.ZodOptional<z.ZodCustom<import("@authhero/adapter-interfaces").AuthorizationResponseMode, import("@authhero/adapter-interfaces").AuthorizationResponseMode>>;
472
+ is_domain_connection: z.ZodOptional<z.ZodBoolean>;
473
+ show_as_button: z.ZodOptional<z.ZodBoolean>;
474
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
475
+ is_system: z.ZodOptional<z.ZodBoolean>;
476
+ }, z.core.$strip>>;
477
+ }, z.core.$strip>;
478
+ export type EnrichedClient = z.infer<typeof enrichedClientSchema>;
479
+ /**
480
+ * Fetches a client along with its tenant and connections by making separate
481
+ * adapter calls. This composites the data into an EnrichedClient.
482
+ *
483
+ * When tenantId is provided, all fetches happen in parallel for better performance.
484
+ * When tenantId is not provided, we first fetch the client to get the tenant_id,
485
+ * then fetch tenant and connections in parallel.
486
+ *
487
+ * If no connections are explicitly enabled for the client, falls back to all
488
+ * connections available in the tenant.
489
+ *
490
+ * @param env - The environment bindings containing data adapters
491
+ * @param clientId - The client ID to fetch
492
+ * @param tenantId - Optional tenant ID (if known, enables parallel fetching)
493
+ * @returns EnrichedClient with client, tenant, and connections data
494
+ * @throws JSONHTTPException if client or tenant is not found
495
+ */
496
+ export declare function getEnrichedClient(env: Bindings, clientId: string, tenantId?: string): Promise<EnrichedClient>;
@@ -0,0 +1,24 @@
1
+ export interface ConstraintViolation {
2
+ field: string;
3
+ expected: unknown;
4
+ got: unknown;
5
+ }
6
+ export interface ConstraintResult {
7
+ ok: boolean;
8
+ violation?: ConstraintViolation;
9
+ /**
10
+ * Request merged with any absent constrained fields filled in from the
11
+ * constraints. Returned as a loose record since constraints may include
12
+ * fields beyond the typed request schema (e.g. AuthHero-internal
13
+ * `domain`, `integration_type` for the Phase 4 /connect/start flow).
14
+ */
15
+ filled: Record<string, unknown>;
16
+ }
17
+ /**
18
+ * Enforce IAT-pre-bound metadata constraints on a registration request.
19
+ *
20
+ * Rule per plan: each constrained field must either be absent from the
21
+ * request (filled in from the constraint) or exactly equal. No merging,
22
+ * no subset matching.
23
+ */
24
+ export declare function enforceConstraints(constraints: Record<string, unknown> | undefined, request: Readonly<Record<string, unknown>>): ConstraintResult;