import { DrizzleClient } from '../../../types/drizzle.js';
import { IOAuthStateStore, OAuthStateRecord } from '../protocols/oauth-state-store.js';
import 'drizzle-orm/node-postgres';

interface DrizzleOAuthStateStoreOptions {
    /** TTL in ms. Default 10 minutes. */
    ttlMs?: number;
    /** Injectable clock for tests. Default `Date.now`. */
    now?: () => number;
    /** Injectable token generator for tests. Default 32-byte base64url. */
    generateToken?: () => string;
}
declare class DrizzleOAuthStateStore implements IOAuthStateStore {
    private readonly db;
    private readonly ttlMs;
    private readonly now;
    private readonly generateToken;
    constructor(db: DrizzleClient, opts?: DrizzleOAuthStateStoreOptions);
    generate(record: OAuthStateRecord): Promise<string>;
    consume(state: string): Promise<OAuthStateRecord>;
}

export { DrizzleOAuthStateStore, type DrizzleOAuthStateStoreOptions };
