@authhero/kysely-adapter 11.9.0 → 11.10.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 (34) hide show
  1. package/dist/kysely-adapter.cjs +18 -18
  2. package/dist/kysely-adapter.mjs +2077 -1967
  3. package/dist/types/src/actions/create.d.ts +2 -2
  4. package/dist/types/src/authenticationMethods/create.d.ts +2 -2
  5. package/dist/types/src/clientGrants/create.d.ts +2 -2
  6. package/dist/types/src/clients/create.d.ts +2 -2
  7. package/dist/types/src/connections/create.d.ts +2 -2
  8. package/dist/types/src/customDomains/create.d.ts +2 -2
  9. package/dist/types/src/emailProvideres/create.d.ts +2 -2
  10. package/dist/types/src/emailTemplates/create.d.ts +2 -2
  11. package/dist/types/src/flows/create.d.ts +2 -2
  12. package/dist/types/src/forms/create.d.ts +2 -2
  13. package/dist/types/src/hook-code/create.d.ts +2 -2
  14. package/dist/types/src/hooks/create.d.ts +2 -2
  15. package/dist/types/src/invites/create.d.ts +2 -2
  16. package/dist/types/src/keys/create.d.ts +2 -2
  17. package/dist/types/src/organizations/create.d.ts +2 -2
  18. package/dist/types/src/passwords/create.d.ts +2 -2
  19. package/dist/types/src/resourceServers/create.d.ts +2 -2
  20. package/dist/types/src/role-permissions/assign.d.ts +2 -2
  21. package/dist/types/src/role-permissions/index.d.ts +1 -1
  22. package/dist/types/src/roles/create.d.ts +2 -2
  23. package/dist/types/src/tenants/create.d.ts +2 -2
  24. package/dist/types/src/themes/create.d.ts +2 -2
  25. package/dist/types/src/themes/list.d.ts +4 -0
  26. package/dist/types/src/universalLoginTemplates/set.d.ts +2 -2
  27. package/dist/types/src/user-organizations/create.d.ts +2 -2
  28. package/dist/types/src/user-permissions/create.d.ts +2 -2
  29. package/dist/types/src/user-permissions/index.d.ts +1 -1
  30. package/dist/types/src/user-roles/create.d.ts +2 -1
  31. package/dist/types/src/user-roles/index.d.ts +1 -1
  32. package/dist/types/src/users/create.d.ts +2 -2
  33. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  34. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Action, ActionInsert } from "@authhero/adapter-interfaces";
2
+ import { Action, ActionInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, action: ActionInsert) => Promise<Action>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, action: ActionInsert, options?: CreateOptions) => Promise<Action>;
@@ -1,4 +1,4 @@
1
- import { AuthenticationMethod, AuthenticationMethodInsert } from "@authhero/adapter-interfaces";
1
+ import { AuthenticationMethod, AuthenticationMethodInsert, CreateOptions } from "@authhero/adapter-interfaces";
2
2
  import { Kysely } from "kysely";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, method: AuthenticationMethodInsert) => Promise<AuthenticationMethod>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, method: AuthenticationMethodInsert, options?: CreateOptions) => Promise<AuthenticationMethod>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { ClientGrant, ClientGrantInsert } from "@authhero/adapter-interfaces";
2
+ import { ClientGrant, ClientGrantInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: ClientGrantInsert) => Promise<ClientGrant>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: ClientGrantInsert, options?: CreateOptions) => Promise<ClientGrant>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Client, ClientInsert } from "@authhero/adapter-interfaces";
2
+ import { Client, ClientInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: ClientInsert) => Promise<Client>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: ClientInsert, options?: CreateOptions) => Promise<Client>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Connection, ConnectionInsert } from "@authhero/adapter-interfaces";
2
+ import { Connection, ConnectionInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: ConnectionInsert) => Promise<Connection>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: ConnectionInsert, options?: CreateOptions) => Promise<Connection>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { CustomDomain, CustomDomainInsert } from "@authhero/adapter-interfaces";
2
+ import { CustomDomain, CustomDomainInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: CustomDomainInsert) => Promise<CustomDomain>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: CustomDomainInsert, options?: CreateOptions) => Promise<CustomDomain>;
@@ -1,4 +1,4 @@
1
- import { EmailProvider } from "@authhero/adapter-interfaces";
1
+ import { CreateOptions, EmailProvider } from "@authhero/adapter-interfaces";
2
2
  import { Kysely } from "kysely";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, emailProvider: EmailProvider) => Promise<void>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, emailProvider: EmailProvider, options?: CreateOptions) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { EmailTemplate } from "@authhero/adapter-interfaces";
