@milobedini/shared-types 1.0.81 → 1.0.83

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.
Files changed (2) hide show
  1. package/dist/types.d.ts +32 -2
  2. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -79,7 +79,7 @@ export type ProgramWithModules = ProgramBase & {
79
79
  modules: Module[];
80
80
  };
81
81
  export type ProgramRef = Pick<Program, '_id' | 'title' | 'description'>;
82
- export type ModuleType = 'questionnaire' | 'psychoeducation' | 'exercise' | 'activity_diary';
82
+ export type ModuleType = 'questionnaire' | 'reading' | 'activity_diary';
83
83
  export type Module = {
84
84
  _id: string;
85
85
  title: string;
@@ -88,6 +88,7 @@ export type Module = {
88
88
  type: ModuleType;
89
89
  disclaimer?: string;
90
90
  imageUrl?: string;
91
+ content?: string;
91
92
  createdAt: string;
92
93
  updatedAt: string;
93
94
  accessPolicy: 'open' | 'assigned';
@@ -133,6 +134,7 @@ export type ModuleSnapshotQuestion = {
133
134
  export type ModuleSnapshot = {
134
135
  title: string;
135
136
  disclaimer?: string;
137
+ content?: string;
136
138
  questions?: ModuleSnapshotQuestion[];
137
139
  };
138
140
  export type ModuleAttempt = {
@@ -161,6 +163,7 @@ export type ModuleAttempt = {
161
163
  moduleSnapshot?: ModuleSnapshot;
162
164
  userNote?: string;
163
165
  therapistNote?: string;
166
+ readerNote?: string;
164
167
  createdAt: string;
165
168
  updatedAt: string;
166
169
  };
@@ -225,6 +228,7 @@ export type SaveProgressInput = {
225
228
  answers?: AttemptAnswer[];
226
229
  diaryEntries?: DiaryEntryInput[];
227
230
  merge?: boolean;
231
+ readerNote?: string;
228
232
  userNote?: string;
229
233
  };
230
234
  export type SaveProgressResponse = {
@@ -233,6 +237,7 @@ export type SaveProgressResponse = {
233
237
  };
234
238
  export type SubmitAttemptInput = {
235
239
  assignmentId?: string;
240
+ readerNote?: string;
236
241
  };
237
242
  export type SubmitAttemptResponse = {
238
243
  success: boolean;
@@ -259,7 +264,7 @@ export type TherapistLatestRow = {
259
264
  _id: string;
260
265
  user: TherapistUserPreview;
261
266
  module: TherapistModulePreview;
262
- moduleType?: 'questionnaire' | 'psychoeducation' | 'exercise' | 'activity_diary';
267
+ moduleType?: ModuleType;
263
268
  iteration?: number;
264
269
  completedAt?: string;
265
270
  totalScore?: number;
@@ -385,11 +390,36 @@ export type MyAssignmentView = {
385
390
  createdAt: string;
386
391
  updatedAt: string;
387
392
  percentComplete?: number;
393
+ attemptCount?: number;
388
394
  };
389
395
  export type MyAssignmentsResponse = {
390
396
  success: boolean;
391
397
  assignments: MyAssignmentView[];
392
398
  };
399
+ export type UpdateAssignmentInput = {
400
+ status?: AssignmentStatus;
401
+ dueAt?: string;
402
+ notes?: string;
403
+ recurrence?: AssignmentRecurrence;
404
+ };
405
+ export type TherapistAssignmentsResponse = {
406
+ success: boolean;
407
+ items: MyAssignmentView[];
408
+ page: number;
409
+ totalPages: number;
410
+ totalItems: number;
411
+ };
412
+ export type AssignmentSortOption = 'urgency' | 'newest' | 'oldest' | 'module';
413
+ export type AssignmentUrgencyFilter = 'overdue' | 'due_soon' | 'on_track' | 'no_due_date';
414
+ export type TherapistAssignmentFilters = {
415
+ patientId?: string;
416
+ moduleId?: string;
417
+ status?: string;
418
+ urgency?: AssignmentUrgencyFilter;
419
+ sortBy?: AssignmentSortOption;
420
+ page?: number;
421
+ limit?: number;
422
+ };
393
423
  export type ModulesQuery = {
394
424
  program?: string;
395
425
  withMeta?: boolean | string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@milobedini/shared-types",
3
3
  "type": "commonjs",
4
- "version": "1.0.81",
4
+ "version": "1.0.83",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "sideEffects": false,