@milobedini/shared-types 1.0.63 → 1.0.64
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/types.d.ts +42 -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';
|
|
82
|
+
export type ModuleType = 'questionnaire' | 'psychoeducation' | 'exercise' | 'activity_diary';
|
|
83
83
|
export type Module = {
|
|
84
84
|
_id: string;
|
|
85
85
|
title: string;
|
|
@@ -221,6 +221,8 @@ export type StartAttemptResponse = {
|
|
|
221
221
|
};
|
|
222
222
|
export type SaveProgressInput = {
|
|
223
223
|
answers?: AttemptAnswer[];
|
|
224
|
+
diaryEntries?: DiaryEntryInput[];
|
|
225
|
+
merge?: boolean;
|
|
224
226
|
userNote?: string;
|
|
225
227
|
};
|
|
226
228
|
export type SaveProgressResponse = {
|
|
@@ -387,9 +389,47 @@ export type AttemptDetail = {
|
|
|
387
389
|
totalQuestions: number;
|
|
388
390
|
percentComplete: number;
|
|
389
391
|
};
|
|
392
|
+
export type DiaryEntry = {
|
|
393
|
+
at: string;
|
|
394
|
+
label?: string;
|
|
395
|
+
activity: string;
|
|
396
|
+
mood?: number;
|
|
397
|
+
achievement?: number;
|
|
398
|
+
closeness?: number;
|
|
399
|
+
enjoyment?: number;
|
|
400
|
+
};
|
|
401
|
+
export type DiaryEntryInput = {
|
|
402
|
+
at: string;
|
|
403
|
+
label?: string;
|
|
404
|
+
activity?: string;
|
|
405
|
+
mood?: number;
|
|
406
|
+
achievement?: number;
|
|
407
|
+
closeness?: number;
|
|
408
|
+
enjoyment?: number;
|
|
409
|
+
};
|
|
410
|
+
export type DiaryDay = {
|
|
411
|
+
dateISO: string;
|
|
412
|
+
entries: DiaryEntry[];
|
|
413
|
+
avgMood: number | null;
|
|
414
|
+
avgAchievement: number | null;
|
|
415
|
+
avgCloseness: number | null;
|
|
416
|
+
avgEnjoyment: number | null;
|
|
417
|
+
};
|
|
418
|
+
export type DiaryTotals = {
|
|
419
|
+
count: number;
|
|
420
|
+
avgMood: number | null;
|
|
421
|
+
avgAchievement: number | null;
|
|
422
|
+
avgCloseness: number | null;
|
|
423
|
+
avgEnjoyment: number | null;
|
|
424
|
+
};
|
|
425
|
+
export type DiaryDetail = {
|
|
426
|
+
days: DiaryDay[];
|
|
427
|
+
totals: DiaryTotals;
|
|
428
|
+
};
|
|
390
429
|
export type AttemptDetailResponseItem = ModuleAttempt & {
|
|
391
430
|
band?: ScoreBandSummary;
|
|
392
|
-
detail
|
|
431
|
+
detail?: AttemptDetail;
|
|
432
|
+
diary?: DiaryDetail;
|
|
393
433
|
patient?: Pick<AuthUser, '_id' | 'name' | 'username' | 'email'>;
|
|
394
434
|
module?: Pick<Module, '_id' | 'title' | 'type'>;
|
|
395
435
|
};
|