authhero 9.9.1 → 9.11.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 (64) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +145 -145
  3. package/dist/authhero.d.ts +585 -190
  4. package/dist/authhero.mjs +15529 -14313
  5. package/dist/tsconfig.types.tsbuildinfo +1 -1
  6. package/dist/types/authentication-flows/authorization-code.d.ts +2 -1
  7. package/dist/types/authentication-flows/client-credentials.d.ts +2 -1
  8. package/dist/types/authentication-flows/passwordless.d.ts +6 -5
  9. package/dist/types/authentication-flows/refresh-token.d.ts +2 -1
  10. package/dist/types/authentication-flows/token-exchange.d.ts +2 -1
  11. package/dist/types/helpers/client-assertion-replay.d.ts +21 -0
  12. package/dist/types/helpers/client-assertion.d.ts +24 -2
  13. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  14. package/dist/types/helpers/default-destinations.d.ts +7 -1
  15. package/dist/types/helpers/outbox-destinations/index.d.ts +1 -0
  16. package/dist/types/helpers/outbox-destinations/pipeline.d.ts +63 -0
  17. package/dist/types/helpers/outbox-relay.d.ts +3 -0
  18. package/dist/types/helpers/reserved-claims.d.ts +64 -0
  19. package/dist/types/helpers/run-outbox-relay.d.ts +8 -0
  20. package/dist/types/helpers/run-retention.d.ts +5 -0
  21. package/dist/types/helpers/users-import/map.d.ts +128 -0
  22. package/dist/types/helpers/users-import/process.d.ts +95 -0
  23. package/dist/types/helpers/users-import-cleanup.d.ts +26 -0
  24. package/dist/types/index.d.ts +321 -185
  25. package/dist/types/routes/auth-api/index.d.ts +44 -44
  26. package/dist/types/routes/auth-api/passwordless.d.ts +14 -14
  27. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  28. package/dist/types/routes/auth-api/token.d.ts +24 -24
  29. package/dist/types/routes/management-api/action-triggers.d.ts +0 -2
  30. package/dist/types/routes/management-api/actions.d.ts +0 -7
  31. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  32. package/dist/types/routes/management-api/branding.d.ts +1 -1
  33. package/dist/types/routes/management-api/client-grants.d.ts +9 -9
  34. package/dist/types/routes/management-api/clients.d.ts +8 -8
  35. package/dist/types/routes/management-api/connections.d.ts +1 -1
  36. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  37. package/dist/types/routes/management-api/failed-events.d.ts +22 -2
  38. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  39. package/dist/types/routes/management-api/helpers.d.ts +1 -1
  40. package/dist/types/routes/management-api/index.d.ts +216 -86
  41. package/dist/types/routes/management-api/jobs.d.ts +133 -0
  42. package/dist/types/routes/management-api/keys.d.ts +16 -16
  43. package/dist/types/routes/management-api/logs.d.ts +4 -4
  44. package/dist/types/routes/management-api/migration-sources.d.ts +6 -6
  45. package/dist/types/routes/management-api/organizations.d.ts +2 -2
  46. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  47. package/dist/types/routes/management-api/roles.d.ts +1 -1
  48. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  49. package/dist/types/routes/management-api/tenant-operations.d.ts +33 -9
  50. package/dist/types/routes/management-api/tenants.d.ts +11 -11
  51. package/dist/types/routes/management-api/users.d.ts +24 -24
  52. package/dist/types/routes/universal-login/common.d.ts +2 -2
  53. package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
  54. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  55. package/dist/types/routes/universal-login/index.d.ts +2 -2
  56. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  57. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  58. package/dist/types/state-machines/login-session.d.ts +1 -1
  59. package/dist/types/types/AuthHeroConfig.d.ts +40 -0
  60. package/dist/types/types/Bindings.d.ts +14 -0
  61. package/dist/types/types/OutboxMetrics.d.ts +47 -0
  62. package/dist/types/types/auth0/UserImport.d.ts +317 -0
  63. package/dist/types/types/index.d.ts +1 -0
  64. package/package.json +6 -6
