@milobedini/shared-types 1.0.27 → 1.0.29

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/auth.d.ts CHANGED
@@ -1,25 +1,29 @@
1
- export interface AuthUser {
1
+ export type User = {
2
2
  _id: string;
3
3
  username: string;
4
4
  email: string;
5
+ };
6
+ export type AuthUser = User & {
5
7
  roles: string[];
6
- }
8
+ isVerifiedTherapist: boolean;
9
+ };
7
10
  export type UserRole = 'therapist' | 'admin' | 'patient';
8
- export interface AuthResponse {
11
+ export type AuthResponse = {
9
12
  success: boolean;
10
13
  message: string;
11
14
  user: AuthUser;
12
- }
13
- export interface RegisterInput {
15
+ };
16
+ export type RegisterInput = {
14
17
  username: string;
15
18
  email: string;
16
19
  password: string;
17
20
  roles: UserRole[];
18
- }
19
- export interface LoginInput {
21
+ };
22
+ export type LoginInput = {
20
23
  identifier: string;
21
24
  password: string;
22
- }
23
- export interface VerifyInput {
25
+ };
26
+ export type VerifyInput = {
24
27
  verificationCode: string;
25
- }
28
+ };
29
+ export type PatientsResponse = User[];
package/dist/program.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export interface Module {
1
+ export type Module = {
2
2
  _id: string;
3
3
  title: string;
4
4
  description: string;
@@ -8,44 +8,44 @@ export interface Module {
8
8
  imageUrl?: string;
9
9
  createdAt: string;
10
10
  updatedAt: string;
11
- }
12
- export interface ProgramBase {
11
+ };
12
+ export type ProgramBase = {
13
13
  _id: string;
14
14
  title: string;
15
15
  description: string;
16
16
  createdAt: string;
17
17
  updatedAt: string;
18
- }
19
- export interface Program extends ProgramBase {
18
+ };
19
+ export type Program = ProgramBase & {
20
20
  modules: string[];
21
- }
22
- export interface ProgramWithModules extends ProgramBase {
21
+ };
22
+ export type ProgramWithModules = ProgramBase & {
23
23
  modules: Module[];
24
- }
25
- export interface Choice {
24
+ };
25
+ export type Choice = {
26
26
  text: string;
27
27
  score: number;
28
- }
29
- export interface Question {
28
+ };
29
+ export type Question = {
30
30
  _id: string;
31
31
  module: string;
32
32
  order: number;
33
33
  text: string;
34
34
  choices: Choice[];
35
- }
36
- export interface ScoreBand {
35
+ };
36
+ export type ScoreBand = {
37
37
  _id: string;
38
38
  module: string;
39
39
  min: number;
40
40
  max: number;
41
41
  label: string;
42
42
  interpretation: string;
43
- }
44
- export interface AssessmentAnswer {
43
+ };
44
+ export type AssessmentAnswer = {
45
45
  question: string;
46
46
  chosenScore: number;
47
- }
48
- export interface AssessmentResponse {
47
+ };
48
+ export type AssessmentResponse = {
49
49
  _id: string;
50
50
  user: string;
51
51
  program: string;
@@ -55,62 +55,62 @@ export interface AssessmentResponse {
55
55
  weekStart: string;
56
56
  createdAt: string;
57
57
  updatedAt: string;
58
- }
59
- export interface ProgramResponse {
58
+ };
59
+ export type ProgramResponse = {
60
60
  program: ProgramWithModules;
61
- }
62
- export interface ProgramsResponse {
61
+ };
62
+ export type ProgramsResponse = {
63
63
  programs: Program[];
64
- }
65
- export interface ModulesResponse {
64
+ };
65
+ export type ModulesResponse = {
66
66
  modules: Module[];
67
- }
68
- export interface ModuleResponse {
67
+ };
68
+ export type ModuleResponse = {
69
69
  module: Module;
70
- }
71
- export interface ModuleDetailResponse {
70
+ };
71
+ export type ModuleDetailResponse = {
72
72
  success: boolean;
73
73
  module: Module;
74
74
  questions: Question[];
75
75
  scoreBands: ScoreBand[];
76
- }
77
- export interface QuestionListResponse {
76
+ };
77
+ export type QuestionListResponse = {
78
78
  questions: Question[];
79
- }
80
- export interface ScoreBandListResponse {
79
+ };
80
+ export type ScoreBandListResponse = {
81
81
  scoreBands: ScoreBand[];
82
- }
83
- export interface AssessmentSubmitInput {
82
+ };
83
+ export type AssessmentSubmitInput = {
84
84
  moduleId: string;
85
85
  answers: AssessmentAnswer[];
86
- }
87
- export interface AssessmentSubmitResponse {
86
+ };
87
+ export type AssessmentSubmitResponse = {
88
88
  totalScore: number;
89
89
  scoreBand: string;
90
90
  interpretation: string;
91
91
  weekStart: string;
92
- }
93
- export interface AssessmentHistoryResponse {
92
+ };
93
+ export type AssessmentHistoryResponse = {
94
94
  assessments: AssessmentResponse[];
95
- }
96
- export interface CreateModuleInput {
95
+ };
96
+ export type CreateModuleInput = {
97
97
  title: string;
98
98
  description: string;
99
99
  type: 'questionnaire' | 'psychoeducation' | 'exercise';
100
100
  program: string;
101
101
  disclaimer?: string;
102
102
  imageUrl?: string;
103
- }
104
- export interface CreateQuestionInput {
103
+ };
104
+ export type CreateQuestionInput = {
105
105
  moduleId: string;
106
106
  text: string;
107
107
  order: number;
108
108
  choices: Choice[];
109
- }
110
- export interface CreateScoreBandInput {
109
+ };
110
+ export type CreateScoreBandInput = {
111
111
  moduleId: string;
112
112
  min: number;
113
113
  max: number;
114
114
  label: string;
115
115
  interpretation: string;
116
- }
116
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milobedini/shared-types",
3
- "version": "1.0.27",
3
+ "version": "1.0.29",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [