authhero 9.31.0 → 9.34.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 (71) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +137 -137
  3. package/dist/authhero.d.ts +605 -392
  4. package/dist/authhero.mjs +16303 -15968
  5. package/dist/mfa-CDFRupfM.mjs +128 -0
  6. package/dist/mfa-DF3O3Z8H.js +1 -0
  7. package/dist/mfa-attempts-BOWgbEPg.js +275 -0
  8. package/dist/{mfa-attempts-Dl3I8pop.mjs → mfa-attempts-C06Bkdy9.mjs} +14352 -13847
  9. package/dist/{passkey-enrollment-2Toeaevy.js → passkey-enrollment-RGw-WaSq.js} +1 -1
  10. package/dist/tsconfig.types.tsbuildinfo +1 -1
  11. package/dist/types/authentication-flows/common.d.ts +12 -1
  12. package/dist/types/authentication-flows/passwordless.d.ts +24 -11
  13. package/dist/types/authentication-flows/refresh-token.d.ts +1 -0
  14. package/dist/types/authentication-flows/remember-browser.d.ts +77 -0
  15. package/dist/types/constants.d.ts +1 -0
  16. package/dist/types/generated/locale-types.d.ts +6 -0
  17. package/dist/types/helpers/cimd.d.ts +8 -0
  18. package/dist/types/helpers/client.d.ts +25 -7
  19. package/dist/types/helpers/dcr/metadata-mapping.d.ts +1 -1
  20. package/dist/types/helpers/login-session-tenant.d.ts +22 -0
  21. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  22. package/dist/types/helpers/session-transfer.d.ts +158 -0
  23. package/dist/types/hooks/lifecycle-codehooks.d.ts +1 -1
  24. package/dist/types/index.d.ts +536 -376
  25. package/dist/types/routes/auth-api/authorize.d.ts +6 -0
  26. package/dist/types/routes/auth-api/device.d.ts +8 -8
  27. package/dist/types/routes/auth-api/index.d.ts +49 -32
  28. package/dist/types/routes/auth-api/passwordless.d.ts +6 -6
  29. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  30. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  31. package/dist/types/routes/auth-api/token.d.ts +21 -10
  32. package/dist/types/routes/management-api/action-triggers.d.ts +25 -25
  33. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  34. package/dist/types/routes/management-api/clients.d.ts +100 -32
  35. package/dist/types/routes/management-api/connections.d.ts +25 -25
  36. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  37. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  38. package/dist/types/routes/management-api/failed-events.d.ts +2 -2
  39. package/dist/types/routes/management-api/forms.d.ts +144 -144
  40. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  41. package/dist/types/routes/management-api/helpers.d.ts +11 -1
  42. package/dist/types/routes/management-api/hooks.d.ts +21 -21
  43. package/dist/types/routes/management-api/index.d.ts +480 -337
  44. package/dist/types/routes/management-api/jobs.d.ts +2 -2
  45. package/dist/types/routes/management-api/keys.d.ts +12 -12
  46. package/dist/types/routes/management-api/logs.d.ts +4 -4
  47. package/dist/types/routes/management-api/organizations.d.ts +7 -7
  48. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  49. package/dist/types/routes/management-api/refresh_tokens.d.ts +5 -0
  50. package/dist/types/routes/management-api/rollouts.d.ts +6 -6
  51. package/dist/types/routes/management-api/sessions.d.ts +5 -0
  52. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  53. package/dist/types/routes/management-api/tenant-members.d.ts +8 -8
  54. package/dist/types/routes/management-api/tenant-operations.d.ts +4 -4
  55. package/dist/types/routes/management-api/tenants.d.ts +24 -16
  56. package/dist/types/routes/management-api/users.d.ts +84 -24
  57. package/dist/types/routes/universal-login/common.d.ts +57 -22
  58. package/dist/types/routes/universal-login/flow-api.d.ts +8 -8
  59. package/dist/types/routes/universal-login/identifier.d.ts +2 -2
  60. package/dist/types/routes/universal-login/index.d.ts +2 -2
  61. package/dist/types/routes/universal-login/screens/mfa-remember-browser.d.ts +28 -0
  62. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  63. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  64. package/dist/types/state-machines/login-session.d.ts +7 -2
  65. package/dist/types/types/GrantFlowResult.d.ts +13 -0
  66. package/dist/types/types/Hooks.d.ts +24 -0
  67. package/dist/types/types/Variables.d.ts +12 -1
  68. package/dist/types/utils/cookies.d.ts +29 -0
  69. package/dist/types/utils/session-transfer-token.d.ts +56 -0
  70. package/package.json +6 -6
  71. package/dist/mfa-attempts-DXiY4U74.js +0 -275