1
+ import { EmailTemplate, CreateOptions } from "@authhero/adapter-interfaces";
2
2
  import { Kysely } from "kysely";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, template: EmailTemplate) => Promise<EmailTemplate>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, template: EmailTemplate, options?: CreateOptions) => Promise<EmailTemplate>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Flow, FlowInsert } from "@authhero/adapter-interfaces";
2
+ import { CreateOptions, Flow, FlowInsert } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: FlowInsert) => Promise<Flow>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: FlowInsert, options?: CreateOptions) => Promise<Flow>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Form, FormInsert } from "@authhero/adapter-interfaces";
2
+ import { CreateOptions, Form, FormInsert } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: FormInsert) => Promise<Form>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: FormInsert, options?: CreateOptions) => Promise<Form>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { HookCode, HookCodeInsert } from "@authhero/adapter-interfaces";
2
+ import { CreateOptions, HookCode, HookCodeInsert } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, hookCode: HookCodeInsert) => Promise<HookCode>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, hookCode: HookCodeInsert, options?: CreateOptions) => Promise<HookCode>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Hook, HookInsert } from "@authhero/adapter-interfaces";
2
+ import { CreateOptions, Hook, HookInsert } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, hook: HookInsert) => Promise<Hook>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, hook: HookInsert, options?: CreateOptions) => Promise<Hook>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { Invite, InviteInsert } from "@authhero/adapter-interfaces";
4
- export declare function create(db: Kysely<Database>): (tenantId: string, invite: InviteInsert) => Promise<Invite>;
3
+ import { Invite, InviteInsert, CreateOptions } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenantId: string, invite: InviteInsert, options?: CreateOptions) => Promise<Invite>;
@@ -1,4 +1,4 @@
1
- import { SigningKey } from "@authhero/adapter-interfaces";
1
+ import { SigningKey, CreateOptions } from "@authhero/adapter-interfaces";
2
2
  import { Kysely } from "kysely";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (key: SigningKey) => Promise<void>;
