authhero 9.24.0 → 9.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/authhero.cjs +116 -116
  2. package/dist/authhero.d.ts +298 -297
  3. package/dist/authhero.mjs +34211 -33944
  4. package/dist/tsconfig.types.tsbuildinfo +1 -1
  5. package/dist/types/authentication-flows/password.d.ts +6 -0
  6. package/dist/types/authentication-flows/passwordless.d.ts +5 -5
  7. package/dist/types/generated/locale-types.d.ts +1 -0
  8. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  9. package/dist/types/helpers/session-notice.d.ts +17 -0
  10. package/dist/types/index.d.ts +298 -297
  11. package/dist/types/routes/auth-api/index.d.ts +29 -29
  12. package/dist/types/routes/auth-api/logout.d.ts +2 -2
  13. package/dist/types/routes/auth-api/oidc-logout.d.ts +3 -3
  14. package/dist/types/routes/auth-api/passwordless.d.ts +8 -8
  15. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  16. package/dist/types/routes/auth-api/token.d.ts +10 -10
  17. package/dist/types/routes/management-api/branding.d.ts +3 -3
  18. package/dist/types/routes/management-api/clients.d.ts +8 -8
  19. package/dist/types/routes/management-api/connections.d.ts +7 -7
  20. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  21. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  22. package/dist/types/routes/management-api/failed-events.d.ts +3 -2
  23. package/dist/types/routes/management-api/forms.d.ts +144 -144
  24. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  25. package/dist/types/routes/management-api/helpers.d.ts +26 -4
  26. package/dist/types/routes/management-api/index.d.ts +248 -247
  27. package/dist/types/routes/management-api/keys.d.ts +12 -12
  28. package/dist/types/routes/management-api/logs.d.ts +4 -4
  29. package/dist/types/routes/management-api/organizations.d.ts +1 -1
  30. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  31. package/dist/types/routes/management-api/roles.d.ts +1 -1
  32. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  33. package/dist/types/routes/management-api/tenants.d.ts +3 -3
  34. package/dist/types/routes/management-api/users.d.ts +26 -26
  35. package/dist/types/routes/saml/index.d.ts +6 -6
  36. package/dist/types/routes/saml/samlp.d.ts +6 -6
  37. package/dist/types/routes/universal-login/common.d.ts +10 -10
  38. package/dist/types/routes/universal-login/continue.d.ts +2 -2
  39. package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
  40. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  41. package/dist/types/routes/universal-login/impersonate.d.ts +4 -4
  42. package/dist/types/routes/universal-login/index.d.ts +8 -8
  43. package/dist/types/routes/universal-login/screens/account-mfa-phone-enrollment.d.ts +0 -5
  44. package/dist/types/routes/universal-login/screens/account-mfa-totp-enrollment.d.ts +0 -5
  45. package/dist/types/routes/universal-login/screens/account-passkeys.d.ts +0 -5
  46. package/dist/types/routes/universal-login/screens/connect-tenant-select.d.ts +0 -10
  47. package/dist/types/routes/universal-login/screens/identifier.d.ts +0 -5
  48. package/dist/types/routes/universal-login/screens/login.d.ts +0 -8
  49. package/dist/types/routes/universal-login/screens/mfa-login-options.d.ts +0 -5
  50. package/dist/types/routes/universal-login/screens/mfa-phone-challenge.d.ts +0 -5
  51. package/dist/types/routes/universal-login/screens/mfa-phone-enrollment.d.ts +0 -5
  52. package/dist/types/routes/universal-login/screens/mfa-totp-challenge.d.ts +0 -5
  53. package/dist/types/routes/universal-login/screens/mfa-totp-enrollment.d.ts +0 -5
  54. package/dist/types/routes/universal-login/screens/passkey-challenge.d.ts +0 -14
  55. package/dist/types/routes/universal-login/screens/passkey-enrollment-nudge.d.ts +0 -15
  56. package/dist/types/routes/universal-login/screens/passkey-enrollment.d.ts +0 -9
  57. package/dist/types/routes/universal-login/screens/reset-password-code.d.ts +0 -9
  58. package/dist/types/routes/universal-login/screens/reset-password.d.ts +2 -6
  59. package/dist/types/routes/universal-login/u2-index.d.ts +7 -7
  60. package/dist/types/routes/universal-login/u2-routes.d.ts +7 -7
  61. package/dist/types/state-machines/index.d.ts +3 -1
  62. package/dist/types/state-machines/login-session-data.d.ts +19 -0
  63. package/dist/types/state-machines/login-session.d.ts +67 -3
  64. package/dist/types/state-machines/password-reset.d.ts +46 -0
  65. package/package.json +2 -2
