import { type ActionContext } from '../actions.js';
import type { EntryCounts, FetchFormEntriesParams, FormField, FormSubmission } from './types.js';
interface FormMeta {
    name?: string;
    slug?: string;
}
/**
 * Convert a raw submission row into the typed shape. Prefers the persisted
 * sender columns (set by the new pipeline) and falls back to deriving them
 * from `data` so legacy/seed rows still display a name/email/preview.
 */
export declare function normalizeEntry(row: any, formMeta?: FormMeta): FormSubmission;
export interface ListEntriesResult {
    entries: FormSubmission[];
    total: number;
    page: number;
    pageSize: number;
}
export declare function listEntries(params?: FetchFormEntriesParams): Promise<ListEntriesResult>;
export declare function getEntryById(id: string): Promise<FormSubmission | null>;
/**
 * Render an entry alongside the field schema it was captured against. Falls
 * back to the form's current schema when the submission predates versioning.
 */
export declare function getEntryWithSchema(id: string): Promise<{
    entry: FormSubmission;
    fields: FormField[];
} | null>;
export interface FormEntriesExport {
    csv: string;
    count: number;
    formName: string;
    formSlug: string;
}
/**
 * Build a CSV export of a form's submissions. Values are decrypted (PII) and
 * include the schema field columns plus core metadata. Bounded by `EXPORT_MAX`.
 * Returns `null` when the form does not exist.
 */
export declare function exportFormEntries(formId: string): Promise<FormEntriesExport | null>;
export declare function getEntryCounts(params?: FetchFormEntriesParams): Promise<EntryCounts>;
interface EntryPatch {
    unread?: boolean;
    starred?: boolean;
    archived?: boolean;
}
export declare function updateEntry(ctx: ActionContext, id: string, patch: EntryPatch): Promise<FormSubmission | null>;
export declare function markEntryRead(ctx: ActionContext, id: string): Promise<FormSubmission | null>;
export declare function markEntryUnread(ctx: ActionContext, id: string): Promise<FormSubmission | null>;
export declare function starEntry(ctx: ActionContext, id: string): Promise<FormSubmission | null>;
export declare function unstarEntry(ctx: ActionContext, id: string): Promise<FormSubmission | null>;
export declare function archiveEntry(ctx: ActionContext, id: string): Promise<FormSubmission | null>;
export declare function unarchiveEntry(ctx: ActionContext, id: string): Promise<FormSubmission | null>;
export declare function bulkUpdateEntries(ctx: ActionContext, ids: string[], patch: EntryPatch): Promise<number>;
export declare function deleteEntry(ctx: ActionContext, id: string): Promise<void>;
export {};
//# sourceMappingURL=entries.d.ts.map