@milobedini/shared-types 1.0.58 → 1.0.60
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 +56 -2
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ export type ModuleAttempt = {
|
|
|
142
142
|
therapist?: string;
|
|
143
143
|
program: string;
|
|
144
144
|
module: {
|
|
145
|
-
|
|
145
|
+
_id: string;
|
|
146
146
|
title: string;
|
|
147
147
|
};
|
|
148
148
|
moduleType: ModuleType;
|
|
@@ -165,7 +165,7 @@ export type ModuleAttempt = {
|
|
|
165
165
|
createdAt: string;
|
|
166
166
|
updatedAt: string;
|
|
167
167
|
};
|
|
168
|
-
export type AttemptListItem = Pick<ModuleAttempt, '_id' | 'module' | 'program' | 'moduleType' | 'totalScore' | 'scoreBandLabel' | 'band' | 'weekStart' | 'completedAt' | '
|
|
168
|
+
export type AttemptListItem = Pick<ModuleAttempt, '_id' | 'module' | 'program' | 'moduleType' | 'iteration' | 'status' | 'totalScore' | 'scoreBandLabel' | 'band' | 'weekStart' | 'completedAt' | 'startedAt' | 'lastInteractionAt' | 'dueAt' | 'userNote'>;
|
|
169
169
|
export type AssignmentStatus = 'assigned' | 'in_progress' | 'completed' | 'cancelled';
|
|
170
170
|
export type AssignmentRecurrence = {
|
|
171
171
|
freq: 'weekly' | 'monthly' | 'none';
|
|
@@ -412,3 +412,57 @@ export type AttemptDetailResponse = {
|
|
|
412
412
|
success: boolean;
|
|
413
413
|
attempt: AttemptDetailResponseItem;
|
|
414
414
|
};
|
|
415
|
+
export type MongoId = string;
|
|
416
|
+
export type TherapistPreview = Pick<User, '_id' | 'username' | 'email' | 'name'>;
|
|
417
|
+
export type UsersSort = `${string}:${'asc' | 'desc'}` | string;
|
|
418
|
+
export type UsersSortMulti = UsersSort | `${UsersSort},${UsersSort}` | `${UsersSort},${UsersSort},${string}`;
|
|
419
|
+
export type GetUsersQuery = {
|
|
420
|
+
page?: number;
|
|
421
|
+
limit?: number;
|
|
422
|
+
q?: string;
|
|
423
|
+
roles?: UserRole[] | string;
|
|
424
|
+
ids?: string[] | string;
|
|
425
|
+
isVerified?: boolean | string;
|
|
426
|
+
isVerifiedTherapist?: boolean | string;
|
|
427
|
+
hasTherapist?: boolean | string;
|
|
428
|
+
therapistId?: string;
|
|
429
|
+
createdFrom?: string;
|
|
430
|
+
createdTo?: string;
|
|
431
|
+
lastLoginFrom?: string;
|
|
432
|
+
lastLoginTo?: string;
|
|
433
|
+
sort?: UsersSortMulti;
|
|
434
|
+
select?: string[] | string;
|
|
435
|
+
};
|
|
436
|
+
export type UsersListItem = {
|
|
437
|
+
_id: MongoId;
|
|
438
|
+
username: string;
|
|
439
|
+
email: string;
|
|
440
|
+
name?: string;
|
|
441
|
+
roles: UserRole[];
|
|
442
|
+
isVerified?: boolean;
|
|
443
|
+
isVerifiedTherapist?: boolean;
|
|
444
|
+
therapist?: MongoId | null;
|
|
445
|
+
therapistInfo?: TherapistPreview | null;
|
|
446
|
+
patients?: MongoId[];
|
|
447
|
+
createdAt: string;
|
|
448
|
+
updatedAt: string;
|
|
449
|
+
lastLogin?: string;
|
|
450
|
+
};
|
|
451
|
+
export type FacetCount<T = string | boolean | null> = {
|
|
452
|
+
_id: T;
|
|
453
|
+
count: number;
|
|
454
|
+
};
|
|
455
|
+
export type UsersFacets = {
|
|
456
|
+
roles: FacetCount<UserRole>[];
|
|
457
|
+
isVerified: FacetCount<boolean>[];
|
|
458
|
+
isVerifiedTherapist: FacetCount<boolean>[];
|
|
459
|
+
hasTherapist: FacetCount<boolean>[];
|
|
460
|
+
};
|
|
461
|
+
export type GetUsersResponse = {
|
|
462
|
+
page: number;
|
|
463
|
+
limit: number;
|
|
464
|
+
total: number;
|
|
465
|
+
totalPages: number;
|
|
466
|
+
items: UsersListItem[];
|
|
467
|
+
facets: UsersFacets;
|
|
468
|
+
};
|