@authhero/kysely-adapter 11.4.1 → 11.5.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.
- package/dist/kysely-adapter.cjs +15 -15
- package/dist/kysely-adapter.d.ts +24 -2
- package/dist/kysely-adapter.mjs +2167 -1984
- package/dist/types/migrate/migrations/2026-05-26T00:00:00_create_proxy_routes.d.ts +3 -0
- package/dist/types/migrate/migrations/2026-05-28T00:00:00_proxy_routes_v2.d.ts +3 -0
- package/dist/types/migrate/migrations/index.d.ts +4 -0
- package/dist/types/src/db.d.ts +11 -0
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/proxyRoutes/adapter.d.ts +4 -0
- package/dist/types/src/proxyRoutes/index.d.ts +11 -0
- package/dist/types/src/proxyRoutes/resolve-host.d.ts +4 -0
- package/dist/types/src/proxyRoutes/serialize.d.ts +4 -0
- package/dist/types/src/tenants/list.d.ts +2 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +3 -2
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Kysely } from 'kysely';
|
|
2
2
|
import { z } from '@hono/zod-openapi';
|
|
3
|
-
import { Code, SigningKey, DataAdapters } from '@authhero/adapter-interfaces';
|
|
3
|
+
import { Code, SigningKey, ProxyRoutesAdapter, DataAdapters } from '@authhero/adapter-interfaces';
|
|
4
|
+
import { ProxyDataAdapter } from '@authhero/proxy';
|
|
4
5
|
|
|
5
6
|
declare const sqlThemeSchema: z.ZodObject<{
|
|
6
7
|
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
@@ -434,6 +435,7 @@ declare const sqlTenantSchema: z.ZodObject<{
|
|
|
434
435
|
allow_legacy_ro_grant_types: z.ZodOptional<z.ZodBoolean>;
|
|
435
436
|
allow_legacy_tokeninfo_endpoint: z.ZodOptional<z.ZodBoolean>;
|
|
436
437
|
change_pwd_flow_v1: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
client_id_metadata_document_registration: z.ZodOptional<z.ZodBoolean>;
|
|
437
439
|
custom_domains_provisioning: z.ZodOptional<z.ZodBoolean>;
|
|
438
440
|
dashboard_insights_view: z.ZodOptional<z.ZodBoolean>;
|
|
439
441
|
dashboard_log_streams_next: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -887,14 +889,34 @@ interface Database {
|
|
|
887
889
|
dead_lettered_at: string | null;
|
|
888
890
|
final_error: string | null;
|
|
889
891
|
};
|
|
892
|
+
proxy_routes: {
|
|
893
|
+
id: string;
|
|
894
|
+
tenant_id: string;
|
|
895
|
+
custom_domain_id: string;
|
|
896
|
+
priority: number;
|
|
897
|
+
match: string;
|
|
898
|
+
handlers: string;
|
|
899
|
+
created_at: string;
|
|
900
|
+
updated_at: string;
|
|
901
|
+
};
|
|
890
902
|
}
|
|
891
903
|
|
|
892
904
|
declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
|
|
893
905
|
declare function migrateDown(db: Kysely<Database>, debug?: boolean): Promise<void>;
|
|
894
906
|
|
|
907
|
+
declare function createProxyRoutesAdapter(db: Kysely<Database>): ProxyRoutesAdapter;
|
|
908
|
+
|
|
909
|
+
/**
|
|
910
|
+
* Build a full `ProxyDataAdapter` (CRUD + cross-tenant `resolveHost`) for the
|
|
911
|
+
* `@authhero/proxy` data plane. Authhero itself only needs the CRUD adapter
|
|
912
|
+
* surfaced via `createAdapters(db).proxyRoutes`; a separate proxy worker
|
|
913
|
+
* process uses this helper when reading directly from the same database.
|
|
914
|
+
*/
|
|
915
|
+
declare function createProxyDataAdapter(db: Kysely<Database>): ProxyDataAdapter;
|
|
916
|
+
|
|
895
917
|
declare function createAdapters(db: Kysely<Database>, databaseOptions?: {
|
|
896
918
|
useTransactions: boolean;
|
|
897
919
|
}): DataAdapters;
|
|
898
920
|
|
|
899
|
-
export { createAdapters as default, migrateDown, migrateToLatest };
|
|
921
|
+
export { createProxyDataAdapter, createProxyRoutesAdapter, createAdapters as default, migrateDown, migrateToLatest };
|
|
900
922
|
export type { Database };
|