@nakafa/aksara-contracts 0.49.0 → 0.51.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.
- package/dist/artifact/integrity.d.ts +15 -2
- package/dist/artifact/integrity.js +3 -15
- package/dist/artifact/limits.js +3 -4
- package/dist/artifact/source.js +4 -8
- package/dist/artifact/spec.d.ts +30 -10
- package/dist/assessment/hash.d.ts +251 -213
- package/dist/assessment/item.d.ts +44 -7
- package/dist/assessment/item.js +19 -9
- package/dist/assessment/joint.d.ts +62 -0
- package/dist/assessment/joint.js +85 -0
- package/dist/assessment/paper.d.ts +22 -2
- package/dist/assessment/profile.d.ts +6 -0
- package/dist/assessment/scoring.d.ts +55 -2
- package/dist/assessment/scoring.js +63 -8
- package/dist/assessment/stimulus.d.ts +3 -3
- package/dist/assessment/stimulus.js +2 -2
- package/dist/errors.d.ts +3 -1
- package/dist/graph/family.d.ts +6 -2
- package/dist/graph/identity.d.ts +3 -1
- package/dist/hash/digest.d.ts +10 -0
- package/dist/hash/digest.js +40 -0
- package/dist/hash/stream.d.ts +12 -0
- package/dist/hash/stream.js +27 -0
- package/dist/hash/text.d.ts +3 -1
- package/dist/hash/text.js +2 -15
- package/dist/locale.d.ts +9 -0
- package/dist/locale.js +25 -1
- package/dist/preview/auth.d.ts +4 -2
- package/dist/preview/auth.js +26 -12
- package/dist/program/snapshot/digest.d.ts +3 -1
- package/dist/program/snapshot/digest.js +14 -22
- package/dist/program/snapshot/hash.d.ts +6 -2
- package/dist/program/snapshot/hash.js +10 -21
- package/dist/projection/digest.d.ts +11 -9
- package/dist/projection/digest.js +23 -32
- package/dist/projection/hash.d.ts +222 -2
- package/dist/projection/hash.js +6 -8
- package/dist/projection/verify.d.ts +16 -6
- package/dist/question/item.d.ts +3 -1
- package/dist/question/item.js +3 -1
- package/dist/quran/notes.d.ts +3 -1
- package/dist/quran/provenance.d.ts +6 -2
- package/dist/quran/provenance.js +8 -15
- package/dist/quran/snapshot/digest.d.ts +9 -5
- package/dist/quran/snapshot/digest.js +33 -41
- package/dist/quran/snapshot/hash.d.ts +3 -1
- package/dist/quran/snapshot/hash.js +9 -15
- package/dist/quran/snapshot/row/hash.d.ts +3 -1
- package/dist/quran/snapshot/row/hash.js +2 -8
- package/dist/release/digest.d.ts +10 -8
- package/dist/release/digest.js +22 -31
- package/dist/release/hash.d.ts +3 -1
- package/dist/release/hash.js +3 -8
- package/dist/release/items.d.ts +25 -9
- package/dist/release/items.js +12 -3
- package/dist/release/policy.d.ts +3 -1
- package/dist/release/result/digest.d.ts +23 -13
- package/dist/release/result/digest.js +20 -29
- package/dist/release/rollback/digest.d.ts +16 -10
- package/dist/release/rollback/digest.js +25 -32
- package/dist/release/route/digest.d.ts +10 -8
- package/dist/release/route/digest.js +22 -31
- package/dist/release/route/verify.d.ts +16 -6
- package/dist/release/route/verify.js +8 -2
- package/dist/release/snapshot/evidence/requirement.d.ts +3 -1
- package/dist/release/snapshot/evidence/tryout.d.ts +1 -1
- package/dist/release/snapshot/evidence/tryout.js +1 -1
- package/dist/release/snapshot/evidence.d.ts +1 -1
- package/dist/release/snapshot/verify.d.ts +19 -7
- package/dist/release/snapshot/verify.js +20 -18
- package/dist/release/verify.d.ts +9 -3
- package/dist/renderer/compatibility.d.ts +6 -2
- package/dist/renderer/compatibility.js +3 -1
- package/dist/renderer/contract.d.ts +9 -3
- package/dist/renderer/contract.js +3 -1
- package/dist/runtime/error.d.ts +3 -1
- package/dist/runtime/protected/verify.d.ts +1 -1
- package/dist/runtime/verify.d.ts +2 -2
- package/dist/runtime/verify.js +2 -1
- package/dist/signature/key.d.ts +21 -0
- package/dist/signature/key.js +104 -0
- package/dist/signature/spec.d.ts +18 -6
- package/dist/signature/spec.js +16 -4
- package/dist/transport/request.d.ts +728 -728
- package/dist/transport/response.d.ts +26 -26
- package/dist/tryout/canonical.d.ts +11 -1
- package/dist/tryout/canonical.js +6 -10
- package/dist/tryout/closure/accounting.d.ts +3 -1
- package/dist/tryout/digest.d.ts +12 -6
- package/dist/tryout/digest.js +21 -14
- package/dist/tryout/hash/catalog.d.ts +228 -3
- package/dist/tryout/hash/catalog.js +5 -7
- package/dist/tryout/hash/content.d.ts +113 -2
- package/dist/tryout/hash/content.js +10 -8
- package/dist/tryout/hash/placement.d.ts +236 -5
- package/dist/tryout/hash/placement.js +7 -8
- package/dist/tryout/runtime/hash.d.ts +3 -1
- package/dist/tryout/runtime/hash.js +3 -1
- package/dist/tryout/runtime/source.d.ts +3 -1
- package/dist/tryout/runtime/verify.d.ts +13 -5
- package/dist/tryout/runtime/verify.js +1 -1
- package/dist/tryout/scoring.d.ts +3 -1
- package/dist/tryout/snapshot/hash.d.ts +45 -4
- package/dist/tryout/snapshot/hash.js +9 -7
- package/package.json +22 -2
|
@@ -11,13 +11,15 @@ export declare const canonicalJson: (value: unknown) => Effect.Effect<string, Sc
|
|
|
11
11
|
declare const VersionHashMismatchError_base: Schema.Class<VersionHashMismatchError, Schema.TaggedStruct<"VersionHashMismatchError", {
|
|
12
12
|
readonly actualHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
13
13
|
readonly expectedHash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
|
|
14
|
-
}>, import("effect/Cause").YieldableError
|
|
14
|
+
}>, import("effect/Cause").YieldableError & {
|
|
15
|
+
readonly brand: unique symbol;
|
|
16
|
+
}>;
|
|
15
17
|
/** A stored hash is not the hash of the content that carries it. */
|
|
16
18
|
export declare class VersionHashMismatchError extends VersionHashMismatchError_base {
|
|
17
19
|
}
|
|
18
20
|
/** Computes the hash that an item version carries, from all of its other fields. */
|
|
19
21
|
export declare const hashItemVersion: (body: Omit<{
|
|
20
|
-
readonly deliveryLanguage:
|
|
22
|
+
readonly deliveryLanguage: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentLanguage">;
|
|
21
23
|
readonly family: string & import("effect/Brand").Brand<"@NakafaAI/AksaraItemFamilyId">;
|
|
22
24
|
readonly interactions: readonly [{
|
|
23
25
|
readonly id: string;
|
|
@@ -162,58 +164,6 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
162
164
|
})[]];
|
|
163
165
|
}[];
|
|
164
166
|
readonly shuffle: boolean;
|
|
165
|
-
} | {
|
|
166
|
-
readonly id: string;
|
|
167
|
-
readonly label: string;
|
|
168
|
-
readonly expectedLength?: number;
|
|
169
|
-
readonly kind: "textEntry";
|
|
170
|
-
} | {
|
|
171
|
-
readonly id: string;
|
|
172
|
-
readonly label: string;
|
|
173
|
-
readonly acceptsFractions: boolean;
|
|
174
|
-
readonly kind: "numericEntry";
|
|
175
|
-
readonly unit?: string;
|
|
176
|
-
} | {
|
|
177
|
-
readonly id: string;
|
|
178
|
-
readonly label: string;
|
|
179
|
-
readonly kind: "mathEntry";
|
|
180
|
-
} | {
|
|
181
|
-
readonly id: string;
|
|
182
|
-
readonly label: string;
|
|
183
|
-
readonly areas: readonly ({
|
|
184
|
-
readonly id: string;
|
|
185
|
-
readonly label: string;
|
|
186
|
-
readonly coords: readonly [number, number, number, number];
|
|
187
|
-
readonly shape: "rect";
|
|
188
|
-
} | {
|
|
189
|
-
readonly id: string;
|
|
190
|
-
readonly label: string;
|
|
191
|
-
readonly coords: readonly [number, number, number];
|
|
192
|
-
readonly shape: "circle";
|
|
193
|
-
} | {
|
|
194
|
-
readonly id: string;
|
|
195
|
-
readonly label: string;
|
|
196
|
-
readonly coords: readonly [number, number, number, number];
|
|
197
|
-
readonly shape: "ellipse";
|
|
198
|
-
} | {
|
|
199
|
-
readonly id: string;
|
|
200
|
-
readonly label: string;
|
|
201
|
-
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
202
|
-
readonly shape: "poly";
|
|
203
|
-
} | {
|
|
204
|
-
readonly id: string;
|
|
205
|
-
readonly label: string;
|
|
206
|
-
readonly shape: "default";
|
|
207
|
-
})[];
|
|
208
|
-
readonly image: {
|
|
209
|
-
readonly alt: string;
|
|
210
|
-
readonly asset: string;
|
|
211
|
-
readonly height: number;
|
|
212
|
-
readonly width: number;
|
|
213
|
-
};
|
|
214
|
-
readonly kind: "hotspot";
|
|
215
|
-
readonly maxChoices: number;
|
|
216
|
-
readonly minChoices: number;
|
|
217
167
|
} | {
|
|
218
168
|
readonly id: string;
|
|
219
169
|
readonly label: string;
|
|
@@ -325,6 +275,58 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
325
275
|
}[]];
|
|
326
276
|
readonly kind: "gapMatch";
|
|
327
277
|
readonly shuffle: boolean;
|
|
278
|
+
} | {
|
|
279
|
+
readonly id: string;
|
|
280
|
+
readonly label: string;
|
|
281
|
+
readonly areas: readonly ({
|
|
282
|
+
readonly id: string;
|
|
283
|
+
readonly label: string;
|
|
284
|
+
readonly coords: readonly [number, number, number, number];
|
|
285
|
+
readonly shape: "rect";
|
|
286
|
+
} | {
|
|
287
|
+
readonly id: string;
|
|
288
|
+
readonly label: string;
|
|
289
|
+
readonly coords: readonly [number, number, number];
|
|
290
|
+
readonly shape: "circle";
|
|
291
|
+
} | {
|
|
292
|
+
readonly id: string;
|
|
293
|
+
readonly label: string;
|
|
294
|
+
readonly coords: readonly [number, number, number, number];
|
|
295
|
+
readonly shape: "ellipse";
|
|
296
|
+
} | {
|
|
297
|
+
readonly id: string;
|
|
298
|
+
readonly label: string;
|
|
299
|
+
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
300
|
+
readonly shape: "poly";
|
|
301
|
+
} | {
|
|
302
|
+
readonly id: string;
|
|
303
|
+
readonly label: string;
|
|
304
|
+
readonly shape: "default";
|
|
305
|
+
})[];
|
|
306
|
+
readonly image: {
|
|
307
|
+
readonly alt: string;
|
|
308
|
+
readonly asset: string;
|
|
309
|
+
readonly height: number;
|
|
310
|
+
readonly width: number;
|
|
311
|
+
};
|
|
312
|
+
readonly kind: "hotspot";
|
|
313
|
+
readonly maxChoices: number;
|
|
314
|
+
readonly minChoices: number;
|
|
315
|
+
} | {
|
|
316
|
+
readonly id: string;
|
|
317
|
+
readonly label: string;
|
|
318
|
+
readonly expectedLength?: number;
|
|
319
|
+
readonly kind: "textEntry";
|
|
320
|
+
} | {
|
|
321
|
+
readonly id: string;
|
|
322
|
+
readonly label: string;
|
|
323
|
+
readonly acceptsFractions: boolean;
|
|
324
|
+
readonly kind: "numericEntry";
|
|
325
|
+
readonly unit?: string;
|
|
326
|
+
} | {
|
|
327
|
+
readonly id: string;
|
|
328
|
+
readonly label: string;
|
|
329
|
+
readonly kind: "mathEntry";
|
|
328
330
|
} | {
|
|
329
331
|
readonly id: string;
|
|
330
332
|
readonly label: string;
|
|
@@ -491,58 +493,6 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
491
493
|
})[]];
|
|
492
494
|
}[];
|
|
493
495
|
readonly shuffle: boolean;
|
|
494
|
-
} | {
|
|
495
|
-
readonly id: string;
|
|
496
|
-
readonly label: string;
|
|
497
|
-
readonly expectedLength?: number;
|
|
498
|
-
readonly kind: "textEntry";
|
|
499
|
-
} | {
|
|
500
|
-
readonly id: string;
|
|
501
|
-
readonly label: string;
|
|
502
|
-
readonly acceptsFractions: boolean;
|
|
503
|
-
readonly kind: "numericEntry";
|
|
504
|
-
readonly unit?: string;
|
|
505
|
-
} | {
|
|
506
|
-
readonly id: string;
|
|
507
|
-
readonly label: string;
|
|
508
|
-
readonly kind: "mathEntry";
|
|
509
|
-
} | {
|
|
510
|
-
readonly id: string;
|
|
511
|
-
readonly label: string;
|
|
512
|
-
readonly areas: readonly ({
|
|
513
|
-
readonly id: string;
|
|
514
|
-
readonly label: string;
|
|
515
|
-
readonly coords: readonly [number, number, number, number];
|
|
516
|
-
readonly shape: "rect";
|
|
517
|
-
} | {
|
|
518
|
-
readonly id: string;
|
|
519
|
-
readonly label: string;
|
|
520
|
-
readonly coords: readonly [number, number, number];
|
|
521
|
-
readonly shape: "circle";
|
|
522
|
-
} | {
|
|
523
|
-
readonly id: string;
|
|
524
|
-
readonly label: string;
|
|
525
|
-
readonly coords: readonly [number, number, number, number];
|
|
526
|
-
readonly shape: "ellipse";
|
|
527
|
-
} | {
|
|
528
|
-
readonly id: string;
|
|
529
|
-
readonly label: string;
|
|
530
|
-
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
531
|
-
readonly shape: "poly";
|
|
532
|
-
} | {
|
|
533
|
-
readonly id: string;
|
|
534
|
-
readonly label: string;
|
|
535
|
-
readonly shape: "default";
|
|
536
|
-
})[];
|
|
537
|
-
readonly image: {
|
|
538
|
-
readonly alt: string;
|
|
539
|
-
readonly asset: string;
|
|
540
|
-
readonly height: number;
|
|
541
|
-
readonly width: number;
|
|
542
|
-
};
|
|
543
|
-
readonly kind: "hotspot";
|
|
544
|
-
readonly maxChoices: number;
|
|
545
|
-
readonly minChoices: number;
|
|
546
496
|
} | {
|
|
547
497
|
readonly id: string;
|
|
548
498
|
readonly label: string;
|
|
@@ -654,6 +604,58 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
654
604
|
}[]];
|
|
655
605
|
readonly kind: "gapMatch";
|
|
656
606
|
readonly shuffle: boolean;
|
|
607
|
+
} | {
|
|
608
|
+
readonly id: string;
|
|
609
|
+
readonly label: string;
|
|
610
|
+
readonly areas: readonly ({
|
|
611
|
+
readonly id: string;
|
|
612
|
+
readonly label: string;
|
|
613
|
+
readonly coords: readonly [number, number, number, number];
|
|
614
|
+
readonly shape: "rect";
|
|
615
|
+
} | {
|
|
616
|
+
readonly id: string;
|
|
617
|
+
readonly label: string;
|
|
618
|
+
readonly coords: readonly [number, number, number];
|
|
619
|
+
readonly shape: "circle";
|
|
620
|
+
} | {
|
|
621
|
+
readonly id: string;
|
|
622
|
+
readonly label: string;
|
|
623
|
+
readonly coords: readonly [number, number, number, number];
|
|
624
|
+
readonly shape: "ellipse";
|
|
625
|
+
} | {
|
|
626
|
+
readonly id: string;
|
|
627
|
+
readonly label: string;
|
|
628
|
+
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
629
|
+
readonly shape: "poly";
|
|
630
|
+
} | {
|
|
631
|
+
readonly id: string;
|
|
632
|
+
readonly label: string;
|
|
633
|
+
readonly shape: "default";
|
|
634
|
+
})[];
|
|
635
|
+
readonly image: {
|
|
636
|
+
readonly alt: string;
|
|
637
|
+
readonly asset: string;
|
|
638
|
+
readonly height: number;
|
|
639
|
+
readonly width: number;
|
|
640
|
+
};
|
|
641
|
+
readonly kind: "hotspot";
|
|
642
|
+
readonly maxChoices: number;
|
|
643
|
+
readonly minChoices: number;
|
|
644
|
+
} | {
|
|
645
|
+
readonly id: string;
|
|
646
|
+
readonly label: string;
|
|
647
|
+
readonly expectedLength?: number;
|
|
648
|
+
readonly kind: "textEntry";
|
|
649
|
+
} | {
|
|
650
|
+
readonly id: string;
|
|
651
|
+
readonly label: string;
|
|
652
|
+
readonly acceptsFractions: boolean;
|
|
653
|
+
readonly kind: "numericEntry";
|
|
654
|
+
readonly unit?: string;
|
|
655
|
+
} | {
|
|
656
|
+
readonly id: string;
|
|
657
|
+
readonly label: string;
|
|
658
|
+
readonly kind: "mathEntry";
|
|
657
659
|
} | {
|
|
658
660
|
readonly id: string;
|
|
659
661
|
readonly label: string;
|
|
@@ -678,6 +680,15 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
678
680
|
readonly expectedLines?: number;
|
|
679
681
|
readonly kind: "extendedText";
|
|
680
682
|
})[]];
|
|
683
|
+
readonly joint?: {
|
|
684
|
+
readonly levels: readonly [{
|
|
685
|
+
readonly correct: readonly [string, ...string[]];
|
|
686
|
+
readonly points: number;
|
|
687
|
+
}, ...{
|
|
688
|
+
readonly correct: readonly [string, ...string[]];
|
|
689
|
+
readonly points: number;
|
|
690
|
+
}[]];
|
|
691
|
+
};
|
|
681
692
|
readonly prompt: {
|
|
682
693
|
readonly content: readonly [import("./document.js").BlockNode, ...import("./document.js").BlockNode[]];
|
|
683
694
|
readonly type: "doc";
|
|
@@ -691,6 +702,15 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
691
702
|
readonly kind: "perPart";
|
|
692
703
|
readonly penaltyPerWrongPart?: number;
|
|
693
704
|
readonly pointsPerPart: number;
|
|
705
|
+
} | {
|
|
706
|
+
readonly bands: readonly [{
|
|
707
|
+
readonly points: number;
|
|
708
|
+
readonly wrong: number;
|
|
709
|
+
}, ...{
|
|
710
|
+
readonly points: number;
|
|
711
|
+
readonly wrong: number;
|
|
712
|
+
}[]];
|
|
713
|
+
readonly kind: "wrongParts";
|
|
694
714
|
} | {
|
|
695
715
|
readonly criteria: readonly [{
|
|
696
716
|
readonly id: string;
|
|
@@ -720,7 +740,7 @@ export declare const hashItemVersion: (body: Omit<{
|
|
|
720
740
|
}, "hash">) => Effect.Effect<string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">, Schema.SchemaError | import("#contracts/hash/text").TextHashError, never>;
|
|
721
741
|
/** Computes the hash that a stimulus version carries, from all of its other fields. */
|
|
722
742
|
export declare const hashStimulusVersion: (body: Omit<{
|
|
723
|
-
readonly deliveryLanguage:
|
|
743
|
+
readonly deliveryLanguage: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentLanguage">;
|
|
724
744
|
readonly document: {
|
|
725
745
|
readonly content: readonly [import("./document.js").BlockNode, ...import("./document.js").BlockNode[]];
|
|
726
746
|
readonly type: "doc";
|
|
@@ -730,7 +750,7 @@ export declare const hashStimulusVersion: (body: Omit<{
|
|
|
730
750
|
}, "hash">) => Effect.Effect<string & import("effect/Brand").Brand<"@NakafaAI/AksaraSha256Hash">, Schema.SchemaError | import("#contracts/hash/text").TextHashError, never>;
|
|
731
751
|
/** Requires an item version to carry the hash of its own content. */
|
|
732
752
|
export declare const verifyItemVersion: (version: {
|
|
733
|
-
readonly deliveryLanguage:
|
|
753
|
+
readonly deliveryLanguage: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentLanguage">;
|
|
734
754
|
readonly family: string & import("effect/Brand").Brand<"@NakafaAI/AksaraItemFamilyId">;
|
|
735
755
|
readonly interactions: readonly [{
|
|
736
756
|
readonly id: string;
|
|
@@ -875,58 +895,6 @@ export declare const verifyItemVersion: (version: {
|
|
|
875
895
|
})[]];
|
|
876
896
|
}[];
|
|
877
897
|
readonly shuffle: boolean;
|
|
878
|
-
} | {
|
|
879
|
-
readonly id: string;
|
|
880
|
-
readonly label: string;
|
|
881
|
-
readonly expectedLength?: number;
|
|
882
|
-
readonly kind: "textEntry";
|
|
883
|
-
} | {
|
|
884
|
-
readonly id: string;
|
|
885
|
-
readonly label: string;
|
|
886
|
-
readonly acceptsFractions: boolean;
|
|
887
|
-
readonly kind: "numericEntry";
|
|
888
|
-
readonly unit?: string;
|
|
889
|
-
} | {
|
|
890
|
-
readonly id: string;
|
|
891
|
-
readonly label: string;
|
|
892
|
-
readonly kind: "mathEntry";
|
|
893
|
-
} | {
|
|
894
|
-
readonly id: string;
|
|
895
|
-
readonly label: string;
|
|
896
|
-
readonly areas: readonly ({
|
|
897
|
-
readonly id: string;
|
|
898
|
-
readonly label: string;
|
|
899
|
-
readonly coords: readonly [number, number, number, number];
|
|
900
|
-
readonly shape: "rect";
|
|
901
|
-
} | {
|
|
902
|
-
readonly id: string;
|
|
903
|
-
readonly label: string;
|
|
904
|
-
readonly coords: readonly [number, number, number];
|
|
905
|
-
readonly shape: "circle";
|
|
906
|
-
} | {
|
|
907
|
-
readonly id: string;
|
|
908
|
-
readonly label: string;
|
|
909
|
-
readonly coords: readonly [number, number, number, number];
|
|
910
|
-
readonly shape: "ellipse";
|
|
911
|
-
} | {
|
|
912
|
-
readonly id: string;
|
|
913
|
-
readonly label: string;
|
|
914
|
-
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
915
|
-
readonly shape: "poly";
|
|
916
|
-
} | {
|
|
917
|
-
readonly id: string;
|
|
918
|
-
readonly label: string;
|
|
919
|
-
readonly shape: "default";
|
|
920
|
-
})[];
|
|
921
|
-
readonly image: {
|
|
922
|
-
readonly alt: string;
|
|
923
|
-
readonly asset: string;
|
|
924
|
-
readonly height: number;
|
|
925
|
-
readonly width: number;
|
|
926
|
-
};
|
|
927
|
-
readonly kind: "hotspot";
|
|
928
|
-
readonly maxChoices: number;
|
|
929
|
-
readonly minChoices: number;
|
|
930
898
|
} | {
|
|
931
899
|
readonly id: string;
|
|
932
900
|
readonly label: string;
|
|
@@ -1038,6 +1006,58 @@ export declare const verifyItemVersion: (version: {
|
|
|
1038
1006
|
}[]];
|
|
1039
1007
|
readonly kind: "gapMatch";
|
|
1040
1008
|
readonly shuffle: boolean;
|
|
1009
|
+
} | {
|
|
1010
|
+
readonly id: string;
|
|
1011
|
+
readonly label: string;
|
|
1012
|
+
readonly areas: readonly ({
|
|
1013
|
+
readonly id: string;
|
|
1014
|
+
readonly label: string;
|
|
1015
|
+
readonly coords: readonly [number, number, number, number];
|
|
1016
|
+
readonly shape: "rect";
|
|
1017
|
+
} | {
|
|
1018
|
+
readonly id: string;
|
|
1019
|
+
readonly label: string;
|
|
1020
|
+
readonly coords: readonly [number, number, number];
|
|
1021
|
+
readonly shape: "circle";
|
|
1022
|
+
} | {
|
|
1023
|
+
readonly id: string;
|
|
1024
|
+
readonly label: string;
|
|
1025
|
+
readonly coords: readonly [number, number, number, number];
|
|
1026
|
+
readonly shape: "ellipse";
|
|
1027
|
+
} | {
|
|
1028
|
+
readonly id: string;
|
|
1029
|
+
readonly label: string;
|
|
1030
|
+
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
1031
|
+
readonly shape: "poly";
|
|
1032
|
+
} | {
|
|
1033
|
+
readonly id: string;
|
|
1034
|
+
readonly label: string;
|
|
1035
|
+
readonly shape: "default";
|
|
1036
|
+
})[];
|
|
1037
|
+
readonly image: {
|
|
1038
|
+
readonly alt: string;
|
|
1039
|
+
readonly asset: string;
|
|
1040
|
+
readonly height: number;
|
|
1041
|
+
readonly width: number;
|
|
1042
|
+
};
|
|
1043
|
+
readonly kind: "hotspot";
|
|
1044
|
+
readonly maxChoices: number;
|
|
1045
|
+
readonly minChoices: number;
|
|
1046
|
+
} | {
|
|
1047
|
+
readonly id: string;
|
|
1048
|
+
readonly label: string;
|
|
1049
|
+
readonly expectedLength?: number;
|
|
1050
|
+
readonly kind: "textEntry";
|
|
1051
|
+
} | {
|
|
1052
|
+
readonly id: string;
|
|
1053
|
+
readonly label: string;
|
|
1054
|
+
readonly acceptsFractions: boolean;
|
|
1055
|
+
readonly kind: "numericEntry";
|
|
1056
|
+
readonly unit?: string;
|
|
1057
|
+
} | {
|
|
1058
|
+
readonly id: string;
|
|
1059
|
+
readonly label: string;
|
|
1060
|
+
readonly kind: "mathEntry";
|
|
1041
1061
|
} | {
|
|
1042
1062
|
readonly id: string;
|
|
1043
1063
|
readonly label: string;
|
|
@@ -1204,58 +1224,6 @@ export declare const verifyItemVersion: (version: {
|
|
|
1204
1224
|
})[]];
|
|
1205
1225
|
}[];
|
|
1206
1226
|
readonly shuffle: boolean;
|
|
1207
|
-
} | {
|
|
1208
|
-
readonly id: string;
|
|
1209
|
-
readonly label: string;
|
|
1210
|
-
readonly expectedLength?: number;
|
|
1211
|
-
readonly kind: "textEntry";
|
|
1212
|
-
} | {
|
|
1213
|
-
readonly id: string;
|
|
1214
|
-
readonly label: string;
|
|
1215
|
-
readonly acceptsFractions: boolean;
|
|
1216
|
-
readonly kind: "numericEntry";
|
|
1217
|
-
readonly unit?: string;
|
|
1218
|
-
} | {
|
|
1219
|
-
readonly id: string;
|
|
1220
|
-
readonly label: string;
|
|
1221
|
-
readonly kind: "mathEntry";
|
|
1222
|
-
} | {
|
|
1223
|
-
readonly id: string;
|
|
1224
|
-
readonly label: string;
|
|
1225
|
-
readonly areas: readonly ({
|
|
1226
|
-
readonly id: string;
|
|
1227
|
-
readonly label: string;
|
|
1228
|
-
readonly coords: readonly [number, number, number, number];
|
|
1229
|
-
readonly shape: "rect";
|
|
1230
|
-
} | {
|
|
1231
|
-
readonly id: string;
|
|
1232
|
-
readonly label: string;
|
|
1233
|
-
readonly coords: readonly [number, number, number];
|
|
1234
|
-
readonly shape: "circle";
|
|
1235
|
-
} | {
|
|
1236
|
-
readonly id: string;
|
|
1237
|
-
readonly label: string;
|
|
1238
|
-
readonly coords: readonly [number, number, number, number];
|
|
1239
|
-
readonly shape: "ellipse";
|
|
1240
|
-
} | {
|
|
1241
|
-
readonly id: string;
|
|
1242
|
-
readonly label: string;
|
|
1243
|
-
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
1244
|
-
readonly shape: "poly";
|
|
1245
|
-
} | {
|
|
1246
|
-
readonly id: string;
|
|
1247
|
-
readonly label: string;
|
|
1248
|
-
readonly shape: "default";
|
|
1249
|
-
})[];
|
|
1250
|
-
readonly image: {
|
|
1251
|
-
readonly alt: string;
|
|
1252
|
-
readonly asset: string;
|
|
1253
|
-
readonly height: number;
|
|
1254
|
-
readonly width: number;
|
|
1255
|
-
};
|
|
1256
|
-
readonly kind: "hotspot";
|
|
1257
|
-
readonly maxChoices: number;
|
|
1258
|
-
readonly minChoices: number;
|
|
1259
1227
|
} | {
|
|
1260
1228
|
readonly id: string;
|
|
1261
1229
|
readonly label: string;
|
|
@@ -1367,6 +1335,58 @@ export declare const verifyItemVersion: (version: {
|
|
|
1367
1335
|
}[]];
|
|
1368
1336
|
readonly kind: "gapMatch";
|
|
1369
1337
|
readonly shuffle: boolean;
|
|
1338
|
+
} | {
|
|
1339
|
+
readonly id: string;
|
|
1340
|
+
readonly label: string;
|
|
1341
|
+
readonly areas: readonly ({
|
|
1342
|
+
readonly id: string;
|
|
1343
|
+
readonly label: string;
|
|
1344
|
+
readonly coords: readonly [number, number, number, number];
|
|
1345
|
+
readonly shape: "rect";
|
|
1346
|
+
} | {
|
|
1347
|
+
readonly id: string;
|
|
1348
|
+
readonly label: string;
|
|
1349
|
+
readonly coords: readonly [number, number, number];
|
|
1350
|
+
readonly shape: "circle";
|
|
1351
|
+
} | {
|
|
1352
|
+
readonly id: string;
|
|
1353
|
+
readonly label: string;
|
|
1354
|
+
readonly coords: readonly [number, number, number, number];
|
|
1355
|
+
readonly shape: "ellipse";
|
|
1356
|
+
} | {
|
|
1357
|
+
readonly id: string;
|
|
1358
|
+
readonly label: string;
|
|
1359
|
+
readonly coords: readonly [number, number, number, number, number, number, ...number[]];
|
|
1360
|
+
readonly shape: "poly";
|
|
1361
|
+
} | {
|
|
1362
|
+
readonly id: string;
|
|
1363
|
+
readonly label: string;
|
|
1364
|
+
readonly shape: "default";
|
|
1365
|
+
})[];
|
|
1366
|
+
readonly image: {
|
|
1367
|
+
readonly alt: string;
|
|
1368
|
+
readonly asset: string;
|
|
1369
|
+
readonly height: number;
|
|
1370
|
+
readonly width: number;
|
|
1371
|
+
};
|
|
1372
|
+
readonly kind: "hotspot";
|
|
1373
|
+
readonly maxChoices: number;
|
|
1374
|
+
readonly minChoices: number;
|
|
1375
|
+
} | {
|
|
1376
|
+
readonly id: string;
|
|
1377
|
+
readonly label: string;
|
|
1378
|
+
readonly expectedLength?: number;
|
|
1379
|
+
readonly kind: "textEntry";
|
|
1380
|
+
} | {
|
|
1381
|
+
readonly id: string;
|
|
1382
|
+
readonly label: string;
|
|
1383
|
+
readonly acceptsFractions: boolean;
|
|
1384
|
+
readonly kind: "numericEntry";
|
|
1385
|
+
readonly unit?: string;
|
|
1386
|
+
} | {
|
|
1387
|
+
readonly id: string;
|
|
1388
|
+
readonly label: string;
|
|
1389
|
+
readonly kind: "mathEntry";
|
|
1370
1390
|
} | {
|
|
1371
1391
|
readonly id: string;
|
|
1372
1392
|
readonly label: string;
|
|
@@ -1391,6 +1411,15 @@ export declare const verifyItemVersion: (version: {
|
|
|
1391
1411
|
readonly expectedLines?: number;
|
|
1392
1412
|
readonly kind: "extendedText";
|
|
1393
1413
|
})[]];
|
|
1414
|
+
readonly joint?: {
|
|
1415
|
+
readonly levels: readonly [{
|
|
1416
|
+
readonly correct: readonly [string, ...string[]];
|
|
1417
|
+
readonly points: number;
|
|
1418
|
+
}, ...{
|
|
1419
|
+
readonly correct: readonly [string, ...string[]];
|
|
1420
|
+
readonly points: number;
|
|
1421
|
+
}[]];
|
|
1422
|
+
};
|
|
1394
1423
|
readonly prompt: {
|
|
1395
1424
|
readonly content: readonly [import("./document.js").BlockNode, ...import("./document.js").BlockNode[]];
|
|
1396
1425
|
readonly type: "doc";
|
|
@@ -1404,6 +1433,15 @@ export declare const verifyItemVersion: (version: {
|
|
|
1404
1433
|
readonly kind: "perPart";
|
|
1405
1434
|
readonly penaltyPerWrongPart?: number;
|
|
1406
1435
|
readonly pointsPerPart: number;
|
|
1436
|
+
} | {
|
|
1437
|
+
readonly bands: readonly [{
|
|
1438
|
+
readonly points: number;
|
|
1439
|
+
readonly wrong: number;
|
|
1440
|
+
}, ...{
|
|
1441
|
+
readonly points: number;
|
|
1442
|
+
readonly wrong: number;
|
|
1443
|
+
}[]];
|
|
1444
|
+
readonly kind: "wrongParts";
|
|
1407
1445
|
} | {
|
|
1408
1446
|
readonly criteria: readonly [{
|
|
1409
1447
|
readonly id: string;
|
|
@@ -1433,7 +1471,7 @@ export declare const verifyItemVersion: (version: {
|
|
|
1433
1471
|
}) => Effect.Effect<undefined, Schema.SchemaError | import("#contracts/hash/text").TextHashError | VersionHashMismatchError, never>;
|
|
1434
1472
|
/** Requires a stimulus version to carry the hash of its own content. */
|
|
1435
1473
|
export declare const verifyStimulusVersion: (version: {
|
|
1436
|
-
readonly deliveryLanguage:
|
|
1474
|
+
readonly deliveryLanguage: string & import("effect/Brand").Brand<"@NakafaAI/AksaraContentLanguage">;
|
|
1437
1475
|
readonly document: {
|
|
1438
1476
|
readonly content: readonly [import("./document.js").BlockNode, ...import("./document.js").BlockNode[]];
|
|
1439
1477
|
readonly type: "doc";
|
|
@@ -30,13 +30,14 @@ export declare const StimulusReferenceSchema: Schema.Struct<{
|
|
|
30
30
|
export type StimulusReference = typeof StimulusReferenceSchema.Type;
|
|
31
31
|
/**
|
|
32
32
|
* One item in one delivery language, without its hash: the prompt document,
|
|
33
|
-
* its interactions, the scoring rules that override the exam profile,
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* its interactions, the scoring rules that override the exam profile, the joint
|
|
34
|
+
* rule when its answers depend on each other, and the shared reading it was
|
|
35
|
+
* written against, if it has one. The prompt carries no answer key, and the
|
|
36
|
+
* version holds no explanation: the key and the explanation are records of their
|
|
37
|
+
* own (`assessment/key`, `assessment/explanation`).
|
|
37
38
|
*/
|
|
38
39
|
export declare const ItemVersionBodySchema: Schema.Struct<{
|
|
39
|
-
deliveryLanguage: Schema.brand<Schema.
|
|
40
|
+
deliveryLanguage: Schema.brand<Schema.String, "@NakafaAI/AksaraContentLanguage">;
|
|
40
41
|
family: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
|
|
41
42
|
interactions: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
42
43
|
readonly id: Schema.String;
|
|
@@ -236,6 +237,12 @@ export declare const ItemVersionBodySchema: Schema.Struct<{
|
|
|
236
237
|
readonly expectedLines: Schema.optionalKey<Schema.Int>;
|
|
237
238
|
readonly kind: Schema.Literal<"extendedText">;
|
|
238
239
|
}>]>>;
|
|
240
|
+
joint: Schema.optionalKey<Schema.Struct<{
|
|
241
|
+
readonly levels: Schema.NonEmptyArray<Schema.Struct<{
|
|
242
|
+
readonly correct: Schema.NonEmptyArray<Schema.String>;
|
|
243
|
+
readonly points: Schema.Int;
|
|
244
|
+
}>>;
|
|
245
|
+
}>>;
|
|
239
246
|
prompt: Schema.decodeTo<Schema.Struct<{
|
|
240
247
|
readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
|
|
241
248
|
readonly type: Schema.Literal<"doc">;
|
|
@@ -249,6 +256,12 @@ export declare const ItemVersionBodySchema: Schema.Struct<{
|
|
|
249
256
|
readonly kind: Schema.Literal<"perPart">;
|
|
250
257
|
readonly penaltyPerWrongPart: Schema.optionalKey<Schema.Int>;
|
|
251
258
|
readonly pointsPerPart: Schema.Int;
|
|
259
|
+
}>, Schema.Struct<{
|
|
260
|
+
readonly bands: Schema.NonEmptyArray<Schema.Struct<{
|
|
261
|
+
readonly points: Schema.Int;
|
|
262
|
+
readonly wrong: Schema.Int;
|
|
263
|
+
}>>;
|
|
264
|
+
readonly kind: Schema.Literal<"wrongParts">;
|
|
252
265
|
}>, Schema.Struct<{
|
|
253
266
|
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
254
267
|
readonly id: Schema.String;
|
|
@@ -274,7 +287,7 @@ export declare const ItemVersionBodySchema: Schema.Struct<{
|
|
|
274
287
|
* by `assessment/record`.
|
|
275
288
|
*/
|
|
276
289
|
export declare const ItemVersionSchema: Schema.Struct<{
|
|
277
|
-
readonly deliveryLanguage: Schema.brand<Schema.
|
|
290
|
+
readonly deliveryLanguage: Schema.brand<Schema.String, "@NakafaAI/AksaraContentLanguage">;
|
|
278
291
|
readonly family: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
|
|
279
292
|
readonly interactions: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
280
293
|
readonly id: Schema.String;
|
|
@@ -474,6 +487,12 @@ export declare const ItemVersionSchema: Schema.Struct<{
|
|
|
474
487
|
readonly expectedLines: Schema.optionalKey<Schema.Int>;
|
|
475
488
|
readonly kind: Schema.Literal<"extendedText">;
|
|
476
489
|
}>]>>;
|
|
490
|
+
readonly joint: Schema.optionalKey<Schema.Struct<{
|
|
491
|
+
readonly levels: Schema.NonEmptyArray<Schema.Struct<{
|
|
492
|
+
readonly correct: Schema.NonEmptyArray<Schema.String>;
|
|
493
|
+
readonly points: Schema.Int;
|
|
494
|
+
}>>;
|
|
495
|
+
}>>;
|
|
477
496
|
readonly prompt: Schema.decodeTo<Schema.Struct<{
|
|
478
497
|
readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
|
|
479
498
|
readonly type: Schema.Literal<"doc">;
|
|
@@ -487,6 +506,12 @@ export declare const ItemVersionSchema: Schema.Struct<{
|
|
|
487
506
|
readonly kind: Schema.Literal<"perPart">;
|
|
488
507
|
readonly penaltyPerWrongPart: Schema.optionalKey<Schema.Int>;
|
|
489
508
|
readonly pointsPerPart: Schema.Int;
|
|
509
|
+
}>, Schema.Struct<{
|
|
510
|
+
readonly bands: Schema.NonEmptyArray<Schema.Struct<{
|
|
511
|
+
readonly points: Schema.Int;
|
|
512
|
+
readonly wrong: Schema.Int;
|
|
513
|
+
}>>;
|
|
514
|
+
readonly kind: Schema.Literal<"wrongParts">;
|
|
490
515
|
}>, Schema.Struct<{
|
|
491
516
|
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
492
517
|
readonly id: Schema.String;
|
|
@@ -523,7 +548,7 @@ export declare const ItemSchema: Schema.Struct<{
|
|
|
523
548
|
readonly stimulus: Schema.optionalKey<Schema.brand<Schema.String, "@NakafaAI/AksaraStimulusId">>;
|
|
524
549
|
}>;
|
|
525
550
|
readonly versions: Schema.NonEmptyArray<Schema.Struct<{
|
|
526
|
-
readonly deliveryLanguage: Schema.brand<Schema.
|
|
551
|
+
readonly deliveryLanguage: Schema.brand<Schema.String, "@NakafaAI/AksaraContentLanguage">;
|
|
527
552
|
readonly family: Schema.brand<Schema.String, "@NakafaAI/AksaraItemFamilyId">;
|
|
528
553
|
readonly interactions: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
529
554
|
readonly id: Schema.String;
|
|
@@ -723,6 +748,12 @@ export declare const ItemSchema: Schema.Struct<{
|
|
|
723
748
|
readonly expectedLines: Schema.optionalKey<Schema.Int>;
|
|
724
749
|
readonly kind: Schema.Literal<"extendedText">;
|
|
725
750
|
}>]>>;
|
|
751
|
+
readonly joint: Schema.optionalKey<Schema.Struct<{
|
|
752
|
+
readonly levels: Schema.NonEmptyArray<Schema.Struct<{
|
|
753
|
+
readonly correct: Schema.NonEmptyArray<Schema.String>;
|
|
754
|
+
readonly points: Schema.Int;
|
|
755
|
+
}>>;
|
|
756
|
+
}>>;
|
|
726
757
|
readonly prompt: Schema.decodeTo<Schema.Struct<{
|
|
727
758
|
readonly content: Schema.NonEmptyArray<Schema.Codec<import("#contracts/assessment/document").BlockNode, import("#contracts/assessment/document").BlockNode, never, never>>;
|
|
728
759
|
readonly type: Schema.Literal<"doc">;
|
|
@@ -736,6 +767,12 @@ export declare const ItemSchema: Schema.Struct<{
|
|
|
736
767
|
readonly kind: Schema.Literal<"perPart">;
|
|
737
768
|
readonly penaltyPerWrongPart: Schema.optionalKey<Schema.Int>;
|
|
738
769
|
readonly pointsPerPart: Schema.Int;
|
|
770
|
+
}>, Schema.Struct<{
|
|
771
|
+
readonly bands: Schema.NonEmptyArray<Schema.Struct<{
|
|
772
|
+
readonly points: Schema.Int;
|
|
773
|
+
readonly wrong: Schema.Int;
|
|
774
|
+
}>>;
|
|
775
|
+
readonly kind: Schema.Literal<"wrongParts">;
|
|
739
776
|
}>, Schema.Struct<{
|
|
740
777
|
readonly criteria: Schema.NonEmptyArray<Schema.Struct<{
|
|
741
778
|
readonly id: Schema.String;
|