export interface PreviewSession {
    token: string;
    collection: string;
    documentId: string;
    /** When the token expires (server clock). */
    expiresAt: Date;
    /** The admin who issued the token (used for audit + future revocation). */
    issuedBy?: string;
}
export interface CreatePreviewSessionOptions {
    /**
     * Token lifetime in seconds. Defaults to 7 days. The maximum is
     * enforced server-side ({@link MAX_PREVIEW_TOKEN_TTL_SECONDS}). A short
     * TTL is preferable for one-off client reviews; longer TTLs are okay
     * for staging-style preview links shared with trusted partners.
     */
    ttlSeconds?: number;
    /** Issuing admin's user id (recorded in the JWT for audit). */
    issuedBy?: string;
}
export interface PreviewAdapter {
    createPreviewSession(collection: string, documentId: string, options?: CreatePreviewSessionOptions): Promise<PreviewSession>;
    validatePreviewToken(token: string): Promise<PreviewSession | null>;
    exitPreview(token: string): Promise<void>;
    getPreviewData(session: PreviewSession): Promise<Record<string, unknown> | null>;
}
/** 5 minutes — fits "one tab, one read" review flows. */
export declare const DEFAULT_PREVIEW_TOKEN_TTL_SECONDS: number;
/**
 * Upper bound for token lifetime. Tokens are JWT-signed and stateless, so a
 * leaked token is valid until expiry — keep the ceiling reasonable. Sites
 * that need shareable URLs for months should use draft-publishing instead.
 */
export declare const MAX_PREVIEW_TOKEN_TTL_SECONDS: number;
export declare function createPreviewAdapter(secret: string, db: unknown): PreviewAdapter;
//# sourceMappingURL=index.d.ts.map