@milobedini/shared-types 1.0.84 → 1.0.86
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 +84 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ export type UpdateNameInput = {
|
|
|
35
35
|
newName: string;
|
|
36
36
|
userId: string;
|
|
37
37
|
};
|
|
38
|
+
export type ChangePasswordInput = {
|
|
39
|
+
currentPassword: string;
|
|
40
|
+
newPassword: string;
|
|
41
|
+
};
|
|
38
42
|
export type VerifyInput = {
|
|
39
43
|
verificationCode: string;
|
|
40
44
|
};
|
|
@@ -175,16 +179,19 @@ export type AssignmentRecurrence = {
|
|
|
175
179
|
freq: 'weekly' | 'monthly' | 'none';
|
|
176
180
|
interval?: number;
|
|
177
181
|
};
|
|
182
|
+
export type AssignmentSource = 'therapist' | 'self';
|
|
178
183
|
export type ModuleAssignment = {
|
|
179
184
|
_id: string;
|
|
180
185
|
user: string;
|
|
181
|
-
therapist
|
|
186
|
+
therapist?: string;
|
|
182
187
|
program: string;
|
|
183
188
|
module: string;
|
|
184
189
|
moduleType: ModuleType;
|
|
185
190
|
status: AssignmentStatus;
|
|
191
|
+
source: AssignmentSource;
|
|
186
192
|
dueAt?: string;
|
|
187
193
|
recurrence?: AssignmentRecurrence;
|
|
194
|
+
recurrenceGroupId?: string;
|
|
188
195
|
latestAttempt?: string;
|
|
189
196
|
notes?: string;
|
|
190
197
|
createdAt: string;
|
|
@@ -397,6 +404,82 @@ export type MyAssignmentsResponse = {
|
|
|
397
404
|
success: boolean;
|
|
398
405
|
assignments: MyAssignmentView[];
|
|
399
406
|
};
|
|
407
|
+
export type PracticeItemStatus = 'not_started' | 'in_progress' | 'completed';
|
|
408
|
+
export type PracticeLatestAttempt = {
|
|
409
|
+
attemptId: string;
|
|
410
|
+
status: AttemptStatus;
|
|
411
|
+
totalScore?: number;
|
|
412
|
+
scoreBandLabel?: string;
|
|
413
|
+
completedAt?: string;
|
|
414
|
+
iteration: number;
|
|
415
|
+
};
|
|
416
|
+
export type PracticeItem = {
|
|
417
|
+
assignmentId: string;
|
|
418
|
+
moduleId: string;
|
|
419
|
+
moduleTitle: string;
|
|
420
|
+
moduleType: ModuleType;
|
|
421
|
+
programTitle: string;
|
|
422
|
+
source: AssignmentSource;
|
|
423
|
+
therapistName?: string;
|
|
424
|
+
status: PracticeItemStatus;
|
|
425
|
+
dueAt?: string;
|
|
426
|
+
recurrence?: AssignmentRecurrence;
|
|
427
|
+
notes?: string;
|
|
428
|
+
percentComplete: number;
|
|
429
|
+
attemptCount: number;
|
|
430
|
+
latestAttempt?: PracticeLatestAttempt;
|
|
431
|
+
};
|
|
432
|
+
export type PracticeResponse = {
|
|
433
|
+
success: boolean;
|
|
434
|
+
today: PracticeItem[];
|
|
435
|
+
thisWeek: PracticeItem[];
|
|
436
|
+
upcoming: PracticeItem[];
|
|
437
|
+
recentlyCompleted: PracticeItem[];
|
|
438
|
+
};
|
|
439
|
+
export type PracticeHistoryQuery = {
|
|
440
|
+
moduleId?: string;
|
|
441
|
+
moduleType?: ModuleType;
|
|
442
|
+
cursor?: string;
|
|
443
|
+
limit?: number;
|
|
444
|
+
};
|
|
445
|
+
export type PracticeHistoryResponse = {
|
|
446
|
+
success: boolean;
|
|
447
|
+
items: PracticeItem[];
|
|
448
|
+
nextCursor: string | null;
|
|
449
|
+
};
|
|
450
|
+
export type SparklineMap = Record<string, number[]>;
|
|
451
|
+
export type PatientPracticeResponse = PracticeResponse & {
|
|
452
|
+
sparklines: SparklineMap;
|
|
453
|
+
};
|
|
454
|
+
export type AttentionReason = 'severe_score' | 'score_regression' | 'overdue' | 'first_submission';
|
|
455
|
+
export type AttentionPriority = 'high' | 'medium' | 'low';
|
|
456
|
+
export type ReviewItem = PracticeItem & {
|
|
457
|
+
patientId: string;
|
|
458
|
+
patientName: string;
|
|
459
|
+
attentionReason?: AttentionReason;
|
|
460
|
+
attentionPriority?: AttentionPriority;
|
|
461
|
+
};
|
|
462
|
+
export type ReviewGroupBy = 'date' | 'patient' | 'module';
|
|
463
|
+
export type ReviewFilters = {
|
|
464
|
+
sort?: SortOption;
|
|
465
|
+
groupBy?: ReviewGroupBy;
|
|
466
|
+
patientId?: string;
|
|
467
|
+
moduleId?: string;
|
|
468
|
+
severity?: SeverityOption;
|
|
469
|
+
dateFrom?: string;
|
|
470
|
+
dateTo?: string;
|
|
471
|
+
cursor?: string;
|
|
472
|
+
limit?: number;
|
|
473
|
+
};
|
|
474
|
+
export type ReviewResponse = {
|
|
475
|
+
success: boolean;
|
|
476
|
+
needsAttention: ReviewItem[];
|
|
477
|
+
submissions: {
|
|
478
|
+
items: ReviewItem[];
|
|
479
|
+
nextCursor: string | null;
|
|
480
|
+
total: number;
|
|
481
|
+
};
|
|
482
|
+
};
|
|
400
483
|
export type UpdateAssignmentInput = {
|
|
401
484
|
status?: AssignmentStatus;
|
|
402
485
|
dueAt?: string;
|