authhero 5.20.0 → 5.21.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 (43) hide show
  1. package/dist/assets/u/widget/index.esm.js +1 -1
  2. package/dist/authhero.cjs +101 -101
  3. package/dist/authhero.d.ts +168 -102
  4. package/dist/authhero.mjs +8703 -8635
  5. package/dist/stats.html +1 -1
  6. package/dist/tsconfig.types.tsbuildinfo +1 -1
  7. package/dist/types/authentication-flows/common.d.ts +1 -1
  8. package/dist/types/authentication-flows/passwordless.d.ts +12 -3
  9. package/dist/types/helpers/client.d.ts +23 -3
  10. package/dist/types/helpers/logging.d.ts +7 -0
  11. package/dist/types/index.d.ts +98 -96
  12. package/dist/types/provisioning/index.d.ts +2 -0
  13. package/dist/types/provisioning/noop-provisioner.d.ts +11 -0
  14. package/dist/types/provisioning/provisioner.d.ts +25 -0
  15. package/dist/types/routes/auth-api/index.d.ts +12 -12
  16. package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
  17. package/dist/types/routes/auth-api/well-known.d.ts +2 -2
  18. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  19. package/dist/types/routes/management-api/actions.d.ts +3 -3
  20. package/dist/types/routes/management-api/authentication-methods.d.ts +1 -1
  21. package/dist/types/routes/management-api/custom-domains.d.ts +7 -7
  22. package/dist/types/routes/management-api/email-templates.d.ts +35 -35
  23. package/dist/types/routes/management-api/emails.d.ts +2 -2
  24. package/dist/types/routes/management-api/failed-events.d.ts +1 -1
  25. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  26. package/dist/types/routes/management-api/hook-code.d.ts +2 -2
  27. package/dist/types/routes/management-api/index.d.ts +72 -72
  28. package/dist/types/routes/management-api/logs.d.ts +3 -3
  29. package/dist/types/routes/management-api/organizations.d.ts +4 -4
  30. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  31. package/dist/types/routes/management-api/tenants.d.ts +33 -6
  32. package/dist/types/routes/management-api/users.d.ts +2 -2
  33. package/dist/types/routes/universal-login/common.d.ts +48 -12
  34. package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
  35. package/dist/types/routes/universal-login/form-node.d.ts +4 -4
  36. package/dist/types/routes/universal-login/index.d.ts +4 -4
  37. package/dist/types/routes/universal-login/u2-form-node.d.ts +2 -2
  38. package/dist/types/routes/universal-login/u2-index.d.ts +8 -8
  39. package/dist/types/routes/universal-login/u2-routes.d.ts +6 -6
  40. package/dist/types/types/AuthHeroConfig.d.ts +12 -0
  41. package/dist/types/utils/email.d.ts +2 -0
  42. package/dist/types/utils/jwks.d.ts +4 -4
  43. package/package.json +5 -5
