@authhero/kysely-adapter 11.14.1 → 11.15.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.
@@ -121,7 +121,6 @@ export declare const sqlUserSchema: z.ZodObject<{
121
121
  family_name: z.ZodOptional<z.ZodString>;
122
122
  }, z.core.$catchall<z.ZodAny>>>;
123
123
  }, z.core.$strip>>>;
124
- login_count: z.ZodOptional<z.ZodNumber>;
125
124
  email_verified: z.ZodNumber;
126
125
  phone_verified: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
127
126
  is_social: z.ZodNumber;
@@ -1,4 +1,11 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { AuditEventInsert } from "@authhero/adapter-interfaces";
3
3
  import { Database } from "../db";
4
+ /**
5
+ * Insert a single outbox event using the provided Kysely instance — which may
6
+ * be a transaction (`trx`). Shared by `createOutboxEvent` (standalone insert)
7
+ * and the user write adapters, which call it inside their own transaction so
8
+ * the event row commits together with the business row (issue #1057).
9
+ */
10
+ export declare function insertOutboxEvent(db: Kysely<Database>, tenantId: string, id: string, event: AuditEventInsert): Promise<void>;
4
11
  export declare function createOutboxEvent(db: Kysely<Database>): (tenantId: string, event: AuditEventInsert) => Promise<string>;
@@ -1,4 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
2
  import { Database } from "../db";
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>;
3
+ import { User, UserInsert, CreateOptions, WriteOptions } from "@authhero/adapter-interfaces";
4
+ export declare function create(db: Kysely<Database>): (tenantId: string, user: UserInsert, options?: CreateOptions & WriteOptions) => Promise<User>;
@@ -1,3 +1,4 @@
1
1
  import { Kysely } from "kysely";
2
+ import { WriteOptions } from "@authhero/adapter-interfaces";
2
3
  import { Database } from "../db";
3
- export declare function remove(db: Kysely<Database>): (tenant_id: string, user_id: string) => Promise<boolean>;
4
+ export declare function remove(db: Kysely<Database>): (tenant_id: string, user_id: string, options?: WriteOptions) => Promise<boolean>;
@@ -1,4 +1,4 @@
1
- import { PostUsersBody, User } from "@authhero/adapter-interfaces";
1
+ import { PostUsersBody, User, WriteOptions } from "@authhero/adapter-interfaces";
2
2
  import { Kysely } from "kysely";
3
3
  import { Database } from "../db";
4
- export declare function update(db: Kysely<Database>): (tenant_id: string, user_id: string, user: Partial<PostUsersBody> & Partial<Pick<User, "last_login" | "last_ip" | "login_count">>) => Promise<boolean>;
4
+ export declare function update(db: Kysely<Database>): (tenant_id: string, user_id: string, user: Partial<PostUsersBody> & Partial<Pick<User, "last_login" | "last_ip" | "login_count">>, options?: WriteOptions) => Promise<boolean>;