import { type UnansweredQuestion } from "../schema";
import type { Paginated } from "../../schemas/pagination";
import type { ListUnansweredQuestionsQuery } from "../../schemas/tenant";
export interface RecordUnansweredQuestionInput {
    /** The conversation this came from, for context. Null if unknown. */
    threadId: string | null;
    question: string;
}
/**
 * Logs a question the assistant couldn't answer from the KB. Called
 * fire-and-forget off the chat response path (see src/routes/chat/index.ts), so
 * it never adds to reply latency -- a write failure is logged, not surfaced to
 * the visitor.
 */
export declare function recordUnansweredQuestion(tenantId: string, input: RecordUnansweredQuestionInput): Promise<void>;
/**
 * Dashboard list, newest first and offset-paginated so a tenant with many logged
 * gaps doesn't load them all at once. Filtered by `status` (default open) so the
 * admin's default view is the actionable set -- questions they haven't handled.
 */
export declare function listUnansweredQuestions(tenantId: string, pagination: ListUnansweredQuestionsQuery): Promise<Paginated<UnansweredQuestion>>;
export interface UnansweredQuestionStats {
    open: number;
    resolved: number;
    total: number;
}
/**
 * Tenant-wide counts, independent of the current page window, so the dashboard's
 * summary tiles and the "open" badge stay correct regardless of pagination.
 */
export declare function getUnansweredQuestionStats(tenantId: string): Promise<UnansweredQuestionStats>;
/**
 * Marks a question handled (or re-opens it). Tenant-scoped -- returns null if the
 * row belongs to a different tenant, so one tenant can never resolve another's.
 */
export declare function setUnansweredQuestionResolved(tenantId: string, id: string, resolved: boolean): Promise<UnansweredQuestion | null>;
/** Tenant-scoped delete -- returns null if the row isn't this tenant's. */
export declare function deleteUnansweredQuestion(tenantId: string, id: string): Promise<UnansweredQuestion | null>;
