-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsafe-types.ts
49 lines (44 loc) · 997 Bytes
/
safe-types.ts
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
export enum QuestionType {
TEAM_HEALTH = 'TEAM_HEALTH',
ME = 'ME',
SURROUNDINGS = 'SURROUNDINGS',
SPEED = 'SPEED',
TECH = 'TECH',
OTHER = 'OTHER',
}
export interface Question {
questionId: string
question: string
answers: {
LOW: string
MID: string
HIGH: string
}
type: QuestionType
custom?: boolean
/**
* Whether this question is required to be answered by the user.
*
* @default true
*/
required?: boolean
}
export type QuestionScoring = {
timestamp: Date
averageScore: number | null
distribution: QuestionScoreDistributrion
}
export type QuestionScoreDistributrion = Record<AnswerLevel, number | null>
export enum AnswerLevel {
GOOD = 'GOOD',
MEDIUM = 'MEDIUM',
BAD = 'BAD',
}
export type QuestionScorePerWeek = {
question: {
questionId: string
question: string
answers: Record<AnswerLevel, string>
}
scoring: QuestionScoring[]
}