import { createAdapterFactory, type DBAdapterDebugLogOption } from "better-auth/adapters"; export interface JazzAdapterConfig { /** * Helps you debug issues with the adapter. */ debugLogs?: DBAdapterDebugLogOption; /** * The sync server to use. */ syncServer: string; /** * The worker account ID to use. */ accountID: string; /** * The worker account secret to use. */ accountSecret: string; } /** * Creates a Better Auth database adapter that integrates with Jazz framework. * * This adapter provides a seamless integration between Better Auth and Jazz, * allowing you to use Jazz as database for for Better Auth's authentication system. * * @param config - Configuration object for the Jazz Better Auth adapter * @param config.syncServer - The Jazz sync server URL to connect to (e.g., "wss://your-sync-server.com") * @param config.accountID - The worker account ID for the Jazz worker that will handle auth operations * @param config.accountSecret - The worker account secret for authenticating with the Jazz sync server * @param config.debugLogs - Optional debug logging configuration to help troubleshoot adapter issues * * @returns A Better Auth adapter instance configured to work with Jazz * * @example * ```typescript * import { JazzBetterAuthDatabaseAdapter } from "jazz-tools/better-auth/database-adapter"; * import { createAuth } from "better-auth"; * * const auth = createAuth({ * adapter: JazzBetterAuthDatabaseAdapter({ * syncServer: "wss://your-jazz-sync-server.com", * accountID: "auth-worker-account-id", * accountSecret: "your-worker-account-secret", * }), * // ... other auth configuration * }); * ``` */ export declare const JazzBetterAuthDatabaseAdapter: (config: JazzAdapterConfig) => ReturnType; //# sourceMappingURL=index.d.ts.map