@@ -818,11 +818,10 @@ export declare const userRoutes: OpenAPIHono<{
818
818
  };
819
819
  output: {
820
820
  created_at: string;
821
- user_id: string;
821
+ id: string;
822
822
  client_id: string;
823
+ user_id: string;
823
824
  rotating: boolean;
824
- id: string;
825
- login_id: string;
826
825
  device: {
827
826
  initial_user_agent: string;
828
827
  initial_ip: string;
@@ -831,32 +830,29 @@ export declare const userRoutes: OpenAPIHono<{
831
830
  last_ip: string;
832
831
  last_asn: string;
833
832
  };
833
+ login_id: string;
834
834
  resource_servers: {
835
835
  audience: string;
836
836
  scopes: string;
837
837
  }[];
838
+ revoked_at?: string | undefined;
838
839
  expires_at?: string | undefined;
840
+ idle_expires_at?: string | undefined;
839
841
  session_id?: string | undefined;
842
+ organization?: string | undefined;
840
843
  auth_connection?: string | undefined;
841
844
  auth_strategy?: {
842
845
  strategy: string;
843
846
  strategy_type: string;
844
847
  } | undefined;
845
- organization?: string | undefined;
846
- revoked_at?: string | undefined;
847
- idle_expires_at?: string | undefined;
848
848
  last_exchanged_at?: string | undefined;
849
849
  }[] | {
850
- start: number;
851
- limit: number;
852
- length: number;
853
850
  tokens: {
854
851
  created_at: string;
855
- user_id: string;
852
+ id: string;
856
853
  client_id: string;
854
+ user_id: string;
857
855
  rotating: boolean;
858
- id: string;
859
- login_id: string;
860
856
  device: {
861
857
  initial_user_agent: string;
862
858
  initial_ip: string;
@@ -865,32 +861,34 @@ export declare const userRoutes: OpenAPIHono<{
865
861
  last_ip: string;
866
862
  last_asn: string;
867
863
  };
864
+ login_id: string;
868
865
  resource_servers: {
869
866
  audience: string;
870
867
  scopes: string;
871
868
  }[];
869
+ revoked_at?: string | undefined;
872
870
  expires_at?: string | undefined;
871
+ idle_expires_at?: string | undefined;
873
872
  session_id?: string | undefined;
873
+ organization?: string | undefined;
874
874
  auth_connection?: string | undefined;
875
875
  auth_strategy?: {
876
876
  strategy: string;
877
877
  strategy_type: string;
878
878
  } | undefined;
879
- organization?: string | undefined;
880
- revoked_at?: string | undefined;
881
- idle_expires_at?: string | undefined;
882
879
  last_exchanged_at?: string | undefined;
883
880
  }[];
884
- total?: number | undefined;
885
881
  next?: string | undefined;
886
882
  } | {
883
+ start: number;
884
+ limit: number;
885
+ length: number;
887
886
  tokens: {
888
887
  created_at: string;
889
- user_id: string;
888
+ id: string;
890
889
  client_id: string;
890
+ user_id: string;
891
891
  rotating: boolean;
892
- id: string;
893
- login_id: string;
894
892
  device: {
895
893
  initial_user_agent: string;
896
894
  initial_ip: string;
@@ -899,22 +897,24 @@ export declare const userRoutes: OpenAPIHono<{
899
897
  last_ip: string;
900
898
  last_asn: string;
901
899
  };
900
+ login_id: string;
902
901
  resource_servers: {
903
902
  audience: string;
904
903
  scopes: string;
905
904
  }[];
905
+ revoked_at?: string | undefined;
906
906
  expires_at?: string | undefined;
907
+ idle_expires_at?: string | undefined;
907
908
  session_id?: string | undefined;
909
+ organization?: string | undefined;
908
910
  auth_connection?: string | undefined;
909
911
  auth_strategy?: {
910
912
  strategy: string;
911
913
  strategy_type: string;
912
914
  } | undefined;
913
- organization?: string | undefined;
914
- revoked_at?: string | undefined;
915
- idle_expires_at?: string | undefined;
916
915
  last_exchanged_at?: string | undefined;
917
916
  }[];
917
+ total?: number | undefined;
918
918
  next?: string | undefined;
919
919
  };
920
920
  outputFormat: "json";
@@ -963,7 +963,7 @@ export declare const userRoutes: OpenAPIHono<{
963
963
  };
964
964
  };
965
965
  output: {
966
- type: "fs" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
966
+ type: "fn" | "i" | "sui" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
967
967
  date: string;
968
968
  isMobile: boolean;
969
969
  log_id: string;
@@ -1002,7 +1002,7 @@ export declare const userRoutes: OpenAPIHono<{
1002
1002
  limit: number;
1003
1003
  length: number;
1004
1004
  logs: {
1005
- type: "fs" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "fn" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "i" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sui" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
1005
+ type: "fn" | "i" | "sui" | "acls_summary" | "actions_execution_failed" | "api_limit" | "api_limit_warning" | "appi" | "ciba_exchange_failed" | "ciba_exchange_succeeded" | "ciba_start_failed" | "ciba_start_succeeded" | "cls" | "cs" | "depnote" | "f" | "fc" | "fce" | "fco" | "fcoa" | "fcp" | "fcph" | "fcpn" | "fcpr" | "fcpro" | "fcu" | "fd" | "fdeac" | "fdeaz" | "fdecc" | "fdu" | "feacft" | "feccft" | "fecte" | "fede" | "federated_logout_failed" | "fens" | "feoobft" | "feotpft" | "fepft" | "fepotpft" | "fercft" | "ferrt" | "fertft" | "festft" | "fh" | "fimp" | "fi" | "flo" | "flows_execution_completed" | "flows_execution_failed" | "forms_submission_failed" | "forms_submission_succeeded" | "fp" | "fpar" | "fpurh" | "fs" | "fsa" | "fu" | "fui" | "fv" | "fvr" | "gd_auth_email_verification" | "gd_auth_fail_email_verification" | "gd_auth_failed" | "gd_auth_rejected" | "gd_auth_succeed" | "gd_enrollment_complete" | "gd_otp_rate_limit_exceed" | "gd_recovery_failed" | "gd_recovery_rate_limit_exceed" | "gd_recovery_succeed" | "gd_send_email" | "gd_send_email_verification" | "gd_send_email_verification_failure" | "gd_send_pn" | "gd_send_pn_failure" | "gd_send_sms" | "gd_send_sms_failure" | "gd_send_voice" | "gd_send_voice_failure" | "gd_start_auth" | "gd_start_enroll" | "gd_start_enroll_failed" | "gd_tenant_update" | "gd_unenroll" | "gd_update_device_account" | "gd_webauthn_challenge_failed" | "gd_webauthn_enrollment_failed" | "kms_key_management_failure" | "kms_key_management_success" | "kms_key_state_changed" | "limit_delegation" | "limit_mu" | "limit_sul" | "limit_wc" | "mfar" | "mgmt_api_read" | "my_account_authentication_method_failed" | "my_account_authentication_method_succeeded" | "oidc_backchannel_logout_failed" | "oidc_backchannel_logout_succeeded" | "organization_member_added" | "passkey_challenge_failed" | "passkey_challenge_started" | "pla" | "pwd_leak" | "reset_pwd_leak" | "resource_cleanup" | "rich_consents_access_error" | "s" | "sapi" | "fapi" | "sce" | "scoa" | "scp" | "scpn" | "scpr" | "scu" | "scv" | "sd" | "sdu" | "seacft" | "seccft" | "secte" | "sede" | "sens" | "seoobft" | "seotpft" | "sepotpft" | "sepft" | "sepkoobft" | "sepkotpft" | "sepkrcft" | "sercft" | "sertft" | "sestft" | "simp" | "si" | "signup_pwd_leak" | "slo" | "sh" | "spm" | "srrt" | "ss" | "ss_sso_failure" | "ss_sso_info" | "ss_sso_success" | "ssa" | "sscim" | "sv" | "svr" | "too_many_records" | "ublkdu" | "universal_logout_failed" | "universal_logout_succeeded" | "w" | "wn" | "wum";
1006
1006
  date: string;
1007
1007
  isMobile: boolean;
1008
1008
  log_id: string;
@@ -460,7 +460,7 @@ export declare function initJSXRoute(ctx: Context<{
460
460
  custom_login_page_preview?: string | undefined;
461
461
  form_template?: string | undefined;
462
462
  addons?: Record<string, any> | undefined;
463
- token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
463
+ token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
464
464
  client_metadata?: Record<string, string> | undefined;
465
465
  hide_sign_up_disabled_error?: boolean | undefined;
466
466
  mobile?: Record<string, any> | undefined;
@@ -1193,7 +1193,7 @@ export declare function initJSXRouteWithSession(ctx: Context<{
1193
1193
  custom_login_page_preview?: string | undefined;
1194
1194
  form_template?: string | undefined;
1195
1195
  addons?: Record<string, any> | undefined;
1196
- token_endpoint_auth_method?: "none" | "client_secret_post" | "client_secret_basic" | "client_secret_jwt" | "private_key_jwt" | undefined;
1196
+ token_endpoint_auth_method?: "client_secret_post" | "client_secret_basic" | "none" | "client_secret_jwt" | "private_key_jwt" | undefined;
1197
1197
  client_metadata?: Record<string, string> | undefined;
1198
1198
  hide_sign_up_disabled_error?: boolean | undefined;
1199
1199
  mobile?: Record<string, any> | undefined;
@@ -27,7 +27,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
27
27
  output: {
28
28
  screen: {
29
29
  action: string;
30
- method: "POST" | "GET";
30
+ method: "GET" | "POST";
31
31
  components: {
32
32
  id: string;
33
33
  type: string;
@@ -43,7 +43,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
43
43
  hint?: string | undefined;
44
44
  messages?: {
45
45
  text: string;
46
- type: "success" | "error" | "info" | "warning";
46
+ type: "error" | "success" | "info" | "warning";
47
47
  id?: number | undefined;
48
48
  }[] | undefined;
49
49
  }[];
@@ -51,7 +51,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
51
51
  description?: string | undefined;
52
52
  messages?: {
53
53
  text: string;
54
- type: "success" | "error" | "info" | "warning";
54
+ type: "error" | "success" | "info" | "warning";
55
55
  id?: number | undefined;
56
56
  }[] | undefined;
57
57
  links?: {
@@ -107,7 +107,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
107
107
  output: {
108
108
  screen: {
109
109
  action: string;
110
- method: "POST" | "GET";
110
+ method: "GET" | "POST";
111
111
  components: {
112
112
  id: string;
113
113
  type: string;
@@ -123,7 +123,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
123
123
  hint?: string | undefined;
124
124
  messages?: {
125
125
  text: string;
126
- type: "success" | "error" | "info" | "warning";
126
+ type: "error" | "success" | "info" | "warning";
127
127
  id?: number | undefined;
128
128
  }[] | undefined;
129
129
  }[];
@@ -131,7 +131,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
131
131
  description?: string | undefined;
132
132
  messages?: {
133
133
  text: string;
134
- type: "success" | "error" | "info" | "warning";
134
+ type: "error" | "success" | "info" | "warning";
135
135
  id?: number | undefined;
136
136
  }[] | undefined;
137
137
  links?: {
@@ -204,7 +204,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
204
204
  output: {
205
205
  screen: {
206
206
  action: string;
207
- method: "POST" | "GET";
207
+ method: "GET" | "POST";
208
208
  components: {
209
209
  id: string;
210
210
  type: string;
@@ -220,7 +220,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
220
220
  hint?: string | undefined;
221
221
  messages?: {
222
222
  text: string;
223
- type: "success" | "error" | "info" | "warning";
223
+ type: "error" | "success" | "info" | "warning";
224
224
  id?: number | undefined;
225
225
  }[] | undefined;
226
226
  }[];
@@ -228,7 +228,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
228
228
  description?: string | undefined;
229
229
  messages?: {
230
230
  text: string;
231
- type: "success" | "error" | "info" | "warning";
231
+ type: "error" | "success" | "info" | "warning";
232
232
  id?: number | undefined;
233
233
  }[] | undefined;
234
234
  links?: {
@@ -319,7 +319,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
319
319
  output: {
320
320
  screen: {
321
321
  action: string;
322
- method: "POST" | "GET";
322
+ method: "GET" | "POST";
323
323
  components: {
324
324
  id: string;
325
325
  type: string;
@@ -335,7 +335,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
335
335
  hint?: string | undefined;
336
336
  messages?: {
337
337
  text: string;
338
- type: "success" | "error" | "info" | "warning";
338
+ type: "error" | "success" | "info" | "warning";
339
339
  id?: number | undefined;
340
340
  }[] | undefined;
341
341
  }[];
@@ -343,7 +343,7 @@ export declare const flowApiRoutes: OpenAPIHono<{
343
343
  description?: string | undefined;
344
344
  messages?: {
345
345
  text: string;
346
- type: "success" | "error" | "info" | "warning";
346
+ type: "error" | "success" | "info" | "warning";
347
347
  id?: number | undefined;
348
348
  }[] | undefined;
349
349
  links?: {
@@ -30,7 +30,7 @@ export declare const identifierRoutes: OpenAPIHono<{
30
30
  } & {
31
31
  form: {
32
32
  username: string;
33
- login_selection?: "password" | "code" | undefined;
33
+ login_selection?: "code" | "password" | undefined;
34
34
  };
35
35
  };
36
36
  output: {};
@@ -44,7 +44,7 @@ export declare const identifierRoutes: OpenAPIHono<{
44
44
  } & {
45
45
  form: {
46
46
  username: string;
47
- login_selection?: "password" | "code" | undefined;
47
+ login_selection?: "code" | "password" | undefined;
48
48
  };
49
49
  };
50
50
  output: {};
@@ -515,7 +515,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
515
515
  } & {
516
516
  form: {
517
517
  username: string;
518
- login_selection?: "password" | "code" | undefined;
518
+ login_selection?: "code" | "password" | undefined;
519
519
  };
520
520
  };
521
521
  output: {};
@@ -529,7 +529,7 @@ export default function create(config: AuthHeroConfig): OpenAPIHono<{
529
529
  } & {
530
530
  form: {
531
531
  username: string;
532
- login_selection?: "password" | "code" | undefined;
532
+ login_selection?: "code" | "password" | undefined;
533
533
  };
534
534
  };
535
535
  output: {};
@@ -165,7 +165,7 @@ export default function createU2App(config: AuthHeroConfig): OpenAPIHono<{
165
165
  $get: {
166
166
  input: {
167
167
  param: {
168
- screen: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "account" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "account" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "account" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
220
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
238
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "account" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "account" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "account" | "consent" | "try-connection-result" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
225
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
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: "login" | "signup" | "enter-password" | "reset-password" | "impersonate" | "consent" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
243
+ screen: "impersonate" | "signup" | "login" | "reset-password" | "consent" | "enter-password" | "login/identifier" | "login/email-otp-challenge" | "login/sms-otp-challenge" | "login/login-passwordless-identifier" | "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";
244
244
  };
245
245
  } & {
246
246
  query: {
@@ -140,7 +140,7 @@ export declare const loginSessionMachine: import("xstate").StateMachine<LoginSes
140
140
  } | {
141
141
  type: "setFailureReason";
142
142
  params: import("xstate").NonReducibleUnknown;
143
- }, never, 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, {
143
+ }, never, never, "pending" | "failed" | "completed" | "expired" | "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, {
144
144
  id: "loginSession";
145
145
  states: {
146
146
  readonly pending: {};
@@ -1,5 +1,6 @@
1
1
  import { CodeExecutor, Connection, ConnectionInsert, CreateTenantParams, DataAdapters, Hook, ResourceServer, ResourceServerInsert, Role, RoleInsert, Tenant, TenantOperation, TenantOperationKind } from "@authhero/adapter-interfaces";
2
2
  import type { RolePermissionHooks, Hooks } from "./Hooks";
3
+ import type { OutboxMetricsSink } from "./OutboxMetrics";
3
4
  import type { SamlSigner } from "@authhero/saml/core";
4
5
  import type { OpenAPIHono } from "@hono/zod-openapi";
5
6
  import type { Handler, MiddlewareHandler } from "hono";
@@ -127,6 +128,32 @@ export interface OutboxConfig {
127
128
  retentionDays?: number;
128
129
  /** Max delivery retries before giving up on an event (default: 5) */
129
130
  maxRetries?: number;
131
+ /**
132
+ * Optional sink for relay metrics (`outbox_events_processed_total`,
133
+ * `outbox_events_dead_lettered_total`, `outbox_retry_delay_seconds`).
134
+ * Left unset, the relay emits nothing beyond its existing console logging.
135
+ */
136
+ metrics?: OutboxMetricsSink;
137
+ /**
138
+ * When set, audit events are additionally archived to a Cloudflare Pipelines
139
+ * stream, which lands them in R2 as an Iceberg table. Left unset, no archive
140
+ * destination is registered and delivery is unchanged.
141
+ *
142
+ * See `apps/docs/architecture/audit-archive.md`.
143
+ */
144
+ pipeline?: OutboxPipelineConfig;
145
+ }
146
+ export interface OutboxPipelineConfig {
147
+ /**
148
+ * Stream HTTP ingest endpoint, e.g. `https://<stream-id>.ingest.cloudflare.com`.
149
+ * Must be https — the destination rejects any other scheme at startup, since
150
+ * every request carries the ingest token and a full audit event.
151
+ */
152
+ endpoint: string;
153
+ /** Stream ingest token, sent as `Authorization: Bearer`. */
154
+ token: string;
155
+ /** Per-request timeout in ms (default: 10_000). */
156
+ timeoutMs?: number;
130
157
  }
131
158
  /**
132
159
  * Mode for the built-in email-based user linking path.
@@ -457,6 +484,19 @@ export interface AuthHeroConfig {
457
484
  * satisfy this shape.
458
485
  */
459
486
  tenantOperationExecutor?: TenantOperationExecutorBinding;
487
+ /**
488
+ * Maximum accepted size of a bulk user-import file, in bytes
489
+ * (`POST /api/v2/jobs/users-imports`). Defaults to Auth0's documented
490
+ * 500 KB, so any Auth0-shaped client sees identical behaviour. Raise it
491
+ * only for a migration you control end to end — a larger file means more
492
+ * rows staged inside a single request.
493
+ */
494
+ usersImportMaxBytes?: number;
495
+ /**
496
+ * Maximum bulk user-import jobs a single tenant may have in flight.
497
+ * Defaults to Auth0's limit of 2; further submissions get a 429.
498
+ */
499
+ usersImportMaxConcurrentJobs?: number;
460
500
  /**
461
501
  * Optional powered-by logo to display at the bottom left of the login widget.
462
502
  * This is only configurable in code, not stored in the database.
@@ -35,6 +35,8 @@ export type Bindings = {
35
35
  webhookInvoker?: WebhookInvoker;
36
36
  tenantUpgrade?: (tenantId: string) => Promise<void>;
37
37
  tenantOperationExecutor?: TenantOperationExecutorBinding;
38
+ usersImportMaxBytes?: number;
39
+ usersImportMaxConcurrentJobs?: number;
38
40
  outbox?: OutboxConfig;
39
41
  userLinkingMode?: UserLinkingModeOption;
40
42
  usernamePasswordProvider?: UsernamePasswordProviderResolver;
@@ -45,6 +47,18 @@ export type Bindings = {
45
47
  * leave unset (or false) in production so SSRF protection stays on.
46
48
  */
47
49
  ALLOW_PRIVATE_OUTBOUND_FETCH?: boolean;
50
+ /**
51
+ * Clock-skew leeway in seconds applied to a client assertion's `exp`/`nbf`
52
+ * at `POST /oauth/token`. Defaults to 30 when unset.
53
+ */
54
+ CLIENT_ASSERTION_LEEWAY_SECONDS?: number;
55
+ /**
56
+ * Upper bound, in seconds, on a client assertion's lifetime (`exp - iat`,
57
+ * and the absolute `exp` measured from now). RFC 7523 sets no limit, so
58
+ * without one a client can mint an assertion valid for a year. Defaults to
59
+ * 300 when unset.
60
+ */
61
+ CLIENT_ASSERTION_MAX_LIFETIME_SECONDS?: number;
48
62
  /**
49
63
  * Controls where Server-Timing instrumentation goes. The data/cache adapters
50
64
  * and the webhook hook always measure per-operation latency; this decides the
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Metric names emitted by the outbox relay.
3
+ *
4
+ * - `outbox_events_processed_total` — counter, one per event that every
5
+ * accepting destination delivered successfully.
6
+ * - `outbox_events_dead_lettered_total` — counter, one per event successfully
7
+ * moved to the dead-letter state (retries exhausted, or no destination
8
+ * accepted it). Not emitted when the dead-letter write itself fails, since
9
+ * the event has not transitioned.
10
+ * - `outbox_retry_delay_seconds` — observation, emitted once per delivery
11
+ * failure with the backoff delay before the next attempt. Its count doubles
12
+ * as a retry counter.
13
+ */
14
+ export type OutboxMetricName = "outbox_events_processed_total" | "outbox_events_dead_lettered_total" | "outbox_retry_delay_seconds";
15
+ /** A single metric emission from the outbox relay. */
16
+ export interface OutboxMetric {
17
+ name: OutboxMetricName;
18
+ /** Counter increment, or the observed value for `outbox_retry_delay_seconds`. */
19
+ value: number;
20
+ /** Tenant the event belongs to. */
21
+ tenantId: string;
22
+ /** Audit event type, e.g. `hook.post-user-registration`. */
23
+ eventType: string;
24
+ /** Which relay path emitted this: inline per-request, or the cron drain. */
25
+ source: "request" | "cron";
26
+ /** Destination that failed, when the metric was caused by a delivery failure. */
27
+ destination?: string;
28
+ /** Failure reason, for retry and dead-letter metrics. */
29
+ error?: string;
30
+ /** Retry count of the event at the time of emission. */
31
+ retryCount?: number;
32
+ }
33
+ /**
34
+ * Optional sink for outbox relay metrics.
35
+ *
36
+ * Kept deliberately sink-agnostic: `packages/authhero` never knows where the
37
+ * numbers end up. Consumers pass a callback that forwards to whatever they
38
+ * use (Cloudflare Analytics Engine, StatsD, OpenTelemetry, a log line).
39
+ * `@authhero/cloudflare-adapter` ships an Analytics Engine implementation via
40
+ * `createAnalyticsEngineOutboxMetricsSink`.
41
+ *
42
+ * Implementations should be synchronous and must not throw. The relay calls
43
+ * the sink without awaiting it and swallows both synchronous throws and
44
+ * rejections from a promise-returning sink, so a broken sink can never fail
45
+ * event delivery.
46
+ */
47
+ export type OutboxMetricsSink = (metric: OutboxMetric) => void;