import { BetterAuthOptions } from "@better-auth/core"; import { BaseModelNames } from "@better-auth/core/db"; import { DBAdapter, Where } from "@better-auth/core/db/adapter"; //#region src/db/with-hooks.d.ts type DatabaseHooksEntry = { source: string; hooks: Exclude; }; declare function getWithHooks(adapter: DBAdapter, ctx: { options: BetterAuthOptions; hooks: DatabaseHooksEntry[]; }): { createWithHooks: >(data: T, model: BaseModelNames, customCreateFn?: { fn: (data: Record) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; updateWithHooks: >(data: any, where: Where[], model: BaseModelNames, customUpdateFn?: { fn: (data: Record) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; updateManyWithHooks: <_T extends Record>(data: any, where: Where[], model: BaseModelNames, customUpdateFn?: { fn: (data: Record) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; deleteWithHooks: >(where: Where[], model: BaseModelNames, customDeleteFn?: { fn: (where: Where[]) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; deleteManyWithHooks: >(where: Where[], model: BaseModelNames, customDeleteFn?: { fn: (where: Where[]) => void | Promise; executeMainFn?: boolean; } | undefined) => Promise; }; //#endregion export { DatabaseHooksEntry, getWithHooks };