30 lines
1 KiB
TypeScript
30 lines
1 KiB
TypeScript
|
|
/**
|
||
|
|
* Demo form schema for CE-WP-0003 (the form-binding slice).
|
||
|
|
*
|
||
|
|
* Deliberately minimal: text, textarea, date. JSON Schema is **not** used
|
||
|
|
* here — that's deferred to a later ADR. The MVP form's only job is to
|
||
|
|
* render a handful of fields and accept evidence links so the visual-guide
|
||
|
|
* round-trip can be exercised end-to-end.
|
||
|
|
*/
|
||
|
|
|
||
|
|
export type FormFieldSchema =
|
||
|
|
| { readonly type: "text"; readonly id: string; readonly label: string }
|
||
|
|
| { readonly type: "textarea"; readonly id: string; readonly label: string }
|
||
|
|
| { readonly type: "date"; readonly id: string; readonly label: string };
|
||
|
|
|
||
|
|
export interface FormSchema {
|
||
|
|
readonly id: string;
|
||
|
|
readonly title: string;
|
||
|
|
readonly fields: readonly FormFieldSchema[];
|
||
|
|
}
|
||
|
|
|
||
|
|
export const DEMO_SCHEMA: FormSchema = {
|
||
|
|
id: "demo-form",
|
||
|
|
title: "Demo evidence-backed form",
|
||
|
|
fields: [
|
||
|
|
{ type: "textarea", id: "summary", label: "Summary of the matter" },
|
||
|
|
{ type: "date", id: "deadline", label: "Key deadline" },
|
||
|
|
{ type: "text", id: "amount", label: "Disputed amount" },
|
||
|
|
],
|
||
|
|
};
|