@@ -12,7 +12,7 @@ export declare const guardianRoutes: OpenAPIHono<{
12
12
  };
13
13
  };
14
14
  output: {
15
- name: "sms" | "otp" | "email" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
15
+ name: "email" | "otp" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
16
16
  enabled: boolean;
17
17
  trial_expired?: boolean | undefined;
18
18
  }[];
@@ -167,7 +167,7 @@ export declare const guardianRoutes: OpenAPIHono<{
167
167
  $get: {
168
168
  input: {
169
169
  param: {
170
- factor_name: "sms" | "otp" | "email" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
170
+ factor_name: "email" | "otp" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
171
171
  };
172
172
  } & {
173
173
  header: {
@@ -175,7 +175,7 @@ export declare const guardianRoutes: OpenAPIHono<{
175
175
  };
176
176
  };
177
177
  output: {
178
- name: "sms" | "otp" | "email" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
178
+ name: "email" | "otp" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
179
179
  enabled: boolean;
180
180
  trial_expired?: boolean | undefined;
181
181
  };
@@ -188,7 +188,7 @@ export declare const guardianRoutes: OpenAPIHono<{
188
188
  $put: {
189
189
  input: {
190
190
  param: {
191
- factor_name: "sms" | "otp" | "email" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
191
+ factor_name: "email" | "otp" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
192
192
  };
193
193
  } & {
194
194
  header: {
@@ -200,7 +200,7 @@ export declare const guardianRoutes: OpenAPIHono<{
200
200
  };
201
201
  };
202
202
  output: {
203
- name: "sms" | "otp" | "email" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
203
+ name: "email" | "otp" | "sms" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
204
204
  enabled: boolean;
205
205
  trial_expired?: boolean | undefined;
206
206
  };
@@ -23,7 +23,7 @@ export declare function requireTenantId(ctx: {
23
23
  * `totalsSchema.extend({ roles: z.array(roleSchema) })` pattern repeated
24
24
  * across the management-api modules.
25
25
  */
26
- export declare function withTotals<T extends z.ZodRawShape>(items: T): z.ZodObject<(("length" | "next" | "start" | "limit" | "total") & keyof T extends never ? {
26
+ export declare function withTotals<T extends z.ZodRawShape>(items: T): z.ZodObject<(("start" | "limit" | "length" | "total" | "next") & keyof T extends never ? {
27
27
  start: z.ZodNumber;
28
28
  limit: z.ZodNumber;
29
29
  length: z.ZodNumber;
@@ -44,12 +44,34 @@ export declare function withTotals<T extends z.ZodRawShape>(items: T): z.ZodObje
44
44
  export declare function withNext<T extends z.ZodRawShape>(items: T): z.ZodObject<T & {
45
45
  next: z.ZodOptional<z.ZodString>;
46
46
  } extends infer T_1 ? { -readonly [P in keyof T_1]: T_1[P]; } : never, z.core.$strip>;
47
+ /**
48
+ * Builds the Auth0 `include_totals` envelope from an adapter list result.
49
+ *
50
+ * Adapters report the overall match count as `length` (the offset-list
51
+ * contract). Auth0's wire format differs: `length` is the number of items on
52
+ * the returned page and `total` is the overall count, so the two are
53
+ * remapped here. A result that already carries `total` keeps it. Checkpoint
54
+ * (`from`/`take`) responses are built by the callers and never come through
55
+ * this helper.
56
+ */
57
+ export declare function withTotalsEnvelope<T extends {
58
+ length: number;
59
+ }>(result: T, items: readonly unknown[]): T & {
60
+ length: number;
61
+ total: number;
62
+ };
47
63
  /**
48
64
  * Picks the list-response body for the `include_totals` branch every list
49
- * handler repeats: the full totals envelope when `include_totals` is set,
50
- * otherwise the bare item array under `key`.
65
+ * handler repeats: the Auth0 totals envelope (`start`, `limit`, `length`,
66
+ * `total`) when `include_totals` is set, otherwise the bare item array under
67
+ * `key`.
51
68
  *
52
69
  * The caller keeps its own `ctx.json(...)` so hono's per-route response
53
70
  * typing still applies.
54
71
  */
55
- export declare function listResponse<T extends object, K extends keyof T>(include_totals: boolean | undefined, result: T, key: K): T | T[K];
72
+ export declare function listResponse<T extends {
73
+ length: number;
74
+ }, K extends keyof T>(include_totals: boolean | undefined, result: T, key: K): (T & {
75
+ length: number;
76
+ total: number;
77
+ }) | T[K];