authhero 9.23.1 → 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 (74) 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-91459994.entry.js → p-210f06bf.entry.js} +1 -1
  4. package/dist/authhero.cjs +116 -116
  5. package/dist/authhero.d.ts +1433 -278
  6. package/dist/authhero.mjs +36511 -35845
  7. package/dist/tsconfig.types.tsbuildinfo +1 -1
  8. package/dist/types/authentication-flows/password.d.ts +6 -0
  9. package/dist/types/authentication-flows/passwordless.d.ts +5 -5
  10. package/dist/types/generated/locale-types.d.ts +1 -0
  11. package/dist/types/helpers/logging.d.ts +7 -0
  12. package/dist/types/helpers/outbox-destinations/log-streams.d.ts +2 -0
  13. package/dist/types/helpers/reserved-claims.d.ts +2 -2
  14. package/dist/types/helpers/session-notice.d.ts +17 -0
  15. package/dist/types/helpers/users.d.ts +5 -0
  16. package/dist/types/index.d.ts +1433 -278
  17. package/dist/types/routes/auth-api/index.d.ts +26 -26
  18. package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
  19. package/dist/types/routes/auth-api/revoke.d.ts +6 -6
  20. package/dist/types/routes/auth-api/token.d.ts +10 -10
  21. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  22. package/dist/types/routes/management-api/actions.d.ts +29 -3
  23. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  24. package/dist/types/routes/management-api/branding.d.ts +5 -5
  25. package/dist/types/routes/management-api/clients.d.ts +8 -8
  26. package/dist/types/routes/management-api/connections.d.ts +7 -7
  27. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  28. package/dist/types/routes/management-api/email-templates.d.ts +20 -20
  29. package/dist/types/routes/management-api/emails.d.ts +2 -2
  30. package/dist/types/routes/management-api/failed-events.d.ts +97 -3
  31. package/dist/types/routes/management-api/flows.d.ts +52 -0
  32. package/dist/types/routes/management-api/forms.d.ts +735 -126
  33. package/dist/types/routes/management-api/grants.d.ts +11 -0
  34. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  35. package/dist/types/routes/management-api/helpers.d.ts +34 -4
  36. package/dist/types/routes/management-api/hooks.d.ts +68 -4
  37. package/dist/types/routes/management-api/index.d.ts +1326 -269
  38. package/dist/types/routes/management-api/keys.d.ts +12 -12
  39. package/dist/types/routes/management-api/logs.d.ts +4 -4
  40. package/dist/types/routes/management-api/organizations.d.ts +66 -8
  41. package/dist/types/routes/management-api/prompts.d.ts +6 -6
  42. package/dist/types/routes/management-api/roles.d.ts +1 -1
  43. package/dist/types/routes/management-api/tenant-export-import.d.ts +5 -5
  44. package/dist/types/routes/management-api/tenants.d.ts +9 -9
  45. package/dist/types/routes/management-api/users.d.ts +166 -23
  46. package/dist/types/routes/saml/index.d.ts +98 -0
  47. package/dist/types/routes/saml/samlp.d.ts +98 -0
  48. package/dist/types/routes/universal-login/common.d.ts +10 -10
  49. package/dist/types/routes/universal-login/flow-api.d.ts +12 -12
  50. package/dist/types/routes/universal-login/form-node.d.ts +4 -4
  51. package/dist/types/routes/universal-login/screens/account-mfa-phone-enrollment.d.ts +0 -5
  52. package/dist/types/routes/universal-login/screens/account-mfa-totp-enrollment.d.ts +0 -5
  53. package/dist/types/routes/universal-login/screens/account-passkeys.d.ts +0 -5
  54. package/dist/types/routes/universal-login/screens/connect-tenant-select.d.ts +0 -10
  55. package/dist/types/routes/universal-login/screens/identifier.d.ts +0 -5
  56. package/dist/types/routes/universal-login/screens/login.d.ts +0 -8
  57. package/dist/types/routes/universal-login/screens/mfa-login-options.d.ts +0 -5
  58. package/dist/types/routes/universal-login/screens/mfa-phone-challenge.d.ts +0 -5
  59. package/dist/types/routes/universal-login/screens/mfa-phone-enrollment.d.ts +0 -5
  60. package/dist/types/routes/universal-login/screens/mfa-totp-challenge.d.ts +0 -5
  61. package/dist/types/routes/universal-login/screens/mfa-totp-enrollment.d.ts +0 -5
  62. package/dist/types/routes/universal-login/screens/passkey-challenge.d.ts +0 -14
  63. package/dist/types/routes/universal-login/screens/passkey-enrollment-nudge.d.ts +0 -15
  64. package/dist/types/routes/universal-login/screens/passkey-enrollment.d.ts +0 -9
  65. package/dist/types/routes/universal-login/screens/reset-password-code.d.ts +0 -9
  66. package/dist/types/routes/universal-login/screens/reset-password.d.ts +2 -6
  67. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  68. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  69. package/dist/types/state-machines/index.d.ts +3 -1
  70. package/dist/types/state-machines/login-session-data.d.ts +19 -0
  71. package/dist/types/state-machines/login-session.d.ts +67 -3
  72. package/dist/types/state-machines/password-reset.d.ts +46 -0
  73. package/dist/types/strategies/saml.d.ts +1 -1
  74. package/package.json +6 -6