@@ -12,7 +12,7 @@ export declare const guardianRoutes: OpenAPIHono<{
12
12
  };
13
13
  };
14
14
  output: {
15
- name: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
15
+ name: "sms" | "otp" | "email" | "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: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
170
+ factor_name: "sms" | "otp" | "email" | "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: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
178
+ name: "sms" | "otp" | "email" | "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: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
191
+ factor_name: "sms" | "otp" | "email" | "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: "email" | "sms" | "otp" | "duo" | "webauthn-roaming" | "webauthn-platform" | "push-notification" | "recovery-code";
203
+ name: "sms" | "otp" | "email" | "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" | "start" | "next" | "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;
@@ -75,3 +75,13 @@ export declare function listResponse<T extends {
75
75
  length: number;
76
76
  total: number;
77
77
  }) | T[K];
78
+ /**
79
+ * Pages through a list until an item satisfies `match`, so a uniqueness check
80
+ * or lookup is not limited to the first page.
81
+ *
82
+ * Adapter `q` filters are not uniformly exact (drizzle matches resource-server
83
+ * identifiers with a substring LIKE, for one), so callers pass a filter that
84
+ * returns a superset and do the exact comparison in `match`. Stops at the
85
+ * first page shorter than the page size.
86
+ */
87
+ export declare function findInPagedList<T>(fetchPage: (page: number, per_page: number) => Promise<T[]>, match: (item: T) => boolean): Promise<T | undefined>;
@@ -24,7 +24,7 @@ export declare const hooksRoutes: OpenAPIHono<{
24
24
  };
25
25
  };
