import type { CachePort } from "../cache/cache-port.js";
import type { CreateFormInput, FormRecord, FormRepository, FormVersionRecord, FormWithVersions, PublishVersionInput, SubmissionFilter, SubmissionPage, SubmissionRecord, UpdateFormInput } from "./domain.js";
export declare class FormService {
    private readonly repo;
    private readonly cache;
    constructor(repo: FormRepository, cache: CachePort);
    listForms(): Promise<FormRecord[]>;
    getFormByCode(code: string): Promise<FormWithVersions | null>;
    /**
     * Legacy-compat: return the surveyJson of the requested version.
     * Kept for the GET /api/forms/schema endpoint.
     */
    getSchema(formCode: string, version: string): Promise<Record<string, unknown>>;
    createForm(data: CreateFormInput): Promise<FormRecord>;
    updateForm(code: string, data: UpdateFormInput): Promise<FormWithVersions | null>;
    deleteForm(code: string): Promise<boolean>;
    publishVersion(formCode: string, data: PublishVersionInput): Promise<FormVersionRecord>;
    submit(formCode: string, version: string, moduleCode: string, answers: Record<string, unknown>, submittedBy?: string): Promise<SubmissionRecord>;
    listSubmissions(formId: string, filter: SubmissionFilter): Promise<SubmissionPage>;
}
