@nakafa/aksara-contracts 0.48.8 → 0.49.0

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.
Files changed (55) hide show
  1. package/README.md +9 -0
  2. package/dist/assessment/choice.d.ts +154 -0
  3. package/dist/assessment/choice.js +87 -0
  4. package/dist/assessment/document.d.ts +219 -0
  5. package/dist/assessment/document.js +162 -0
  6. package/dist/assessment/entry.d.ts +50 -0
  7. package/dist/assessment/entry.js +48 -0
  8. package/dist/assessment/explanation.d.ts +19 -0
  9. package/dist/assessment/explanation.js +18 -0
  10. package/dist/assessment/figure.d.ts +1938 -0
  11. package/dist/assessment/figure.js +236 -0
  12. package/dist/assessment/fit.d.ts +21 -0
  13. package/dist/assessment/fit.js +42 -0
  14. package/dist/assessment/graphic.d.ts +95 -0
  15. package/dist/assessment/graphic.js +106 -0
  16. package/dist/assessment/hash.d.ts +1444 -0
  17. package/dist/assessment/hash.js +66 -0
  18. package/dist/assessment/identity.d.ts +37 -0
  19. package/dist/assessment/identity.js +50 -0
  20. package/dist/assessment/inline.d.ts +124 -0
  21. package/dist/assessment/inline.js +92 -0
  22. package/dist/assessment/interaction.d.ts +219 -0
  23. package/dist/assessment/interaction.js +38 -0
  24. package/dist/assessment/item.d.ts +759 -0
  25. package/dist/assessment/item.js +98 -0
  26. package/dist/assessment/key.d.ts +195 -0
  27. package/dist/assessment/key.js +136 -0
  28. package/dist/assessment/paper.d.ts +799 -0
  29. package/dist/assessment/paper.js +69 -0
  30. package/dist/assessment/part.d.ts +47 -0
  31. package/dist/assessment/part.js +32 -0
  32. package/dist/assessment/profile.d.ts +153 -0
  33. package/dist/assessment/profile.js +160 -0
  34. package/dist/assessment/record.d.ts +18 -0
  35. package/dist/assessment/record.js +27 -0
  36. package/dist/assessment/scalar.d.ts +18 -0
  37. package/dist/assessment/scalar.js +18 -0
  38. package/dist/assessment/scoring.d.ts +157 -0
  39. package/dist/assessment/scoring.js +150 -0
  40. package/dist/assessment/stimulus.d.ts +48 -0
  41. package/dist/assessment/stimulus.js +42 -0
  42. package/dist/assessment/structure.d.ts +13 -0
  43. package/dist/assessment/structure.js +29 -0
  44. package/dist/assessment/tools.d.ts +17 -0
  45. package/dist/assessment/tools.js +39 -0
  46. package/dist/projection/verify.d.ts +23 -23
  47. package/dist/release/current/evidence.d.ts +12 -12
  48. package/dist/release/current/state.d.ts +4 -4
  49. package/dist/release/lifecycle.d.ts +4 -4
  50. package/dist/release/spec.d.ts +49 -49
  51. package/dist/release/spec.js +12 -2
  52. package/dist/runtime/verify.d.ts +46 -46
  53. package/dist/transport/request.d.ts +138 -138
  54. package/dist/transport/response.d.ts +172 -172
  55. package/package.json +69 -1
