authhero 9.13.1 → 9.14.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 (45) hide show
  1. package/dist/authhero.cjs +141 -141
  2. package/dist/authhero.d.ts +294 -264
  3. package/dist/authhero.mjs +7686 -7642
  4. package/dist/tsconfig.types.tsbuildinfo +1 -1
  5. package/dist/types/authentication-flows/passwordless.d.ts +3 -3
  6. package/dist/types/emails/index.d.ts +8 -9
  7. package/dist/types/emails/render.d.ts +2 -6
  8. package/dist/types/helpers/connection.d.ts +2 -6
  9. package/dist/types/helpers/logging.d.ts +2 -5
  10. package/dist/types/helpers/reserved-claims.d.ts +4 -8
  11. package/dist/types/helpers/service-token.d.ts +2 -5
  12. package/dist/types/helpers/wait-until.d.ts +3 -1
  13. package/dist/types/index.d.ts +258 -258
  14. package/dist/types/routes/auth-api/index.d.ts +47 -47
  15. package/dist/types/routes/auth-api/passwordless.d.ts +10 -10
  16. package/dist/types/routes/auth-api/register/index.d.ts +2 -2
  17. package/dist/types/routes/auth-api/revoke.d.ts +8 -8
  18. package/dist/types/routes/auth-api/token.d.ts +22 -22
  19. package/dist/types/routes/auth-api/well-known.d.ts +1 -1
  20. package/dist/types/routes/management-api/action-executions.d.ts +1 -1
  21. package/dist/types/routes/management-api/actions.d.ts +1 -1
  22. package/dist/types/routes/management-api/clients.d.ts +8 -8
  23. package/dist/types/routes/management-api/custom-domains.d.ts +6 -6
  24. package/dist/types/routes/management-api/email-templates.d.ts +18 -18
  25. package/dist/types/routes/management-api/failed-events.d.ts +1 -1
  26. package/dist/types/routes/management-api/guardian.d.ts +5 -5
  27. package/dist/types/routes/management-api/index.d.ts +233 -233
  28. package/dist/types/routes/management-api/keys.d.ts +4 -4
  29. package/dist/types/routes/management-api/logs.d.ts +4 -4
  30. package/dist/types/routes/management-api/organizations.d.ts +2 -2
  31. package/dist/types/routes/management-api/prompts.d.ts +4 -4
  32. package/dist/types/routes/management-api/roles.d.ts +1 -1
  33. package/dist/types/routes/management-api/tenants.d.ts +1 -1
  34. package/dist/types/routes/management-api/users.d.ts +11 -11
  35. package/dist/types/routes/proxy-control-plane/tenant-members.d.ts +9 -2
  36. package/dist/types/routes/proxy-control-plane/verify.d.ts +15 -0
  37. package/dist/types/routes/universal-login/flow-api.d.ts +4 -4
  38. package/dist/types/routes/universal-login/index.d.ts +2 -2
  39. package/dist/types/routes/universal-login/u2-index.d.ts +5 -5
  40. package/dist/types/routes/universal-login/u2-routes.d.ts +5 -5
  41. package/dist/types/tenant-members/local-backend.d.ts +11 -3
  42. package/dist/types/types/RequestContext.d.ts +16 -0
  43. package/dist/types/types/index.d.ts +1 -0
  44. package/dist/types/utils/jwks.d.ts +2 -2
  45. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
1
  import { DataAdapters } from "@authhero/adapter-interfaces";
2
+ import { RequestContext } from "../types";
2
3
  import { TenantMembersBackend } from "./types";
3
4
  /** The control-plane adapters the team lives in. */
4
5
  type TeamAdapters = Pick<DataAdapters, "organizations" | "userOrganizations" | "userRoles" | "users" | "roles" | "invites">;
