This repository has no description
1import { AnnotationValueType } from './annotationValues';
2
3// Field Definitions
4export interface FieldDefinition {
5 // Common properties for all field types
6 type: string;
7 required?: boolean;
8}
9
10export interface DyadDefinition extends FieldDefinition {
11 type: 'dyad';
12 sideA: string;
13 sideB: string;
14}
15
16export interface TriadDefinition extends FieldDefinition {
17 type: 'triad';
18 vertexA: string;
19 vertexB: string;
20 vertexC: string;
21}
22
23export interface RatingDefinition extends FieldDefinition {
24 type: 'rating';
25 numberOfStars: number;
26}
27
28export interface SingleSelectDefinition extends FieldDefinition {
29 type: 'singleSelect';
30 options: string[];
31}
32
33export interface MultiSelectDefinition extends FieldDefinition {
34 type: 'multiSelect';
35 options: string[];
36}
37
38export type AnnotationFieldDefinition =
39 | DyadDefinition
40 | TriadDefinition
41 | RatingDefinition
42 | SingleSelectDefinition
43 | MultiSelectDefinition;
44
45// Template Field
46export interface TemplateField {
47 id: string;
48 name: string;
49 description: string;
50 definition: AnnotationFieldDefinition;
51 required: boolean;
52}
53
54// Template
55export interface Template {
56 id?: string;
57 name: string;
58 description: string;
59 fields: TemplateField[];
60 createdAt?: Date;
61}