26
26
  output: ({
27
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
27
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
28
28
  enabled: boolean;
29
29
  synchronous: boolean;
30
30
  created_at: string;
@@ -54,7 +54,7 @@ export declare const hooksRoutes: OpenAPIHono<{
54
54
  [x: string]: import("hono/utils/types").JSONValue;
55
55
  } | undefined;
56
56
  } | {
57
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
57
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
58
58
  enabled: boolean;
59
59
  synchronous: boolean;
60
60
  created_at: string;
@@ -69,7 +69,7 @@ export declare const hooksRoutes: OpenAPIHono<{
69
69
  [x: string]: import("hono/utils/types").JSONValue;
70
70
  } | undefined;
71
71
  } | {
72
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
72
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
73
73
  enabled: boolean;
74
74
  synchronous: boolean;
75
75
  created_at: string;
@@ -104,7 +104,7 @@ export declare const hooksRoutes: OpenAPIHono<{
104
104
  limit: number;
105
105
  length: number;
106
106
  hooks: ({
107
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
107
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
108
108
  enabled: boolean;
109
109
  synchronous: boolean;
110
110
  created_at: string;
@@ -134,7 +134,7 @@ export declare const hooksRoutes: OpenAPIHono<{
134
134
  [x: string]: import("hono/utils/types").JSONValue;
135
135
  } | undefined;
136
136
  } | {
137
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
137
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
138
138
  enabled: boolean;
139
139
  synchronous: boolean;
140
140
  created_at: string;
@@ -149,7 +149,7 @@ export declare const hooksRoutes: OpenAPIHono<{
149
149
  [x: string]: import("hono/utils/types").JSONValue;
150
150
  } | undefined;
151
151
  } | {
152
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
152
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
153
153
  enabled: boolean;
154
154
  synchronous: boolean;
155
155
  created_at: string;
@@ -184,7 +184,7 @@ export declare const hooksRoutes: OpenAPIHono<{
184
184
  next?: string | undefined;
185
185
  } | {
186
186
  hooks: ({
187
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
187
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
188
188
  enabled: boolean;
189
189
  synchronous: boolean;
190
190
  created_at: string;
@@ -214,7 +214,7 @@ export declare const hooksRoutes: OpenAPIHono<{
214
214
  [x: string]: import("hono/utils/types").JSONValue;
215
215
  } | undefined;
216
216
  } | {
217
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
217
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
218
218
  enabled: boolean;
219
219
  synchronous: boolean;
220
220
  created_at: string;
@@ -229,7 +229,7 @@ export declare const hooksRoutes: OpenAPIHono<{
229
229
  [x: string]: import("hono/utils/types").JSONValue;
230
230
  } | undefined;
231
231
  } | {
232
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
232
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
233
233
  enabled: boolean;
234
234
  synchronous: boolean;
235
235
  created_at: string;
@@ -275,7 +275,7 @@ export declare const hooksRoutes: OpenAPIHono<{
275
275
  };
276
276
  } & {
277
277
  json: {
278
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
278
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
279
279
  url: string;
280
280
  scope?: "local" | "shared" | "platform" | undefined;
281
281
  override?: "none" | "secrets" | "fields" | undefined;
@@ -297,7 +297,7 @@ export declare const hooksRoutes: OpenAPIHono<{
297
297
  hook_id?: string | undefined;
298
298
  metadata?: Record<string, unknown> | undefined;
299
299
  } | {
300
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
300
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
301
301
  template_id: "ensure-username" | "set-preferred-username" | "account-linking";
302
302
  scope?: "local" | "shared" | "platform" | undefined;
303
303
  override?: "none" | "secrets" | "fields" | undefined;
@@ -308,7 +308,7 @@ export declare const hooksRoutes: OpenAPIHono<{
308
308
  hook_id?: string | undefined;
309
309
  metadata?: Record<string, unknown> | undefined;
310
310
  } | {
311
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
311
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
312
312
  code_id: string;
313
313
  scope?: "local" | "shared" | "platform" | undefined;
314
314
  override?: "none" | "secrets" | "fields" | undefined;
@@ -333,7 +333,7 @@ export declare const hooksRoutes: OpenAPIHono<{
333
333
  };
334
334
  };
335
335
  output: {
336
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
336
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
337
337
  enabled: boolean;
338
338
  synchronous: boolean;
339
339
  created_at: string;
@@ -363,7 +363,7 @@ export declare const hooksRoutes: OpenAPIHono<{
363
363
  [x: string]: import("hono/utils/types").JSONValue;
364
364
  } | undefined;
365
365
  } | {
366
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
366
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
367
367
  enabled: boolean;
368
368
  synchronous: boolean;
369
369
  created_at: string;
@@ -378,7 +378,7 @@ export declare const hooksRoutes: OpenAPIHono<{
378
378
  [x: string]: import("hono/utils/types").JSONValue;
379
379
  } | undefined;
380
380
  } | {
381
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
381
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
382
382
  enabled: boolean;
383
383
  synchronous: boolean;
384
384
  created_at: string;
@@ -458,7 +458,7 @@ export declare const hooksRoutes: OpenAPIHono<{
458
458
  json: unknown;
459
459
  };
460
460
  output: {
461
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
461
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
462
462
  enabled: boolean;
463
463
  synchronous: boolean;
464
464
  created_at: string;
@@ -488,7 +488,7 @@ export declare const hooksRoutes: OpenAPIHono<{
488
488
  [x: string]: import("hono/utils/types").JSONValue;
489
489
  } | undefined;
490
490
  } | {
491
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
491
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
492
492
  enabled: boolean;
493
493
  synchronous: boolean;
494
494
  created_at: string;
@@ -503,7 +503,7 @@ export declare const hooksRoutes: OpenAPIHono<{
503
503
  [x: string]: import("hono/utils/types").JSONValue;
504
504
  } | undefined;
505
505
  } | {
506
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
506
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
507
507
  enabled: boolean;
508
508
  synchronous: boolean;
509
509
  created_at: string;
@@ -564,7 +564,7 @@ export declare const hooksRoutes: OpenAPIHono<{
564
564
  };
565
565
  };
566
566
  output: {
567
- trigger_id: "post-user-login" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
567
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
568
568
  enabled: boolean;
569
569
  synchronous: boolean;
570
570
  created_at: string;
@@ -594,7 +594,7 @@ export declare const hooksRoutes: OpenAPIHono<{
594
594
  [x: string]: import("hono/utils/types").JSONValue;
595
595
  } | undefined;
596
596
  } | {
597
- trigger_id: "post-user-login" | "credentials-exchange" | "post-user-registration" | "post-user-update";
597
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
598
598
  enabled: boolean;
599
599
  synchronous: boolean;
600
600
  created_at: string;
@@ -609,7 +609,7 @@ export declare const hooksRoutes: OpenAPIHono<{
609
609
  [x: string]: import("hono/utils/types").JSONValue;
610
610
  } | undefined;
611
611
  } | {
612
- trigger_id: "post-user-login" | "credentials-exchange" | "pre-user-registration" | "post-user-registration" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "pre-user-update" | "pre-account-action";
612
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion" | "credentials-exchange" | "pre-user-update" | "pre-account-action";
613
613
  enabled: boolean;
614
614
  synchronous: boolean;
615
615
  created_at: string;