@milobedini/shared-types 1.0.18 → 1.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/program.d.ts +102 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export interface Module {
|
|
2
|
+
_id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
program: string;
|
|
6
|
+
type: 'questionnaire' | 'psychoeducation' | 'exercise';
|
|
7
|
+
disclaimer?: string;
|
|
8
|
+
imageUrl?: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Program {
|
|
13
|
+
_id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
modules: string[] | Module[];
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Choice {
|
|
21
|
+
text: string;
|
|
22
|
+
score: number;
|
|
23
|
+
}
|
|
24
|
+
export interface Question {
|
|
25
|
+
_id: string;
|
|
26
|
+
module: string;
|
|
27
|
+
order: number;
|
|
28
|
+
text: string;
|
|
29
|
+
choices: Choice[];
|
|
30
|
+
}
|
|
31
|
+
export interface ScoreBand {
|
|
32
|
+
_id: string;
|
|
33
|
+
module: string;
|
|
34
|
+
min: number;
|
|
35
|
+
max: number;
|
|
36
|
+
label: string;
|
|
37
|
+
interpretation: string;
|
|
38
|
+
}
|
|
39
|
+
export interface AssessmentAnswer {
|
|
40
|
+
question: string;
|
|
41
|
+
chosenScore: number;
|
|
42
|
+
}
|
|
43
|
+
export interface AssessmentResponse {
|
|
44
|
+
_id: string;
|
|
45
|
+
user: string;
|
|
46
|
+
program: string;
|
|
47
|
+
module: string;
|
|
48
|
+
answers: AssessmentAnswer[];
|
|
49
|
+
totalScore: number;
|
|
50
|
+
weekStart: string;
|
|
51
|
+
createdAt: string;
|
|
52
|
+
updatedAt: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ProgramResponse {
|
|
55
|
+
program: Program;
|
|
56
|
+
}
|
|
57
|
+
export interface ModulesResponse {
|
|
58
|
+
modules: Module[];
|
|
59
|
+
}
|
|
60
|
+
export interface ModuleResponse {
|
|
61
|
+
module: Module;
|
|
62
|
+
}
|
|
63
|
+
export interface QuestionListResponse {
|
|
64
|
+
questions: Question[];
|
|
65
|
+
}
|
|
66
|
+
export interface ScoreBandListResponse {
|
|
67
|
+
scoreBands: ScoreBand[];
|
|
68
|
+
}
|
|
69
|
+
export interface AssessmentSubmitInput {
|
|
70
|
+
moduleId: string;
|
|
71
|
+
answers: AssessmentAnswer[];
|
|
72
|
+
}
|
|
73
|
+
export interface AssessmentSubmitResponse {
|
|
74
|
+
totalScore: number;
|
|
75
|
+
scoreBand: string;
|
|
76
|
+
interpretation: string;
|
|
77
|
+
weekStart: string;
|
|
78
|
+
}
|
|
79
|
+
export interface AssessmentHistoryResponse {
|
|
80
|
+
assessments: AssessmentResponse[];
|
|
81
|
+
}
|
|
82
|
+
export interface CreateModuleInput {
|
|
83
|
+
title: string;
|
|
84
|
+
description: string;
|
|
85
|
+
type: 'questionnaire' | 'psychoeducation' | 'exercise';
|
|
86
|
+
program: string;
|
|
87
|
+
disclaimer?: string;
|
|
88
|
+
imageUrl?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface CreateQuestionInput {
|
|
91
|
+
moduleId: string;
|
|
92
|
+
text: string;
|
|
93
|
+
order: number;
|
|
94
|
+
choices: Choice[];
|
|
95
|
+
}
|
|
96
|
+
export interface CreateScoreBandInput {
|
|
97
|
+
moduleId: string;
|
|
98
|
+
min: number;
|
|
99
|
+
max: number;
|
|
100
|
+
label: string;
|
|
101
|
+
interpretation: string;
|
|
102
|
+
}
|