/**
 * Shared mock Kysely database builder for orchestrator tests.
 *
 * Provides a configurable `createMockDb()` that constructs a chainable
 * mock supporting the common query patterns used by the orchestrator:
 *
 * - selectFrom().selectAll().where()...execute() / executeTakeFirst()
 * - selectFrom().select().where()...execute() / executeTakeFirst() / executeTakeFirstOrThrow()
 * - insertInto().values().execute() / returning().executeTakeFirstOrThrow()
 * - insertInto().values().onConflict(cb).execute()
 * - insertInto().values().returningAll().executeTakeFirstOrThrow()
 * - updateTable().set().where()...execute() / executeTakeFirst()
 * - deleteFrom().where()...execute() / executeTakeFirst()
 * - transaction().execute(async (trx) => { ... })
 *
 * Each test can configure return values via options and access the
 * underlying vi.fn() mocks for assertions via the `mocks` property.
 */
import { vi } from 'vitest';
export interface MockDbOptions {
    /** Rows returned by selectAll/select chains ending in .execute(). Default: [] */
    selectRows?: unknown[];
    /** Row returned by select chains ending in .executeTakeFirst(). Default: undefined */
    selectFirstRow?: unknown | undefined;
    /** Row returned by insert chains ending in .returningAll().executeTakeFirstOrThrow(). Default: { id: 'mock-id' } */
    insertedRow?: unknown;
    /** Row returned by insert chains ending in .returning().executeTakeFirstOrThrow(). Default: { id: 'mock-id' } */
    insertReturning?: unknown;
    /** Row returned by update chains ending in .returningAll().executeTakeFirstOrThrow() or executeTakeFirst(). Default: undefined */
    updatedRow?: unknown;
    /** Row returned by update chains ending in .returning(...).executeTakeFirst(). Default: undefined */
    updateReturning?: unknown;
    /** Result for update .execute() calls. Default: { numUpdatedRows: 0n } */
    updateResult?: {
        numUpdatedRows: bigint;
    };
    /** Result for delete .executeTakeFirst() calls. Default: { numDeletedRows: 0n } */
    deleteResult?: {
        numDeletedRows: bigint;
    };
    /** Result for count queries (fn.countAll). Default: { count: 0 } */
    countResult?: {
        count: number;
    };
    /** Result for insert chains ending in .executeTakeFirst(). Default: undefined */
    insertResult?: {
        numInsertedOrUpdatedRows: bigint;
    };
}
export interface MockDb {
    db: any;
    mocks: MockDbMocks;
}
export interface MockDbMocks {
    selectFrom: ReturnType<typeof vi.fn>;
    selectAll: ReturnType<typeof vi.fn>;
    select: ReturnType<typeof vi.fn>;
    selectWhere: ReturnType<typeof vi.fn>;
    selectOrderBy: ReturnType<typeof vi.fn>;
    selectLimit: ReturnType<typeof vi.fn>;
    selectExecute: ReturnType<typeof vi.fn>;
    selectExecuteTakeFirst: ReturnType<typeof vi.fn>;
    selectExecuteTakeFirstOrThrow: ReturnType<typeof vi.fn>;
    selectForUpdate: ReturnType<typeof vi.fn>;
    selectSkipLocked: ReturnType<typeof vi.fn>;
    insertInto: ReturnType<typeof vi.fn>;
    insertValues: ReturnType<typeof vi.fn>;
    insertReturning: ReturnType<typeof vi.fn>;
    insertReturningAll: ReturnType<typeof vi.fn>;
    insertExecute: ReturnType<typeof vi.fn>;
    insertExecuteTakeFirstOrThrow: ReturnType<typeof vi.fn>;
    onConflict: ReturnType<typeof vi.fn>;
    updateTable: ReturnType<typeof vi.fn>;
    updateSet: ReturnType<typeof vi.fn>;
    updateWhere: ReturnType<typeof vi.fn>;
    updateReturningAll: ReturnType<typeof vi.fn>;
    updateExecute: ReturnType<typeof vi.fn>;
    updateExecuteTakeFirst: ReturnType<typeof vi.fn>;
    updateExecuteTakeFirstOrThrow: ReturnType<typeof vi.fn>;
    deleteFrom: ReturnType<typeof vi.fn>;
    deleteWhere: ReturnType<typeof vi.fn>;
    deleteExecute: ReturnType<typeof vi.fn>;
    deleteExecuteTakeFirst: ReturnType<typeof vi.fn>;
    transaction: ReturnType<typeof vi.fn>;
    transactionExecute: ReturnType<typeof vi.fn>;
    countAll: ReturnType<typeof vi.fn>;
    countAs: ReturnType<typeof vi.fn>;
    countExecuteTakeFirst: ReturnType<typeof vi.fn>;
}
/**
 * Create a mock Kysely DB instance for orchestrator unit tests.
 *
 * All query chains are fully wired and return sensible defaults.
 * Override specific return values via the `options` parameter.
 *
 * @example
 * ```ts
 * const { db, mocks } = createMockDb({ selectRows: [row1, row2] });
 * const store = new SomeStore(db);
 * await store.list();
 * expect(mocks.selectFrom).toHaveBeenCalledWith('my_table');
 * ```
 */
export declare function createMockDb(options?: MockDbOptions): MockDb;
//# sourceMappingURL=mock-db.d.ts.map