authhero 9.25.0 → 9.27.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 (91) hide show
  1. package/dist/assets/u/widget/authhero-widget.esm.js +1 -1
  2. package/dist/assets/u/widget/index.esm.js +1 -1
  3. package/dist/assets/u/widget/{p-210f06bf.entry.js → p-ce8560f6.entry.js} +1 -1
  4. package/dist/authhero.cjs +157 -157
  5. package/dist/authhero.d.ts +914 -264
  6. package/dist/authhero.mjs +27723 -25733
  7. package/dist/tsconfig.types.tsbuildinfo +1 -1
  8. package/dist/types/adapters/createEncryptedDataAdapter.d.ts +2 -1
  9. package/dist/types/adapters/index.d.ts +1 -1
  10. package/dist/types/authentication-flows/device-code.d.ts +11 -0
  11. package/dist/types/authentication-flows/passwordless.d.ts +9 -5
  12. package/dist/types/errors/management-api-error.d.ts +113 -0
  13. package/dist/types/generated/locale-types.d.ts +16 -0
  14. package/dist/types/helpers/client.d.ts +8 -0
  15. package/dist/types/helpers/codes-cleanup.d.ts +1 -1
  16. package/dist/types/helpers/control-plane-caller.d.ts +15 -0
  17. package/dist/types/helpers/device-flow.d.ts +25 -0
  18. package/dist/types/helpers/hook-events.d.ts +8 -4
  19. package/dist/types/helpers/hook-user-payload.d.ts +2 -0
  20. package/dist/types/helpers/logging.d.ts +2 -1
  21. package/dist/types/helpers/outbox-destinations/code-hooks.d.ts +8 -3
  22. package/dist/types/helpers/outbox-destinations/webhooks.d.ts +3 -0
  23. package/dist/types/helpers/platform-rows.d.ts +27 -0
  24. package/dist/types/helpers/request-data.d.ts +12 -0
  25. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  26. package/dist/types/helpers/scopes-permissions.d.ts +1 -1
  27. package/dist/types/helpers/synced-rows.d.ts +1 -0
  28. package/dist/types/hooks/lifecycle-codehooks.d.ts +16 -0
  29. package/dist/types/hooks/user-deletion.d.ts +9 -0
  30. package/dist/types/index.d.ts +540 -256
  31. package/dist/types/routes/auth-api/account.d.ts +2 -2
  32. package/dist/types/routes/auth-api/device.d.ts +139 -0
  33. package/dist/types/routes/auth-api/index.d.ts +238 -37
  34. package/dist/types/routes/auth-api/passwordless.d.ts +14 -14
  35. package/dist/types/routes/auth-api/revoke.d.ts +8 -8
  36. package/dist/types/routes/auth-api/token.d.ts +82 -12
  37. package/dist/types/routes/auth-api/well-known.d.ts +3 -1
  38. package/dist/types/routes/management-api/action-executions.d.ts +2 -2
  39. package/dist/types/routes/management-api/action-triggers.d.ts +27 -2
  40. package/dist/types/routes/management-api/actions.d.ts +12 -12
  41. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  42. package/dist/types/routes/management-api/branding.d.ts +4 -4
  43. package/dist/types/routes/management-api/client-grants.d.ts +13 -0
  44. package/dist/types/routes/management-api/clients.d.ts +17 -4
  45. package/dist/types/routes/management-api/connections.d.ts +27 -14
  46. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  47. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  48. package/dist/types/routes/management-api/emails.d.ts +6 -6
  49. package/dist/types/routes/management-api/failed-events.d.ts +2 -2
  50. package/dist/types/routes/management-api/flows.d.ts +8 -8
  51. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  52. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  53. package/dist/types/routes/management-api/hooks.d.ts +42 -42
  54. package/dist/types/routes/management-api/index.d.ts +288 -211
  55. package/dist/types/routes/management-api/keys.d.ts +16 -16
  56. package/dist/types/routes/management-api/log-streams.d.ts +6 -6
  57. package/dist/types/routes/management-api/logs.d.ts +4 -4
  58. package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
  59. package/dist/types/routes/management-api/organizations.d.ts +5 -5
  60. package/dist/types/routes/management-api/prompts.d.ts +8 -8
  61. package/dist/types/routes/management-api/resource-servers.d.ts +21 -8
  62. package/dist/types/routes/management-api/roles.d.ts +1 -1
  63. package/dist/types/routes/management-api/rollouts.d.ts +261 -0
  64. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  65. package/dist/types/routes/management-api/tenant-members-requests.test.d.ts +1 -0
  66. package/dist/types/routes/management-api/tenant-members.d.ts +155 -1
  67. package/dist/types/routes/management-api/tenant-operations.d.ts +17 -10
  68. package/dist/types/routes/management-api/tenants.d.ts +39 -13
  69. package/dist/types/routes/management-api/token-exchange-profiles.d.ts +6 -6
  70. package/dist/types/routes/management-api/users.d.ts +20 -20
  71. package/dist/types/routes/proxy-control-plane/tenant-members.d.ts +11 -0
  72. package/dist/types/routes/scim/index.d.ts +1 -0
  73. package/dist/types/routes/universal-login/common.d.ts +26 -10
  74. package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
  75. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  76. package/dist/types/routes/universal-login/index.d.ts +2 -2
  77. package/dist/types/routes/universal-login/screens/device-flow.d.ts +4 -0
  78. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  79. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  80. package/dist/types/state-machines/login-session.d.ts +6 -1
  81. package/dist/types/tenant-members/request-notifier.d.ts +9 -0
  82. package/dist/types/tenant-members/request-notify.test.d.ts +1 -0
  83. package/dist/types/tenant-members/requests.d.ts +79 -0
  84. package/dist/types/tenant-members/requests.test.d.ts +1 -0
  85. package/dist/types/tenant-members/wire.d.ts +10 -0
  86. package/dist/types/types/AuthHeroConfig.d.ts +47 -1
  87. package/dist/types/types/Bindings.d.ts +2 -1
  88. package/dist/types/types/Variables.d.ts +8 -1
  89. package/dist/types/utils/field-encryption.d.ts +7 -0
  90. package/dist/types/utils/jwks.d.ts +2 -2
  91. package/package.json +6 -6
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
165
165
  $get: {
166
166
  input: {
167
167
  param: {
168
- screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
168
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
169
169
  };
170
170
  } & {
171
171
  query: {
@@ -181,7 +181,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
181
181
  } | {
182
182
  input: {
183
183
  param: {
184
- screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
184
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
185
185
  };
186
186
  } & {
187
187
  query: {
@@ -197,7 +197,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
197
197
  } | {
198
198
  input: {
199
199
  param: {
200
- screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
200
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
201
201
  };
202
202
  } & {
203
203
  query: {
@@ -217,7 +217,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
217
217
  $post: {
218
218
  input: {
219
219
  param: {
220
- screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
220
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
221
221
  };
222
222
  } & {
223
223
  query: {
@@ -235,7 +235,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
235
235
  } | {
236
236
  input: {
237
237
  param: {
238
- screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
238
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
239
239
  };
240
240
  } & {
241
241
  query: {
@@ -170,7 +170,7 @@ export declare const u2Routes: OpenAPIHono<{
170
170
  $get: {
171
171
  input: {
172
172
  param: {
173
- screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
173
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
174
174
  };
175
175
  } & {
176
176
  query: {
@@ -186,7 +186,7 @@ export declare const u2Routes: OpenAPIHono<{
186
186
  } | {
187
187
  input: {
188
188
  param: {
189
- screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
189
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
190
190
  };
191
191
  } & {
192
192
  query: {
@@ -202,7 +202,7 @@ export declare const u2Routes: OpenAPIHono<{
202
202
  } | {
203
203
  input: {
204
204
  param: {
205
- screen: "signup" | "impersonate" | "account" | "consent" | "login" | "reset-password" | "enter-password" | "try-connection-result" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
205
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "account" | "enter-password" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation" | "device/complete";
206
206
  };
207
207
  } & {
208
208
  query: {
@@ -222,7 +222,7 @@ export declare const u2Routes: OpenAPIHono<{
222
222
  $post: {
223
223
  input: {
224
224
  param: {
225
- screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
225
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
226
226
  };
227
227
  } & {
228
228
  query: {
@@ -240,7 +240,7 @@ export declare const u2Routes: OpenAPIHono<{
240
240
  } | {
241
241
  input: {
242
242
  param: {
243
- screen: "signup" | "impersonate" | "consent" | "login" | "reset-password" | "enter-password" | "reset-password/request" | "reset-password/code" | "login/email-verification" | "login/email-verification-sent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant";
243
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "login/email-verification" | "login/email-verification-sent" | "reset-password/code" | "reset-password/request" | "mfa/login-options" | "mfa/totp-challenge" | "mfa/totp-enrollment" | "mfa/phone-challenge" | "mfa/phone-enrollment" | "passkey/challenge" | "passkey/enrollment" | "passkey/enrollment-nudge" | "account/profile" | "account/security" | "account/security/totp-enrollment" | "account/security/phone-enrollment" | "account/linked" | "account/delete" | "account/passkeys" | "connect/start" | "connect/select-tenant" | "device/code" | "device/confirmation";
244
244
  };
245
245
  } & {
246
246
  query: {
@@ -22,6 +22,11 @@ export interface LoginSessionData {
22
22
  inviter_name?: string;
23
23
  roles?: string[];
24
24
  connect?: Record<string, unknown>;
25
+ deviceFlow?: {
26
+ deviceCodeHash?: string;
27
+ userCode?: string;
28
+ ready?: boolean;
29
+ };
25
30
  try_connection_result?: unknown;
26
31
  }
27
32
  /** The on-disk JSON shape stays flat for compatibility with existing sessions. */
@@ -204,7 +209,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
204
209
  }, {
205
210
  type: "passwordResetRequested";
206
211
  params: unknown;
207
- }, never, "pending" | "failed" | "expired" | "authenticated" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation" | "completed", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
212
+ }, never, "pending" | "failed" | "expired" | "completed" | "authenticated" | "awaiting_email_verification" | "awaiting_mfa" | "awaiting_consent" | "awaiting_hook" | "awaiting_continuation", string, import("xstate").NonReducibleUnknown, import("xstate").NonReducibleUnknown, import("xstate").EventObject, import("xstate").MetaObject, {
208
213
  id: "loginSession";
209
214
  states: {
210
215
  readonly pending: {};
@@ -0,0 +1,9 @@
1
+ import type { ControlPlaneClient } from "../helpers/control-plane-client";
2
+ import type { AfterTenantMemberRequestRegistered } from "./requests";
3
+ /**
4
+ * Tells the control plane, over the shared control-plane client, that a
5
+ * request is waiting, and records that it was told. If the control plane is
6
+ * down the request simply stays unnotified and a control-plane sweep finds it
7
+ * later, so this never throws.
8
+ */
9
+ export declare function createControlPlaneRequestNotifier(client: ControlPlaneClient): AfterTenantMemberRequestRegistered;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,79 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ import type { Context } from "hono";
3
+ import type { TenantMemberRequest } from "@authhero/adapter-interfaces";
4
+ import type { Bindings, Variables } from "../types";
5
+ import { TenantMembersBackend } from "./types";
6
+ /** What each kind of request carries in `payload`. */
7
+ export declare const tenantMemberRequestPayloadSchemas: {
8
+ invite: z.ZodObject<{
9
+ invitee: z.ZodObject<{
10
+ email: z.ZodString;
11
+ }, z.core.$strip>;
12
+ inviter: z.ZodDefault<z.ZodObject<{
13
+ name: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>>;
15
+ roles: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString>>>;
16
+ send_invitation_email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
17
+ ttl_sec: z.ZodOptional<z.ZodNumber>;
18
+ }, z.core.$strip>;
19
+ add_members: z.ZodObject<{
20
+ user_ids: z.ZodArray<z.ZodString>;
21
+ }, z.core.$strip>;
22
+ remove_members: z.ZodObject<{
23
+ user_ids: z.ZodArray<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ assign_roles: z.ZodObject<{
26
+ user_id: z.ZodString;
27
+ roles: z.ZodArray<z.ZodString>;
28
+ }, z.core.$strip>;
29
+ remove_roles: z.ZodObject<{
30
+ user_id: z.ZodString;
31
+ roles: z.ZodArray<z.ZodString>;
32
+ }, z.core.$strip>;
33
+ revoke_invitation: z.ZodObject<{
34
+ invitation_id: z.ZodString;
35
+ }, z.core.$strip>;
36
+ };
37
+ type Ctx = Context<{
38
+ Bindings: Bindings;
39
+ Variables: Variables;
40
+ }>;
41
+ /**
42
+ * What a deployment does once a request is stored, given the stored row. A
43
+ * shard tells the control plane (`createControlPlaneRequestNotifier`), a
44
+ * single-instance deployment runs it right away. A failure here never fails
45
+ * the registration: the request stays `pending` and is picked up later.
46
+ */
47
+ export type AfterTenantMemberRequestRegistered = (ctx: Ctx, request: TenantMemberRequest) => Promise<void>;
48
+ export interface TenantMemberRequestsConfig {
49
+ afterRegister?: AfterTenantMemberRequestRegistered;
50
+ }
51
+ /**
52
+ * The request cannot be carried out, for a reason an admin may read: it is not
53
+ * a failure of the system, so it is not retried.
54
+ */
55
+ export declare class TenantMemberRequestRejected extends Error {
56
+ constructor(reason: string);
57
+ }
58
+ export interface ExecuteTenantMemberRequestOptions {
59
+ /**
60
+ * Whether the requester may still change this tenant's team. Defaults to
61
+ * holding at least one role in the tenant's organization.
62
+ */
63
+ isRequesterAllowed?: (backend: TenantMembersBackend, tenantId: string, userId: string) => Promise<boolean>;
64
+ }
65
+ /**
66
+ * Carries out one request against the control-plane team of its tenant.
67
+ *
68
+ * `tenantId` is the tenant the caller proved it speaks for (the verified
69
+ * service token's `tenant_id`); a request that names another tenant is
70
+ * refused. The requester is checked again here because the request may have
71
+ * waited a while. Running it twice is safe: membership and role changes are
72
+ * idempotent, and an invitation that was already created for the same address
73
+ * is reused instead of created again.
74
+ *
75
+ * Returns what the request produced, to store on the row. Throws
76
+ * {@link TenantMemberRequestRejected} when it must not or cannot run.
77
+ */
78
+ export declare function executeTenantMemberRequest(backend: TenantMembersBackend, tenantId: string, request: Pick<TenantMemberRequest, "tenant_id" | "kind" | "requested_by" | "payload" | "result">, options?: ExecuteTenantMemberRequestOptions): Promise<Record<string, unknown> | null>;
79
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -26,3 +26,13 @@ export declare const createInvitationBodySchema: z.ZodObject<{
26
26
  ttl_sec: z.ZodOptional<z.ZodNumber>;
27
27
  tenant_id: z.ZodOptional<z.ZodString>;
28
28
  }, z.core.$strip>;
29
+ /**
30
+ * A shard tells the control plane that a team-change request is waiting
31
+ * (issue #1550). Only the id travels: the control plane reads the request from
32
+ * the shard, so what was asked never rests on what the notification claims.
33
+ */
34
+ export declare const CONTROL_PLANE_TENANT_MEMBER_REQUESTS_NOTIFY_PATH = "/api/v2/proxy/control-plane/tenant-members/requests/notify";
35
+ export declare const notifyMemberRequestBodySchema: z.ZodObject<{
36
+ request_id: z.ZodString;
37
+ tenant_id: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>;
@@ -1,4 +1,4 @@
1
- import { CodeExecutor, Connection, ConnectionInsert, CreateTenantParams, DataAdapters, Hook, ResourceServer, ResourceServerInsert, Role, RoleInsert, Tenant, TenantOperation, TenantOperationKind } from "@authhero/adapter-interfaces";
1
+ import { Action, ActionInsert, ActionUpdate, CodeExecutor, Connection, ConnectionInsert, CreateTenantParams, DataAdapters, Hook, HookCode, HookCodeInsert, HookInsert, ResourceServer, ResourceServerInsert, Role, RoleInsert, Rollout, Tenant, TenantOperation, TenantOperationKind } from "@authhero/adapter-interfaces";
2
2
  import type { RolePermissionHooks, Hooks } from "./Hooks";
3
3
  import type { OutboxMetricsSink } from "./OutboxMetrics";
4
4
  import type { SamlSigner } from "@authhero/saml/core";
@@ -102,6 +102,9 @@ export interface EntityHooksConfig {
102
102
  rolePermissions?: (RolePermissionHooks | undefined)[];
103
103
  connections?: (EntityHooks<Connection, ConnectionInsert> | undefined)[];
104
104
  tenants?: (EntityHooks<Tenant, CreateTenantParams> | undefined)[];
105
+ actions?: (EntityHooks<Action, ActionInsert, ActionUpdate> | undefined)[];
106
+ hooks?: (EntityHooks<Hook, HookInsert> | undefined)[];
107
+ hookCode?: (EntityHooks<HookCode, HookCodeInsert> | undefined)[];
105
108
  }
106
109
  /**
107
110
  * Route extension for the management API.
@@ -126,12 +129,39 @@ export interface ManagementApiExtension {
126
129
  * resolve as soon as the run is enqueued — clients poll
127
130
  * `GET /api/v2/operations/{id}`.
128
131
  */
132
+ /**
133
+ * Creates and controls fleet rollouts of synced config (issue #1499). Kept
134
+ * structural, like {@link TenantOperationExecutorBinding}: the multi-tenancy
135
+ * package's `createRolloutController` satisfies it.
136
+ */
137
+ export interface RolloutControllerBinding {
138
+ create(params: {
139
+ rootTenantId?: string;
140
+ tenantIds?: string[];
141
+ canary?: number;
142
+ waves?: number[];
143
+ failureThreshold?: number;
144
+ maxConcurrent?: number;
145
+ dryRun?: boolean;
146
+ force?: boolean;
147
+ initiatedBy?: string;
148
+ }): Promise<Rollout>;
149
+ pause(id: string, reason?: string): Promise<Rollout | null>;
150
+ resume(id: string): Promise<Rollout | null>;
151
+ }
129
152
  export interface TenantOperationExecutorBinding {
130
153
  engine: string;
154
+ /**
155
+ * The kinds this executor can run. Absent means any. A request for another
156
+ * kind is answered `501` without creating an operation.
157
+ */
158
+ kinds?: readonly TenantOperationKind[];
131
159
  enqueue(params: {
132
160
  kind: TenantOperationKind;
133
161
  tenant_id: string | null;
134
162
  initiated_by?: string;
163
+ /** Kind-specific parameters, fixed at creation. Never contains secrets. */
164
+ input?: Record<string, unknown>;
135
165
  }): Promise<TenantOperation>;
136
166
  }
137
167
  /**
@@ -452,6 +482,16 @@ export interface AuthHeroConfig {
452
482
  */
453
483
  tenantMembers?: {
454
484
  getBackend: import("../routes/management-api/tenant-members").GetTenantMembersBackend;
485
+ /**
486
+ * Register team changes as requests instead of making them in the request
487
+ * (issue #1550). Needs `tenantMemberRequests` on the data adapter. A write
488
+ * then answers `202` with the request id, `GET /tenant-members/requests`
489
+ * lists them, and `afterRegister` decides what happens next: a shard tells
490
+ * the control plane (`createControlPlaneRequestNotifier`), a
491
+ * single-instance deployment runs the request right away. Unset keeps the
492
+ * synchronous writes.
493
+ */
494
+ requests?: import("../tenant-members/requests").TenantMemberRequestsConfig;
455
495
  };
456
496
  /**
457
497
  * Optional outbox-driven replication of `proxy_routes` mutations to a global
@@ -537,6 +577,12 @@ export interface AuthHeroConfig {
537
577
  * satisfy this shape.
538
578
  */
539
579
  tenantOperationExecutor?: TenantOperationExecutorBinding;
580
+ /**
581
+ * Creates and controls fleet rollouts of synced config. Drives
582
+ * `POST /api/v2/rollouts` and the pause and resume routes; reading rollouts
583
+ * only needs the `rollouts` adapter.
584
+ */
585
+ rolloutController?: RolloutControllerBinding;
540
586
  /**
541
587
  * Maximum accepted size of a bulk user-import file, in bytes
542
588
  * (`POST /api/v2/jobs/users-imports`). Defaults to Auth0's documented
@@ -2,7 +2,7 @@ import type { SigningCertificateAuthority } from "../helpers/signing-certificate
2
2
  import { CodeExecutor, DataAdapters } from "@authhero/adapter-interfaces";
3
3
  import type { SamlSigner } from "@authhero/saml/core";
4
4
  import { Hooks } from "./Hooks";
5
- import { ActionExecutionLogCapture, EntityHooksConfig, McpConfig, OutboxConfig, SigningKeyModeOption, TenantOperationExecutorBinding, UserLinkingModeOption, UsernamePasswordProviderResolver, WebhookInvoker } from "./AuthHeroConfig";
5
+ import { ActionExecutionLogCapture, EntityHooksConfig, McpConfig, OutboxConfig, SigningKeyModeOption, RolloutControllerBinding, TenantOperationExecutorBinding, UserLinkingModeOption, UsernamePasswordProviderResolver, WebhookInvoker } from "./AuthHeroConfig";
6
6
  import { StrategyHandler } from "../strategies";
7
7
  export type Bindings = {
8
8
  ENVIRONMENT: string;
@@ -42,6 +42,7 @@ export type Bindings = {
42
42
  webhookInvoker?: WebhookInvoker;
43
43
  tenantUpgrade?: (tenantId: string) => Promise<void>;
44
44
  tenantOperationExecutor?: TenantOperationExecutorBinding;
45
+ rolloutController?: RolloutControllerBinding;
45
46
  usersImportMaxBytes?: number;
46
47
  usersImportMaxConcurrentJobs?: number;
47
48
  unsafeAllowAzpCustomClaim?: boolean;
@@ -1,4 +1,4 @@
1
- import { DataAdapters, LoginSession } from "@authhero/adapter-interfaces";
1
+ import { DataAdapters, LoginSession, RequestAuth } from "@authhero/adapter-interfaces";
2
2
  import { CountryCode } from "libphonenumber-js";
3
3
  import { Auth0Client } from "./Auth0Client";
4
4
  import type { PreferState } from "../middlewares/prefer";
@@ -29,11 +29,18 @@ export type Variables = {
29
29
  * twice. Read it through `getBaseData`.
30
30
  */
31
31
  baseData?: DataAdapters;
32
+ /**
33
+ * Management API only: the request stack before platform-scoped rows are
34
+ * hidden from it. Code-hook execution reads this; see `getExecutorData`.
35
+ */
36
+ executorData?: DataAdapters;
32
37
  tenant_id: string;
33
38
  ip: string;
34
39
  client_id?: string;
35
40
  user_id?: string;
36
41
  username?: string;
42
+ /** Verified account-session caller, captured before account mutations. */
43
+ sessionAuth?: RequestAuth;
37
44
  connection?: string;
38
45
  body?: any;
39
46
  /**
@@ -42,6 +42,13 @@ export declare function decryptField(value: string, key: CryptoKey): Promise<str
42
42
  * ring's default key and is byte-compatible with `encryptField` (legacy form).
43
43
  */
44
44
  export declare function encryptFieldWithRing(plaintext: string, ring: KeyRing, keyId?: string): Promise<EncryptedField>;
45
+ /**
46
+ * Whether `ring` can decrypt `value`. Plaintext values are trivially readable.
47
+ * For ciphertext this checks that the key id embedded in it is in the ring and
48
+ * that decryption succeeds (a key can be present but wrong). Never throws and
49
+ * never returns the plaintext.
50
+ */
51
+ export declare function canDecrypt(value: string, ring: KeyRing): Promise<boolean>;
45
52
  /**
46
53
  * Decrypts a value using a key ring, selecting the key from the id embedded in
47
54
  * the ciphertext (or the default key for legacy unkeyed values). Plaintext
@@ -9,7 +9,7 @@ import { CertificateIssuer } from "../helpers/signing-certificate-authority";
9
9
  */
10
10
  export declare function getJwksForPublication(data: DataAdapters, tenantId: string, modeOption: SigningKeyModeOption | undefined, certificateIssuer?: CertificateIssuer): Promise<{
11
11
  kty: "EC" | "RSA" | "oct";
12
- alg?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | undefined;
12
+ alg?: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "HS256" | "HS384" | "HS512" | undefined;
13
13
  kid?: string | undefined;
14
14
  use?: "sig" | "enc" | undefined;
15
15
  n?: string | undefined;
@@ -29,7 +29,7 @@ export declare function getJwksForPublication(data: DataAdapters, tenantId: stri
29
29
  */
30
30
  export declare function getJwksForVerification(data: DataAdapters, tenantId: string | undefined, modeOption: SigningKeyModeOption | undefined): Promise<{
31
31
  kty: "EC" | "RSA" | "oct";
32
- alg?: "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | undefined;
32
+ alg?: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "HS256" | "HS384" | "HS512" | undefined;
33
33
  kid?: string | undefined;
34
34
  use?: "sig" | "enc" | undefined;
35
35
  n?: string | undefined;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/sesamyab/authhero"
13
13
  },
14
- "version": "9.25.0",
14
+ "version": "9.27.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -63,8 +63,8 @@
63
63
  "vite": "^8.0.14",
64
64
  "vite-plugin-dts": "^4.5.4",
65
65
  "vitest": "^4.1.7",
66
- "@authhero/kysely-adapter": "12.16.0",
67
- "@authhero/widget": "0.41.4"
66
+ "@authhero/kysely-adapter": "12.18.0",
67
+ "@authhero/widget": "0.41.7"
68
68
  },
69
69
  "dependencies": {
70
70
  "@peculiar/x509": "^1.14.3",
@@ -80,9 +80,9 @@
80
80
  "qrcode": "^1.5.4",
81
81
  "sanitize-html": "^2.17.4",
82
82
  "xstate": "^5.31.1",
83
- "@authhero/adapter-interfaces": "4.22.0",
84
- "@authhero/proxy": "0.11.8",
85
- "@authhero/saml": "0.6.1"
83
+ "@authhero/adapter-interfaces": "4.24.0",
84
+ "@authhero/proxy": "0.11.10",
85
+ "@authhero/saml": "0.6.3"
86
86
  },
87
87
  "peerDependencies": {
88
88
  "@authhero/widget": "^0.1.0",