UNPKG

@proofkit/better-auth

Version:

FileMaker adapter for Better Auth

28 lines (27 loc) 1.03 kB
import { Database, Metadata } from '../../fmodata/src.js'; import { DBFieldAttribute } from 'better-auth/db'; type BetterAuthSchema = Record<string, { fields: Record<string, DBFieldAttribute>; order: number; }>; export declare function getMetadata(db: Database): Promise<Metadata>; export declare function planMigration(db: Database, betterAuthSchema: BetterAuthSchema): Promise<MigrationPlan>; export declare function executeMigration(db: Database, migrationPlan: MigrationPlan): Promise<void>; interface FmField { name: string; type: "string" | "numeric" | "timestamp"; primary?: boolean; unique?: boolean; } declare const migrationStepTypes: readonly ["create", "update"]; interface MigrationStep { tableName: string; operation: (typeof migrationStepTypes)[number]; fields: FmField[]; } export type MigrationPlan = MigrationStep[]; export declare function prettyPrintMigrationPlan(migrationPlan: MigrationPlan, target?: { serverUrl?: string; fileName?: string; }): void; export {};