@authhero/kysely-adapter 11.5.3 → 11.6.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,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { Database } from "../../src/db";
3
+ export declare function up(db: Kysely<Database>): Promise<void>;
4
+ export declare function down(db: Kysely<Database>): 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>;
@@ -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>;
@@ -169,6 +169,9 @@ import * as o070_collapse_auth0_source_into_db_connection from "./2026-05-13T12:
169
169
  import * as o071_migration_sources from "./2026-05-14T10:00:00_migration_sources";
170
170
  import * as o072_proxy_routes from "./2026-05-26T00:00:00_create_proxy_routes";
171
171
  import * as o073_proxy_routes_v2 from "./2026-05-28T00:00:00_proxy_routes_v2";
172
+ import * as o074_widen_user_permissions_resource_server_identifier from "./2026-06-04T10:00:00_widen_user_permissions_resource_server_identifier";
173
+ import * as o075_create_grants from "./2026-06-04T11:00:00_create_grants";
174
+ import * as o076_default_first_party_true from "./2026-06-04T11:01:00_default_first_party_true";
172
175
  declare const _default: {
173
176
  m1_init: typeof m1_init;
174
177
  m2_magicLink: typeof m2_magicLink;
@@ -341,5 +344,8 @@ declare const _default: {
341
344
  o071_migration_sources: typeof o071_migration_sources;
342
345
  o072_proxy_routes: typeof o072_proxy_routes;
343
346
  o073_proxy_routes_v2: typeof o073_proxy_routes_v2;
347
+ o074_widen_user_permissions_resource_server_identifier: typeof o074_widen_user_permissions_resource_server_identifier;
348
+ o075_create_grants: typeof o075_create_grants;
349
+ o076_default_first_party_true: typeof o076_default_first_party_true;
344
350
  };
345
351
  export default _default;
@@ -606,6 +606,16 @@ export declare const sqlRolePermissionSchema: z.ZodObject<{
606
606
  created_at: z.ZodString;
607
607
  tenant_id: z.ZodString;
608
608
  }, z.core.$strip>;
609
+ export declare const sqlGrantSchema: z.ZodObject<{
610
+ id: z.ZodString;
611
+ tenant_id: z.ZodString;
612
+ user_id: z.ZodString;
613
+ client_id: z.ZodString;
614
+ audience: z.ZodString;
615
+ scope: z.ZodString;
616
+ created_at: z.ZodString;
617
+ updated_at: z.ZodString;
618
+ }, z.core.$strip>;
609
619
  export declare const sqlUserPermissionSchema: z.ZodObject<{
610
620
  user_id: z.ZodString;
611
621
  resource_server_identifier: z.ZodString;
@@ -830,6 +840,7 @@ export interface Database {
830
840
  themes: z.infer<typeof sqlThemeSchema>;
831
841
  resource_servers: z.infer<typeof sqlResourceServerSchema>;
832
842
  role_permissions: z.infer<typeof sqlRolePermissionSchema>;
843
+ grants: z.infer<typeof sqlGrantSchema>;
833
844
  user_permissions: z.infer<typeof sqlUserPermissionSchema>;
834
845
  user_roles: z.infer<typeof sqlUserRoleSchema>;
835
846
  roles: z.infer<typeof sqlRoleSchema>;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { Grant, GrantInsert } from "@authhero/adapter-interfaces";
3
+ import { Database } from "../db";
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, grant: GrantInsert) => Promise<Grant>;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { Grant } from "@authhero/adapter-interfaces";
3
+ import { Database } from "../db";
4
+ export declare function get(db: Kysely<Database>): (tenant_id: string, user_id: string, clientID: string, audience?: string) => Promise<Grant | null>;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { GrantsAdapter } from "@authhero/adapter-interfaces";
3
+ import { Database } from "../db";
4
+ export declare function createGrantsAdapter(db: Kysely<Database>): GrantsAdapter;
@@ -0,0 +1,4 @@
1
+ import { ListParams, ListGrantsResponse } from "@authhero/adapter-interfaces";
2
+ import { Kysely } from "kysely";
3
+ import { Database } from "../db";
4
+ export declare function list(db: Kysely<Database>): (tenant_id: string, params?: ListParams) => Promise<ListGrantsResponse>;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { Database } from "../db";
3
+ export declare function remove(db: Kysely<Database>): (tenant_id: string, id: string) => Promise<boolean>;
4
+ export declare function removeByUser(db: Kysely<Database>): (tenant_id: string, user_id: string) => Promise<boolean>;