@timeback/qti 0.2.2-beta.20260331191116 → 0.2.2
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/errors.d.ts +144 -1
- package/dist/index.d.ts +1405 -718
- package/dist/index.js +15 -25
- package/dist/public-types.d.ts +1 -574
- package/dist/public-types.js +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -45,8 +45,19 @@ class Transport extends BaseTransport {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
// ../../types/
|
|
48
|
+
// ../../types/dist/zod/index.js
|
|
49
49
|
import { z } from "zod/v4";
|
|
50
|
+
import { z as z2 } from "zod/v4";
|
|
51
|
+
import { z as z3 } from "zod/v4";
|
|
52
|
+
import { z as z4 } from "zod/v4";
|
|
53
|
+
import { z as z5 } from "zod/v4";
|
|
54
|
+
import { z as z6 } from "zod/v4";
|
|
55
|
+
import { z as z7 } from "zod/v4";
|
|
56
|
+
import { z as z8 } from "zod/v4";
|
|
57
|
+
import { z as z9 } from "zod/v4";
|
|
58
|
+
import { z as z10 } from "zod/v4";
|
|
59
|
+
import { z as z11 } from "zod/v4";
|
|
60
|
+
import { z as z12 } from "zod/v4";
|
|
50
61
|
var IsoDateTimeRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/;
|
|
51
62
|
var IsoDateTimeString = z.string().min(1).regex(IsoDateTimeRegex, "must be a valid ISO 8601 datetime");
|
|
52
63
|
var IsoDateString = z.string().min(1).regex(/^\d{4}-\d{2}-\d{2}$/, "must be a valid ISO 8601 date (YYYY-MM-DD)");
|
|
@@ -194,8 +205,6 @@ var IMSErrorResponse = z.object({
|
|
|
194
205
|
}))
|
|
195
206
|
}).optional()
|
|
196
207
|
});
|
|
197
|
-
// ../../types/src/zod/caliper.ts
|
|
198
|
-
import { z as z2 } from "zod/v4";
|
|
199
208
|
var CaliperIri = z2.union([z2.url(), z2.string().regex(/^urn:/, "Must be a URL or URN")]);
|
|
200
209
|
var TimebackUser = z2.object({
|
|
201
210
|
id: z2.url(),
|
|
@@ -400,8 +409,6 @@ var QuestionGradedInput = z2.object({
|
|
|
400
409
|
session: CaliperEntity.optional(),
|
|
401
410
|
extensions: z2.record(z2.string(), z2.unknown()).optional()
|
|
402
411
|
}).strict();
|
|
403
|
-
// ../../types/src/zod/webhooks.ts
|
|
404
|
-
import { z as z3 } from "zod/v4";
|
|
405
412
|
var WebhookCreateInput = z3.object({
|
|
406
413
|
name: NonEmptyString,
|
|
407
414
|
targetUrl: z3.url("targetUrl must be a valid URL"),
|
|
@@ -434,8 +441,6 @@ var WebhookFilterCreateInput = z3.object({
|
|
|
434
441
|
filterOperator: WebhookFilterOperation,
|
|
435
442
|
active: z3.boolean()
|
|
436
443
|
}).strict();
|
|
437
|
-
// ../../types/src/zod/case.ts
|
|
438
|
-
import { z as z4 } from "zod/v4";
|
|
439
444
|
var UuidString = z4.string().uuid();
|
|
440
445
|
var InputNodeURISchema = z4.object({
|
|
441
446
|
title: NonEmptyString,
|
|
@@ -509,8 +514,6 @@ var CasePackageInput = z4.object({
|
|
|
509
514
|
CFDefinitions: CFDefinitionsSchema.optional(),
|
|
510
515
|
extensions: z4.unknown().optional()
|
|
511
516
|
});
|
|
512
|
-
// ../../types/src/zod/clr.ts
|
|
513
|
-
import { z as z5 } from "zod/v4";
|
|
514
517
|
var W3C_CREDENTIALS_CONTEXT = "https://www.w3.org/ns/credentials/v2";
|
|
515
518
|
var ClrContextArray = z5.array(z5.url()).min(3, "@context must include W3C, CLR, and OB context URLs").refine((arr) => arr[0] === W3C_CREDENTIALS_CONTEXT, `First @context entry must be "${W3C_CREDENTIALS_CONTEXT}"`);
|
|
516
519
|
var ClrImageSchema = z5.object({
|
|
@@ -610,8 +613,6 @@ var ClrCredentialInput = z5.object({
|
|
|
610
613
|
proof: z5.array(ClrProofSchema).optional(),
|
|
611
614
|
credentialSchema: z5.array(ClrCredentialSchemaSchema).optional()
|
|
612
615
|
});
|
|
613
|
-
// ../../types/src/zod/config.ts
|
|
614
|
-
import { z as z6 } from "zod/v4";
|
|
615
616
|
var CourseIds = z6.object({
|
|
616
617
|
staging: z6.string().meta({ description: "Course ID in staging environment" }).optional(),
|
|
617
618
|
production: z6.string().meta({ description: "Course ID in production environment" }).optional()
|
|
@@ -732,8 +733,6 @@ var TimebackConfig = z6.object({
|
|
|
732
733
|
message: "Each course must have an effective sensor. Either set `sensor` explicitly (top-level or per-course), or provide a `launchUrl` so sensor can be derived from its origin.",
|
|
733
734
|
path: ["courses"]
|
|
734
735
|
});
|
|
735
|
-
// ../../types/src/zod/edubridge.ts
|
|
736
|
-
import { z as z7 } from "zod/v4";
|
|
737
736
|
var EdubridgeDateString = z7.union([IsoDateTimeString, IsoDateString]);
|
|
738
737
|
var EduBridgeEnrollment = z7.object({
|
|
739
738
|
id: z7.string(),
|
|
@@ -838,8 +837,6 @@ var EdubridgeEnrollmentFactsParams = z7.object({
|
|
|
838
837
|
endDate: EdubridgeDateString.optional(),
|
|
839
838
|
timezone: z7.string().optional()
|
|
840
839
|
});
|
|
841
|
-
// ../../types/src/zod/masterytrack.ts
|
|
842
|
-
import { z as z8 } from "zod/v4";
|
|
843
840
|
var MasteryTrackAuthorizerInput = z8.object({
|
|
844
841
|
email: z8.email()
|
|
845
842
|
});
|
|
@@ -915,8 +912,6 @@ var MasteryTrackInvalidateAssignmentInput = z8.object({
|
|
|
915
912
|
});
|
|
916
913
|
}
|
|
917
914
|
});
|
|
918
|
-
// ../../types/src/zod/oneroster.ts
|
|
919
|
-
import { z as z9 } from "zod/v4";
|
|
920
915
|
var Status = z9.enum(["active", "tobedeleted"]);
|
|
921
916
|
var Metadata = z9.record(z9.string(), z9.unknown()).nullable().optional();
|
|
922
917
|
var Ref = z9.object({
|
|
@@ -1397,8 +1392,6 @@ var OneRosterBulkResultItem = z9.object({
|
|
|
1397
1392
|
student: Ref
|
|
1398
1393
|
}).loose();
|
|
1399
1394
|
var OneRosterBulkResultsInput = z9.array(OneRosterBulkResultItem).min(1, "results must have at least one item");
|
|
1400
|
-
// ../../types/src/zod/powerpath.ts
|
|
1401
|
-
import { z as z10 } from "zod/v4";
|
|
1402
1395
|
var ToolProvider = z10.enum(["edulastic", "mastery-track"]);
|
|
1403
1396
|
var LessonTypeRequired = z10.enum([
|
|
1404
1397
|
"powerpath-100",
|
|
@@ -1682,8 +1675,6 @@ var PowerPathRenderConfigUpsertInput = z10.object({
|
|
|
1682
1675
|
var PowerPathSyllabusQueryParams = z10.object({
|
|
1683
1676
|
status: z10.enum(["active", "tobedeleted"]).optional()
|
|
1684
1677
|
});
|
|
1685
|
-
// ../../types/src/zod/qti.ts
|
|
1686
|
-
import { z as z11 } from "zod/v4";
|
|
1687
1678
|
var QtiAssessmentItemType = z11.enum([
|
|
1688
1679
|
"choice",
|
|
1689
1680
|
"text-entry",
|
|
@@ -1943,8 +1934,6 @@ var QtiLessonFeedbackInput = z11.object({
|
|
|
1943
1934
|
lessonId: NonEmptyString,
|
|
1944
1935
|
humanApproved: z11.boolean().optional()
|
|
1945
1936
|
}).strict();
|
|
1946
|
-
// ../../types/src/zod/reporting.ts
|
|
1947
|
-
import { z as z12 } from "zod/v4";
|
|
1948
1937
|
var ReportingAuthMode = z12.enum(["creator_only", "same_org", "all_orgs"]);
|
|
1949
1938
|
var ReportingSavedQueryId = z12.string().uuid();
|
|
1950
1939
|
var ReportingUserEmail = z12.email();
|
|
@@ -1960,6 +1949,7 @@ var PersistReportingQueryInput = z12.object({
|
|
|
1960
1949
|
var RemoveReportingQueryInput = z12.object({
|
|
1961
1950
|
endpointId: ReportingSavedQueryId
|
|
1962
1951
|
});
|
|
1952
|
+
|
|
1963
1953
|
// src/lib/pagination.ts
|
|
1964
1954
|
function translateParams(params) {
|
|
1965
1955
|
const {
|
|
@@ -2445,8 +2435,8 @@ function createQtiClient(registry = DEFAULT_PROVIDER_REGISTRY) {
|
|
|
2445
2435
|
validate;
|
|
2446
2436
|
lesson;
|
|
2447
2437
|
general;
|
|
2448
|
-
constructor(
|
|
2449
|
-
const resolved = resolveToProvider2(
|
|
2438
|
+
constructor(config = {}) {
|
|
2439
|
+
const resolved = resolveToProvider2(config, registry);
|
|
2450
2440
|
if (resolved.mode === "transport") {
|
|
2451
2441
|
this.transport = resolved.transport;
|
|
2452
2442
|
log.info("Client initialized with custom transport");
|
package/dist/public-types.d.ts
CHANGED
|
@@ -1,574 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* QTI Primitives
|
|
3
|
-
*
|
|
4
|
-
* Enums and literal types specific to the QTI protocol.
|
|
5
|
-
* For shared Timeback primitives (TimebackGrade, TimebackSubject), see `@timeback/types`.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Lesson types for PowerPath integration.
|
|
10
|
-
* Used to categorize assessment content by delivery mode.
|
|
11
|
-
*/
|
|
12
|
-
type LessonType =
|
|
13
|
-
| 'powerpath-100'
|
|
14
|
-
| 'quiz'
|
|
15
|
-
| 'test-out'
|
|
16
|
-
| 'placement'
|
|
17
|
-
| 'unit-test'
|
|
18
|
-
| 'alpha-read-article'
|
|
19
|
-
| null
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* API Response Types
|
|
23
|
-
*
|
|
24
|
-
* Types for QTI API responses.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
28
|
-
// LIST RESPONSE
|
|
29
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Paginated list response from QTI API.
|
|
33
|
-
*
|
|
34
|
-
* QTI returns pagination metadata directly in the response body alongside items.
|
|
35
|
-
*/
|
|
36
|
-
interface ListResponse<T> {
|
|
37
|
-
/** Array of items in this page */
|
|
38
|
-
items: T[]
|
|
39
|
-
/** Total items across all pages */
|
|
40
|
-
total: number
|
|
41
|
-
/** Current page number (1-indexed) */
|
|
42
|
-
page: number
|
|
43
|
-
/** Total number of pages */
|
|
44
|
-
pages: number
|
|
45
|
-
/** Items per page */
|
|
46
|
-
limit: number
|
|
47
|
-
/** Sort field */
|
|
48
|
-
sort: string
|
|
49
|
-
/** Sort order */
|
|
50
|
-
order: 'asc' | 'desc'
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Raw paginated response shape from QTI API (alias for internal use).
|
|
55
|
-
*/
|
|
56
|
-
type RawPaginatedResponse<T> = ListResponse<T>
|
|
57
|
-
|
|
58
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
59
|
-
// DELETE RESPONSE
|
|
60
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Response from DELETE operations.
|
|
64
|
-
*/
|
|
65
|
-
interface DeleteResponse {
|
|
66
|
-
message?: string
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Base Types
|
|
71
|
-
*
|
|
72
|
-
* Common types shared across QTI resources.
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
76
|
-
// ENUMS
|
|
77
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Assessment item interaction types.
|
|
81
|
-
*/
|
|
82
|
-
type AssessmentItemType =
|
|
83
|
-
| 'choice'
|
|
84
|
-
| 'text-entry'
|
|
85
|
-
| 'extended-text'
|
|
86
|
-
| 'inline-choice'
|
|
87
|
-
| 'match'
|
|
88
|
-
| 'order'
|
|
89
|
-
| 'associate'
|
|
90
|
-
| 'select-point'
|
|
91
|
-
| 'graphic-order'
|
|
92
|
-
| 'graphic-associate'
|
|
93
|
-
| 'graphic-gap-match'
|
|
94
|
-
| 'hotspot'
|
|
95
|
-
| 'hottext'
|
|
96
|
-
| 'slider'
|
|
97
|
-
| 'drawing'
|
|
98
|
-
| 'media'
|
|
99
|
-
| 'upload'
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Cardinality of a response or outcome variable.
|
|
103
|
-
*/
|
|
104
|
-
type Cardinality = 'single' | 'multiple' | 'ordered' | 'record'
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Base type of a response or outcome variable.
|
|
108
|
-
*/
|
|
109
|
-
type BaseType =
|
|
110
|
-
| 'identifier'
|
|
111
|
-
| 'boolean'
|
|
112
|
-
| 'integer'
|
|
113
|
-
| 'float'
|
|
114
|
-
| 'string'
|
|
115
|
-
| 'point'
|
|
116
|
-
| 'pair'
|
|
117
|
-
| 'directedPair'
|
|
118
|
-
| 'duration'
|
|
119
|
-
| 'file'
|
|
120
|
-
| 'uri'
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Difficulty level for assessment items.
|
|
124
|
-
*/
|
|
125
|
-
type Difficulty = 'easy' | 'medium' | 'hard'
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Grade level (K-12 + pre-K as -1).
|
|
129
|
-
*/
|
|
130
|
-
type Grade = -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Navigation mode for test parts.
|
|
134
|
-
*/
|
|
135
|
-
type NavigationMode = 'linear' | 'nonlinear'
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Submission mode for test parts.
|
|
139
|
-
*/
|
|
140
|
-
type SubmissionMode = 'individual' | 'simultaneous'
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Show/hide indicator for feedback.
|
|
144
|
-
*/
|
|
145
|
-
type ShowHide = 'show' | 'hide'
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Schema type for validation.
|
|
149
|
-
*/
|
|
150
|
-
type ValidationSchema = 'test' | 'item' | 'stimulus'
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Sort order for list responses.
|
|
154
|
-
*/
|
|
155
|
-
type SortOrder = 'asc' | 'desc'
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Feedback type.
|
|
159
|
-
*/
|
|
160
|
-
type FeedbackType = 'QUESTION' | 'LESSON'
|
|
161
|
-
|
|
162
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
163
|
-
// COMMON STRUCTURES
|
|
164
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Correct response value.
|
|
168
|
-
*/
|
|
169
|
-
interface CorrectResponse {
|
|
170
|
-
value: string[]
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* Response declaration for assessment items.
|
|
175
|
-
*/
|
|
176
|
-
interface ResponseDeclaration {
|
|
177
|
-
identifier: string
|
|
178
|
-
cardinality: Cardinality
|
|
179
|
-
baseType?: BaseType
|
|
180
|
-
correctResponse: CorrectResponse
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Outcome declaration for items and tests.
|
|
185
|
-
*/
|
|
186
|
-
interface OutcomeDeclaration {
|
|
187
|
-
identifier: string
|
|
188
|
-
cardinality: Cardinality
|
|
189
|
-
baseType?: BaseType
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Test outcome declaration with additional properties.
|
|
194
|
-
*/
|
|
195
|
-
interface TestOutcomeDeclaration {
|
|
196
|
-
identifier: string
|
|
197
|
-
cardinality?: Cardinality
|
|
198
|
-
baseType: BaseType
|
|
199
|
-
normalMaximum?: number
|
|
200
|
-
normalMinimum?: number
|
|
201
|
-
defaultValue?: {
|
|
202
|
-
value?: unknown
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Inline feedback configuration.
|
|
208
|
-
*/
|
|
209
|
-
interface InlineFeedback {
|
|
210
|
-
outcomeIdentifier: string
|
|
211
|
-
variableIdentifier: string
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Response processing configuration.
|
|
216
|
-
*/
|
|
217
|
-
interface ResponseProcessing {
|
|
218
|
-
templateType: 'match_correct' | 'map_response'
|
|
219
|
-
responseDeclarationIdentifier: string
|
|
220
|
-
outcomeIdentifier: string
|
|
221
|
-
correctResponseIdentifier: string
|
|
222
|
-
incorrectResponseIdentifier: string
|
|
223
|
-
inlineFeedback?: InlineFeedback
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* Learning objective set for metadata.
|
|
228
|
-
*/
|
|
229
|
-
interface LearningObjectiveSet {
|
|
230
|
-
source: string
|
|
231
|
-
learningObjectiveIds: string[]
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
* Item metadata.
|
|
236
|
-
*/
|
|
237
|
-
interface ItemMetadata {
|
|
238
|
-
subject?: string
|
|
239
|
-
grade?: Grade
|
|
240
|
-
difficulty?: Difficulty
|
|
241
|
-
learningObjectiveSet?: LearningObjectiveSet[]
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/**
|
|
245
|
-
* Modal feedback element.
|
|
246
|
-
*/
|
|
247
|
-
interface ModalFeedback {
|
|
248
|
-
outcomeIdentifier: string
|
|
249
|
-
identifier: string
|
|
250
|
-
showHide: ShowHide
|
|
251
|
-
content: string
|
|
252
|
-
title: string
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Inline feedback element.
|
|
257
|
-
*/
|
|
258
|
-
interface FeedbackInline {
|
|
259
|
-
outcomeIdentifier: string
|
|
260
|
-
identifier: string
|
|
261
|
-
showHide: ShowHide
|
|
262
|
-
content: string
|
|
263
|
-
class: string[]
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Block feedback element.
|
|
268
|
-
*/
|
|
269
|
-
interface FeedbackBlock {
|
|
270
|
-
outcomeIdentifier: string
|
|
271
|
-
identifier: string
|
|
272
|
-
showHide: ShowHide
|
|
273
|
-
content: string
|
|
274
|
-
class: string[]
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Stylesheet reference.
|
|
279
|
-
*/
|
|
280
|
-
interface Stylesheet {
|
|
281
|
-
href: string
|
|
282
|
-
type: string
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Catalog info entry.
|
|
287
|
-
*/
|
|
288
|
-
interface CatalogInfo {
|
|
289
|
-
id: string
|
|
290
|
-
support: string
|
|
291
|
-
content: string
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
295
|
-
// PAGINATION
|
|
296
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Pagination metadata from QTI list responses.
|
|
300
|
-
*/
|
|
301
|
-
interface PaginationMeta {
|
|
302
|
-
/** Total items across all pages */
|
|
303
|
-
total: number
|
|
304
|
-
/** Current page number (1-indexed) */
|
|
305
|
-
page: number
|
|
306
|
-
/** Total number of pages */
|
|
307
|
-
pages: number
|
|
308
|
-
/** Items per page */
|
|
309
|
-
limit: number
|
|
310
|
-
/** Sort field */
|
|
311
|
-
sort: string
|
|
312
|
-
/** Sort order */
|
|
313
|
-
order: SortOrder
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Assessment Items Types
|
|
318
|
-
*
|
|
319
|
-
* Types for QTI assessment item resources.
|
|
320
|
-
*/
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
325
|
-
// ASSESSMENT ITEM
|
|
326
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Assessment item entity.
|
|
330
|
-
*/
|
|
331
|
-
interface AssessmentItem {
|
|
332
|
-
identifier: string
|
|
333
|
-
title: string
|
|
334
|
-
type: AssessmentItemType
|
|
335
|
-
qtiVersion: string
|
|
336
|
-
timeDependent: boolean
|
|
337
|
-
adaptive: boolean
|
|
338
|
-
responseDeclarations?: ResponseDeclaration[]
|
|
339
|
-
outcomeDeclarations?: OutcomeDeclaration[]
|
|
340
|
-
responseProcessing?: ResponseProcessing
|
|
341
|
-
metadata?: ItemMetadata
|
|
342
|
-
/** Raw QTI XML string */
|
|
343
|
-
rawXml: string
|
|
344
|
-
/**
|
|
345
|
-
* Parsed XML→JSON content.
|
|
346
|
-
* Structure varies by item type.
|
|
347
|
-
*/
|
|
348
|
-
content: Record<string, unknown>
|
|
349
|
-
modalFeedback?: ModalFeedback[]
|
|
350
|
-
feedbackInline?: FeedbackInline[]
|
|
351
|
-
feedbackBlock?: FeedbackBlock[]
|
|
352
|
-
createdAt: string
|
|
353
|
-
updatedAt: string
|
|
354
|
-
__v?: number
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Result of processing a response.
|
|
359
|
-
*
|
|
360
|
-
* Feedback is only present when the item has response processing
|
|
361
|
-
* with feedback identifiers configured.
|
|
362
|
-
*/
|
|
363
|
-
interface ProcessResponseResult {
|
|
364
|
-
/** Score (0.0–1.0) for the response. */
|
|
365
|
-
score: number
|
|
366
|
-
/** Feedback for the response (only present when item has feedback configured). */
|
|
367
|
-
feedback?: {
|
|
368
|
-
identifier: string
|
|
369
|
-
value: string
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
374
|
-
// SECTION ITEM REFERENCE
|
|
375
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Reference to an assessment item within a section.
|
|
379
|
-
*/
|
|
380
|
-
interface AssessmentItemRef {
|
|
381
|
-
identifier: string
|
|
382
|
-
/** Item reference href */
|
|
383
|
-
href: string
|
|
384
|
-
sequence?: number
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
388
|
-
// SECTION
|
|
389
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Assessment section within a test part.
|
|
393
|
-
*/
|
|
394
|
-
interface AssessmentSection {
|
|
395
|
-
identifier: string
|
|
396
|
-
title: string
|
|
397
|
-
visible: boolean
|
|
398
|
-
required?: boolean
|
|
399
|
-
fixed?: boolean
|
|
400
|
-
sequence: number
|
|
401
|
-
'qti-assessment-item-ref'?: AssessmentItemRef[]
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
405
|
-
// TEST PART
|
|
406
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
407
|
-
|
|
408
|
-
/**
|
|
409
|
-
* Test part within an assessment test.
|
|
410
|
-
*/
|
|
411
|
-
interface TestPart {
|
|
412
|
-
identifier: string
|
|
413
|
-
navigationMode: NavigationMode
|
|
414
|
-
submissionMode: SubmissionMode
|
|
415
|
-
'qti-assessment-section': AssessmentSection[]
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
419
|
-
// ASSESSMENT TEST
|
|
420
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
421
|
-
|
|
422
|
-
/**
|
|
423
|
-
* Assessment test entity.
|
|
424
|
-
*/
|
|
425
|
-
interface AssessmentTest {
|
|
426
|
-
identifier: string
|
|
427
|
-
title: string
|
|
428
|
-
qtiVersion: string
|
|
429
|
-
'qti-test-part': TestPart[]
|
|
430
|
-
/** Outcome declarations for the test. May be an empty array or absent. */
|
|
431
|
-
'qti-outcome-declaration'?: TestOutcomeDeclaration[]
|
|
432
|
-
timeLimit?: number
|
|
433
|
-
maxAttempts?: number
|
|
434
|
-
toolsEnabled?: Record<string, boolean>
|
|
435
|
-
metadata?: Record<string, unknown>
|
|
436
|
-
/** Raw QTI XML string */
|
|
437
|
-
rawXml: string
|
|
438
|
-
/**
|
|
439
|
-
* Parsed XML→JSON content.
|
|
440
|
-
* Structure varies by test.
|
|
441
|
-
*/
|
|
442
|
-
content: Record<string, unknown>
|
|
443
|
-
createdAt: string
|
|
444
|
-
updatedAt: string
|
|
445
|
-
__v?: number
|
|
446
|
-
isValidXml?: boolean
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
450
|
-
// QUESTIONS RESPONSE
|
|
451
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Question reference within a test.
|
|
455
|
-
*/
|
|
456
|
-
interface QuestionReference {
|
|
457
|
-
identifier: string
|
|
458
|
-
href: string
|
|
459
|
-
testPart: string
|
|
460
|
-
section: string
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Question with full item details.
|
|
465
|
-
*/
|
|
466
|
-
interface QuestionWithItem {
|
|
467
|
-
reference: QuestionReference
|
|
468
|
-
question: AssessmentItem
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
/**
|
|
472
|
-
* Response from GET /assessment-tests/{identifier}/questions.
|
|
473
|
-
*/
|
|
474
|
-
interface QuestionsResponse {
|
|
475
|
-
assessmentTest: string
|
|
476
|
-
title: string
|
|
477
|
-
totalQuestions: number
|
|
478
|
-
questions: QuestionWithItem[]
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Lesson Types
|
|
483
|
-
*
|
|
484
|
-
* Types for QTI lesson and question feedback resources.
|
|
485
|
-
*/
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
490
|
-
// LESSON FEEDBACK
|
|
491
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
492
|
-
|
|
493
|
-
/**
|
|
494
|
-
* Lesson feedback entity.
|
|
495
|
-
*/
|
|
496
|
-
interface LessonFeedback {
|
|
497
|
-
questionId?: string
|
|
498
|
-
userId: string
|
|
499
|
-
feedback: string
|
|
500
|
-
type: FeedbackType
|
|
501
|
-
lessonId: string
|
|
502
|
-
humanApproved?: boolean | boolean[]
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
/**
|
|
506
|
-
* Stimuli Types
|
|
507
|
-
*
|
|
508
|
-
* Types for QTI stimulus resources.
|
|
509
|
-
*/
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
514
|
-
// STIMULUS
|
|
515
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
516
|
-
|
|
517
|
-
/**
|
|
518
|
-
* Stimulus entity.
|
|
519
|
-
*/
|
|
520
|
-
interface Stimulus {
|
|
521
|
-
identifier: string
|
|
522
|
-
title: string
|
|
523
|
-
label?: string
|
|
524
|
-
language?: string
|
|
525
|
-
stylesheet?: Stylesheet
|
|
526
|
-
catalogInfo: CatalogInfo[]
|
|
527
|
-
toolName?: string
|
|
528
|
-
toolVersion?: string
|
|
529
|
-
metadata?: Record<string, unknown>
|
|
530
|
-
/** Raw QTI XML string */
|
|
531
|
-
rawXml: string
|
|
532
|
-
/**
|
|
533
|
-
* Parsed XML→JSON content.
|
|
534
|
-
* Structure varies.
|
|
535
|
-
*/
|
|
536
|
-
content: Record<string, unknown>
|
|
537
|
-
createdAt: string
|
|
538
|
-
updatedAt: string
|
|
539
|
-
__v?: number
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
* Validation Types
|
|
544
|
-
*
|
|
545
|
-
* Types for QTI XML validation resources.
|
|
546
|
-
*/
|
|
547
|
-
|
|
548
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
549
|
-
// VALIDATION
|
|
550
|
-
// ═══════════════════════════════════════════════════════════════════════════════
|
|
551
|
-
|
|
552
|
-
/**
|
|
553
|
-
* Single validation result.
|
|
554
|
-
*
|
|
555
|
-
* When the entity exists, the response includes `xmlContent` and `validationErrors`.
|
|
556
|
-
* When the entity is not found (batch only), the response includes `error` instead.
|
|
557
|
-
*/
|
|
558
|
-
interface ValidationResult {
|
|
559
|
-
success: boolean
|
|
560
|
-
entityId: string
|
|
561
|
-
xmlContent?: string
|
|
562
|
-
validationErrors?: string[]
|
|
563
|
-
message: string
|
|
564
|
-
error?: string
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* Batch validation result.
|
|
569
|
-
*/
|
|
570
|
-
interface BatchValidationResult {
|
|
571
|
-
results: ValidationResult[]
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
export type { AssessmentItem, AssessmentItemRef, AssessmentItemType, AssessmentSection, AssessmentTest, BaseType, BatchValidationResult, Cardinality, CatalogInfo, CorrectResponse, DeleteResponse, Difficulty, FeedbackBlock, FeedbackInline, FeedbackType, Grade, InlineFeedback, ItemMetadata, LearningObjectiveSet, LessonFeedback, LessonType, ListResponse, ModalFeedback, NavigationMode, OutcomeDeclaration, PaginationMeta, ProcessResponseResult, QuestionReference, QuestionWithItem, QuestionsResponse, RawPaginatedResponse, ResponseDeclaration, ResponseProcessing, ShowHide, SortOrder, Stimulus, Stylesheet, SubmissionMode, TestOutcomeDeclaration, TestPart, ValidationResult, ValidationSchema };
|
|
1
|
+
export * from '@timeback/types/protocols/qti';
|
package/dist/public-types.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-6jf1natv.js";
|