@@ -0,0 +1,759 @@
1
+ import { Schema } from "effect";
2
+ /** The editorial facts that place an item in a blueprint. */
3
+ export declare const ItemBlueprintSchema: Schema.Struct<{
4
+ readonly cognitiveLevel: Schema.String;
5
+ readonly competency: Schema.String;
6
+ readonly topic: Schema.String;
7
+ }>;
8
+ /**
9
+ * One item, whatever its language: a language-neutral identifier, its
10
+ * blueprint, and the shared reading it belongs to, if any.
11
+ */
12
+ export declare const ItemFamilySchema: Schema.Struct<{
13
+ readonly blueprint: Schema.optionalKey<Schema.Struct<{
14
+ readonly cognitiveLevel: Schema.String;
15
+ readonly competency: Schema.String;
16
+ readonly topic: Schema.String;
17
+ }>>;
18
+ readonly id: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
19
+ readonly stimulus: Schema.optionalKey<Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">>;
20
+ }>;
21
+ export type ItemFamily = typeof ItemFamilySchema.Type;
22
+ /**
23
+ * A shared reading, pinned to the exact version that this item version was
24
+ * written against. The reading is never copied into the prompt.
25
+ */
26
+ export declare const StimulusReferenceSchema: Schema.Struct<{
27
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
28
+ readonly id: Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">;
29
+ }>;
30
+ export type StimulusReference = typeof StimulusReferenceSchema.Type;
31
+ /**
32
+ * One item in one delivery language, without its hash: the prompt document,
33
+ * its interactions, the scoring rules that override the exam profile, and the
34
+ * shared reading it was written against, if it has one. The prompt carries no
35
+ * answer key, and the version holds no explanation: the key and the explanation
36
+ * are records of their own (`assessment/key`, `assessment/explanation`).
37
+ */
38
+ export declare const ItemVersionBodySchema: Schema.Struct<{
39
+ deliveryLanguage: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraDeliveryLanguage">;
40
+ family: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
41
+ interactions: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
42
+ readonly id: Schema.String;
43
+ readonly label: Schema.Trimmed;
44
+ readonly kind: Schema.Literal<"choice">;
45
+ readonly maxChoices: Schema.Int;
46
+ readonly minChoices: Schema.Int;
47
+ readonly options: Schema.$Array<Schema.Struct<{
48
+ readonly id: Schema.String;
49
+ readonly label: Schema.decodeTo<Schema.Struct<{
50
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
51
+ readonly type: Schema.Literal<"doc">;
52
+ }>, Schema.Unknown, never, never>;
53
+ }>>;
54
+ readonly shuffle: Schema.Boolean;
55
+ }>, Schema.Struct<{
56
+ readonly id: Schema.String;
57
+ readonly label: Schema.Trimmed;
58
+ readonly columns: Schema.$Array<Schema.Struct<{
59
+ readonly id: Schema.String;
60
+ readonly label: Schema.decodeTo<Schema.Struct<{
61
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
62
+ readonly type: Schema.Literal<"doc">;
63
+ }>, Schema.Unknown, never, never>;
64
+ }>>;
65
+ readonly kind: Schema.Literal<"matrix">;
66
+ readonly shuffle: Schema.Boolean;
67
+ readonly statements: Schema.NonEmptyArray<Schema.Struct<{
68
+ readonly id: Schema.String;
69
+ readonly label: Schema.decodeTo<Schema.Struct<{
70
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
71
+ readonly type: Schema.Literal<"doc">;
72
+ }>, Schema.Unknown, never, never>;
73
+ }>>;
74
+ }>, Schema.Struct<{
75
+ readonly id: Schema.String;
76
+ readonly label: Schema.Trimmed;
77
+ readonly kind: Schema.Literal<"match">;
78
+ readonly shuffle: Schema.Boolean;
79
+ readonly sources: Schema.NonEmptyArray<Schema.Struct<{
80
+ readonly id: Schema.String;
81
+ readonly label: Schema.decodeTo<Schema.Struct<{
82
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
83
+ readonly type: Schema.Literal<"doc">;
84
+ }>, Schema.Unknown, never, never>;
85
+ readonly maxMatches: Schema.Int;
86
+ }>>;
87
+ readonly targets: Schema.NonEmptyArray<Schema.Struct<{
88
+ readonly id: Schema.String;
89
+ readonly label: Schema.decodeTo<Schema.Struct<{
90
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
91
+ readonly type: Schema.Literal<"doc">;
92
+ }>, Schema.Unknown, never, never>;
93
+ readonly maxMatches: Schema.Int;
94
+ }>>;
95
+ }>, Schema.Struct<{
96
+ readonly id: Schema.String;
97
+ readonly label: Schema.Trimmed;
98
+ readonly items: Schema.$Array<Schema.Struct<{
99
+ readonly id: Schema.String;
100
+ readonly label: Schema.decodeTo<Schema.Struct<{
101
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
102
+ readonly type: Schema.Literal<"doc">;
103
+ }>, Schema.Unknown, never, never>;
104
+ }>>;
105
+ readonly kind: Schema.Literal<"order">;
106
+ readonly maxChoices: Schema.Int;
107
+ readonly minChoices: Schema.Int;
108
+ readonly shuffle: Schema.Boolean;
109
+ }>, Schema.Struct<{
110
+ readonly id: Schema.String;
111
+ readonly label: Schema.Trimmed;
112
+ readonly kind: Schema.Literal<"inlineChoice">;
113
+ readonly options: Schema.$Array<Schema.Struct<{
114
+ readonly id: Schema.String;
115
+ readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
116
+ readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
117
+ readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
118
+ }>, Schema.Struct<{
119
+ readonly attrs: Schema.Struct<{
120
+ readonly href: Schema.String;
121
+ }>;
122
+ readonly type: Schema.Literal<"link">;
123
+ }>]>>>;
124
+ readonly text: Schema.String;
125
+ readonly type: Schema.Literal<"text">;
126
+ }>, Schema.Struct<{
127
+ readonly attrs: Schema.Struct<{
128
+ readonly latex: Schema.Trimmed;
129
+ }>;
130
+ readonly type: Schema.Literal<"mathInline">;
131
+ }>]>>;
132
+ }>>;
133
+ readonly shuffle: Schema.Boolean;
134
+ }>, Schema.Struct<{
135
+ readonly id: Schema.String;
136
+ readonly label: Schema.Trimmed;
137
+ readonly expectedLength: Schema.optionalKey<Schema.Int>;
138
+ readonly kind: Schema.Literal<"textEntry">;
139
+ }>, Schema.Struct<{
140
+ readonly id: Schema.String;
141
+ readonly label: Schema.Trimmed;
142
+ readonly acceptsFractions: Schema.Boolean;
143
+ readonly kind: Schema.Literal<"numericEntry">;
144
+ readonly unit: Schema.optionalKey<Schema.Trimmed>;
145
+ }>, Schema.Struct<{
146
+ readonly id: Schema.String;
147
+ readonly label: Schema.Trimmed;
148
+ readonly kind: Schema.Literal<"mathEntry">;
149
+ }>, Schema.Struct<{
150
+ readonly id: Schema.String;
151
+ readonly label: Schema.Trimmed;
152
+ readonly areas: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
153
+ readonly id: Schema.String;
154
+ readonly label: Schema.Trimmed;
155
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>;
156
+ readonly shape: Schema.Literal<"rect">;
157
+ }>, Schema.Struct<{
158
+ readonly id: Schema.String;
159
+ readonly label: Schema.Trimmed;
160
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite]>;
161
+ readonly shape: Schema.Literal<"circle">;
162
+ }>, Schema.Struct<{
163
+ readonly id: Schema.String;
164
+ readonly label: Schema.Trimmed;
165
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>;
166
+ readonly shape: Schema.Literal<"ellipse">;
167
+ }>, Schema.Struct<{
168
+ readonly id: Schema.String;
169
+ readonly label: Schema.Trimmed;
170
+ readonly coords: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>, readonly [Schema.Finite]>;
171
+ readonly shape: Schema.Literal<"poly">;
172
+ }>, Schema.Struct<{
173
+ readonly id: Schema.String;
174
+ readonly label: Schema.Trimmed;
175
+ readonly shape: Schema.Literal<"default">;
176
+ }>]>>;
177
+ readonly image: Schema.Struct<{
178
+ readonly alt: Schema.Trimmed;
179
+ readonly asset: Schema.String;
180
+ readonly height: Schema.Int;
181
+ readonly width: Schema.Int;
182
+ }>;
183
+ readonly kind: Schema.Literal<"hotspot">;
184
+ readonly maxChoices: Schema.Int;
185
+ readonly minChoices: Schema.Int;
186
+ }>, Schema.Struct<{
187
+ readonly id: Schema.String;
188
+ readonly label: Schema.Trimmed;
189
+ readonly choices: Schema.NonEmptyArray<Schema.Struct<{
190
+ readonly id: Schema.String;
191
+ readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
192
+ readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
193
+ readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
194
+ }>, Schema.Struct<{
195
+ readonly attrs: Schema.Struct<{
196
+ readonly href: Schema.String;
197
+ }>;
198
+ readonly type: Schema.Literal<"link">;
199
+ }>]>>>;
200
+ readonly text: Schema.String;
201
+ readonly type: Schema.Literal<"text">;
202
+ }>, Schema.Struct<{
203
+ readonly attrs: Schema.Struct<{
204
+ readonly latex: Schema.Trimmed;
205
+ }>;
206
+ readonly type: Schema.Literal<"mathInline">;
207
+ }>]>>;
208
+ readonly maxMatches: Schema.Int;
209
+ }>>;
210
+ readonly gaps: Schema.NonEmptyArray<Schema.Struct<{
211
+ readonly id: Schema.String;
212
+ }>>;
213
+ readonly kind: Schema.Literal<"gapMatch">;
214
+ readonly shuffle: Schema.Boolean;
215
+ }>, Schema.Struct<{
216
+ readonly id: Schema.String;
217
+ readonly label: Schema.Trimmed;
218
+ readonly count: Schema.Int;
219
+ readonly frame: Schema.Struct<{
220
+ readonly kind: Schema.Literal<"cartesian">;
221
+ readonly x: Schema.Struct<{
222
+ readonly max: Schema.Finite;
223
+ readonly min: Schema.Finite;
224
+ }>;
225
+ readonly y: Schema.Struct<{
226
+ readonly max: Schema.Finite;
227
+ readonly min: Schema.Finite;
228
+ }>;
229
+ }>;
230
+ readonly kind: Schema.Literal<"graphPoint">;
231
+ readonly placing: Schema.Literals<readonly ["points", "lines"]>;
232
+ readonly snap: Schema.optionalKey<Schema.Finite>;
233
+ }>, Schema.Struct<{
234
+ readonly id: Schema.String;
235
+ readonly label: Schema.Trimmed;
236
+ readonly expectedLines: Schema.optionalKey<Schema.Int>;
237
+ readonly kind: Schema.Literal<"extendedText">;
238
+ }>]>>;
239
+ prompt: Schema.decodeTo<Schema.Struct<{
240
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
241
+ readonly type: Schema.Literal<"doc">;
242
+ }>, Schema.Unknown, never, never>;
243
+ scoring: Schema.$Array<Schema.Struct<{
244
+ readonly interaction: Schema.String;
245
+ readonly rule: Schema.Union<readonly [Schema.Struct<{
246
+ readonly kind: Schema.Literal<"allOrNothing">;
247
+ }>, Schema.Struct<{
248
+ readonly floor: Schema.Int;
249
+ readonly kind: Schema.Literal<"perPart">;
250
+ readonly penaltyPerWrongPart: Schema.optionalKey<Schema.Int>;
251
+ readonly pointsPerPart: Schema.Int;
252
+ }>, Schema.Struct<{
253
+ readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
254
+ readonly id: Schema.String;
255
+ readonly label: Schema.Trimmed;
256
+ readonly levels: Schema.$Array<Schema.Struct<{
257
+ readonly id: Schema.String;
258
+ readonly label: Schema.Trimmed;
259
+ readonly points: Schema.Int;
260
+ }>>;
261
+ }>>;
262
+ readonly kind: Schema.Literal<"rubric">;
263
+ }>]>;
264
+ }>>;
265
+ stimulus: Schema.optionalKey<Schema.Struct<{
266
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
267
+ readonly id: Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">;
268
+ }>>;
269
+ }>;
270
+ /**
271
+ * An item version is immutable once published: a change is a new version. Its
272
+ * `hash` is the SHA-256 of the canonical encoding of the body (see
273
+ * `assessment/hash`), so the hash names the exact content. Its size is limited
274
+ * by `assessment/record`.
275
+ */
276
+ export declare const ItemVersionSchema: Schema.Struct<{
277
+ readonly deliveryLanguage: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraDeliveryLanguage">;
278
+ readonly family: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
279
+ readonly interactions: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
280
+ readonly id: Schema.String;
281
+ readonly label: Schema.Trimmed;
282
+ readonly kind: Schema.Literal<"choice">;
283
+ readonly maxChoices: Schema.Int;
284
+ readonly minChoices: Schema.Int;
285
+ readonly options: Schema.$Array<Schema.Struct<{
286
+ readonly id: Schema.String;
287
+ readonly label: Schema.decodeTo<Schema.Struct<{
288
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
289
+ readonly type: Schema.Literal<"doc">;
290
+ }>, Schema.Unknown, never, never>;
291
+ }>>;
292
+ readonly shuffle: Schema.Boolean;
293
+ }>, Schema.Struct<{
294
+ readonly id: Schema.String;
295
+ readonly label: Schema.Trimmed;
296
+ readonly columns: Schema.$Array<Schema.Struct<{
297
+ readonly id: Schema.String;
298
+ readonly label: Schema.decodeTo<Schema.Struct<{
299
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
300
+ readonly type: Schema.Literal<"doc">;
301
+ }>, Schema.Unknown, never, never>;
302
+ }>>;
303
+ readonly kind: Schema.Literal<"matrix">;
304
+ readonly shuffle: Schema.Boolean;
305
+ readonly statements: Schema.NonEmptyArray<Schema.Struct<{
306
+ readonly id: Schema.String;
307
+ readonly label: Schema.decodeTo<Schema.Struct<{
308
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
309
+ readonly type: Schema.Literal<"doc">;
310
+ }>, Schema.Unknown, never, never>;
311
+ }>>;
312
+ }>, Schema.Struct<{
313
+ readonly id: Schema.String;
314
+ readonly label: Schema.Trimmed;
315
+ readonly kind: Schema.Literal<"match">;
316
+ readonly shuffle: Schema.Boolean;
317
+ readonly sources: Schema.NonEmptyArray<Schema.Struct<{
318
+ readonly id: Schema.String;
319
+ readonly label: Schema.decodeTo<Schema.Struct<{
320
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
321
+ readonly type: Schema.Literal<"doc">;
322
+ }>, Schema.Unknown, never, never>;
323
+ readonly maxMatches: Schema.Int;
324
+ }>>;
325
+ readonly targets: Schema.NonEmptyArray<Schema.Struct<{
326
+ readonly id: Schema.String;
327
+ readonly label: Schema.decodeTo<Schema.Struct<{
328
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
329
+ readonly type: Schema.Literal<"doc">;
330
+ }>, Schema.Unknown, never, never>;
331
+ readonly maxMatches: Schema.Int;
332
+ }>>;
333
+ }>, Schema.Struct<{
334
+ readonly id: Schema.String;
335
+ readonly label: Schema.Trimmed;
336
+ readonly items: Schema.$Array<Schema.Struct<{
337
+ readonly id: Schema.String;
338
+ readonly label: Schema.decodeTo<Schema.Struct<{
339
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
340
+ readonly type: Schema.Literal<"doc">;
341
+ }>, Schema.Unknown, never, never>;
342
+ }>>;
343
+ readonly kind: Schema.Literal<"order">;
344
+ readonly maxChoices: Schema.Int;
345
+ readonly minChoices: Schema.Int;
346
+ readonly shuffle: Schema.Boolean;
347
+ }>, Schema.Struct<{
348
+ readonly id: Schema.String;
349
+ readonly label: Schema.Trimmed;
350
+ readonly kind: Schema.Literal<"inlineChoice">;
351
+ readonly options: Schema.$Array<Schema.Struct<{
352
+ readonly id: Schema.String;
353
+ readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
354
+ readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
355
+ readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
356
+ }>, Schema.Struct<{
357
+ readonly attrs: Schema.Struct<{
358
+ readonly href: Schema.String;
359
+ }>;
360
+ readonly type: Schema.Literal<"link">;
361
+ }>]>>>;
362
+ readonly text: Schema.String;
363
+ readonly type: Schema.Literal<"text">;
364
+ }>, Schema.Struct<{
365
+ readonly attrs: Schema.Struct<{
366
+ readonly latex: Schema.Trimmed;
367
+ }>;
368
+ readonly type: Schema.Literal<"mathInline">;
369
+ }>]>>;
370
+ }>>;
371
+ readonly shuffle: Schema.Boolean;
372
+ }>, Schema.Struct<{
373
+ readonly id: Schema.String;
374
+ readonly label: Schema.Trimmed;
375
+ readonly expectedLength: Schema.optionalKey<Schema.Int>;
376
+ readonly kind: Schema.Literal<"textEntry">;
377
+ }>, Schema.Struct<{
378
+ readonly id: Schema.String;
379
+ readonly label: Schema.Trimmed;
380
+ readonly acceptsFractions: Schema.Boolean;
381
+ readonly kind: Schema.Literal<"numericEntry">;
382
+ readonly unit: Schema.optionalKey<Schema.Trimmed>;
383
+ }>, Schema.Struct<{
384
+ readonly id: Schema.String;
385
+ readonly label: Schema.Trimmed;
386
+ readonly kind: Schema.Literal<"mathEntry">;
387
+ }>, Schema.Struct<{
388
+ readonly id: Schema.String;
389
+ readonly label: Schema.Trimmed;
390
+ readonly areas: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
391
+ readonly id: Schema.String;
392
+ readonly label: Schema.Trimmed;
393
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>;
394
+ readonly shape: Schema.Literal<"rect">;
395
+ }>, Schema.Struct<{
396
+ readonly id: Schema.String;
397
+ readonly label: Schema.Trimmed;
398
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite]>;
399
+ readonly shape: Schema.Literal<"circle">;
400
+ }>, Schema.Struct<{
401
+ readonly id: Schema.String;
402
+ readonly label: Schema.Trimmed;
403
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>;
404
+ readonly shape: Schema.Literal<"ellipse">;
405
+ }>, Schema.Struct<{
406
+ readonly id: Schema.String;
407
+ readonly label: Schema.Trimmed;
408
+ readonly coords: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>, readonly [Schema.Finite]>;
409
+ readonly shape: Schema.Literal<"poly">;
410
+ }>, Schema.Struct<{
411
+ readonly id: Schema.String;
412
+ readonly label: Schema.Trimmed;
413
+ readonly shape: Schema.Literal<"default">;
414
+ }>]>>;
415
+ readonly image: Schema.Struct<{
416
+ readonly alt: Schema.Trimmed;
417
+ readonly asset: Schema.String;
418
+ readonly height: Schema.Int;
419
+ readonly width: Schema.Int;
420
+ }>;
421
+ readonly kind: Schema.Literal<"hotspot">;
422
+ readonly maxChoices: Schema.Int;
423
+ readonly minChoices: Schema.Int;
424
+ }>, Schema.Struct<{
425
+ readonly id: Schema.String;
426
+ readonly label: Schema.Trimmed;
427
+ readonly choices: Schema.NonEmptyArray<Schema.Struct<{
428
+ readonly id: Schema.String;
429
+ readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
430
+ readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
431
+ readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
432
+ }>, Schema.Struct<{
433
+ readonly attrs: Schema.Struct<{
434
+ readonly href: Schema.String;
435
+ }>;
436
+ readonly type: Schema.Literal<"link">;
437
+ }>]>>>;
438
+ readonly text: Schema.String;
439
+ readonly type: Schema.Literal<"text">;
440
+ }>, Schema.Struct<{
441
+ readonly attrs: Schema.Struct<{
442
+ readonly latex: Schema.Trimmed;
443
+ }>;
444
+ readonly type: Schema.Literal<"mathInline">;
445
+ }>]>>;
446
+ readonly maxMatches: Schema.Int;
447
+ }>>;
448
+ readonly gaps: Schema.NonEmptyArray<Schema.Struct<{
449
+ readonly id: Schema.String;
450
+ }>>;
451
+ readonly kind: Schema.Literal<"gapMatch">;
452
+ readonly shuffle: Schema.Boolean;
453
+ }>, Schema.Struct<{
454
+ readonly id: Schema.String;
455
+ readonly label: Schema.Trimmed;
456
+ readonly count: Schema.Int;
457
+ readonly frame: Schema.Struct<{
458
+ readonly kind: Schema.Literal<"cartesian">;
459
+ readonly x: Schema.Struct<{
460
+ readonly max: Schema.Finite;
461
+ readonly min: Schema.Finite;
462
+ }>;
463
+ readonly y: Schema.Struct<{
464
+ readonly max: Schema.Finite;
465
+ readonly min: Schema.Finite;
466
+ }>;
467
+ }>;
468
+ readonly kind: Schema.Literal<"graphPoint">;
469
+ readonly placing: Schema.Literals<readonly ["points", "lines"]>;
470
+ readonly snap: Schema.optionalKey<Schema.Finite>;
471
+ }>, Schema.Struct<{
472
+ readonly id: Schema.String;
473
+ readonly label: Schema.Trimmed;
474
+ readonly expectedLines: Schema.optionalKey<Schema.Int>;
475
+ readonly kind: Schema.Literal<"extendedText">;
476
+ }>]>>;
477
+ readonly prompt: Schema.decodeTo<Schema.Struct<{
478
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
479
+ readonly type: Schema.Literal<"doc">;
480
+ }>, Schema.Unknown, never, never>;
481
+ readonly scoring: Schema.$Array<Schema.Struct<{
482
+ readonly interaction: Schema.String;
483
+ readonly rule: Schema.Union<readonly [Schema.Struct<{
484
+ readonly kind: Schema.Literal<"allOrNothing">;
485
+ }>, Schema.Struct<{
486
+ readonly floor: Schema.Int;
487
+ readonly kind: Schema.Literal<"perPart">;
488
+ readonly penaltyPerWrongPart: Schema.optionalKey<Schema.Int>;
489
+ readonly pointsPerPart: Schema.Int;
490
+ }>, Schema.Struct<{
491
+ readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
492
+ readonly id: Schema.String;
493
+ readonly label: Schema.Trimmed;
494
+ readonly levels: Schema.$Array<Schema.Struct<{
495
+ readonly id: Schema.String;
496
+ readonly label: Schema.Trimmed;
497
+ readonly points: Schema.Int;
498
+ }>>;
499
+ }>>;
500
+ readonly kind: Schema.Literal<"rubric">;
501
+ }>]>;
502
+ }>>;
503
+ readonly stimulus: Schema.optionalKey<Schema.Struct<{
504
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
505
+ readonly id: Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">;
506
+ }>>;
507
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
508
+ }>;
509
+ export type ItemVersion = typeof ItemVersionSchema.Type;
510
+ /**
511
+ * One item with its versions, one for each delivery language. Every version
512
+ * names the family and the shared reading of the family, is written in its own
513
+ * language, and has the same interaction structure as the others.
514
+ */
515
+ export declare const ItemSchema: Schema.Struct<{
516
+ readonly family: Schema.Struct<{
517
+ readonly blueprint: Schema.optionalKey<Schema.Struct<{
518
+ readonly cognitiveLevel: Schema.String;
519
+ readonly competency: Schema.String;
520
+ readonly topic: Schema.String;
521
+ }>>;
522
+ readonly id: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
523
+ readonly stimulus: Schema.optionalKey<Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">>;
524
+ }>;
525
+ readonly versions: Schema.NonEmptyArray<Schema.Struct<{
526
+ readonly deliveryLanguage: Schema.brand<Schema.Literals<readonly ["en", "id", "de"]>, "@NakafaAI/AksaraDeliveryLanguage">;
527
+ readonly family: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
528
+ readonly interactions: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
529
+ readonly id: Schema.String;
530
+ readonly label: Schema.Trimmed;
531
+ readonly kind: Schema.Literal<"choice">;
532
+ readonly maxChoices: Schema.Int;
533
+ readonly minChoices: Schema.Int;
534
+ readonly options: Schema.$Array<Schema.Struct<{
535
+ readonly id: Schema.String;
536
+ readonly label: Schema.decodeTo<Schema.Struct<{
537
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
538
+ readonly type: Schema.Literal<"doc">;
539
+ }>, Schema.Unknown, never, never>;
540
+ }>>;
541
+ readonly shuffle: Schema.Boolean;
542
+ }>, Schema.Struct<{
543
+ readonly id: Schema.String;
544
+ readonly label: Schema.Trimmed;
545
+ readonly columns: Schema.$Array<Schema.Struct<{
546
+ readonly id: Schema.String;
547
+ readonly label: Schema.decodeTo<Schema.Struct<{
548
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
549
+ readonly type: Schema.Literal<"doc">;
550
+ }>, Schema.Unknown, never, never>;
551
+ }>>;
552
+ readonly kind: Schema.Literal<"matrix">;
553
+ readonly shuffle: Schema.Boolean;
554
+ readonly statements: Schema.NonEmptyArray<Schema.Struct<{
555
+ readonly id: Schema.String;
556
+ readonly label: Schema.decodeTo<Schema.Struct<{
557
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
558
+ readonly type: Schema.Literal<"doc">;
559
+ }>, Schema.Unknown, never, never>;
560
+ }>>;
561
+ }>, Schema.Struct<{
562
+ readonly id: Schema.String;
563
+ readonly label: Schema.Trimmed;
564
+ readonly kind: Schema.Literal<"match">;
565
+ readonly shuffle: Schema.Boolean;
566
+ readonly sources: Schema.NonEmptyArray<Schema.Struct<{
567
+ readonly id: Schema.String;
568
+ readonly label: Schema.decodeTo<Schema.Struct<{
569
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
570
+ readonly type: Schema.Literal<"doc">;
571
+ }>, Schema.Unknown, never, never>;
572
+ readonly maxMatches: Schema.Int;
573
+ }>>;
574
+ readonly targets: Schema.NonEmptyArray<Schema.Struct<{
575
+ readonly id: Schema.String;
576
+ readonly label: Schema.decodeTo<Schema.Struct<{
577
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
578
+ readonly type: Schema.Literal<"doc">;
579
+ }>, Schema.Unknown, never, never>;
580
+ readonly maxMatches: Schema.Int;
581
+ }>>;
582
+ }>, Schema.Struct<{
583
+ readonly id: Schema.String;
584
+ readonly label: Schema.Trimmed;
585
+ readonly items: Schema.$Array<Schema.Struct<{
586
+ readonly id: Schema.String;
587
+ readonly label: Schema.decodeTo<Schema.Struct<{
588
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
589
+ readonly type: Schema.Literal<"doc">;
590
+ }>, Schema.Unknown, never, never>;
591
+ }>>;
592
+ readonly kind: Schema.Literal<"order">;
593
+ readonly maxChoices: Schema.Int;
594
+ readonly minChoices: Schema.Int;
595
+ readonly shuffle: Schema.Boolean;
596
+ }>, Schema.Struct<{
597
+ readonly id: Schema.String;
598
+ readonly label: Schema.Trimmed;
599
+ readonly kind: Schema.Literal<"inlineChoice">;
600
+ readonly options: Schema.$Array<Schema.Struct<{
601
+ readonly id: Schema.String;
602
+ readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
603
+ readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
604
+ readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
605
+ }>, Schema.Struct<{
606
+ readonly attrs: Schema.Struct<{
607
+ readonly href: Schema.String;
608
+ }>;
609
+ readonly type: Schema.Literal<"link">;
610
+ }>]>>>;
611
+ readonly text: Schema.String;
612
+ readonly type: Schema.Literal<"text">;
613
+ }>, Schema.Struct<{
614
+ readonly attrs: Schema.Struct<{
615
+ readonly latex: Schema.Trimmed;
616
+ }>;
617
+ readonly type: Schema.Literal<"mathInline">;
618
+ }>]>>;
619
+ }>>;
620
+ readonly shuffle: Schema.Boolean;
621
+ }>, Schema.Struct<{
622
+ readonly id: Schema.String;
623
+ readonly label: Schema.Trimmed;
624
+ readonly expectedLength: Schema.optionalKey<Schema.Int>;
625
+ readonly kind: Schema.Literal<"textEntry">;
626
+ }>, Schema.Struct<{
627
+ readonly id: Schema.String;
628
+ readonly label: Schema.Trimmed;
629
+ readonly acceptsFractions: Schema.Boolean;
630
+ readonly kind: Schema.Literal<"numericEntry">;
631
+ readonly unit: Schema.optionalKey<Schema.Trimmed>;
632
+ }>, Schema.Struct<{
633
+ readonly id: Schema.String;
634
+ readonly label: Schema.Trimmed;
635
+ readonly kind: Schema.Literal<"mathEntry">;
636
+ }>, Schema.Struct<{
637
+ readonly id: Schema.String;
638
+ readonly label: Schema.Trimmed;
639
+ readonly areas: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
640
+ readonly id: Schema.String;
641
+ readonly label: Schema.Trimmed;
642
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>;
643
+ readonly shape: Schema.Literal<"rect">;
644
+ }>, Schema.Struct<{
645
+ readonly id: Schema.String;
646
+ readonly label: Schema.Trimmed;
647
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite]>;
648
+ readonly shape: Schema.Literal<"circle">;
649
+ }>, Schema.Struct<{
650
+ readonly id: Schema.String;
651
+ readonly label: Schema.Trimmed;
652
+ readonly coords: Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>;
653
+ readonly shape: Schema.Literal<"ellipse">;
654
+ }>, Schema.Struct<{
655
+ readonly id: Schema.String;
656
+ readonly label: Schema.Trimmed;
657
+ readonly coords: Schema.TupleWithRest<Schema.Tuple<readonly [Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite, Schema.Finite]>, readonly [Schema.Finite]>;
658
+ readonly shape: Schema.Literal<"poly">;
659
+ }>, Schema.Struct<{
660
+ readonly id: Schema.String;
661
+ readonly label: Schema.Trimmed;
662
+ readonly shape: Schema.Literal<"default">;
663
+ }>]>>;
664
+ readonly image: Schema.Struct<{
665
+ readonly alt: Schema.Trimmed;
666
+ readonly asset: Schema.String;
667
+ readonly height: Schema.Int;
668
+ readonly width: Schema.Int;
669
+ }>;
670
+ readonly kind: Schema.Literal<"hotspot">;
671
+ readonly maxChoices: Schema.Int;
672
+ readonly minChoices: Schema.Int;
673
+ }>, Schema.Struct<{
674
+ readonly id: Schema.String;
675
+ readonly label: Schema.Trimmed;
676
+ readonly choices: Schema.NonEmptyArray<Schema.Struct<{
677
+ readonly id: Schema.String;
678
+ readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
679
+ readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
680
+ readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
681
+ }>, Schema.Struct<{
682
+ readonly attrs: Schema.Struct<{
683
+ readonly href: Schema.String;
684
+ }>;
685
+ readonly type: Schema.Literal<"link">;
686
+ }>]>>>;
687
+ readonly text: Schema.String;
688
+ readonly type: Schema.Literal<"text">;
689
+ }>, Schema.Struct<{
690
+ readonly attrs: Schema.Struct<{
691
+ readonly latex: Schema.Trimmed;
692
+ }>;
693
+ readonly type: Schema.Literal<"mathInline">;
694
+ }>]>>;
695
+ readonly maxMatches: Schema.Int;
696
+ }>>;
697
+ readonly gaps: Schema.NonEmptyArray<Schema.Struct<{
698
+ readonly id: Schema.String;
699
+ }>>;
700
+ readonly kind: Schema.Literal<"gapMatch">;
701
+ readonly shuffle: Schema.Boolean;
702
+ }>, Schema.Struct<{
703
+ readonly id: Schema.String;
704
+ readonly label: Schema.Trimmed;
705
+ readonly count: Schema.Int;
706
+ readonly frame: Schema.Struct<{
707
+ readonly kind: Schema.Literal<"cartesian">;
708
+ readonly x: Schema.Struct<{
709
+ readonly max: Schema.Finite;
710
+ readonly min: Schema.Finite;
711
+ }>;
712
+ readonly y: Schema.Struct<{
713
+ readonly max: Schema.Finite;
714
+ readonly min: Schema.Finite;
715
+ }>;
716
+ }>;
717
+ readonly kind: Schema.Literal<"graphPoint">;
718
+ readonly placing: Schema.Literals<readonly ["points", "lines"]>;
719
+ readonly snap: Schema.optionalKey<Schema.Finite>;
720
+ }>, Schema.Struct<{
721
+ readonly id: Schema.String;
722
+ readonly label: Schema.Trimmed;
723
+ readonly expectedLines: Schema.optionalKey<Schema.Int>;
724
+ readonly kind: Schema.Literal<"extendedText">;
725
+ }>]>>;
726
+ readonly prompt: Schema.decodeTo<Schema.Struct<{
727
+ readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
728
+ readonly type: Schema.Literal<"doc">;
729
+ }>, Schema.Unknown, never, never>;
730
+ readonly scoring: Schema.$Array<Schema.Struct<{
731
+ readonly interaction: Schema.String;
732
+ readonly rule: Schema.Union<readonly [Schema.Struct<{
733
+ readonly kind: Schema.Literal<"allOrNothing">;
734
+ }>, Schema.Struct<{
735
+ readonly floor: Schema.Int;
736
+ readonly kind: Schema.Literal<"perPart">;
737
+ readonly penaltyPerWrongPart: Schema.optionalKey<Schema.Int>;
738
+ readonly pointsPerPart: Schema.Int;
739
+ }>, Schema.Struct<{
740
+ readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
741
+ readonly id: Schema.String;
742
+ readonly label: Schema.Trimmed;
743
+ readonly levels: Schema.$Array<Schema.Struct<{
744
+ readonly id: Schema.String;
745
+ readonly label: Schema.Trimmed;
746
+ readonly points: Schema.Int;
747
+ }>>;
748
+ }>>;
749
+ readonly kind: Schema.Literal<"rubric">;
750
+ }>]>;
751
+ }>>;
752
+ readonly stimulus: Schema.optionalKey<Schema.Struct<{
753
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
754
+ readonly id: Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">;
755
+ }>>;
756
+ readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
757
+ }>>;
758
+ }>;
759
+ export type Item = typeof ItemSchema.Type;