@milobedini/shared-types 1.0.60 → 1.0.62
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 +25 -20
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -90,8 +90,7 @@ export type Module = {
|
|
|
90
90
|
imageUrl?: string;
|
|
91
91
|
createdAt: string;
|
|
92
92
|
updatedAt: string;
|
|
93
|
-
|
|
94
|
-
accessPolicy: 'open' | 'enrolled' | 'assigned';
|
|
93
|
+
accessPolicy: 'open' | 'assigned';
|
|
95
94
|
};
|
|
96
95
|
export type Choice = {
|
|
97
96
|
text: string;
|
|
@@ -212,7 +211,7 @@ export type ModuleDetailResponse = {
|
|
|
212
211
|
scoreBands: ScoreBand[];
|
|
213
212
|
meta?: {
|
|
214
213
|
canStart?: boolean;
|
|
215
|
-
canStartReason?: 'ok' | '
|
|
214
|
+
canStartReason?: 'ok' | 'requires_assignment' | 'unauthenticated';
|
|
216
215
|
activeAssignmentId?: string;
|
|
217
216
|
};
|
|
218
217
|
};
|
|
@@ -267,12 +266,6 @@ export type TherapistLatestResponse = {
|
|
|
267
266
|
success: boolean;
|
|
268
267
|
rows: TherapistLatestRow[];
|
|
269
268
|
};
|
|
270
|
-
export type PatientModuleTimelineResponse = {
|
|
271
|
-
success: boolean;
|
|
272
|
-
attempts: (AttemptListItem & {
|
|
273
|
-
band?: ScoreBandSummary;
|
|
274
|
-
})[];
|
|
275
|
-
};
|
|
276
269
|
export type CreateAssignmentInput = {
|
|
277
270
|
userId: string;
|
|
278
271
|
moduleId: string;
|
|
@@ -302,7 +295,7 @@ export type CreateModuleInput = {
|
|
|
302
295
|
program: string;
|
|
303
296
|
disclaimer?: string;
|
|
304
297
|
imageUrl?: string;
|
|
305
|
-
accessPolicy?: 'open' | '
|
|
298
|
+
accessPolicy?: 'open' | 'assigned';
|
|
306
299
|
};
|
|
307
300
|
export type CreateQuestionInput = {
|
|
308
301
|
moduleId: string;
|
|
@@ -317,20 +310,12 @@ export type CreateScoreBandInput = {
|
|
|
317
310
|
label: string;
|
|
318
311
|
interpretation: string;
|
|
319
312
|
};
|
|
320
|
-
export type
|
|
321
|
-
patientId: string;
|
|
322
|
-
moduleId: string;
|
|
323
|
-
};
|
|
324
|
-
export type EnrolResponse = {
|
|
325
|
-
success: boolean;
|
|
326
|
-
message: string;
|
|
327
|
-
};
|
|
328
|
-
export type AvailableSourceTag = 'open' | 'enrolled' | 'assigned';
|
|
313
|
+
export type AvailableSourceTag = 'open' | 'assigned';
|
|
329
314
|
export type AvailableModulesItem = {
|
|
330
315
|
module: Module;
|
|
331
316
|
meta: {
|
|
332
317
|
canStart: boolean | undefined;
|
|
333
|
-
canStartReason: 'ok' | '
|
|
318
|
+
canStartReason: 'ok' | 'requires_assignment' | 'unauthenticated';
|
|
334
319
|
source: AvailableSourceTag[];
|
|
335
320
|
activeAssignmentId?: string;
|
|
336
321
|
assignmentStatus?: 'assigned' | 'in_progress';
|
|
@@ -466,3 +451,23 @@ export type GetUsersResponse = {
|
|
|
466
451
|
items: UsersListItem[];
|
|
467
452
|
facets: UsersFacets;
|
|
468
453
|
};
|
|
454
|
+
export type PatientModuleTimelineQuery = {
|
|
455
|
+
moduleId?: string;
|
|
456
|
+
limit?: number;
|
|
457
|
+
cursor?: Cursor;
|
|
458
|
+
/**
|
|
459
|
+
* Status filter:
|
|
460
|
+
* - 'submitted' (default) = completed timeline (sorted by completedAt)
|
|
461
|
+
* - 'active' = alias for in-progress (maps to ['started'])
|
|
462
|
+
* - 'started' | 'abandoned' | csv (e.g. "started,abandoned")
|
|
463
|
+
* - 'all' = no status filter (sorted by lastInteractionAt)
|
|
464
|
+
*/
|
|
465
|
+
status?: 'submitted' | 'active' | AttemptStatus | `${AttemptStatus},${string}` | 'all' | string;
|
|
466
|
+
};
|
|
467
|
+
export type PatientModuleTimelineResponse = {
|
|
468
|
+
success: boolean;
|
|
469
|
+
attempts: (AttemptListItem & {
|
|
470
|
+
band?: ScoreBandSummary;
|
|
471
|
+
})[];
|
|
472
|
+
nextCursor: string | null;
|
|
473
|
+
};
|