UNPKG

better-auth

Version:

The most comprehensive authentication library for TypeScript.

60 lines (57 loc) 1.54 kB
import { Db } from 'mongodb'; import { B as BetterAuthOptions, W as Where } from '../../shared/better-auth.Bs_C2zap.mjs'; import '../../shared/better-auth.Bi8FQwDD.mjs'; import 'zod'; import '../../shared/better-auth.DNEJbRnE.mjs'; import 'jose'; import 'kysely'; import 'better-call'; import 'better-sqlite3'; import 'bun:sqlite'; declare const mongodbAdapter: (db: Db) => (options: BetterAuthOptions) => { id: string; create<T extends Record<string, any>, R = T>(data: { model: string; data: Omit<T, "id">; select?: string[]; forceAllowId?: boolean; }): Promise<any>; findOne<T>(data: { model: string; where: Where[]; select?: string[]; }): Promise<any>; findMany<T>(data: { model: string; where?: Where[]; limit?: number; sortBy?: { field: string; direction: "asc" | "desc"; }; offset?: number; }): Promise<any[]>; count(data: { model: string; where?: Where[]; }): Promise<number>; update<T>(data: { model: string; where: Where[]; update: Record<string, any>; }): Promise<any>; updateMany(data: { model: string; where: Where[]; update: Record<string, any>; }): Promise<number>; delete<T>(data: { model: string; where: Where[]; }): Promise<any>; deleteMany(data: { model: string; where: Where[]; }): Promise<number>; }; export { mongodbAdapter };