@@ -11,7 +11,7 @@ import { GrantType } from "@authhero/adapter-interfaces";
11
11
  export interface AuthTokenClient {
12
12
  client_id: string;
13
13
  tenant: {
14
- audience: string;
14
+ audience?: string;
15
15
  default_audience?: string;
16
16
  allow_organization_name_in_authentication_api?: boolean;
17
17
  };
@@ -129,14 +129,14 @@ export declare function passwordlessGrantUser(ctx: Context<{
129
129
  tenant: {
130
130
  created_at: string;
131
131
  updated_at: string;
132
- audience: string;
133
132
  friendly_name: string;
134
- sender_email: string;
135
- sender_name: string;
136
133
  id: string;
134
+ audience?: string | undefined;
137
135
  picture_url?: string | undefined;
138
136
  support_email?: string | undefined;
139
137
  support_url?: string | undefined;
138
+ sender_email?: string | undefined;
139
+ sender_name?: string | undefined;
140
140
  session_lifetime?: number | undefined;
141
141
  idle_session_lifetime?: number | undefined;
142
142
  ephemeral_session_lifetime?: number | undefined;
@@ -233,6 +233,15 @@ export declare function passwordlessGrantUser(ctx: Context<{
233
233
  } | null | undefined;
234
234
  pushed_authorization_requests_supported?: boolean | undefined;
235
235
  authorization_response_iss_parameter_supported?: boolean | undefined;
236
+ deployment_type?: "shared" | "wfp" | undefined;
237
+ provisioning_state?: "pending" | "ready" | "failed" | undefined;
238
+ provisioning_error?: string | undefined;
239
+ provisioning_state_changed_at?: string | undefined;
240
+ bundle_configuration?: string | undefined;
241
+ worker_version?: string | undefined;
242
+ worker_script_name?: string | undefined;
243
+ storage_kind?: "own_d1" | "existing_d1" | "shared_planetscale" | undefined;
244
+ d1_database_id?: string | undefined;
236
245
  attack_protection?: {
237
246
  breached_password_detection?: {
238
247
  enabled?: boolean | undefined;
@@ -133,13 +133,13 @@ export declare const enrichedClientSchema: z.ZodObject<{
133
133
  tenant: z.ZodObject<{
134
134
  created_at: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
135
135
  updated_at: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string, string | null>>;
136
- audience: z.ZodString;
136
+ audience: z.ZodOptional<z.ZodString>;
137
137
  friendly_name: z.ZodString;
138
138
  picture_url: z.ZodOptional<z.ZodString>;
139
139
  support_email: z.ZodOptional<z.ZodString>;
140
140
  support_url: z.ZodOptional<z.ZodString>;
141
- sender_email: z.ZodString;
142
- sender_name: z.ZodString;
141
+ sender_email: z.ZodOptional<z.ZodString>;
142
+ sender_name: z.ZodOptional<z.ZodString>;
143
143
  session_lifetime: z.ZodOptional<z.ZodNumber>;
144
144
  idle_session_lifetime: z.ZodOptional<z.ZodNumber>;
145
145
  ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
@@ -242,6 +242,26 @@ export declare const enrichedClientSchema: z.ZodObject<{
242
242
  }, z.core.$strip>>>;
243
243
  pushed_authorization_requests_supported: z.ZodOptional<z.ZodBoolean>;
244
244
  authorization_response_iss_parameter_supported: z.ZodOptional<z.ZodBoolean>;
245
+ deployment_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
246
+ shared: "shared";
247
+ wfp: "wfp";
248
+ }>>>;
249
+ provisioning_state: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
250
+ pending: "pending";
251
+ ready: "ready";
252
+ failed: "failed";
253
+ }>>>;
254
+ provisioning_error: z.ZodOptional<z.ZodString>;
255
+ provisioning_state_changed_at: z.ZodOptional<z.ZodString>;
256
+ bundle_configuration: z.ZodOptional<z.ZodString>;
257
+ worker_version: z.ZodOptional<z.ZodString>;
258
+ worker_script_name: z.ZodOptional<z.ZodString>;
259
+ storage_kind: z.ZodOptional<z.ZodEnum<{
260
+ own_d1: "own_d1";
261
+ existing_d1: "existing_d1";
262
+ shared_planetscale: "shared_planetscale";
263
+ }>>;
264
+ d1_database_id: z.ZodOptional<z.ZodString>;
245
265
  attack_protection: z.ZodOptional<z.ZodObject<{
246
266
  breached_password_detection: z.ZodOptional<z.ZodObject<{
247
267
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -5,6 +5,13 @@ export type LogParams = {
5
5
  type: LogType;
6
6
  description?: string;
7
7
  userId?: string;
8
+ /**
9
+ * Human-readable identifier for the subject user (email / phone / name).
10
+ * Populates the legacy `user_name` field and the audit event's `actor.email`
11
+ * when `ctx.var.username` is not set — useful for failure logs where the
12
+ * route handler couldn't authenticate but the caller has resolved the user.
13
+ */
14
+ username?: string;
8
15
  /**
9
16
  * Identifier of the actor when it differs from the subject `userId`
10
17
  * (e.g. impersonation). When set, audit events attribute `actor.id` to