import { AutoEncoder, Data, Decoder } from '@simonbackx/simple-encoding'; import { type CellValue } from '@stamhoofd/excel-writer'; import { Address } from '../../addresses/Address.js'; import { File } from '../../files/File.js'; import { Image } from '../../files/Image.js'; import { TranslatedString } from '../../TranslatedString.js'; import { RecordChoice, RecordSettings, RecordType, RecordWarning } from './RecordSettings.js'; export declare class RecordAnswer extends AutoEncoder { id: string; /** * Settings of this record at the time of input. Depending on the changes, we can auto migrate some settings */ settings: RecordSettings; /** * Date that this was changed. To determine merge order */ date: Date; /** * Date that this answer was last reviewed by the author * -> when editing by the organization, don't set this date */ reviewedAt: Date | null; isOutdated(timeoutMs: number): boolean; markReviewed(): void; get stringValue(): string; get objectValue(): string | number | boolean | null | Date | object; /** * Include both the setting and the value */ get descriptionValue(): string; get excelColumns(): { name: string; width?: number; defaultCategory?: string; }[]; get excelValues(): CellValue[]; getWarnings(): RecordWarning[]; validate(): void; /** * Return true when it is not the default value as a general rule * E.g. checkbox by default not checked -> empty if not checked */ get isEmpty(): boolean; isReviewedAfter(answer: RecordAnswer): boolean; static createDefaultAnswer(settings: RecordSettings): RecordAnswer; getDiffName(): TranslatedString; getDiffValue(): unknown; } export declare class RecordAnswerDecoderStatic implements Decoder { decode(data: Data): RecordAnswer; getClassForType(type: RecordType): typeof RecordAnswer; } export declare const RecordAnswerDecoder: RecordAnswerDecoderStatic; export declare class RecordTextAnswer extends RecordAnswer { value: string | null; get stringValue(): string; get objectValue(): string | null; getWarnings(): RecordWarning[]; validate(): void; get isEmpty(): boolean; } export declare class RecordCheckboxAnswer extends RecordAnswer { selected: boolean; comments?: string; getWarnings(): RecordWarning[]; get stringValue(): string; get objectValue(): boolean; get excelValues(): { value: string; format: null; }[]; validate(): void; get isEmpty(): boolean; } export declare class RecordMultipleChoiceAnswer extends RecordAnswer { selectedChoices: RecordChoice[]; get stringValue(): string; get objectValue(): string[]; getWarnings(): RecordWarning[]; validate(): void; get isEmpty(): boolean; } export declare class RecordChooseOneAnswer extends RecordAnswer { selectedChoice: RecordChoice | null; get selectedChoices(): RecordChoice[]; get stringValue(): string; get objectValue(): string | null; getWarnings(): RecordWarning[]; validate(): void; get isEmpty(): boolean; } export declare class RecordAddressAnswer extends RecordAnswer { address: Address | null; get stringValue(): string; get objectValue(): string | number | boolean | { [key: string]: import("@simonbackx/simple-encoding").PlainObject; } | import("@simonbackx/simple-encoding").PlainObject[] | null; validate(): void; get excelValues(): { value: string | null; format: null; }[]; get isEmpty(): boolean; } export declare class RecordDateAnswer extends RecordAnswer { dateValue: Date | null; get stringValue(): string; get objectValue(): Date | null; validate(): void; get isEmpty(): boolean; } export declare class RecordIntegerAnswer extends RecordAnswer { value: number | null; get stringValue(): string; get objectValue(): number | null; getWarnings(): RecordWarning[]; validate(): void; get isEmpty(): boolean; } export declare class RecordPriceAnswer extends RecordAnswer { value: number | null; get stringValue(): string; get objectValue(): number | null; getWarnings(): RecordWarning[]; validate(): void; get isEmpty(): boolean; } export declare class RecordImageAnswer extends RecordAnswer { image: Image | null; get stringValue(): string; get objectValue(): string | number | boolean | { [key: string]: import("@simonbackx/simple-encoding").PlainObject; } | import("@simonbackx/simple-encoding").PlainObject[] | null; validate(): void; get isEmpty(): boolean; transformForDiff(): Image | null; } export declare class RecordFileAnswer extends RecordAnswer { file: File | null; get stringValue(): string; get objectValue(): { id: string; server: string; path: string; size: number; name: string | null; isPrivate: boolean; signedUrl: string | undefined; signature: string | null | undefined; contentType: string | undefined; } | null; validate(): void; get isEmpty(): boolean; transformForDiff(): File | null; } //# sourceMappingURL=RecordAnswer.d.ts.map