@authhero/kysely-adapter 11.4.1 → 11.5.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.
@@ -0,0 +1,3 @@
1
+ import { Kysely } from "kysely";
2
+ export declare function up(db: Kysely<unknown>): Promise<void>;
3
+ export declare function down(db: Kysely<unknown>): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { Kysely } from "kysely";
2
+ export declare function up(db: Kysely<unknown>): Promise<void>;
3
+ export declare function down(db: Kysely<unknown>): Promise<void>;
@@ -167,6 +167,8 @@ import * as o068_move_disable_signup_to_connection from "./2026-05-13T10:00:00_m
167
167
  import * as o069_actions_is_system_inherit from "./2026-05-13T11:00:00_actions_is_system_inherit";
168
168
  import * as o070_collapse_auth0_source_into_db_connection from "./2026-05-13T12:00:00_collapse_auth0_source_into_db_connection";
169
169
  import * as o071_migration_sources from "./2026-05-14T10:00:00_migration_sources";
170
+ import * as o072_proxy_routes from "./2026-05-26T00:00:00_create_proxy_routes";
171
+ import * as o073_proxy_routes_v2 from "./2026-05-28T00:00:00_proxy_routes_v2";
170
172
  declare const _default: {
171
173
  m1_init: typeof m1_init;
172
174
  m2_magicLink: typeof m2_magicLink;
@@ -337,5 +339,7 @@ declare const _default: {
337
339
  o069_actions_is_system_inherit: typeof o069_actions_is_system_inherit;
338
340
  o070_collapse_auth0_source_into_db_connection: typeof o070_collapse_auth0_source_into_db_connection;
339
341
  o071_migration_sources: typeof o071_migration_sources;
342
+ o072_proxy_routes: typeof o072_proxy_routes;
343
+ o073_proxy_routes_v2: typeof o073_proxy_routes_v2;
340
344
  };
341
345
  export default _default;
@@ -888,5 +888,15 @@ export interface Database {
888
888
  dead_lettered_at: string | null;
889
889
  final_error: string | null;
890
890
  };
891
+ proxy_routes: {
892
+ id: string;
893
+ tenant_id: string;
894
+ custom_domain_id: string;
895
+ priority: number;
896
+ match: string;
897
+ handlers: string;
898
+ created_at: string;
899
+ updated_at: string;
900
+ };
891
901
  }
892
902
  export {};
@@ -3,6 +3,7 @@ import { Database } from "./db";
3
3
  import { DataAdapters } from "@authhero/adapter-interfaces";
4
4
  export { migrateToLatest, migrateDown } from "../migrate/migrate";
5
5
  export type { Database } from "./db";
6
+ export { createProxyRoutesAdapter, createProxyDataAdapter, } from "./proxyRoutes";
6
7
  export default function createAdapters(db: Kysely<Database>, databaseOptions?: {
7
8
  useTransactions: boolean;
8
9
  }): DataAdapters;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { ProxyRoutesAdapter } from "@authhero/adapter-interfaces";
3
+ import { Database } from "../db";
4
+ export declare function createProxyRoutesAdapter(db: Kysely<Database>): ProxyRoutesAdapter;
@@ -0,0 +1,11 @@
1
+ import { Kysely } from "kysely";
2
+ import type { ProxyDataAdapter } from "@authhero/proxy";
3
+ import { Database } from "../db";
4
+ export { createProxyRoutesAdapter } from "./adapter";
5
+ /**
6
+ * Build a full `ProxyDataAdapter` (CRUD + cross-tenant `resolveHost`) for the
7
+ * `@authhero/proxy` data plane. Authhero itself only needs the CRUD adapter
8
+ * surfaced via `createAdapters(db).proxyRoutes`; a separate proxy worker
9
+ * process uses this helper when reading directly from the same database.
10
+ */
11
+ export declare function createProxyDataAdapter(db: Kysely<Database>): ProxyDataAdapter;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import type { ResolvedHost } from "@authhero/proxy";
3
+ import { Database } from "../db";
4
+ export declare function resolveHostFromKysely(db: Kysely<Database>, host: string): Promise<ResolvedHost | null>;
@@ -0,0 +1,4 @@
1
+ import { ProxyRoute } from "@authhero/adapter-interfaces";
2
+ import { Database } from "../db";
3
+ export type ProxyRouteRow = Database["proxy_routes"];
4
+ export declare function rowToProxyRoute(row: ProxyRouteRow): ProxyRoute;