4
+ export declare function create(db: Kysely<Database>): (key: SigningKey, options?: CreateOptions) => Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { Organization, OrganizationInsert } from "@authhero/adapter-interfaces";
4
- export declare function create(db: Kysely<Database>): (tenantId: string, organization: OrganizationInsert) => Promise<Organization>;
3
+ import { Organization, OrganizationInsert, CreateOptions } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenantId: string, organization: OrganizationInsert, options?: CreateOptions) => Promise<Organization>;
@@ -1,7 +1,7 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { PasswordInsert } from "@authhero/adapter-interfaces";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, password: PasswordInsert) => Promise<{
3
+ import { PasswordInsert, CreateOptions } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, password: PasswordInsert, options?: CreateOptions) => Promise<{
5
5
  user_id: string;
6
6
  password: string;
7
7
  algorithm: "bcrypt" | "argon2id";
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { ResourceServer, ResourceServerInsert } from "@authhero/adapter-interfaces";
2
+ import { ResourceServer, ResourceServerInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, params: ResourceServerInsert) => Promise<ResourceServer>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, params: ResourceServerInsert, createOptions?: CreateOptions) => Promise<ResourceServer>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { RolePermissionInsert } from "@authhero/adapter-interfaces";
4
- export declare function assign(db: Kysely<Database>): (tenant_id: string, role_id: string, permissions: RolePermissionInsert[]) => Promise<boolean>;
3
+ import { CreateOptions, RolePermissionInsert } from "@authhero/adapter-interfaces";
4
+ export declare function assign(db: Kysely<Database>): (tenant_id: string, role_id: string, permissions: RolePermissionInsert[], options?: CreateOptions) => Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
3
  export declare function rolePermissions(db: Kysely<Database>): {
4
- assign: (tenant_id: string, role_id: string, permissions: import("@authhero/adapter-interfaces").RolePermissionInsert[]) => Promise<boolean>;
4
+ assign: (tenant_id: string, role_id: string, permissions: import("@authhero/adapter-interfaces").RolePermissionInsert[], options?: import("@authhero/adapter-interfaces").CreateOptions) => Promise<boolean>;
5
5
  remove: (tenant_id: string, role_id: string, permissions: Pick<import("@authhero/adapter-interfaces").RolePermissionInsert, "resource_server_identifier" | "permission_name">[]) => Promise<boolean>;
6
6
  list: (tenant_id: string, role_id: string, params?: import("@authhero/adapter-interfaces").ListParams) => Promise<{
7
7
  role_id: string;
@@ -1,6 +1,6 @@
1
1
  import { Kysely } from "kysely";
2
- import { Role, RoleInsert } from "@authhero/adapter-interfaces";
2
+ import { Role, RoleInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
4
  export declare function create(db: Kysely<Database>): (tenantId: string, params: RoleInsert & {
5
5
  is_system?: boolean;
6
- }) => Promise<Role>;
6
+ }, options?: CreateOptions) => Promise<Role>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { CreateTenantParams, Tenant } from "@authhero/adapter-interfaces";
2
+ import { CreateTenantParams, Tenant, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (params: CreateTenantParams) => Promise<Tenant>;
4
+ export declare function create(db: Kysely<Database>): (params: CreateTenantParams, options?: CreateOptions) => Promise<Tenant>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
- import { Theme, ThemeInsert } from "@authhero/adapter-interfaces";
2
+ import { Theme, ThemeInsert, CreateOptions } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, theme: ThemeInsert, themeId?: string) => Promise<Theme>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, theme: ThemeInsert, themeId?: string, options?: CreateOptions) => Promise<Theme>;
@@ -0,0 +1,4 @@
1
+ import { Kysely } from "kysely";
2
+ import { Theme } from "@authhero/adapter-interfaces";
3
+ import { Database } from "../db";
4
+ export declare function list(db: Kysely<Database>): (tenant_id: string) => Promise<Theme[]>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { UniversalLoginTemplate } from "@authhero/adapter-interfaces";
4
- export declare function set(db: Kysely<Database>): (tenant_id: string, template: UniversalLoginTemplate) => Promise<void>;
3
+ import { CreateOptions, UniversalLoginTemplate } from "@authhero/adapter-interfaces";
4
+ export declare function set(db: Kysely<Database>): (tenant_id: string, template: UniversalLoginTemplate, options?: CreateOptions) => Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { UserOrganization, UserOrganizationInsert } from "@authhero/adapter-interfaces";
4
- export declare function create(db: Kysely<Database>): (tenantId: string, userOrganization: UserOrganizationInsert) => Promise<UserOrganization>;
3
+ import { UserOrganization, UserOrganizationInsert, CreateOptions } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenantId: string, userOrganization: UserOrganizationInsert, options?: CreateOptions) => Promise<UserOrganization>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { UserPermissionInsert } from "@authhero/adapter-interfaces";
4
- export declare function create(db: Kysely<Database>): (tenant_id: string, user_id: string, permission: UserPermissionInsert, organization_id?: string) => Promise<boolean>;
3
+ import { CreateOptions, UserPermissionInsert } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, user_id: string, permission: UserPermissionInsert, organization_id?: string, options?: CreateOptions) => Promise<boolean>;
@@ -1,7 +1,7 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
3
  export declare function userPermissions(db: Kysely<Database>): {
4
- create: (tenant_id: string, user_id: string, permission: import("@authhero/adapter-interfaces").UserPermissionInsert, organization_id?: string) => Promise<boolean>;
4
+ create: (tenant_id: string, user_id: string, permission: import("@authhero/adapter-interfaces").UserPermissionInsert, organization_id?: string, options?: import("@authhero/adapter-interfaces").CreateOptions) => Promise<boolean>;
5
5
  remove: (tenant_id: string, user_id: string, permission: {
6
6
  resource_server_identifier: string;
7
7
  permission_name: string;
@@ -1,3 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
+ import { CreateOptions } from "@authhero/adapter-interfaces";
2
3
  import { Database } from "../db";
3
- export declare function create(db: Kysely<Database>): (tenant_id: string, user_id: string, role_id: string, organization_id?: string) => Promise<boolean>;
4
+ export declare function create(db: Kysely<Database>): (tenant_id: string, user_id: string, role_id: string, organization_id?: string, options?: CreateOptions) => Promise<boolean>;
@@ -2,6 +2,6 @@ import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
3
  export declare function userRoles(db: Kysely<Database>): {
4
4
  list: (tenant_id: string, user_id: string, _params?: import("@authhero/adapter-interfaces").ListParams, organization_id?: string) => Promise<import("@authhero/adapter-interfaces").Role[]>;
5
- create: (tenant_id: string, user_id: string, role_id: string, organization_id?: string) => Promise<boolean>;
5
+ create: (tenant_id: string, user_id: string, role_id: string, organization_id?: string, options?: import("@authhero/adapter-interfaces").CreateOptions) => Promise<boolean>;
6
6
  remove: (tenant_id: string, user_id: string, role_id: string, organization_id?: string) => Promise<boolean>;
7
7
  };
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
3
- import { User, UserInsert } from "@authhero/adapter-interfaces";
4
- export declare function create(db: Kysely<Database>): (tenantId: string, user: UserInsert) => Promise<User>;
3
+ import { User, UserInsert, CreateOptions } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenantId: string, user: UserInsert, options?: CreateOptions) => Promise<User>;