@timeback/powerpath 0.1.4 → 0.1.5
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/index.d.ts +310 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -7
- package/dist/public-types.d.ts +305 -8
- package/dist/resources/assessment.d.ts +6 -6
- package/dist/resources/assessment.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,16 @@ type TestAssignmentStatus =
|
|
|
23
23
|
| 'expired'
|
|
24
24
|
| 'cancelled'
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Lesson types for PowerPath assessments.
|
|
28
|
+
*/
|
|
29
|
+
type PowerPathLessonType = 'powerpath-100' | 'quiz' | 'test-out' | 'placement' | 'unit-test'
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Question difficulty levels.
|
|
33
|
+
*/
|
|
34
|
+
type PowerPathQuestionDifficulty = 'easy' | 'medium' | 'hard'
|
|
35
|
+
|
|
26
36
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
27
37
|
// PAGINATION
|
|
28
38
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -105,6 +115,67 @@ interface BulkResult {
|
|
|
105
115
|
errors: Array<{ row: number; message: string }>
|
|
106
116
|
}
|
|
107
117
|
|
|
118
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
119
|
+
// QUESTIONS
|
|
120
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* QTI content associated with a question.
|
|
124
|
+
*/
|
|
125
|
+
interface PowerPathQuestionContent {
|
|
126
|
+
/** The type of the question (e.g., choiceInteraction) */
|
|
127
|
+
type?: string
|
|
128
|
+
/** The raw XML question in QTI format */
|
|
129
|
+
rawXml: string
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Result of evaluating a student's response to a question.
|
|
134
|
+
*/
|
|
135
|
+
interface PowerPathQuestionResult {
|
|
136
|
+
/** Score assigned considering the student's response */
|
|
137
|
+
score: number
|
|
138
|
+
/** Feedback text for the question */
|
|
139
|
+
feedback: string
|
|
140
|
+
/** Outcome variables from response processing */
|
|
141
|
+
outcomes?: Record<string, string>
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* A question in a PowerPath test.
|
|
146
|
+
*
|
|
147
|
+
* Represents a question with its metadata, optional QTI content,
|
|
148
|
+
* and (when answered) the student's response and result.
|
|
149
|
+
*/
|
|
150
|
+
interface PowerPathTestQuestion {
|
|
151
|
+
/** ID that represents the question in the test */
|
|
152
|
+
id: string
|
|
153
|
+
/** Index of the question in the test */
|
|
154
|
+
index: number
|
|
155
|
+
/** Title of the question */
|
|
156
|
+
title: string
|
|
157
|
+
/** URL of the QTI question */
|
|
158
|
+
url: string
|
|
159
|
+
/** Difficulty of the question */
|
|
160
|
+
difficulty: PowerPathQuestionDifficulty
|
|
161
|
+
/** Whether the question has been approved by a human */
|
|
162
|
+
humanApproved?: boolean | null
|
|
163
|
+
/** QTI content of the question */
|
|
164
|
+
content?: PowerPathQuestionContent
|
|
165
|
+
/** Student's response (single value or array) */
|
|
166
|
+
response?: string | string[]
|
|
167
|
+
/** Student's responses keyed by response identifier */
|
|
168
|
+
responses?: Record<string, string | string[]>
|
|
169
|
+
/** Whether the student's response is correct */
|
|
170
|
+
correct?: boolean
|
|
171
|
+
/** Result of evaluating the response */
|
|
172
|
+
result?: PowerPathQuestionResult
|
|
173
|
+
/** sourcedId of the AssessmentResult for this question attempt */
|
|
174
|
+
resultId?: string
|
|
175
|
+
/** Learning objective IDs associated with the question */
|
|
176
|
+
learningObjectives?: string[]
|
|
177
|
+
}
|
|
178
|
+
|
|
108
179
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
109
180
|
// ASSESSMENTS
|
|
110
181
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -140,21 +211,247 @@ interface GetAttemptsResponse {
|
|
|
140
211
|
attempts: Attempt[]
|
|
141
212
|
}
|
|
142
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Result from resetting an attempt.
|
|
216
|
+
*/
|
|
217
|
+
interface ResetAttemptResponse {
|
|
218
|
+
success: boolean
|
|
219
|
+
score: number
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
223
|
+
// ASSESSMENT PROGRESS (getAssessmentProgress)
|
|
224
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Progress for a PowerPath 100 lesson.
|
|
228
|
+
*
|
|
229
|
+
* Uses `seenQuestions` (not `questions`) and includes remaining question counts
|
|
230
|
+
* per difficulty level.
|
|
231
|
+
*/
|
|
232
|
+
interface PowerPath100ProgressResponse {
|
|
233
|
+
lessonType: 'powerpath-100'
|
|
234
|
+
/** Remaining question counts per difficulty level */
|
|
235
|
+
remainingQuestionsPerDifficulty: {
|
|
236
|
+
easy: number
|
|
237
|
+
medium: number
|
|
238
|
+
hard: number
|
|
239
|
+
}
|
|
240
|
+
/** Current score for this attempt */
|
|
241
|
+
score: number
|
|
242
|
+
/** Questions the student has seen */
|
|
243
|
+
seenQuestions: PowerPathTestQuestion[]
|
|
244
|
+
/** sourcedId of the parent test AssessmentResult */
|
|
245
|
+
testResultId?: string
|
|
246
|
+
/** Attempt number */
|
|
247
|
+
attempt: number
|
|
248
|
+
/** XP earned in the lesson */
|
|
249
|
+
xp: number | null
|
|
250
|
+
/** Multiplier for XP */
|
|
251
|
+
multiplier: number | null
|
|
252
|
+
/** Accuracy of the student's attempted questions */
|
|
253
|
+
accuracy: number
|
|
254
|
+
/** Number of correct questions answered */
|
|
255
|
+
correctQuestions: number
|
|
256
|
+
/** Total number of questions in the lesson */
|
|
257
|
+
totalQuestions: number
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Progress for quiz, test-out, placement, or unit-test lessons.
|
|
262
|
+
*
|
|
263
|
+
* Uses `questions` (not `seenQuestions`). Includes `finalized` to indicate
|
|
264
|
+
* whether the lesson has been completed.
|
|
265
|
+
*/
|
|
266
|
+
interface StandardProgressResponse {
|
|
267
|
+
lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'
|
|
268
|
+
/** Whether the lesson has been finalized in the current attempt */
|
|
269
|
+
finalized: boolean
|
|
270
|
+
/** Current score for this attempt */
|
|
271
|
+
score?: number
|
|
272
|
+
/** Questions in the test */
|
|
273
|
+
questions: PowerPathTestQuestion[]
|
|
274
|
+
/** Tool provider of the lesson if external */
|
|
275
|
+
toolProvider: string | null
|
|
276
|
+
/** Whether auto-enrollment failed (only for finalized external tests) */
|
|
277
|
+
enrollmentFailed?: boolean
|
|
278
|
+
/** sourcedId of the parent test AssessmentResult */
|
|
279
|
+
testResultId?: string
|
|
280
|
+
/** Attempt number */
|
|
281
|
+
attempt: number
|
|
282
|
+
/** XP earned in the lesson */
|
|
283
|
+
xp: number | null
|
|
284
|
+
/** Multiplier for XP */
|
|
285
|
+
multiplier: number | null
|
|
286
|
+
/** Accuracy of the student's attempted questions */
|
|
287
|
+
accuracy: number
|
|
288
|
+
/** Number of correct questions answered */
|
|
289
|
+
correctQuestions: number
|
|
290
|
+
/** Total number of questions in the lesson */
|
|
291
|
+
totalQuestions: number
|
|
292
|
+
}
|
|
293
|
+
|
|
143
294
|
/**
|
|
144
295
|
* Result from getting assessment progress.
|
|
145
|
-
*
|
|
296
|
+
*
|
|
297
|
+
* Discriminated union on `lessonType`:
|
|
298
|
+
* - `'powerpath-100'` — uses `seenQuestions` and `remainingQuestionsPerDifficulty`
|
|
299
|
+
* - `'quiz' | 'test-out' | 'placement' | 'unit-test'` — uses `questions` and `finalized`
|
|
146
300
|
*/
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
301
|
+
type GetAssessmentProgressResponse = PowerPath100ProgressResponse | StandardProgressResponse
|
|
302
|
+
|
|
303
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
304
|
+
// GET NEXT QUESTION (getNextQuestion)
|
|
305
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Result from getting the next question in a PowerPath 100 lesson.
|
|
309
|
+
*/
|
|
310
|
+
interface GetNextQuestionResponse {
|
|
311
|
+
/** Current PowerPath score of the student in this lesson */
|
|
312
|
+
score: number
|
|
313
|
+
/** The next question to present */
|
|
314
|
+
question: PowerPathTestQuestion
|
|
150
315
|
}
|
|
151
316
|
|
|
317
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
318
|
+
// UPDATE STUDENT QUESTION RESPONSE (updateStudentQuestionResponse)
|
|
319
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
320
|
+
|
|
152
321
|
/**
|
|
153
|
-
*
|
|
322
|
+
* Response feedback for a student's answer.
|
|
154
323
|
*/
|
|
155
|
-
interface
|
|
156
|
-
|
|
324
|
+
interface ResponseResultFeedback {
|
|
325
|
+
identifier?: string
|
|
326
|
+
value?: string
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Result of processing a student's response.
|
|
331
|
+
*/
|
|
332
|
+
interface ResponseResult {
|
|
333
|
+
/** Whether the student's response is correct */
|
|
334
|
+
isCorrect: boolean
|
|
335
|
+
/** Score for this specific response (0 or 1) */
|
|
157
336
|
score: number
|
|
337
|
+
/** Optional feedback */
|
|
338
|
+
feedback?: ResponseResultFeedback
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* Result from updating a student's response in a PowerPath 100 lesson.
|
|
343
|
+
*
|
|
344
|
+
* Includes the updated PowerPath score, response correctness, and accuracy stats.
|
|
345
|
+
*/
|
|
346
|
+
interface PowerPath100UpdateResponseResult {
|
|
347
|
+
lessonType: 'powerpath-100'
|
|
348
|
+
/** Updated PowerPath score */
|
|
349
|
+
powerpathScore: number
|
|
350
|
+
/** Result of processing the response */
|
|
351
|
+
responseResult: ResponseResult
|
|
352
|
+
/** Assessment result for the question (for debugging) */
|
|
353
|
+
questionResult?: unknown
|
|
354
|
+
/** Assessment result for the test (for debugging) */
|
|
355
|
+
testResult?: unknown
|
|
356
|
+
/** Accuracy of the student's attempted questions */
|
|
357
|
+
accuracy: number
|
|
358
|
+
/** Number of correct questions answered */
|
|
359
|
+
correctQuestions: number
|
|
360
|
+
/** Total number of questions */
|
|
361
|
+
totalQuestions: number
|
|
362
|
+
/** XP earned */
|
|
363
|
+
xp: number | null
|
|
364
|
+
/** XP multiplier */
|
|
365
|
+
multiplier: number | null
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Result from updating a student's response in a quiz/test-out/placement/unit-test lesson.
|
|
370
|
+
*
|
|
371
|
+
* Minimal response — correctness is evaluated at finalization.
|
|
372
|
+
*/
|
|
373
|
+
interface StandardUpdateResponseResult {
|
|
374
|
+
lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'
|
|
375
|
+
/** Assessment result for the question (for debugging) */
|
|
376
|
+
questionResult?: unknown
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Result from updating a student question response.
|
|
381
|
+
*
|
|
382
|
+
* Discriminated union on `lessonType`:
|
|
383
|
+
* - `'powerpath-100'` — includes score, accuracy, and response correctness
|
|
384
|
+
* - Other lesson types — minimal, evaluated at finalization
|
|
385
|
+
*/
|
|
386
|
+
type UpdateStudentQuestionResponseResult =
|
|
387
|
+
| PowerPath100UpdateResponseResult
|
|
388
|
+
| StandardUpdateResponseResult
|
|
389
|
+
|
|
390
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
391
|
+
// FINALIZE ASSESSMENT (finalStudentAssessmentResponse)
|
|
392
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Result from finalizing a test assessment.
|
|
396
|
+
*
|
|
397
|
+
* Returned after all questions have been answered and the lesson is
|
|
398
|
+
* evaluated. Not applicable to `powerpath-100` or external test lessons.
|
|
399
|
+
*/
|
|
400
|
+
interface FinalizeAssessmentResponse {
|
|
401
|
+
/** Type of the lesson that was finalized */
|
|
402
|
+
lessonType: PowerPathLessonType
|
|
403
|
+
/** Whether the lesson has been finalized */
|
|
404
|
+
finalized: boolean
|
|
405
|
+
/** The attempt number */
|
|
406
|
+
attempt: number
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
410
|
+
// TEST OUT (testOut)
|
|
411
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* Result from getting the test-out lesson for a student/course.
|
|
415
|
+
*
|
|
416
|
+
* Returns the test-out lesson reference, finalization status,
|
|
417
|
+
* and optional external tool credentials.
|
|
418
|
+
*/
|
|
419
|
+
interface TestOutResponse {
|
|
420
|
+
lessonType: 'test-out'
|
|
421
|
+
/** ID of the test-out lesson, or null if none exists */
|
|
422
|
+
lessonId: string | null
|
|
423
|
+
/** Whether the test-out has been finalized in the current attempt */
|
|
424
|
+
finalized: boolean
|
|
425
|
+
/** Tool provider for the test-out lesson, or null if internal */
|
|
426
|
+
toolProvider: string | null
|
|
427
|
+
/** Attempt number */
|
|
428
|
+
attempt?: number
|
|
429
|
+
/** Credentials for accessing the assigned test on external tool */
|
|
430
|
+
credentials?: {
|
|
431
|
+
email: string
|
|
432
|
+
password: string
|
|
433
|
+
}
|
|
434
|
+
/** Assignment ID on external tool for results retrieval */
|
|
435
|
+
assignmentId?: string
|
|
436
|
+
/** Class ID on external tool for results retrieval */
|
|
437
|
+
classId?: string
|
|
438
|
+
/** URL of the test on external tool */
|
|
439
|
+
testUrl?: string
|
|
440
|
+
/** ID of the test on external tool */
|
|
441
|
+
testId?: string
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
445
|
+
// IMPORT EXTERNAL RESULTS (importExternalTestAssignmentResults)
|
|
446
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* Result from importing external test assignment results.
|
|
450
|
+
*
|
|
451
|
+
* Response shape varies by tool provider. Contains at minimum a success indicator.
|
|
452
|
+
*/
|
|
453
|
+
interface ImportExternalResultsResponse {
|
|
454
|
+
[key: string]: unknown
|
|
158
455
|
}
|
|
159
456
|
|
|
160
457
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -707,15 +1004,15 @@ declare class AssessmentResource {
|
|
|
707
1004
|
createExternalTestOut(input: CreateExternalTestOutInput): Promise<ExternalTestCreateResponse>;
|
|
708
1005
|
createInternalTest(input: CreateInternalTestInput): Promise<ExternalTestCreateResponse>;
|
|
709
1006
|
createNewAttempt(input: CreateNewAttemptInput): Promise<CreateAttemptResponse>;
|
|
710
|
-
finalStudentAssessmentResponse(input: FinalStudentAssessmentResponseInput): Promise<
|
|
1007
|
+
finalStudentAssessmentResponse(input: FinalStudentAssessmentResponseInput): Promise<FinalizeAssessmentResponse>;
|
|
711
1008
|
getAssessmentProgress(params: GetAssessmentProgressParams): Promise<GetAssessmentProgressResponse>;
|
|
712
1009
|
getAttempts(params: GetAttemptsParams): Promise<GetAttemptsResponse>;
|
|
713
|
-
getNextQuestion(params: GetNextQuestionParams): Promise<
|
|
714
|
-
importExternalTestAssignmentResults(params: ImportExternalTestAssignmentResultsParams): Promise<
|
|
1010
|
+
getNextQuestion(params: GetNextQuestionParams): Promise<GetNextQuestionResponse>;
|
|
1011
|
+
importExternalTestAssignmentResults(params: ImportExternalTestAssignmentResultsParams): Promise<ImportExternalResultsResponse>;
|
|
715
1012
|
makeExternalTestAssignment(input: MakeExternalTestAssignmentInput): Promise<ExternalTestCreateResponse>;
|
|
716
1013
|
resetAttempt(input: ResetAttemptInput): Promise<ResetAttemptResponse>;
|
|
717
|
-
testOut(params: TestOutParams): Promise<
|
|
718
|
-
updateStudentQuestionResponse(input: UpdateStudentQuestionResponseInput): Promise<
|
|
1014
|
+
testOut(params: TestOutParams): Promise<TestOutResponse>;
|
|
1015
|
+
updateStudentQuestionResponse(input: UpdateStudentQuestionResponseInput): Promise<UpdateStudentQuestionResponseResult>;
|
|
719
1016
|
}
|
|
720
1017
|
|
|
721
1018
|
/**
|
|
@@ -1026,4 +1323,4 @@ declare class Transport extends BaseTransport {
|
|
|
1026
1323
|
}
|
|
1027
1324
|
|
|
1028
1325
|
export { Paginator, PowerPathClient, Transport, createPowerPathClient };
|
|
1029
|
-
export type { AssignmentResult, Attempt, BulkResult, CourseProgressResponse, CreateAttemptResponse, CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, ExternalTestCreateResponse, FinalStudentAssessmentResponseInput, GetAllPlacementTestsResponse, GetAssessmentProgressParams, GetAssessmentProgressResponse, GetAttemptsParams, GetAttemptsResponse, GetCurrentLevelResponse, GetNextPlacementTestResponse, GetNextQuestionParams, GetSubjectProgressResponse, ImportExternalTestAssignmentResultsParams, LessonPlanCourseSyncResult, LessonPlanCreateResponse, LessonPlanOperation, LessonPlanOperationInput, LessonPlanOperationResult, LessonPlanOperationsInput, LessonPlanOperationsResponse, LessonPlanResponse, LessonPlanSyncResult, LessonPlanUpdateStudentItemResponseInput, LessonPlansCreateInput, MakeExternalTestAssignmentInput, PaginationMeta, PlacementQueryParams, PlacementResetUserPlacementInput, PowerPathClientConfig, PowerPathClientInstance, ResetAttemptInput, ResetAttemptResponse, ResetPlacementResponse, ScreeningAssignTestInput, ScreeningAssignTestResponse, ScreeningResetSessionInput, ScreeningResetSessionResponse, ScreeningResultsResponse, ScreeningSessionResponse, SyllabusQueryParams, SyllabusResponse, TestAssignment, TestAssignmentStatus, TestAssignmentsAdminParams, TestAssignmentsBulkInput, TestAssignmentsCreateInput, TestAssignmentsImportInput, TestAssignmentsListParams, TestAssignmentsListResponse, TestAssignmentsUpdateInput, TestOutParams, UpdateStudentItemResponseResult, UpdateStudentQuestionResponseInput };
|
|
1326
|
+
export type { AssignmentResult, Attempt, BulkResult, CourseProgressResponse, CreateAttemptResponse, CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, ExternalTestCreateResponse, FinalStudentAssessmentResponseInput, FinalizeAssessmentResponse, GetAllPlacementTestsResponse, GetAssessmentProgressParams, GetAssessmentProgressResponse, GetAttemptsParams, GetAttemptsResponse, GetCurrentLevelResponse, GetNextPlacementTestResponse, GetNextQuestionParams, GetNextQuestionResponse, GetSubjectProgressResponse, ImportExternalResultsResponse, ImportExternalTestAssignmentResultsParams, LessonPlanCourseSyncResult, LessonPlanCreateResponse, LessonPlanOperation, LessonPlanOperationInput, LessonPlanOperationResult, LessonPlanOperationsInput, LessonPlanOperationsResponse, LessonPlanResponse, LessonPlanSyncResult, LessonPlanUpdateStudentItemResponseInput, LessonPlansCreateInput, MakeExternalTestAssignmentInput, PaginationMeta, PlacementQueryParams, PlacementResetUserPlacementInput, PowerPath100ProgressResponse, PowerPath100UpdateResponseResult, PowerPathClientConfig, PowerPathClientInstance, PowerPathLessonType, PowerPathQuestionContent, PowerPathQuestionDifficulty, PowerPathQuestionResult, PowerPathTestQuestion, ResetAttemptInput, ResetAttemptResponse, ResetPlacementResponse, ResponseResult, ResponseResultFeedback, ScreeningAssignTestInput, ScreeningAssignTestResponse, ScreeningResetSessionInput, ScreeningResetSessionResponse, ScreeningResultsResponse, ScreeningSessionResponse, StandardProgressResponse, StandardUpdateResponseResult, SyllabusQueryParams, SyllabusResponse, TestAssignment, TestAssignmentStatus, TestAssignmentsAdminParams, TestAssignmentsBulkInput, TestAssignmentsCreateInput, TestAssignmentsImportInput, TestAssignmentsListParams, TestAssignmentsListResponse, TestAssignmentsUpdateInput, TestOutParams, TestOutResponse, UpdateStudentItemResponseResult, UpdateStudentQuestionResponseInput, UpdateStudentQuestionResponseResult };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAM3D,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAExE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE9F,YAAY,EAEX,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,2BAA2B,EAE3B,OAAO,EACP,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,EAAE,eAAe,EAAE,KAAK,uBAAuB,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AAEjD,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAA;AAM3D,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAExE,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAE9F,YAAY,EAEX,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,2BAA2B,EAE3B,OAAO,EACP,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,4BAA4B,EAC5B,gCAAgC,EAChC,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB,wBAAwB,EACxB,4BAA4B,EAC5B,eAAe,EACf,mCAAmC,EAEnC,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,sBAAsB,EAEtB,2BAA2B,EAC3B,6BAA6B,EAC7B,wBAAwB,EACxB,wBAAwB,EAExB,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EACzB,4BAA4B,EAC5B,kBAAkB,EAClB,oBAAoB,EACpB,+BAA+B,EAE/B,gBAAgB,EAEhB,cAAc,EACd,mBAAmB,EACnB,2BAA2B,GAC3B,MAAM,qCAAqC,CAAA;AAM5C,YAAY,EACX,gCAAgC,EAChC,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,mCAAmC,EACnC,2BAA2B,EAC3B,iBAAiB,EACjB,qBAAqB,EACrB,yCAAyC,EACzC,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,wCAAwC,EACxC,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EAChC,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,EAC1B,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,aAAa,EACb,kCAAkC,GAClC,MAAM,qBAAqB,CAAA;AAM5B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -16654,7 +16654,7 @@ var QtiItemMetadata = exports_external.object({
|
|
|
16654
16654
|
grade: TimebackGrade.optional(),
|
|
16655
16655
|
difficulty: QtiDifficulty.optional(),
|
|
16656
16656
|
learningObjectiveSet: exports_external.array(QtiLearningObjectiveSet).optional()
|
|
16657
|
-
}).
|
|
16657
|
+
}).loose();
|
|
16658
16658
|
var QtiModalFeedback = exports_external.object({
|
|
16659
16659
|
outcomeIdentifier: exports_external.string().min(1),
|
|
16660
16660
|
identifier: exports_external.string().min(1),
|
|
@@ -16691,7 +16691,12 @@ var QtiPaginationParams = exports_external.object({
|
|
|
16691
16691
|
sort: exports_external.string().optional(),
|
|
16692
16692
|
order: exports_external.enum(["asc", "desc"]).optional()
|
|
16693
16693
|
}).strict();
|
|
16694
|
-
var
|
|
16694
|
+
var QtiAssessmentItemXmlCreateInput = exports_external.object({
|
|
16695
|
+
format: exports_external.string().pipe(exports_external.literal("xml")),
|
|
16696
|
+
xml: exports_external.string().min(1),
|
|
16697
|
+
metadata: QtiItemMetadata.optional()
|
|
16698
|
+
}).strict();
|
|
16699
|
+
var QtiAssessmentItemJsonCreateInput = exports_external.object({
|
|
16695
16700
|
identifier: exports_external.string().min(1),
|
|
16696
16701
|
title: exports_external.string().min(1),
|
|
16697
16702
|
type: QtiAssessmentItemType,
|
|
@@ -16706,6 +16711,10 @@ var QtiAssessmentItemCreateInput = exports_external.object({
|
|
|
16706
16711
|
feedbackInline: exports_external.array(QtiFeedbackInline).optional(),
|
|
16707
16712
|
feedbackBlock: exports_external.array(QtiFeedbackBlock).optional()
|
|
16708
16713
|
}).strict();
|
|
16714
|
+
var QtiAssessmentItemCreateInput = exports_external.union([
|
|
16715
|
+
QtiAssessmentItemXmlCreateInput,
|
|
16716
|
+
QtiAssessmentItemJsonCreateInput
|
|
16717
|
+
]);
|
|
16709
16718
|
var QtiAssessmentItemUpdateInput = exports_external.object({
|
|
16710
16719
|
identifier: exports_external.string().min(1).optional(),
|
|
16711
16720
|
title: exports_external.string().min(1),
|
|
@@ -16742,9 +16751,9 @@ var QtiAssessmentSection = exports_external.object({
|
|
|
16742
16751
|
}).strict();
|
|
16743
16752
|
var QtiTestPart = exports_external.object({
|
|
16744
16753
|
identifier: exports_external.string().min(1),
|
|
16745
|
-
navigationMode: QtiNavigationMode,
|
|
16746
|
-
submissionMode: QtiSubmissionMode,
|
|
16747
|
-
"qti-assessment-section": exports_external.
|
|
16754
|
+
navigationMode: exports_external.string().pipe(QtiNavigationMode),
|
|
16755
|
+
submissionMode: exports_external.string().pipe(QtiSubmissionMode),
|
|
16756
|
+
"qti-assessment-section": exports_external.array(QtiAssessmentSection)
|
|
16748
16757
|
}).strict();
|
|
16749
16758
|
var QtiReorderItemsInput = exports_external.object({
|
|
16750
16759
|
items: exports_external.array(QtiAssessmentItemRef).min(1)
|
|
@@ -16762,7 +16771,7 @@ var QtiAssessmentTestCreateInput = exports_external.object({
|
|
|
16762
16771
|
maxAttempts: exports_external.number().optional(),
|
|
16763
16772
|
toolsEnabled: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
|
|
16764
16773
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
16765
|
-
"qti-test-part": QtiTestPart,
|
|
16774
|
+
"qti-test-part": exports_external.array(QtiTestPart),
|
|
16766
16775
|
"qti-outcome-declaration": exports_external.array(QtiTestOutcomeDeclaration).optional()
|
|
16767
16776
|
}).strict();
|
|
16768
16777
|
var QtiAssessmentTestUpdateInput = exports_external.object({
|
|
@@ -16775,7 +16784,7 @@ var QtiAssessmentTestUpdateInput = exports_external.object({
|
|
|
16775
16784
|
maxAttempts: exports_external.number().optional(),
|
|
16776
16785
|
toolsEnabled: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
|
|
16777
16786
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional(),
|
|
16778
|
-
"qti-test-part": QtiTestPart,
|
|
16787
|
+
"qti-test-part": exports_external.array(QtiTestPart),
|
|
16779
16788
|
"qti-outcome-declaration": exports_external.array(QtiTestOutcomeDeclaration).optional()
|
|
16780
16789
|
}).strict();
|
|
16781
16790
|
var QtiStimulusCreateInput = exports_external.object({
|
package/dist/public-types.d.ts
CHANGED
|
@@ -19,6 +19,16 @@ type TestAssignmentStatus =
|
|
|
19
19
|
| 'expired'
|
|
20
20
|
| 'cancelled'
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Lesson types for PowerPath assessments.
|
|
24
|
+
*/
|
|
25
|
+
type PowerPathLessonType = 'powerpath-100' | 'quiz' | 'test-out' | 'placement' | 'unit-test'
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Question difficulty levels.
|
|
29
|
+
*/
|
|
30
|
+
type PowerPathQuestionDifficulty = 'easy' | 'medium' | 'hard'
|
|
31
|
+
|
|
22
32
|
/**
|
|
23
33
|
* Lesson plan operation types.
|
|
24
34
|
*/
|
|
@@ -113,6 +123,67 @@ interface BulkResult {
|
|
|
113
123
|
errors: Array<{ row: number; message: string }>
|
|
114
124
|
}
|
|
115
125
|
|
|
126
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
127
|
+
// QUESTIONS
|
|
128
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* QTI content associated with a question.
|
|
132
|
+
*/
|
|
133
|
+
interface PowerPathQuestionContent {
|
|
134
|
+
/** The type of the question (e.g., choiceInteraction) */
|
|
135
|
+
type?: string
|
|
136
|
+
/** The raw XML question in QTI format */
|
|
137
|
+
rawXml: string
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Result of evaluating a student's response to a question.
|
|
142
|
+
*/
|
|
143
|
+
interface PowerPathQuestionResult {
|
|
144
|
+
/** Score assigned considering the student's response */
|
|
145
|
+
score: number
|
|
146
|
+
/** Feedback text for the question */
|
|
147
|
+
feedback: string
|
|
148
|
+
/** Outcome variables from response processing */
|
|
149
|
+
outcomes?: Record<string, string>
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* A question in a PowerPath test.
|
|
154
|
+
*
|
|
155
|
+
* Represents a question with its metadata, optional QTI content,
|
|
156
|
+
* and (when answered) the student's response and result.
|
|
157
|
+
*/
|
|
158
|
+
interface PowerPathTestQuestion {
|
|
159
|
+
/** ID that represents the question in the test */
|
|
160
|
+
id: string
|
|
161
|
+
/** Index of the question in the test */
|
|
162
|
+
index: number
|
|
163
|
+
/** Title of the question */
|
|
164
|
+
title: string
|
|
165
|
+
/** URL of the QTI question */
|
|
166
|
+
url: string
|
|
167
|
+
/** Difficulty of the question */
|
|
168
|
+
difficulty: PowerPathQuestionDifficulty
|
|
169
|
+
/** Whether the question has been approved by a human */
|
|
170
|
+
humanApproved?: boolean | null
|
|
171
|
+
/** QTI content of the question */
|
|
172
|
+
content?: PowerPathQuestionContent
|
|
173
|
+
/** Student's response (single value or array) */
|
|
174
|
+
response?: string | string[]
|
|
175
|
+
/** Student's responses keyed by response identifier */
|
|
176
|
+
responses?: Record<string, string | string[]>
|
|
177
|
+
/** Whether the student's response is correct */
|
|
178
|
+
correct?: boolean
|
|
179
|
+
/** Result of evaluating the response */
|
|
180
|
+
result?: PowerPathQuestionResult
|
|
181
|
+
/** sourcedId of the AssessmentResult for this question attempt */
|
|
182
|
+
resultId?: string
|
|
183
|
+
/** Learning objective IDs associated with the question */
|
|
184
|
+
learningObjectives?: string[]
|
|
185
|
+
}
|
|
186
|
+
|
|
116
187
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
117
188
|
// ASSESSMENTS
|
|
118
189
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -148,21 +219,247 @@ interface GetAttemptsResponse {
|
|
|
148
219
|
attempts: Attempt[]
|
|
149
220
|
}
|
|
150
221
|
|
|
222
|
+
/**
|
|
223
|
+
* Result from resetting an attempt.
|
|
224
|
+
*/
|
|
225
|
+
interface ResetAttemptResponse {
|
|
226
|
+
success: boolean
|
|
227
|
+
score: number
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
231
|
+
// ASSESSMENT PROGRESS (getAssessmentProgress)
|
|
232
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Progress for a PowerPath 100 lesson.
|
|
236
|
+
*
|
|
237
|
+
* Uses `seenQuestions` (not `questions`) and includes remaining question counts
|
|
238
|
+
* per difficulty level.
|
|
239
|
+
*/
|
|
240
|
+
interface PowerPath100ProgressResponse {
|
|
241
|
+
lessonType: 'powerpath-100'
|
|
242
|
+
/** Remaining question counts per difficulty level */
|
|
243
|
+
remainingQuestionsPerDifficulty: {
|
|
244
|
+
easy: number
|
|
245
|
+
medium: number
|
|
246
|
+
hard: number
|
|
247
|
+
}
|
|
248
|
+
/** Current score for this attempt */
|
|
249
|
+
score: number
|
|
250
|
+
/** Questions the student has seen */
|
|
251
|
+
seenQuestions: PowerPathTestQuestion[]
|
|
252
|
+
/** sourcedId of the parent test AssessmentResult */
|
|
253
|
+
testResultId?: string
|
|
254
|
+
/** Attempt number */
|
|
255
|
+
attempt: number
|
|
256
|
+
/** XP earned in the lesson */
|
|
257
|
+
xp: number | null
|
|
258
|
+
/** Multiplier for XP */
|
|
259
|
+
multiplier: number | null
|
|
260
|
+
/** Accuracy of the student's attempted questions */
|
|
261
|
+
accuracy: number
|
|
262
|
+
/** Number of correct questions answered */
|
|
263
|
+
correctQuestions: number
|
|
264
|
+
/** Total number of questions in the lesson */
|
|
265
|
+
totalQuestions: number
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Progress for quiz, test-out, placement, or unit-test lessons.
|
|
270
|
+
*
|
|
271
|
+
* Uses `questions` (not `seenQuestions`). Includes `finalized` to indicate
|
|
272
|
+
* whether the lesson has been completed.
|
|
273
|
+
*/
|
|
274
|
+
interface StandardProgressResponse {
|
|
275
|
+
lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'
|
|
276
|
+
/** Whether the lesson has been finalized in the current attempt */
|
|
277
|
+
finalized: boolean
|
|
278
|
+
/** Current score for this attempt */
|
|
279
|
+
score?: number
|
|
280
|
+
/** Questions in the test */
|
|
281
|
+
questions: PowerPathTestQuestion[]
|
|
282
|
+
/** Tool provider of the lesson if external */
|
|
283
|
+
toolProvider: string | null
|
|
284
|
+
/** Whether auto-enrollment failed (only for finalized external tests) */
|
|
285
|
+
enrollmentFailed?: boolean
|
|
286
|
+
/** sourcedId of the parent test AssessmentResult */
|
|
287
|
+
testResultId?: string
|
|
288
|
+
/** Attempt number */
|
|
289
|
+
attempt: number
|
|
290
|
+
/** XP earned in the lesson */
|
|
291
|
+
xp: number | null
|
|
292
|
+
/** Multiplier for XP */
|
|
293
|
+
multiplier: number | null
|
|
294
|
+
/** Accuracy of the student's attempted questions */
|
|
295
|
+
accuracy: number
|
|
296
|
+
/** Number of correct questions answered */
|
|
297
|
+
correctQuestions: number
|
|
298
|
+
/** Total number of questions in the lesson */
|
|
299
|
+
totalQuestions: number
|
|
300
|
+
}
|
|
301
|
+
|
|
151
302
|
/**
|
|
152
303
|
* Result from getting assessment progress.
|
|
153
|
-
*
|
|
304
|
+
*
|
|
305
|
+
* Discriminated union on `lessonType`:
|
|
306
|
+
* - `'powerpath-100'` — uses `seenQuestions` and `remainingQuestionsPerDifficulty`
|
|
307
|
+
* - `'quiz' | 'test-out' | 'placement' | 'unit-test'` — uses `questions` and `finalized`
|
|
154
308
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
309
|
+
type GetAssessmentProgressResponse = PowerPath100ProgressResponse | StandardProgressResponse
|
|
310
|
+
|
|
311
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
312
|
+
// GET NEXT QUESTION (getNextQuestion)
|
|
313
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Result from getting the next question in a PowerPath 100 lesson.
|
|
317
|
+
*/
|
|
318
|
+
interface GetNextQuestionResponse {
|
|
319
|
+
/** Current PowerPath score of the student in this lesson */
|
|
320
|
+
score: number
|
|
321
|
+
/** The next question to present */
|
|
322
|
+
question: PowerPathTestQuestion
|
|
158
323
|
}
|
|
159
324
|
|
|
325
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
326
|
+
// UPDATE STUDENT QUESTION RESPONSE (updateStudentQuestionResponse)
|
|
327
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
328
|
+
|
|
160
329
|
/**
|
|
161
|
-
*
|
|
330
|
+
* Response feedback for a student's answer.
|
|
162
331
|
*/
|
|
163
|
-
interface
|
|
164
|
-
|
|
332
|
+
interface ResponseResultFeedback {
|
|
333
|
+
identifier?: string
|
|
334
|
+
value?: string
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* Result of processing a student's response.
|
|
339
|
+
*/
|
|
340
|
+
interface ResponseResult {
|
|
341
|
+
/** Whether the student's response is correct */
|
|
342
|
+
isCorrect: boolean
|
|
343
|
+
/** Score for this specific response (0 or 1) */
|
|
165
344
|
score: number
|
|
345
|
+
/** Optional feedback */
|
|
346
|
+
feedback?: ResponseResultFeedback
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Result from updating a student's response in a PowerPath 100 lesson.
|
|
351
|
+
*
|
|
352
|
+
* Includes the updated PowerPath score, response correctness, and accuracy stats.
|
|
353
|
+
*/
|
|
354
|
+
interface PowerPath100UpdateResponseResult {
|
|
355
|
+
lessonType: 'powerpath-100'
|
|
356
|
+
/** Updated PowerPath score */
|
|
357
|
+
powerpathScore: number
|
|
358
|
+
/** Result of processing the response */
|
|
359
|
+
responseResult: ResponseResult
|
|
360
|
+
/** Assessment result for the question (for debugging) */
|
|
361
|
+
questionResult?: unknown
|
|
362
|
+
/** Assessment result for the test (for debugging) */
|
|
363
|
+
testResult?: unknown
|
|
364
|
+
/** Accuracy of the student's attempted questions */
|
|
365
|
+
accuracy: number
|
|
366
|
+
/** Number of correct questions answered */
|
|
367
|
+
correctQuestions: number
|
|
368
|
+
/** Total number of questions */
|
|
369
|
+
totalQuestions: number
|
|
370
|
+
/** XP earned */
|
|
371
|
+
xp: number | null
|
|
372
|
+
/** XP multiplier */
|
|
373
|
+
multiplier: number | null
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Result from updating a student's response in a quiz/test-out/placement/unit-test lesson.
|
|
378
|
+
*
|
|
379
|
+
* Minimal response — correctness is evaluated at finalization.
|
|
380
|
+
*/
|
|
381
|
+
interface StandardUpdateResponseResult {
|
|
382
|
+
lessonType: 'quiz' | 'test-out' | 'placement' | 'unit-test'
|
|
383
|
+
/** Assessment result for the question (for debugging) */
|
|
384
|
+
questionResult?: unknown
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Result from updating a student question response.
|
|
389
|
+
*
|
|
390
|
+
* Discriminated union on `lessonType`:
|
|
391
|
+
* - `'powerpath-100'` — includes score, accuracy, and response correctness
|
|
392
|
+
* - Other lesson types — minimal, evaluated at finalization
|
|
393
|
+
*/
|
|
394
|
+
type UpdateStudentQuestionResponseResult =
|
|
395
|
+
| PowerPath100UpdateResponseResult
|
|
396
|
+
| StandardUpdateResponseResult
|
|
397
|
+
|
|
398
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
399
|
+
// FINALIZE ASSESSMENT (finalStudentAssessmentResponse)
|
|
400
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Result from finalizing a test assessment.
|
|
404
|
+
*
|
|
405
|
+
* Returned after all questions have been answered and the lesson is
|
|
406
|
+
* evaluated. Not applicable to `powerpath-100` or external test lessons.
|
|
407
|
+
*/
|
|
408
|
+
interface FinalizeAssessmentResponse {
|
|
409
|
+
/** Type of the lesson that was finalized */
|
|
410
|
+
lessonType: PowerPathLessonType
|
|
411
|
+
/** Whether the lesson has been finalized */
|
|
412
|
+
finalized: boolean
|
|
413
|
+
/** The attempt number */
|
|
414
|
+
attempt: number
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
418
|
+
// TEST OUT (testOut)
|
|
419
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Result from getting the test-out lesson for a student/course.
|
|
423
|
+
*
|
|
424
|
+
* Returns the test-out lesson reference, finalization status,
|
|
425
|
+
* and optional external tool credentials.
|
|
426
|
+
*/
|
|
427
|
+
interface TestOutResponse {
|
|
428
|
+
lessonType: 'test-out'
|
|
429
|
+
/** ID of the test-out lesson, or null if none exists */
|
|
430
|
+
lessonId: string | null
|
|
431
|
+
/** Whether the test-out has been finalized in the current attempt */
|
|
432
|
+
finalized: boolean
|
|
433
|
+
/** Tool provider for the test-out lesson, or null if internal */
|
|
434
|
+
toolProvider: string | null
|
|
435
|
+
/** Attempt number */
|
|
436
|
+
attempt?: number
|
|
437
|
+
/** Credentials for accessing the assigned test on external tool */
|
|
438
|
+
credentials?: {
|
|
439
|
+
email: string
|
|
440
|
+
password: string
|
|
441
|
+
}
|
|
442
|
+
/** Assignment ID on external tool for results retrieval */
|
|
443
|
+
assignmentId?: string
|
|
444
|
+
/** Class ID on external tool for results retrieval */
|
|
445
|
+
classId?: string
|
|
446
|
+
/** URL of the test on external tool */
|
|
447
|
+
testUrl?: string
|
|
448
|
+
/** ID of the test on external tool */
|
|
449
|
+
testId?: string
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
453
|
+
// IMPORT EXTERNAL RESULTS (importExternalTestAssignmentResults)
|
|
454
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Result from importing external test assignment results.
|
|
458
|
+
*
|
|
459
|
+
* Response shape varies by tool provider. Contains at minimum a success indicator.
|
|
460
|
+
*/
|
|
461
|
+
interface ImportExternalResultsResponse {
|
|
462
|
+
[key: string]: unknown
|
|
166
463
|
}
|
|
167
464
|
|
|
168
465
|
// ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -657,4 +954,4 @@ type ImportExternalTestAssignmentResultsParams = input<
|
|
|
657
954
|
type PlacementQueryParams = input<typeof PowerPathPlacementQueryParams>
|
|
658
955
|
type SyllabusQueryParams = input<typeof PowerPathSyllabusQueryParams>
|
|
659
956
|
|
|
660
|
-
export type { AssignmentResult, Attempt, BulkResult, CourseProgressResponse, CreateAttemptResponse, CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, ExternalTestCreateResponse, FinalStudentAssessmentResponseInput, GetAllPlacementTestsResponse, GetAssessmentProgressParams, GetAssessmentProgressResponse, GetAttemptsParams, GetAttemptsResponse, GetCurrentLevelResponse, GetNextPlacementTestResponse, GetNextQuestionParams, GetSubjectProgressResponse, ImportExternalTestAssignmentResultsParams, LessonPlanCourseSyncResult, LessonPlanCreateResponse, LessonPlanOperation, LessonPlanOperationInput, LessonPlanOperationResult, LessonPlanOperationType, LessonPlanOperationsInput, LessonPlanOperationsResponse, LessonPlanResponse, LessonPlanSyncResult, LessonPlanUpdateStudentItemResponseInput, LessonPlansCreateInput, MakeExternalTestAssignmentInput, PaginationMeta, PlacementQueryParams, PlacementResetUserPlacementInput, ResetAttemptInput, ResetAttemptResponse, ResetPlacementResponse, ScreeningAssignTestInput, ScreeningAssignTestResponse, ScreeningResetSessionInput, ScreeningResetSessionResponse, ScreeningResultsResponse, ScreeningSessionResponse, SyllabusQueryParams, SyllabusResponse, TestAssignment, TestAssignmentStatus, TestAssignmentsAdminParams, TestAssignmentsBulkInput, TestAssignmentsCreateInput, TestAssignmentsImportInput, TestAssignmentsListParams, TestAssignmentsListResponse, TestAssignmentsUpdateInput, TestOutParams, UpdateStudentItemResponseResult, UpdateStudentQuestionResponseInput };
|
|
957
|
+
export type { AssignmentResult, Attempt, BulkResult, CourseProgressResponse, CreateAttemptResponse, CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, ExternalTestCreateResponse, FinalStudentAssessmentResponseInput, FinalizeAssessmentResponse, GetAllPlacementTestsResponse, GetAssessmentProgressParams, GetAssessmentProgressResponse, GetAttemptsParams, GetAttemptsResponse, GetCurrentLevelResponse, GetNextPlacementTestResponse, GetNextQuestionParams, GetNextQuestionResponse, GetSubjectProgressResponse, ImportExternalResultsResponse, ImportExternalTestAssignmentResultsParams, LessonPlanCourseSyncResult, LessonPlanCreateResponse, LessonPlanOperation, LessonPlanOperationInput, LessonPlanOperationResult, LessonPlanOperationType, LessonPlanOperationsInput, LessonPlanOperationsResponse, LessonPlanResponse, LessonPlanSyncResult, LessonPlanUpdateStudentItemResponseInput, LessonPlansCreateInput, MakeExternalTestAssignmentInput, PaginationMeta, PlacementQueryParams, PlacementResetUserPlacementInput, PowerPath100ProgressResponse, PowerPath100UpdateResponseResult, PowerPathLessonType, PowerPathQuestionContent, PowerPathQuestionDifficulty, PowerPathQuestionResult, PowerPathTestQuestion, ResetAttemptInput, ResetAttemptResponse, ResetPlacementResponse, ResponseResult, ResponseResultFeedback, ScreeningAssignTestInput, ScreeningAssignTestResponse, ScreeningResetSessionInput, ScreeningResetSessionResponse, ScreeningResultsResponse, ScreeningSessionResponse, StandardProgressResponse, StandardUpdateResponseResult, SyllabusQueryParams, SyllabusResponse, TestAssignment, TestAssignmentStatus, TestAssignmentsAdminParams, TestAssignmentsBulkInput, TestAssignmentsCreateInput, TestAssignmentsImportInput, TestAssignmentsListParams, TestAssignmentsListResponse, TestAssignmentsUpdateInput, TestOutParams, TestOutResponse, UpdateStudentItemResponseResult, UpdateStudentQuestionResponseInput, UpdateStudentQuestionResponseResult };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* PowerPath assessment operations: tests, attempts, and responses.
|
|
5
5
|
*/
|
|
6
|
-
import type { CreateAttemptResponse, ExternalTestCreateResponse, GetAssessmentProgressResponse, GetAttemptsResponse, ResetAttemptResponse } from '@timeback/types/protocols/powerpath';
|
|
6
|
+
import type { CreateAttemptResponse, ExternalTestCreateResponse, FinalizeAssessmentResponse, GetAssessmentProgressResponse, GetAttemptsResponse, GetNextQuestionResponse, ImportExternalResultsResponse, ResetAttemptResponse, TestOutResponse, UpdateStudentQuestionResponseResult } from '@timeback/types/protocols/powerpath';
|
|
7
7
|
import type { CreateExternalPlacementTestInput, CreateExternalTestOutInput, CreateInternalTestInput, CreateNewAttemptInput, FinalStudentAssessmentResponseInput, GetAssessmentProgressParams, GetAttemptsParams, GetNextQuestionParams, ImportExternalTestAssignmentResultsParams, MakeExternalTestAssignmentInput, ResetAttemptInput, TestOutParams, UpdateStudentQuestionResponseInput } from '@timeback/types/zod';
|
|
8
8
|
import type { PowerPathTransportLike } from '../types';
|
|
9
9
|
/**
|
|
@@ -16,14 +16,14 @@ export declare class AssessmentResource {
|
|
|
16
16
|
createExternalTestOut(input: CreateExternalTestOutInput): Promise<ExternalTestCreateResponse>;
|
|
17
17
|
createInternalTest(input: CreateInternalTestInput): Promise<ExternalTestCreateResponse>;
|
|
18
18
|
createNewAttempt(input: CreateNewAttemptInput): Promise<CreateAttemptResponse>;
|
|
19
|
-
finalStudentAssessmentResponse(input: FinalStudentAssessmentResponseInput): Promise<
|
|
19
|
+
finalStudentAssessmentResponse(input: FinalStudentAssessmentResponseInput): Promise<FinalizeAssessmentResponse>;
|
|
20
20
|
getAssessmentProgress(params: GetAssessmentProgressParams): Promise<GetAssessmentProgressResponse>;
|
|
21
21
|
getAttempts(params: GetAttemptsParams): Promise<GetAttemptsResponse>;
|
|
22
|
-
getNextQuestion(params: GetNextQuestionParams): Promise<
|
|
23
|
-
importExternalTestAssignmentResults(params: ImportExternalTestAssignmentResultsParams): Promise<
|
|
22
|
+
getNextQuestion(params: GetNextQuestionParams): Promise<GetNextQuestionResponse>;
|
|
23
|
+
importExternalTestAssignmentResults(params: ImportExternalTestAssignmentResultsParams): Promise<ImportExternalResultsResponse>;
|
|
24
24
|
makeExternalTestAssignment(input: MakeExternalTestAssignmentInput): Promise<ExternalTestCreateResponse>;
|
|
25
25
|
resetAttempt(input: ResetAttemptInput): Promise<ResetAttemptResponse>;
|
|
26
|
-
testOut(params: TestOutParams): Promise<
|
|
27
|
-
updateStudentQuestionResponse(input: UpdateStudentQuestionResponseInput): Promise<
|
|
26
|
+
testOut(params: TestOutParams): Promise<TestOutResponse>;
|
|
27
|
+
updateStudentQuestionResponse(input: UpdateStudentQuestionResponseInput): Promise<UpdateStudentQuestionResponseResult>;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=assessment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assessment.d.ts","sourceRoot":"","sources":["../../src/resources/assessment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,OAAO,KAAK,EACX,qBAAqB,EACrB,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EACX,gCAAgC,EAChC,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,mCAAmC,EACnC,2BAA2B,EAC3B,iBAAiB,EACjB,qBAAqB,EACrB,yCAAyC,EACzC,+BAA+B,EAC/B,iBAAiB,EACjB,aAAa,EACb,kCAAkC,EAClC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEtD;;GAEG;AACH,qBAAa,kBAAkB;IAClB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,sBAAsB,EAAI;IAElE,2BAA2B,CAC1B,KAAK,EAAE,gCAAgC,GACrC,OAAO,CAAC,0BAA0B,CAAC,CAUrC;IAED,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAM5F;IAED,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAMtF;IAED,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAM7E;IAED,8BAA8B,CAC7B,KAAK,EAAE,mCAAmC,GACxC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"assessment.d.ts","sourceRoot":"","sources":["../../src/resources/assessment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,OAAO,KAAK,EACX,qBAAqB,EACrB,0BAA0B,EAC1B,0BAA0B,EAC1B,6BAA6B,EAC7B,mBAAmB,EACnB,uBAAuB,EACvB,6BAA6B,EAC7B,oBAAoB,EACpB,eAAe,EACf,mCAAmC,EACnC,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EACX,gCAAgC,EAChC,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,mCAAmC,EACnC,2BAA2B,EAC3B,iBAAiB,EACjB,qBAAqB,EACrB,yCAAyC,EACzC,+BAA+B,EAC/B,iBAAiB,EACjB,aAAa,EACb,kCAAkC,EAClC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEtD;;GAEG;AACH,qBAAa,kBAAkB;IAClB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,sBAAsB,EAAI;IAElE,2BAA2B,CAC1B,KAAK,EAAE,gCAAgC,GACrC,OAAO,CAAC,0BAA0B,CAAC,CAUrC;IAED,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAM5F;IAED,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAMtF;IAED,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAM7E;IAED,8BAA8B,CAC7B,KAAK,EAAE,mCAAmC,GACxC,OAAO,CAAC,0BAA0B,CAAC,CAarC;IAED,qBAAqB,CACpB,MAAM,EAAE,2BAA2B,GACjC,OAAO,CAAC,6BAA6B,CAAC,CASxC;IAED,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAGnE;IAED,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAG/E;IAED,mCAAmC,CAClC,MAAM,EAAE,yCAAyC,GAC/C,OAAO,CAAC,6BAA6B,CAAC,CAUxC;IAED,0BAA0B,CACzB,KAAK,EAAE,+BAA+B,GACpC,OAAO,CAAC,0BAA0B,CAAC,CAUrC;IAED,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAMpE;IAED,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC,CAGvD;IAED,6BAA6B,CAC5B,KAAK,EAAE,kCAAkC,GACvC,OAAO,CAAC,mCAAmC,CAAC,CAa9C;CACD"}
|