@@ -19,9 +20,16 @@ export interface LocalTenantMembersBackendOptions {
19
20
  */
20
21
  invitationClientId?: string;
21
22
  /**
22
- * Best-effort invitation email delivery. Bound to a request context at the
23
- * call site (it needs branding/email infra). Failures must not fail the
24
- * create — Auth0 returns the invite even when delivery fails.
23
+ * The request context. When set and `sendInvitationEmail` is not, invitation
24
+ * emails are sent with the built-in `user_invitation` template as the
25
+ * control-plane tenant (its email provider, branding and locales), not the
26
+ * request's tenant.
27
+ */
28
+ ctx?: RequestContext;
29
+ /**
30
+ * Best-effort invitation email delivery. Overrides the built-in sender used
31
+ * when `ctx` is set. Failures must not fail the create — Auth0 returns the
32
+ * invite even when delivery fails.
25
33
  */
26
34
  sendInvitationEmail?: (params: {
27
35
  to: string;
@@ -0,0 +1,16 @@
1
+ import type { Context } from "hono";
2
+ import type { Bindings } from "./Bindings";
3
+ import type { Variables } from "./Variables";
4
+ /**
5
+ * The part of a request context the email, logging and service-token helpers
6
+ * use. Every `Variables` entry is optional, so a context that sets only some of
7
+ * them (such as the proxy control-plane resource) can call these helpers too.
8
+ * The app's full `Context<{ Bindings; Variables }>` is assignable to it.
9
+ */
10
+ export type RequestContext = Pick<Context<{
11
+ Bindings: Bindings;
12
+ Variables: Partial<Variables>;
13
+ }>, "env" | "var" | "req" | "executionCtx"> & {
14
+ set(key: "outboxEventPromises", value: Promise<string>[]): void;
15
+ set(key: "backgroundPromises", value: Promise<void>[]): void;
16
+ };
@@ -1,5 +1,6 @@
1
1
  export * from "./Variables";
2
2
  export * from "./Bindings";
3
+ export * from "./RequestContext";
3
4
  export * from "./auth0";
4
5
  export * from "./AuthHeroConfig";
5
6
  export * from "./OutboxMetrics";
@@ -8,7 +8,7 @@ import { SigningKeyModeOption } from "../types/AuthHeroConfig";
8
8
  */
9
9
  export declare function getJwksForPublication(data: DataAdapters, tenantId: string, modeOption: SigningKeyModeOption | undefined): Promise<{
10
10
  alg: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "HS256" | "HS384" | "HS512";
11
- kty: "EC" | "RSA" | "oct";
11
+ kty: "RSA" | "EC" | "oct";
12
12
  kid?: string | undefined;
13
13
  use?: "sig" | "enc" | undefined;
14
14
  n?: string | undefined;
@@ -27,7 +27,7 @@ export declare function getJwksForPublication(data: DataAdapters, tenantId: stri
27
27
  */
28
28
  export declare function getJwksForVerification(data: DataAdapters, tenantId: string | undefined, modeOption: SigningKeyModeOption | undefined): Promise<{
29
29
  alg: "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "HS256" | "HS384" | "HS512";
30
- kty: "EC" | "RSA" | "oct";
30
+ kty: "RSA" | "EC" | "oct";
31
31
  kid?: string | undefined;
32
32
  use?: "sig" | "enc" | undefined;
33
33
  n?: string | undefined;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "9.13.1",
14
+ "version": "9.14.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],
@@ -63,7 +63,7 @@
63
63
  "vite": "^8.0.14",
64
64
  "vite-plugin-dts": "^4.5.4",
65
65
  "vitest": "^4.1.7",
66
- "@authhero/kysely-adapter": "12.8.2",
66
+ "@authhero/kysely-adapter": "12.8.3",
67
67
  "@authhero/widget": "0.39.0"
68
68
  },
69
69
  "dependencies": {
@@ -81,7 +81,7 @@
81
81
  "sanitize-html": "^2.17.4",
82
82
  "xstate": "^5.31.1",
83
83
  "@authhero/adapter-interfaces": "4.14.0",
84
- "@authhero/proxy": "0.10.15",
84
+ "@authhero/proxy": "0.11.0",
85
85
  "@authhero/saml": "0.5.12"
86
86
  },
87
87
  "peerDependencies": {