import { FormItemType } from "../Common/Channels/Form"; export interface SubmittedForm { id: string; shardKey: string; spaceId: string; formId: string; contractVersion: number; formRevision: number; schemaHash: string | null; tags: FormTag[]; /** Compatibilidad con formularios V1. */ responses?: FormResponse[] | null; answers: FormAnswerV2[]; createdAt: Date; expireAt: Date | null; completedAt: Date | null; } export interface FormTag { name: string; value: string; } export declare enum FormStatus { pending = 0, completed = 1, expired = 2 } export interface FormResponse { questionId: string; type: FormItemType; response: unknown; } export interface FormAnswerV2 { fieldId: string; fieldType: string; /** Snapshot útil para exportaciones históricas. */ fieldLabel: string | null; textValue: string | null; numericValue: number | null; /** Formatos canónicos: yyyy-MM-dd y HH:mm:ss. */ dateValue: string | null; timeValue: string | null; selectedOptions: FormSelectedOption[] | null; files: FormSubmittedFile[] | null; } export interface FormSelectedOption { id: string; /** Snapshot histórico de la etiqueta. */ label: string | null; } export interface FormSubmittedFile { storageId: string; fileName: string; contentType: string | null; sizeBytes: number; url: string | null; }