@@ -11,6 +11,8 @@ export declare const grantRoutes: OpenAPIHono<{
11
11
  per_page?: string | undefined;
12
12
  page?: string | undefined;
13
13
  include_totals?: string | undefined;
14
+ from?: string | undefined;
15
+ take?: string | undefined;
14
16
  user_id?: string | undefined;
15
17
  client_id?: string | undefined;
16
18
  audience?: string | undefined;
@@ -39,6 +41,15 @@ export declare const grantRoutes: OpenAPIHono<{
39
41
  }[];
40
42
  total?: number | undefined;
41
43
  next?: string | undefined;
44
+ } | {
45
+ grants: {
46
+ user_id: string;
47
+ clientID: string;
48
+ scope: string[];
49
+ id: string;
50
+ audience?: string | undefined;
51
+ }[];
52
+ next?: string | undefined;
42
53
  };
43
54
  outputFormat: "json";
44
55
  status: 200;
@@ -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" | "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;
@@ -36,12 +36,42 @@ export declare function withTotals<T extends z.ZodRawShape>(items: T): z.ZodObje
36
36
  total: z.ZodOptional<z.ZodNumber>;
37
37
  next: z.ZodOptional<z.ZodString>;
38
38
  } extends infer T_2 extends z.core.util.SomeObject ? { [K in keyof T_2 as K extends keyof T ? never : K]: T_2[K]; } : never) & { [K_1 in keyof { -readonly [P in keyof T]: T[P]; }]: { -readonly [P in keyof T]: T[P]; }[K_1]; }) extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.core.$strip>;
39
+ /**
40
+ * Schema factory for the checkpoint (`from`/`take`) list-response shape:
41
+ * `{ <resource>: [...], next? }`. `next` is an opaque cursor, absent on the
42
+ * last page.
43
+ */
44
+ export declare function withNext<T extends z.ZodRawShape>(items: T): z.ZodObject<T & {
45
+ next: z.ZodOptional<z.ZodString>;
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
+ };
39
63
  /**
40
64
  * Picks the list-response body for the `include_totals` branch every list
41
- * handler repeats: the full totals envelope when `include_totals` is set,
42
- * 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`.
43
68
  *
44
69
  * The caller keeps its own `ctx.json(...)` so hono's per-route response
45
70
  * typing still applies.
46
71
  */
47
- 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];
@@ -152,6 +152,70 @@ export declare const hooksRoutes: OpenAPIHono<{
152
152
  })[];
153
153
  total?: number | undefined;
154
154
  next?: string | undefined;
155
+ } | {
156
+ hooks: ({
157
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
158
+ enabled: boolean;
159
+ synchronous: boolean;
160
+ created_at: string;
161
+ updated_at: string;
162
+ hook_id: string;
163
+ url: string;
164
+ priority?: number | undefined;
165
+ metadata?: {
166
+ [x: string]: import("hono/utils/types").JSONValue;
167
+ } | undefined;
168
+ } | {
169
+ trigger_id: "post-user-login";
170
+ enabled: boolean;
171
+ synchronous: boolean;
172
+ created_at: string;
173
+ updated_at: string;
174
+ hook_id: string;
175
+ form_id: string;
176
+ priority?: number | undefined;
177
+ metadata?: {
178
+ [x: string]: import("hono/utils/types").JSONValue;
179
+ } | undefined;
180
+ } | {
181
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
182
+ enabled: boolean;
183
+ synchronous: boolean;
184
+ created_at: string;
185
+ updated_at: string;
186
+ hook_id: string;
187
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
188
+ priority?: number | undefined;
189
+ metadata?: {
190
+ [x: string]: import("hono/utils/types").JSONValue;
191
+ } | undefined;
192
+ } | {
193
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "credentials-exchange";
194
+ enabled: boolean;
195
+ synchronous: boolean;
196
+ created_at: string;
197
+ updated_at: string;
198
+ hook_id: string;
199
+ code_id: string;
200
+ priority?: number | undefined;
201
+ metadata?: {
202
+ [x: string]: import("hono/utils/types").JSONValue;
203
+ } | undefined;
204
+ } | {
205
+ trigger_id: "post-user-login";
206
+ enabled: boolean;
207
+ synchronous: boolean;
208
+ created_at: string;
209
+ updated_at: string;
210
+ hook_id: string;
211
+ page_id: "impersonate";
212
+ priority?: number | undefined;
213
+ metadata?: {
214
+ [x: string]: import("hono/utils/types").JSONValue;
215
+ } | undefined;
216
+ permission_required?: string | undefined;
217
+ })[];
218
+ next?: string | undefined;
155
219
  };
156
220
  outputFormat: "json";
157
221
  status: 200;
@@ -290,7 +354,7 @@ export declare const hooksRoutes: OpenAPIHono<{
290
354
  };
291
355
  output: {};
292
356
  outputFormat: string;
293
- status: 404;
357
+ status: 400;
294
358
  } | {
295
359
  input: {
296
360
  param: {
@@ -305,7 +369,7 @@ export declare const hooksRoutes: OpenAPIHono<{
305
369
  };
306
370
  output: {};
307
371
  outputFormat: string;
308
- status: 400;
372
+ status: 404;
309
373
  } | {
310
374
  input: {
311
375
  param: {
@@ -510,7 +574,7 @@ export declare const hooksRoutes: OpenAPIHono<{
510
574
  };
511
575
  output: {};
512
576
  outputFormat: string;
513
- status: 404;
577
+ status: 400;
514
578
  } | {
515
579
  input: {
516
580
  param: {
@@ -527,7 +591,7 @@ export declare const hooksRoutes: OpenAPIHono<{
527
591
  };
528
592
  output: {};
529
593
  outputFormat: string;
530
- status: 400;
594
+ status: 404;
531
595
  } | {
532
596
  input: {
533
597
  param: {