@milobedini/shared-types 1.0.67 → 1.0.69
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/constants.d.ts +4 -0
- package/dist/constants.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/types.d.ts +0 -4
- package/dist/types.js +1 -5
- package/package.json +14 -2
- package/dist/auth.d.ts +0 -49
- package/dist/general.d.ts +0 -5
- package/dist/module.d.ts +0 -18
- package/dist/program.d.ts +0 -125
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './constants';
|
package/dist/types.d.ts
CHANGED
|
@@ -521,7 +521,3 @@ export type BasicMutationResponse = {
|
|
|
521
521
|
message?: string;
|
|
522
522
|
data?: any;
|
|
523
523
|
};
|
|
524
|
-
export declare const SLOT_START_HOUR: 6;
|
|
525
|
-
export declare const SLOT_END_HOUR: 24;
|
|
526
|
-
export declare const SLOT_STEP_HOURS: 2;
|
|
527
|
-
export declare const LONDON_TZ: "Europe/London";
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milobedini/shared-types",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "1.0.69",
|
|
4
5
|
"main": "./dist/index.js",
|
|
5
6
|
"types": "./dist/index.d.ts",
|
|
7
|
+
"sideEffects": false,
|
|
6
8
|
"files": [
|
|
7
9
|
"dist"
|
|
8
10
|
],
|
|
9
|
-
"
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc -p .",
|
|
13
|
+
"clean": "rimraf dist",
|
|
14
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
15
|
+
"publish:pkg": "npm version patch && npm publish --access public"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"rimraf": "^6.0.1",
|
|
20
|
+
"typescript": "^5.9.2"
|
|
21
|
+
}
|
|
10
22
|
}
|
package/dist/auth.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
export type User = {
|
|
2
|
-
_id: string;
|
|
3
|
-
username: string;
|
|
4
|
-
email: string;
|
|
5
|
-
};
|
|
6
|
-
export type AuthUser = User & {
|
|
7
|
-
roles: string[];
|
|
8
|
-
isVerifiedTherapist?: boolean;
|
|
9
|
-
patients?: string[];
|
|
10
|
-
therapist?: string;
|
|
11
|
-
};
|
|
12
|
-
export type UserRole = 'therapist' | 'admin' | 'patient';
|
|
13
|
-
export type AuthResponse = {
|
|
14
|
-
success: boolean;
|
|
15
|
-
message: string;
|
|
16
|
-
user: AuthUser;
|
|
17
|
-
};
|
|
18
|
-
export type RegisterInput = {
|
|
19
|
-
username: string;
|
|
20
|
-
email: string;
|
|
21
|
-
password: string;
|
|
22
|
-
roles: UserRole[];
|
|
23
|
-
};
|
|
24
|
-
export type LoginInput = {
|
|
25
|
-
identifier: string;
|
|
26
|
-
password: string;
|
|
27
|
-
};
|
|
28
|
-
export type VerifyInput = {
|
|
29
|
-
verificationCode: string;
|
|
30
|
-
};
|
|
31
|
-
export type PatientsResponse = AuthUser[];
|
|
32
|
-
export type AddRemoveTherapistResponse = {
|
|
33
|
-
message: string;
|
|
34
|
-
patient: AuthUser;
|
|
35
|
-
therapistPatients: string[];
|
|
36
|
-
};
|
|
37
|
-
export type AddRemoveTherapistInput = {
|
|
38
|
-
therapistId: string;
|
|
39
|
-
patientId: string;
|
|
40
|
-
};
|
|
41
|
-
export type ProfileResponse = {
|
|
42
|
-
_id: string;
|
|
43
|
-
username: string;
|
|
44
|
-
email: string;
|
|
45
|
-
roles: string[];
|
|
46
|
-
isVerifiedTherapist: boolean;
|
|
47
|
-
patients: string[];
|
|
48
|
-
therapist: User;
|
|
49
|
-
};
|
package/dist/general.d.ts
DELETED
package/dist/module.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface Module {
|
|
2
|
-
_id: string;
|
|
3
|
-
title: string;
|
|
4
|
-
description: string;
|
|
5
|
-
imageUrl?: string;
|
|
6
|
-
createdAt: string;
|
|
7
|
-
updatedAt: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ModulesResponse {
|
|
10
|
-
modules: Module[];
|
|
11
|
-
}
|
|
12
|
-
export interface ModuleResponse {
|
|
13
|
-
module: Module;
|
|
14
|
-
}
|
|
15
|
-
export interface CreateModuleInput {
|
|
16
|
-
title: string;
|
|
17
|
-
description?: string;
|
|
18
|
-
}
|
package/dist/program.d.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
export type Module = {
|
|
2
|
-
_id: string;
|
|
3
|
-
title: string;
|
|
4
|
-
description: string;
|
|
5
|
-
program: Program;
|
|
6
|
-
type: 'questionnaire' | 'psychoeducation' | 'exercise';
|
|
7
|
-
disclaimer?: string;
|
|
8
|
-
imageUrl?: string;
|
|
9
|
-
createdAt: string;
|
|
10
|
-
updatedAt: string;
|
|
11
|
-
enrolled?: string[];
|
|
12
|
-
};
|
|
13
|
-
export type ProgramBase = {
|
|
14
|
-
_id: string;
|
|
15
|
-
title: string;
|
|
16
|
-
description: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
updatedAt: string;
|
|
19
|
-
};
|
|
20
|
-
export type Program = ProgramBase & {
|
|
21
|
-
modules: string[];
|
|
22
|
-
};
|
|
23
|
-
export type ProgramWithModules = ProgramBase & {
|
|
24
|
-
modules: Module[];
|
|
25
|
-
};
|
|
26
|
-
export type Choice = {
|
|
27
|
-
text: string;
|
|
28
|
-
score: number;
|
|
29
|
-
};
|
|
30
|
-
export type Question = {
|
|
31
|
-
_id: string;
|
|
32
|
-
module: string;
|
|
33
|
-
order: number;
|
|
34
|
-
text: string;
|
|
35
|
-
choices: Choice[];
|
|
36
|
-
};
|
|
37
|
-
export type ScoreBand = {
|
|
38
|
-
_id: string;
|
|
39
|
-
module: string;
|
|
40
|
-
min: number;
|
|
41
|
-
max: number;
|
|
42
|
-
label: string;
|
|
43
|
-
interpretation: string;
|
|
44
|
-
};
|
|
45
|
-
export type AssessmentAnswer = {
|
|
46
|
-
question: string;
|
|
47
|
-
chosenScore: number;
|
|
48
|
-
};
|
|
49
|
-
export type AssessmentResponse = {
|
|
50
|
-
_id: string;
|
|
51
|
-
user: string;
|
|
52
|
-
program: string;
|
|
53
|
-
module: string;
|
|
54
|
-
answers: AssessmentAnswer[];
|
|
55
|
-
totalScore: number;
|
|
56
|
-
weekStart: string;
|
|
57
|
-
createdAt: string;
|
|
58
|
-
updatedAt: string;
|
|
59
|
-
};
|
|
60
|
-
export type ProgramResponse = {
|
|
61
|
-
program: ProgramWithModules;
|
|
62
|
-
};
|
|
63
|
-
export type ProgramsResponse = {
|
|
64
|
-
programs: Program[];
|
|
65
|
-
};
|
|
66
|
-
export type ModulesResponse = {
|
|
67
|
-
modules: Module[];
|
|
68
|
-
};
|
|
69
|
-
export type ModuleResponse = {
|
|
70
|
-
module: Module;
|
|
71
|
-
};
|
|
72
|
-
export type ModuleDetailResponse = {
|
|
73
|
-
success: boolean;
|
|
74
|
-
module: Module;
|
|
75
|
-
questions: Question[];
|
|
76
|
-
scoreBands: ScoreBand[];
|
|
77
|
-
};
|
|
78
|
-
export type QuestionListResponse = {
|
|
79
|
-
questions: Question[];
|
|
80
|
-
};
|
|
81
|
-
export type ScoreBandListResponse = {
|
|
82
|
-
scoreBands: ScoreBand[];
|
|
83
|
-
};
|
|
84
|
-
export type AssessmentSubmitInput = {
|
|
85
|
-
moduleId: string;
|
|
86
|
-
answers: AssessmentAnswer[];
|
|
87
|
-
};
|
|
88
|
-
export type AssessmentSubmitResponse = {
|
|
89
|
-
totalScore: number;
|
|
90
|
-
scoreBand: string;
|
|
91
|
-
interpretation: string;
|
|
92
|
-
weekStart: string;
|
|
93
|
-
};
|
|
94
|
-
export type AssessmentHistoryResponse = {
|
|
95
|
-
assessments: AssessmentResponse[];
|
|
96
|
-
};
|
|
97
|
-
export type CreateModuleInput = {
|
|
98
|
-
title: string;
|
|
99
|
-
description: string;
|
|
100
|
-
type: 'questionnaire' | 'psychoeducation' | 'exercise';
|
|
101
|
-
program: string;
|
|
102
|
-
disclaimer?: string;
|
|
103
|
-
imageUrl?: string;
|
|
104
|
-
};
|
|
105
|
-
export type CreateQuestionInput = {
|
|
106
|
-
moduleId: string;
|
|
107
|
-
text: string;
|
|
108
|
-
order: number;
|
|
109
|
-
choices: Choice[];
|
|
110
|
-
};
|
|
111
|
-
export type CreateScoreBandInput = {
|
|
112
|
-
moduleId: string;
|
|
113
|
-
min: number;
|
|
114
|
-
max: number;
|
|
115
|
-
label: string;
|
|
116
|
-
interpretation: string;
|
|
117
|
-
};
|
|
118
|
-
export type EnrolInput = {
|
|
119
|
-
patientId: string;
|
|
120
|
-
moduleId: string;
|
|
121
|
-
};
|
|
122
|
-
export type EnrolResponse = {
|
|
123
|
-
success: boolean;
|
|
124
|
-
message: string;
|
|
125
|
-
};
|