aboutsummaryrefslogtreecommitdiffstats
path: root/src/api/question.ts
blob: 0fcea0364e44d92ad48c2ea3010e8ede4ee2b853 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
export enum QuestionType {
    TextArea = "textarea",
    Checkbox = "checkbox",
    Radio = "radio",
    Code = "code",
    Select = "select",
    ShortText = "short_text",
    Range = "range",
    Section = "section",
    TimeZone = "timezone",
    Vote = "vote"
}

export interface Question {
    id: string,
    name: string,
    type: QuestionType,
    data: { [key: string]: string | string[] },
    required: boolean
}

type UnittestError = {
    question_id: string,
    question_index: number,
    return_code: number,
    passed: boolean,
    result: string,
}

export interface UnittestFailure {
    error: string,
    test_results: UnittestError[],
}