import { z } from "zod";
export interface FormSchemaQuestion {
    label: string;
    type: string;
    group: string;
    optionSetRef: string | null;
    validationRef: string | null;
    required: boolean;
}
export interface FormSchemaPayload {
    meta: {
        formCode: string;
        version: string;
        checksum: string;
        tenantId: string;
        generatedAt: string;
    };
    order: {
        tabs: string[];
        groups: Record<string, string[]>;
        questions: Record<string, string[]>;
    };
    tabs: Record<string, {
        label: string;
    }>;
    groups: Record<string, {
        label: string;
    }>;
    questions: Record<string, FormSchemaQuestion>;
    optionSets: Record<string, {
        sourceType: "static" | "masterData";
        sourceRef: string;
    }>;
    validation: Record<string, {
        rule: Record<string, unknown>;
        message: string;
    }>;
}
export interface SubmissionRequest {
    formCode: string;
    formVersion: string;
    tenantId: string;
    submittedBy: string;
    answers: Record<string, unknown>;
}
/** Legacy schema endpoint query: formCode + version */
export declare const SchemaQuerySchema: z.ZodObject<{
    formCode: z.ZodString;
    version: z.ZodString;
}, z.core.$strip>;
export type SchemaQuery = z.infer<typeof SchemaQuerySchema>;
/** Submit answers to a form */
export declare const SubmissionBodySchema: z.ZodObject<{
    formCode: z.ZodString;
    version: z.ZodString;
    moduleCode: z.ZodString;
    submittedBy: z.ZodOptional<z.ZodString>;
    answers: z.ZodRecord<z.ZodString, z.ZodUnknown>;
}, z.core.$strip>;
export type SubmissionBody = z.infer<typeof SubmissionBodySchema>;
/** Create a new form with its initial version */
export declare const CreateFormBodySchema: z.ZodObject<{
    code: z.ZodString;
    displayName: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    surveyJson: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    schemaChecksum: z.ZodString;
    semver: z.ZodDefault<z.ZodOptional<z.ZodString>>;
    moduleCode: z.ZodDefault<z.ZodOptional<z.ZodString>>;
}, z.core.$strip>;
export type CreateFormBody = z.infer<typeof CreateFormBodySchema>;
/** Update form metadata and/or save a schema draft */
export declare const UpdateFormBodySchema: z.ZodObject<{
    displayName: z.ZodOptional<z.ZodString>;
    description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    isActive: z.ZodOptional<z.ZodBoolean>;
    surveyJson: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    schemaChecksum: z.ZodOptional<z.ZodString>;
    semver: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type UpdateFormBody = z.infer<typeof UpdateFormBodySchema>;
/** Publish a new version to an existing form */
export declare const PublishVersionBodySchema: z.ZodObject<{
    semver: z.ZodString;
    surveyJson: z.ZodRecord<z.ZodString, z.ZodUnknown>;
    questionIndex: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
    schemaChecksum: z.ZodString;
    publishedBy: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type PublishVersionBody = z.infer<typeof PublishVersionBodySchema>;
/** List submissions query params */
export declare const ListSubmissionsQuerySchema: z.ZodObject<{
    formId: z.ZodString;
    page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
    status: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type ListSubmissionsQuery = z.infer<typeof ListSubmissionsQuerySchema>;
