@conform-ed/contracts 0.0.3
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/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-format.log +6 -0
- package/.turbo/turbo-lint.log +4 -0
- package/.turbo/turbo-test.log +196 -0
- package/.turbo/turbo-typecheck.log +2 -0
- package/README.md +52 -0
- package/caliper-v1_2-zod-templates.md +123 -0
- package/case-v1_1-zod-templates.md +290 -0
- package/cat-v1_0-zod-templates.md +73 -0
- package/cc-v1_3-zod-templates.md +531 -0
- package/cc-v1_4-zod-templates.md +247 -0
- package/clr-v2_0-zod-templates.md +117 -0
- package/cmi5-v1_0-zod-templates.md +9 -0
- package/lti-zod-templates.md +11 -0
- package/oneroster-v1_2-zod-templates.md +76 -0
- package/open-badges-v3_0-zod-templates.md +66 -0
- package/package.json +42 -0
- package/qti-v2_1-zod-templates.md +45 -0
- package/qti-v2_2-zod-templates.md +32 -0
- package/qti-v3_0_1-zod-templates.md +421 -0
- package/src/adapter.ts +83 -0
- package/src/caliper/v1_2/caliper_v1p2_bootcamp_schema.ts +781 -0
- package/src/caliper/v1_2/index.ts +37 -0
- package/src/caliper/v1_2/shared.ts +122 -0
- package/src/caliper/v1_2/textual_requirements.ts +219 -0
- package/src/case/v1_1/case_v1p1_cfassociation_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfassociationgrouping_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfassociationset_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfconceptset_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfdocument_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfdocumentset_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfitem_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfitemtypeset_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cflicense_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfpackage_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfrubric_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_cfsubjectset_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_imsx_statusinfo_jsonschema1.ts +1 -0
- package/src/case/v1_1/case_v1p1_openapi3_restbinding_schema.ts +113 -0
- package/src/case/v1_1/index.ts +95 -0
- package/src/case/v1_1/shared.ts +384 -0
- package/src/cat/v1_0/cat_v1p0_restbinding_operations_schema.ts +75 -0
- package/src/cat/v1_0/index.ts +124 -0
- package/src/cat/v1_0/shared.ts +345 -0
- package/src/clr/v2_0/clr_v2p0_achievementcredential_schema.ts +16 -0
- package/src/clr/v2_0/clr_v2p0_clrcredential_schema.ts +9 -0
- package/src/clr/v2_0/clr_v2p0_endorsementcredential_schema.ts +11 -0
- package/src/clr/v2_0/clr_v2p0_getclrcredentialsresponse_schema.ts +1 -0
- package/src/clr/v2_0/clr_v2p0_imsx_statusinfo_schema.ts +8 -0
- package/src/clr/v2_0/clr_v2p0_profile_schema.ts +9 -0
- package/src/clr/v2_0/index.ts +22 -0
- package/src/clr/v2_0/shared.ts +206 -0
- package/src/cmi5/index.ts +3 -0
- package/src/cmi5/v1_0/index.ts +134 -0
- package/src/common-cartridge/v1_3/ccv1p3_imsccauth_v1p3.ts +26 -0
- package/src/common-cartridge/v1_3/ccv1p3_imscp_v1p2_v1p0.ts +352 -0
- package/src/common-cartridge/v1_3/ccv1p3_imscsmd_v1p0.ts +35 -0
- package/src/common-cartridge/v1_3/ccv1p3_imsdt_v1p3.ts +33 -0
- package/src/common-cartridge/v1_3/ccv1p3_imswl_v1p3.ts +23 -0
- package/src/common-cartridge/v1_3/ccv1p3_lomccltilink_v1p0.ts +14 -0
- package/src/common-cartridge/v1_3/ccv1p3_lommanifest_v1p0.ts +14 -0
- package/src/common-cartridge/v1_3/ccv1p3_lomresource_v1p0.ts +14 -0
- package/src/common-cartridge/v1_3/ccv1p3_qtiasiv1p2p1_v1p0.ts +964 -0
- package/src/common-cartridge/v1_3/index.ts +41 -0
- package/src/common-cartridge/v1_3/lom-internal.ts +396 -0
- package/src/common-cartridge/v1_3/shared.ts +68 -0
- package/src/common-cartridge/v1_4/core/ccv1p4_imscp_v1p2_v1p0.ts +360 -0
- package/src/common-cartridge/v1_4/core/ccv1p4_lommanifest_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/core/ccv1p4_lomresource_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/extension/cc_extresource_assignmentv1p0_v1p0.ts +61 -0
- package/src/common-cartridge/v1_4/extension/ccv1p4_cpextensionv1p2_v1p0.ts +20 -0
- package/src/common-cartridge/v1_4/extension/ims_openvideov1p0_v1p0.ts +325 -0
- package/src/common-cartridge/v1_4/index.ts +104 -0
- package/src/common-cartridge/v1_4/k12/ccv1p4_imscp_v1p2_v1p0.ts +19 -0
- package/src/common-cartridge/v1_4/k12/ccv1p4_imscp_v1p2_v1p0_thin.ts +17 -0
- package/src/common-cartridge/v1_4/k12/ccv1p4_lommanifest_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/k12/ccv1p4_lomresource_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/lom-internal.ts +476 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_imsccauth_v1p4.ts +26 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_imscsmd_v1p1.ts +36 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_imsdt_v1p4.ts +33 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_imslticc_v1p4.ts +45 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_imswl_v1p4.ts +23 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_lomccltilink_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/shared/ccv1p4_qtiasiv1p2p1_v1p0.ts +964 -0
- package/src/common-cartridge/v1_4/shared/imsbasiclti_v1p0p1.ts +24 -0
- package/src/common-cartridge/v1_4/shared/imslticm_v1p0.ts +23 -0
- package/src/common-cartridge/v1_4/shared/imslticp_v1p0.ts +57 -0
- package/src/common-cartridge/v1_4/shared/lineitem_v1p0.ts +35 -0
- package/src/common-cartridge/v1_4/shared/resourcea11ymetadata-20210915.ts +110 -0
- package/src/common-cartridge/v1_4/shared.ts +68 -0
- package/src/common-cartridge/v1_4/thin/ccv1p4_imscp_v1p2_v1p0.ts +243 -0
- package/src/common-cartridge/v1_4/thin/ccv1p4_lommanifest_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/thin/ccv1p4_lomresource_v1p0.ts +14 -0
- package/src/common-cartridge/v1_4/vdex/imsmd_loose_v1p3p2.ts +13 -0
- package/src/common-cartridge/v1_4/vdex/imsvdex_v1p0.ts +124 -0
- package/src/config.ts +121 -0
- package/src/index.ts +32 -0
- package/src/lti/ags/v2_0/index.ts +97 -0
- package/src/lti/deep-linking/v2_0/index.ts +100 -0
- package/src/lti/index.ts +26 -0
- package/src/lti/nrps/v2_0/index.ts +69 -0
- package/src/lti/proctoring/v1_0/index.ts +131 -0
- package/src/lti/shared.ts +66 -0
- package/src/lti/v1_3/index.ts +84 -0
- package/src/oneroster/v1_2/index.ts +156 -0
- package/src/oneroster/v1_2/or_v1p2_csv_binding_schema.ts +427 -0
- package/src/oneroster/v1_2/or_v1p2_gradebook_restbinding_schema.ts +120 -0
- package/src/oneroster/v1_2/or_v1p2_gradebook_service_schema.ts +243 -0
- package/src/oneroster/v1_2/or_v1p2_resource_restbinding_schema.ts +24 -0
- package/src/oneroster/v1_2/or_v1p2_resource_service_schema.ts +47 -0
- package/src/oneroster/v1_2/or_v1p2_rostering_restbinding_schema.ts +84 -0
- package/src/oneroster/v1_2/or_v1p2_rostering_service_schema.ts +288 -0
- package/src/oneroster/v1_2/shared.ts +90 -0
- package/src/open-badges/v3_0/index.ts +20 -0
- package/src/open-badges/v3_0/ob_v3p0_achievementcredential_schema.ts +17 -0
- package/src/open-badges/v3_0/ob_v3p0_endorsementcredential_schema.ts +11 -0
- package/src/open-badges/v3_0/ob_v3p0_getopenbadgecredentialsresponse_schema.ts +1 -0
- package/src/open-badges/v3_0/ob_v3p0_imsx_statusinfo_schema.ts +8 -0
- package/src/open-badges/v3_0/ob_v3p0_profile_schema.ts +9 -0
- package/src/open-badges/v3_0/shared.ts +458 -0
- package/src/qti/v2-internal.ts +1683 -0
- package/src/qti/v2_1/apipv1p0_qtiextv2p1_v1p0.ts +3 -0
- package/src/qti/v2_1/imsqti_metadata_v2p1.ts +3 -0
- package/src/qti/v2_1/imsqti_result_v2p1.ts +3 -0
- package/src/qti/v2_1/imsqti_usagedata_v2p1.ts +3 -0
- package/src/qti/v2_1/imsqti_v2p1p2.ts +71 -0
- package/src/qti/v2_1/index.ts +53 -0
- package/src/qti/v2_1/qtiv2p1_imscpv1p2_v1p0.ts +3 -0
- package/src/qti/v2_1/schemas.ts +15 -0
- package/src/qti/v2_1/shared.ts +3 -0
- package/src/qti/v2_2/apipv1p0_qtiextv2p2_v1p0p1.ts +3 -0
- package/src/qti/v2_2/imsqti_metadata_v2p2.ts +3 -0
- package/src/qti/v2_2/imsqti_result_v2p2.ts +3 -0
- package/src/qti/v2_2/imsqti_usagedata_v2p2.ts +3 -0
- package/src/qti/v2_2/imsqti_v2p2p4.ts +76 -0
- package/src/qti/v2_2/imsqtiv2p2p4_html5_v1p0.ts +8 -0
- package/src/qti/v2_2/index.ts +59 -0
- package/src/qti/v2_2/qtiv2p2_csm_v2p2.ts +4 -0
- package/src/qti/v2_2/qtiv2p2_imscpv1p2_v1p0.ts +3 -0
- package/src/qti/v2_2/schemas.ts +19 -0
- package/src/qti/v2_2/shared.ts +3 -0
- package/src/qti/v3_0_1/assessment-internal.ts +1509 -0
- package/src/qti/v3_0_1/imsqti_asiv3p0p1_v1p0.ts +57 -0
- package/src/qti/v3_0_1/imsqti_itemv3p0p1_v1p0.ts +60 -0
- package/src/qti/v3_0_1/imsqti_metadatav3p0_v1p0.ts +73 -0
- package/src/qti/v3_0_1/imsqti_outcomev3p0p1_v1p0.ts +11 -0
- package/src/qti/v3_0_1/imsqti_responseprocessingv3p0p1_v1p0.ts +17 -0
- package/src/qti/v3_0_1/imsqti_resultv3p0_v1p0.ts +222 -0
- package/src/qti/v3_0_1/imsqti_sectionv3p0p1_v1p0.ts +15 -0
- package/src/qti/v3_0_1/imsqti_stimulusv3p0p1_v1p0.ts +15 -0
- package/src/qti/v3_0_1/imsqti_testv3p0p1_v1p0.ts +49 -0
- package/src/qti/v3_0_1/imsqti_usagedatav3p0_v1p0.ts +77 -0
- package/src/qti/v3_0_1/imsqtiv3p0_afa3p0pnp_v1p0.ts +269 -0
- package/src/qti/v3_0_1/index.ts +50 -0
- package/src/qti/v3_0_1/processing-internal.ts +667 -0
- package/src/qti/v3_0_1/shared.ts +146 -0
- package/src/qti/v3_0_1/variables-internal.ts +274 -0
- package/src/shared/imsx-status.ts +49 -0
- package/src/summary.ts +70 -0
- package/src/vc-data-model/v2_0/index.ts +27 -0
- package/src/vc-data-model/v2_0/shared.ts +206 -0
- package/src/xapi/index.ts +12 -0
- package/src/xapi/shared.ts +444 -0
- package/src/xapi/v1_0_3/index.ts +169 -0
- package/src/xapi/v2_0/index.ts +256 -0
- package/test/caliper-v1_2.test.ts +270 -0
- package/test/case-v1_1.test.ts +147 -0
- package/test/cat-v1_0.test.ts +338 -0
- package/test/cc-v1_4.test.ts +239 -0
- package/test/clr-v2_0.test.ts +225 -0
- package/test/cmi5-v1_0.test.ts +196 -0
- package/test/contracts.test.ts +125 -0
- package/test/fixtures/cmi5/extended-cmi5.xml +72 -0
- package/test/fixtures/cmi5/simple-cmi5.xml +26 -0
- package/test/lti.test.ts +146 -0
- package/test/oneroster-v1_2.test.ts +234 -0
- package/test/open-badges-v3_0.test.ts +144 -0
- package/test/qti-v2_1.test.ts +146 -0
- package/test/qti-v2_2.test.ts +154 -0
- package/test/qti-v3_0_1.test.ts +576 -0
- package/test/schema-examples.test.ts +101 -0
- package/test/vc-data-model-v2_0.test.ts +63 -0
- package/test/xapi.test.ts +384 -0
- package/tsconfig.json +7 -0
- package/vc-data-model-v2_0-zod-templates.md +43 -0
- package/xapi-zod-templates.md +95 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
function strictObject<T extends z.ZodRawShape>(shape: T) {
|
|
4
|
+
return z.object(shape).strict();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
function extensibleEnum<Values extends readonly [string, ...string[]]>(values: Values) {
|
|
8
|
+
return z.union([z.enum(values), ExtensibleVocabularyValueSchema]);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const UuidSchema = z
|
|
12
|
+
.string()
|
|
13
|
+
.regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[8-9a-b][0-9a-f]{3}-[0-9a-f]{12}$/u);
|
|
14
|
+
const UriSchema = z.string().regex(/^[a-zA-Z][a-zA-Z0-9+.-]*:.+$/u);
|
|
15
|
+
const DateSchema = z.iso.date();
|
|
16
|
+
export const DateTimeSchema = z.iso.datetime();
|
|
17
|
+
|
|
18
|
+
export const ExtensionEnumSchema = extensibleEnum;
|
|
19
|
+
|
|
20
|
+
const ExtensibleVocabularyValueSchema = z.string().regex(/^(ext:)[a-zA-Z0-9.\-_]+$/u);
|
|
21
|
+
|
|
22
|
+
const ASSOCIATION_TYPES = [
|
|
23
|
+
"isChildOf",
|
|
24
|
+
"isPeerOf",
|
|
25
|
+
"isPartOf",
|
|
26
|
+
"exactMatchOf",
|
|
27
|
+
"precedes",
|
|
28
|
+
"isRelatedTo",
|
|
29
|
+
"replacedBy",
|
|
30
|
+
"exemplar",
|
|
31
|
+
"hasSkillLevel",
|
|
32
|
+
"isTranslationOf",
|
|
33
|
+
] as const;
|
|
34
|
+
|
|
35
|
+
const LinkTargetTypeSchema = extensibleEnum(["CASE"]);
|
|
36
|
+
const AssociationTypeSchema = extensibleEnum(ASSOCIATION_TYPES);
|
|
37
|
+
|
|
38
|
+
export const CFAssociationExtensionSchema = z.record(z.string(), z.unknown());
|
|
39
|
+
export const CFAssociationGroupingExtensionSchema = z.record(z.string(), z.unknown());
|
|
40
|
+
export const CFConceptExtensionSchema = z.record(z.string(), z.unknown());
|
|
41
|
+
export const CFDefinitionExtensionSchema = z.record(z.string(), z.unknown());
|
|
42
|
+
export const CFDocumentExtensionSchema = z.record(z.string(), z.unknown());
|
|
43
|
+
export const CFItemExtensionSchema = z.record(z.string(), z.unknown());
|
|
44
|
+
export const CFItemTypeExtensionSchema = z.record(z.string(), z.unknown());
|
|
45
|
+
export const CFLicenseExtensionSchema = z.record(z.string(), z.unknown());
|
|
46
|
+
export const CFPackageExtensionSchema = z.record(z.string(), z.unknown());
|
|
47
|
+
export const CFRubricExtensionSchema = z.record(z.string(), z.unknown());
|
|
48
|
+
export const CFRubricCriterionExtensionSchema = z.record(z.string(), z.unknown());
|
|
49
|
+
export const CFRubricCriterionLevelExtensionSchema = z.record(z.string(), z.unknown());
|
|
50
|
+
export const CFSubjectExtensionSchema = z.record(z.string(), z.unknown());
|
|
51
|
+
|
|
52
|
+
export const LinkUriSchema = strictObject({
|
|
53
|
+
title: z.string(),
|
|
54
|
+
identifier: UuidSchema,
|
|
55
|
+
uri: UriSchema,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export const LinkGenUriSchema = strictObject({
|
|
59
|
+
title: z.string(),
|
|
60
|
+
identifier: z.string(),
|
|
61
|
+
uri: UriSchema,
|
|
62
|
+
targetType: LinkTargetTypeSchema.optional(),
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export const CFConceptSchema = strictObject({
|
|
66
|
+
identifier: UuidSchema,
|
|
67
|
+
uri: UriSchema,
|
|
68
|
+
title: z.string(),
|
|
69
|
+
keywords: z.string().optional(),
|
|
70
|
+
hierarchyCode: z.string(),
|
|
71
|
+
description: z.string().optional(),
|
|
72
|
+
lastChangeDateTime: DateTimeSchema,
|
|
73
|
+
extensions: CFConceptExtensionSchema.optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export const CFConceptSetSchema = strictObject({
|
|
77
|
+
CFConcepts: z.array(CFConceptSchema),
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export const CFSubjectSchema = strictObject({
|
|
81
|
+
identifier: UuidSchema,
|
|
82
|
+
uri: UriSchema,
|
|
83
|
+
title: z.string(),
|
|
84
|
+
hierarchyCode: z.string(),
|
|
85
|
+
description: z.string().optional(),
|
|
86
|
+
lastChangeDateTime: DateTimeSchema,
|
|
87
|
+
extensions: CFSubjectExtensionSchema.optional(),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export const CFSubjectSetSchema = strictObject({
|
|
91
|
+
CFSubjects: z.array(CFSubjectSchema),
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export const CFLicenseSchema = strictObject({
|
|
95
|
+
identifier: UuidSchema,
|
|
96
|
+
uri: UriSchema,
|
|
97
|
+
title: z.string(),
|
|
98
|
+
description: z.string().optional(),
|
|
99
|
+
licenseText: z.string(),
|
|
100
|
+
lastChangeDateTime: DateTimeSchema,
|
|
101
|
+
extensions: CFLicenseExtensionSchema.optional(),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const CFItemTypeSchema = strictObject({
|
|
105
|
+
identifier: UuidSchema,
|
|
106
|
+
uri: UriSchema,
|
|
107
|
+
title: z.string(),
|
|
108
|
+
description: z.string(),
|
|
109
|
+
hierarchyCode: z.string(),
|
|
110
|
+
typeCode: z.string().optional(),
|
|
111
|
+
lastChangeDateTime: DateTimeSchema,
|
|
112
|
+
extensions: CFItemTypeExtensionSchema.optional(),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export const CFItemTypeSetSchema = strictObject({
|
|
116
|
+
CFItemTypes: z.array(CFItemTypeSchema),
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export const CFAssociationGroupingSchema = strictObject({
|
|
120
|
+
identifier: UuidSchema,
|
|
121
|
+
uri: UriSchema,
|
|
122
|
+
title: z.string(),
|
|
123
|
+
description: z.string().optional(),
|
|
124
|
+
lastChangeDateTime: DateTimeSchema,
|
|
125
|
+
extensions: CFAssociationGroupingExtensionSchema.optional(),
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
export const CFAssociationSchema = strictObject({
|
|
129
|
+
identifier: UuidSchema,
|
|
130
|
+
associationType: AssociationTypeSchema,
|
|
131
|
+
sequenceNumber: z.number().int().optional(),
|
|
132
|
+
uri: UriSchema,
|
|
133
|
+
originNodeURI: LinkGenUriSchema,
|
|
134
|
+
destinationNodeURI: LinkGenUriSchema,
|
|
135
|
+
CFAssociationGroupingURI: LinkUriSchema.optional(),
|
|
136
|
+
lastChangeDateTime: DateTimeSchema,
|
|
137
|
+
notes: z.string().optional(),
|
|
138
|
+
extensions: CFAssociationExtensionSchema.optional(),
|
|
139
|
+
CFDocumentURI: LinkUriSchema.optional(),
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export const CFPckgAssociationSchema = strictObject({
|
|
143
|
+
identifier: UuidSchema,
|
|
144
|
+
associationType: AssociationTypeSchema,
|
|
145
|
+
sequenceNumber: z.number().int().optional(),
|
|
146
|
+
uri: UriSchema,
|
|
147
|
+
originNodeURI: LinkGenUriSchema,
|
|
148
|
+
destinationNodeURI: LinkGenUriSchema,
|
|
149
|
+
CFAssociationGroupingURI: LinkUriSchema.optional(),
|
|
150
|
+
lastChangeDateTime: DateTimeSchema,
|
|
151
|
+
notes: z.string().optional(),
|
|
152
|
+
extensions: CFAssociationExtensionSchema.optional(),
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
export const CFPckgDocumentSchema = strictObject({
|
|
156
|
+
identifier: UuidSchema,
|
|
157
|
+
uri: UriSchema,
|
|
158
|
+
frameworkType: z.string().optional(),
|
|
159
|
+
caseVersion: z.literal("1.1").optional(),
|
|
160
|
+
creator: z.string(),
|
|
161
|
+
title: z.string(),
|
|
162
|
+
lastChangeDateTime: DateTimeSchema,
|
|
163
|
+
officialSourceURL: UriSchema.optional(),
|
|
164
|
+
publisher: z.string().optional(),
|
|
165
|
+
description: z.string().optional(),
|
|
166
|
+
subject: z.array(z.string()).optional(),
|
|
167
|
+
subjectURI: z.array(LinkUriSchema).optional(),
|
|
168
|
+
language: z.string().optional(),
|
|
169
|
+
version: z.string().optional(),
|
|
170
|
+
adoptionStatus: z.string().optional(),
|
|
171
|
+
statusStartDate: DateSchema.optional(),
|
|
172
|
+
statusEndDate: DateSchema.optional(),
|
|
173
|
+
licenseURI: LinkUriSchema.optional(),
|
|
174
|
+
notes: z.string().optional(),
|
|
175
|
+
extensions: CFDocumentExtensionSchema.optional(),
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
export const CFDocumentSchema = strictObject({
|
|
179
|
+
identifier: UuidSchema,
|
|
180
|
+
uri: UriSchema,
|
|
181
|
+
frameworkType: z.string().optional(),
|
|
182
|
+
caseVersion: z.literal("1.1").optional(),
|
|
183
|
+
creator: z.string(),
|
|
184
|
+
title: z.string(),
|
|
185
|
+
lastChangeDateTime: DateTimeSchema,
|
|
186
|
+
officialSourceURL: UriSchema.optional(),
|
|
187
|
+
publisher: z.string().optional(),
|
|
188
|
+
description: z.string().optional(),
|
|
189
|
+
subject: z.array(z.string()).optional(),
|
|
190
|
+
subjectURI: z.array(LinkUriSchema).optional(),
|
|
191
|
+
language: z.string().optional(),
|
|
192
|
+
version: z.string().optional(),
|
|
193
|
+
adoptionStatus: z.string().optional(),
|
|
194
|
+
statusStartDate: DateSchema.optional(),
|
|
195
|
+
statusEndDate: DateSchema.optional(),
|
|
196
|
+
licenseURI: LinkUriSchema.optional(),
|
|
197
|
+
notes: z.string().optional(),
|
|
198
|
+
extensions: CFDocumentExtensionSchema.optional(),
|
|
199
|
+
CFPackageURI: LinkUriSchema,
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
export const CFDocumentSetSchema = strictObject({
|
|
203
|
+
CFDocuments: z.array(CFDocumentSchema),
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export const CFPckgItemSchema = strictObject({
|
|
207
|
+
identifier: UuidSchema,
|
|
208
|
+
fullStatement: z.string(),
|
|
209
|
+
alternativeLabel: z.string().optional(),
|
|
210
|
+
CFItemType: z.string().optional(),
|
|
211
|
+
uri: UriSchema,
|
|
212
|
+
humanCodingScheme: z.string().optional(),
|
|
213
|
+
listEnumeration: z.string().optional(),
|
|
214
|
+
abbreviatedStatement: z.string().optional(),
|
|
215
|
+
conceptKeywords: z.array(z.string()).optional(),
|
|
216
|
+
conceptKeywordsURI: LinkUriSchema.optional(),
|
|
217
|
+
notes: z.string().optional(),
|
|
218
|
+
subject: z.array(z.string()).optional(),
|
|
219
|
+
subjectURI: z.array(LinkUriSchema).optional(),
|
|
220
|
+
language: z.string().optional(),
|
|
221
|
+
educationLevel: z.array(z.string()).optional(),
|
|
222
|
+
CFItemTypeURI: LinkUriSchema.optional(),
|
|
223
|
+
licenseURI: LinkUriSchema.optional(),
|
|
224
|
+
statusStartDate: DateSchema.optional(),
|
|
225
|
+
statusEndDate: DateSchema.optional(),
|
|
226
|
+
lastChangeDateTime: DateTimeSchema,
|
|
227
|
+
extensions: CFItemExtensionSchema.optional(),
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
export const CFItemSchema = strictObject({
|
|
231
|
+
identifier: UuidSchema,
|
|
232
|
+
fullStatement: z.string(),
|
|
233
|
+
alternativeLabel: z.string().optional(),
|
|
234
|
+
CFItemType: z.string().optional(),
|
|
235
|
+
uri: UriSchema,
|
|
236
|
+
humanCodingScheme: z.string().optional(),
|
|
237
|
+
listEnumeration: z.string().optional(),
|
|
238
|
+
abbreviatedStatement: z.string().optional(),
|
|
239
|
+
conceptKeywords: z.array(z.string()).optional(),
|
|
240
|
+
conceptKeywordsURI: LinkUriSchema.optional(),
|
|
241
|
+
notes: z.string().optional(),
|
|
242
|
+
subject: z.array(z.string()).optional(),
|
|
243
|
+
subjectURI: z.array(LinkUriSchema).optional(),
|
|
244
|
+
language: z.string().optional(),
|
|
245
|
+
educationLevel: z.array(z.string()).optional(),
|
|
246
|
+
CFItemTypeURI: LinkUriSchema.optional(),
|
|
247
|
+
licenseURI: LinkUriSchema.optional(),
|
|
248
|
+
statusStartDate: DateSchema.optional(),
|
|
249
|
+
statusEndDate: DateSchema.optional(),
|
|
250
|
+
lastChangeDateTime: DateTimeSchema,
|
|
251
|
+
extensions: CFItemExtensionSchema.optional(),
|
|
252
|
+
CFDocumentURI: LinkUriSchema,
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
export const CFAssociationSetSchema = strictObject({
|
|
256
|
+
CFItem: CFItemSchema,
|
|
257
|
+
CFAssociations: z.array(CFPckgAssociationSchema),
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
export const CFRubricCriterionLevelSchema = strictObject({
|
|
261
|
+
identifier: UuidSchema,
|
|
262
|
+
uri: UriSchema,
|
|
263
|
+
description: z.string().optional(),
|
|
264
|
+
quality: z.string().optional(),
|
|
265
|
+
score: z.number().optional(),
|
|
266
|
+
feedback: z.string().optional(),
|
|
267
|
+
position: z.number().int().optional(),
|
|
268
|
+
rubricCriterionId: UuidSchema.optional(),
|
|
269
|
+
lastChangeDateTime: DateTimeSchema,
|
|
270
|
+
extensions: z.array(CFRubricCriterionLevelExtensionSchema).optional(),
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
export const CFRubricCriterionSchema = strictObject({
|
|
274
|
+
identifier: UuidSchema,
|
|
275
|
+
uri: UriSchema,
|
|
276
|
+
category: z.string().optional(),
|
|
277
|
+
description: z.string().optional(),
|
|
278
|
+
CFItemURI: LinkUriSchema.optional(),
|
|
279
|
+
weight: z.number().optional(),
|
|
280
|
+
position: z.number().int().optional(),
|
|
281
|
+
rubricId: UuidSchema.optional(),
|
|
282
|
+
lastChangeDateTime: DateTimeSchema,
|
|
283
|
+
CFRubricCriterionLevels: z.array(CFRubricCriterionLevelSchema).optional(),
|
|
284
|
+
extensions: CFRubricCriterionExtensionSchema.optional(),
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
export const CFRubricSchema = strictObject({
|
|
288
|
+
identifier: UuidSchema,
|
|
289
|
+
uri: UriSchema,
|
|
290
|
+
title: z.string().optional(),
|
|
291
|
+
description: z.string().optional(),
|
|
292
|
+
lastChangeDateTime: DateTimeSchema,
|
|
293
|
+
CFRubricCriteria: z.array(CFRubricCriterionSchema).optional(),
|
|
294
|
+
extensions: CFRubricExtensionSchema.optional(),
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
export const CFDefinitionSchema = strictObject({
|
|
298
|
+
CFConcepts: z.array(CFConceptSchema).optional(),
|
|
299
|
+
CFSubjects: z.array(CFSubjectSchema).optional(),
|
|
300
|
+
CFLicenses: z.array(CFLicenseSchema).optional(),
|
|
301
|
+
CFItemTypes: z.array(CFItemTypeSchema).optional(),
|
|
302
|
+
CFAssociationGroupings: z.array(CFAssociationGroupingSchema).optional(),
|
|
303
|
+
extensions: CFDefinitionExtensionSchema.optional(),
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
export const CFPackageSchema = strictObject({
|
|
307
|
+
CFDocument: CFPckgDocumentSchema,
|
|
308
|
+
CFItems: z.array(CFPckgItemSchema).optional(),
|
|
309
|
+
CFAssociations: z.array(CFPckgAssociationSchema).optional(),
|
|
310
|
+
CFDefinitions: CFDefinitionSchema.optional(),
|
|
311
|
+
CFRubrics: z.array(CFRubricSchema).optional(),
|
|
312
|
+
extensions: CFPackageExtensionSchema.optional(),
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
export const ImsxCodeMinorFieldSchema = strictObject({
|
|
316
|
+
imsx_codeMinorFieldName: z.string(),
|
|
317
|
+
imsx_codeMinorFieldValue: z.enum([
|
|
318
|
+
"forbidden",
|
|
319
|
+
"fullsuccess",
|
|
320
|
+
"internal_server_error",
|
|
321
|
+
"invalid_selection_field",
|
|
322
|
+
"invalid_sort_field",
|
|
323
|
+
"invalid_uuid",
|
|
324
|
+
"server_busy",
|
|
325
|
+
"unauthorised_request",
|
|
326
|
+
"unknownobject",
|
|
327
|
+
]),
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
export const ImsxCodeMinorSchema = strictObject({
|
|
331
|
+
imsx_codeMinorField: z.array(ImsxCodeMinorFieldSchema),
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
export const ImsxStatusInfoSchema = strictObject({
|
|
335
|
+
imsx_codeMajor: z.enum(["failure", "processing", "success", "unsupported"]),
|
|
336
|
+
imsx_severity: z.enum(["error", "status", "warning"]),
|
|
337
|
+
imsx_description: z.string().optional(),
|
|
338
|
+
imsx_codeMinor: ImsxCodeMinorSchema.optional(),
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
export { strictObject };
|
|
342
|
+
// Inferred types from exported Zod validators.
|
|
343
|
+
export type Uuid = z.infer<typeof UuidSchema>;
|
|
344
|
+
export type DateTime = z.infer<typeof DateTimeSchema>;
|
|
345
|
+
export type ExtensionEnum = z.infer<typeof ExtensionEnumSchema>;
|
|
346
|
+
export type CFAssociationExtension = z.infer<typeof CFAssociationExtensionSchema>;
|
|
347
|
+
export type CFAssociationGroupingExtension = z.infer<typeof CFAssociationGroupingExtensionSchema>;
|
|
348
|
+
export type CFConceptExtension = z.infer<typeof CFConceptExtensionSchema>;
|
|
349
|
+
export type CFDefinitionExtension = z.infer<typeof CFDefinitionExtensionSchema>;
|
|
350
|
+
export type CFDocumentExtension = z.infer<typeof CFDocumentExtensionSchema>;
|
|
351
|
+
export type CFItemExtension = z.infer<typeof CFItemExtensionSchema>;
|
|
352
|
+
export type CFItemTypeExtension = z.infer<typeof CFItemTypeExtensionSchema>;
|
|
353
|
+
export type CFLicenseExtension = z.infer<typeof CFLicenseExtensionSchema>;
|
|
354
|
+
export type CFPackageExtension = z.infer<typeof CFPackageExtensionSchema>;
|
|
355
|
+
export type CFRubricExtension = z.infer<typeof CFRubricExtensionSchema>;
|
|
356
|
+
export type CFRubricCriterionExtension = z.infer<typeof CFRubricCriterionExtensionSchema>;
|
|
357
|
+
export type CFRubricCriterionLevelExtension = z.infer<typeof CFRubricCriterionLevelExtensionSchema>;
|
|
358
|
+
export type CFSubjectExtension = z.infer<typeof CFSubjectExtensionSchema>;
|
|
359
|
+
export type LinkUri = z.infer<typeof LinkUriSchema>;
|
|
360
|
+
export type LinkGenUri = z.infer<typeof LinkGenUriSchema>;
|
|
361
|
+
export type CFConcept = z.infer<typeof CFConceptSchema>;
|
|
362
|
+
export type CFConceptSet = z.infer<typeof CFConceptSetSchema>;
|
|
363
|
+
export type CFSubject = z.infer<typeof CFSubjectSchema>;
|
|
364
|
+
export type CFSubjectSet = z.infer<typeof CFSubjectSetSchema>;
|
|
365
|
+
export type CFLicense = z.infer<typeof CFLicenseSchema>;
|
|
366
|
+
export type CFItemType = z.infer<typeof CFItemTypeSchema>;
|
|
367
|
+
export type CFItemTypeSet = z.infer<typeof CFItemTypeSetSchema>;
|
|
368
|
+
export type CFAssociationGrouping = z.infer<typeof CFAssociationGroupingSchema>;
|
|
369
|
+
export type CFAssociation = z.infer<typeof CFAssociationSchema>;
|
|
370
|
+
export type CFPckgAssociation = z.infer<typeof CFPckgAssociationSchema>;
|
|
371
|
+
export type CFPckgDocument = z.infer<typeof CFPckgDocumentSchema>;
|
|
372
|
+
export type CFDocument = z.infer<typeof CFDocumentSchema>;
|
|
373
|
+
export type CFDocumentSet = z.infer<typeof CFDocumentSetSchema>;
|
|
374
|
+
export type CFPckgItem = z.infer<typeof CFPckgItemSchema>;
|
|
375
|
+
export type CFItem = z.infer<typeof CFItemSchema>;
|
|
376
|
+
export type CFAssociationSet = z.infer<typeof CFAssociationSetSchema>;
|
|
377
|
+
export type CFRubricCriterionLevel = z.infer<typeof CFRubricCriterionLevelSchema>;
|
|
378
|
+
export type CFRubricCriterion = z.infer<typeof CFRubricCriterionSchema>;
|
|
379
|
+
export type CFRubric = z.infer<typeof CFRubricSchema>;
|
|
380
|
+
export type CFDefinition = z.infer<typeof CFDefinitionSchema>;
|
|
381
|
+
export type CFPackage = z.infer<typeof CFPackageSchema>;
|
|
382
|
+
export type ImsxCodeMinorField = z.infer<typeof ImsxCodeMinorFieldSchema>;
|
|
383
|
+
export type ImsxCodeMinor = z.infer<typeof ImsxCodeMinorSchema>;
|
|
384
|
+
export type ImsxStatusInfo = z.infer<typeof ImsxStatusInfoSchema>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
CreateSectionRequestSchema,
|
|
5
|
+
CreateSectionResponseSchema,
|
|
6
|
+
GetSectionResponseSchema,
|
|
7
|
+
CreateSessionRequestSchema,
|
|
8
|
+
CreateSessionResponseSchema,
|
|
9
|
+
SubmitResultsRequestSchema,
|
|
10
|
+
SubmitResultsResponseSchema,
|
|
11
|
+
EndSessionRequestSchema,
|
|
12
|
+
EndSessionResponseSchema,
|
|
13
|
+
EndSectionRequestSchema,
|
|
14
|
+
EndSectionResponseSchema,
|
|
15
|
+
ErrorResponseSchema,
|
|
16
|
+
} from "./shared";
|
|
17
|
+
|
|
18
|
+
const EmptyPayloadSchema = z.undefined();
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* CAT REST Operation Bindings - extracted from CAT v1.0 specification
|
|
22
|
+
* Each operation defines the HTTP method, path, request payload schema, and response payload schemas.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export const CatV1P0RestBindingOperations = {
|
|
26
|
+
createSection: {
|
|
27
|
+
method: "POST",
|
|
28
|
+
path: "/sections",
|
|
29
|
+
requestPayload: CreateSectionRequestSchema,
|
|
30
|
+
successResponsePayload: CreateSectionResponseSchema,
|
|
31
|
+
errorResponsePayload: ErrorResponseSchema,
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
getSection: {
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: "/sections/{sectionId}",
|
|
37
|
+
requestPayload: EmptyPayloadSchema,
|
|
38
|
+
successResponsePayload: GetSectionResponseSchema,
|
|
39
|
+
errorResponsePayload: ErrorResponseSchema,
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
createSession: {
|
|
43
|
+
method: "POST",
|
|
44
|
+
path: "/sessions",
|
|
45
|
+
requestPayload: CreateSessionRequestSchema,
|
|
46
|
+
successResponsePayload: CreateSessionResponseSchema,
|
|
47
|
+
errorResponsePayload: ErrorResponseSchema,
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
submitResults: {
|
|
51
|
+
method: "POST",
|
|
52
|
+
path: "/sessions/{sessionId}/results",
|
|
53
|
+
requestPayload: SubmitResultsRequestSchema,
|
|
54
|
+
successResponsePayload: SubmitResultsResponseSchema,
|
|
55
|
+
errorResponsePayload: ErrorResponseSchema,
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
endSession: {
|
|
59
|
+
method: "POST",
|
|
60
|
+
path: "/sessions/{sessionId}/end",
|
|
61
|
+
requestPayload: EndSessionRequestSchema,
|
|
62
|
+
successResponsePayload: EndSessionResponseSchema,
|
|
63
|
+
errorResponsePayload: ErrorResponseSchema,
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
endSection: {
|
|
67
|
+
method: "POST",
|
|
68
|
+
path: "/sections/{sectionId}/end",
|
|
69
|
+
requestPayload: EndSectionRequestSchema,
|
|
70
|
+
successResponsePayload: EndSectionResponseSchema,
|
|
71
|
+
errorResponsePayload: ErrorResponseSchema,
|
|
72
|
+
},
|
|
73
|
+
} as const;
|
|
74
|
+
|
|
75
|
+
export type CatV1P0Operations = typeof CatV1P0RestBindingOperations;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import {
|
|
2
|
+
UuidSchema,
|
|
3
|
+
DateTimeSchema,
|
|
4
|
+
ExtensionEnumSchema,
|
|
5
|
+
OutcomeVariableSchema,
|
|
6
|
+
ResponseVariableSchema,
|
|
7
|
+
ItemRefSchema,
|
|
8
|
+
CatConstraintSchema,
|
|
9
|
+
ItemPoolSchema,
|
|
10
|
+
SectionDataSchema,
|
|
11
|
+
ItemStageSchema,
|
|
12
|
+
AssessmentResultSchema,
|
|
13
|
+
CatEngineResultReportSchema,
|
|
14
|
+
SessionInfoSchema,
|
|
15
|
+
CreateSectionRequestSchema,
|
|
16
|
+
CreateSectionResponseSchema,
|
|
17
|
+
GetSectionRequestSchema,
|
|
18
|
+
GetSectionResponseSchema,
|
|
19
|
+
CreateSessionRequestSchema,
|
|
20
|
+
CreateSessionResponseSchema,
|
|
21
|
+
SubmitResultsRequestSchema,
|
|
22
|
+
SubmitResultsResponseSchema,
|
|
23
|
+
EndSessionRequestSchema,
|
|
24
|
+
EndSessionResponseSchema,
|
|
25
|
+
EndSectionRequestSchema,
|
|
26
|
+
EndSectionResponseSchema,
|
|
27
|
+
ErrorResponseSchema,
|
|
28
|
+
OutcomeVariableTypeSchema,
|
|
29
|
+
OutcomeCardinalitySchema,
|
|
30
|
+
AssessmentResultTypeSchema,
|
|
31
|
+
} from "./shared";
|
|
32
|
+
import { CatV1P0RestBindingOperations } from "./cat_v1p0_restbinding_operations_schema";
|
|
33
|
+
|
|
34
|
+
export namespace CatV1_0 {
|
|
35
|
+
export namespace Schemas {
|
|
36
|
+
// Request schemas
|
|
37
|
+
export const CreateSectionRequest = CreateSectionRequestSchema;
|
|
38
|
+
export const GetSectionRequest = GetSectionRequestSchema;
|
|
39
|
+
export const CreateSessionRequest = CreateSessionRequestSchema;
|
|
40
|
+
export const SubmitResultsRequest = SubmitResultsRequestSchema;
|
|
41
|
+
export const EndSessionRequest = EndSessionRequestSchema;
|
|
42
|
+
export const EndSectionRequest = EndSectionRequestSchema;
|
|
43
|
+
|
|
44
|
+
// Response schemas
|
|
45
|
+
export const CreateSectionResponse = CreateSectionResponseSchema;
|
|
46
|
+
export const GetSectionResponse = GetSectionResponseSchema;
|
|
47
|
+
export const CreateSessionResponse = CreateSessionResponseSchema;
|
|
48
|
+
export const SubmitResultsResponse = SubmitResultsResponseSchema;
|
|
49
|
+
export const EndSessionResponse = EndSessionResponseSchema;
|
|
50
|
+
export const EndSectionResponse = EndSectionResponseSchema;
|
|
51
|
+
|
|
52
|
+
// Data type schemas
|
|
53
|
+
export const OutcomeVariable = OutcomeVariableSchema;
|
|
54
|
+
export const ResponseVariable = ResponseVariableSchema;
|
|
55
|
+
export const ItemRef = ItemRefSchema;
|
|
56
|
+
export const CatConstraint = CatConstraintSchema;
|
|
57
|
+
export const ItemPool = ItemPoolSchema;
|
|
58
|
+
export const SectionData = SectionDataSchema;
|
|
59
|
+
export const ItemStage = ItemStageSchema;
|
|
60
|
+
export const AssessmentResult = AssessmentResultSchema;
|
|
61
|
+
export const CatEngineResultReport = CatEngineResultReportSchema;
|
|
62
|
+
export const SessionInfo = SessionInfoSchema;
|
|
63
|
+
export const ErrorResponse = ErrorResponseSchema;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export namespace Shared {
|
|
67
|
+
export const Uuid = UuidSchema;
|
|
68
|
+
export const DateTime = DateTimeSchema;
|
|
69
|
+
export const ExtensionEnum = ExtensionEnumSchema;
|
|
70
|
+
export const OutcomeVariableType = OutcomeVariableTypeSchema;
|
|
71
|
+
export const OutcomeCardinality = OutcomeCardinalitySchema;
|
|
72
|
+
export const AssessmentResultType = AssessmentResultTypeSchema;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export namespace RestBinding {
|
|
76
|
+
export const Operations = CatV1P0RestBindingOperations;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type CatV1_0Schemas = typeof CatV1_0.Schemas;
|
|
81
|
+
|
|
82
|
+
export const Cat10DerivedZodTemplates = {
|
|
83
|
+
description: "CAT v1.0 Zod schemas derived from official 1EdTech CAT Specification",
|
|
84
|
+
specLinks: {
|
|
85
|
+
main: "https://www.imsglobal.org/spec/cat/v1p0/impl/",
|
|
86
|
+
errata: "https://www.imsglobal.org/spec/cat/v1p0/errata/",
|
|
87
|
+
},
|
|
88
|
+
scope: "Computer Adaptive Testing (CAT) REST API for item selection and delivery delegation",
|
|
89
|
+
coreEntities: [
|
|
90
|
+
"SectionData - Adaptive section configuration and item pool",
|
|
91
|
+
"ItemStage - Set of items to present to candidate",
|
|
92
|
+
"AssessmentResult - Candidate responses and item processing results",
|
|
93
|
+
"CatEngineResultReport - CAT engine scoring and recommendations",
|
|
94
|
+
"SessionInfo - Session state and context",
|
|
95
|
+
],
|
|
96
|
+
restOperations: [
|
|
97
|
+
"POST /sections - Create adaptive section",
|
|
98
|
+
"GET /sections/:id - Retrieve section configuration",
|
|
99
|
+
"POST /sessions - Create new session",
|
|
100
|
+
"POST /sessions/:id/results - Submit responses and get next items",
|
|
101
|
+
"POST /sessions/:id/end - Terminate session",
|
|
102
|
+
"POST /sections/:id/end - Close section",
|
|
103
|
+
],
|
|
104
|
+
designNotes: [
|
|
105
|
+
"Strict validation (.strict()) enforces exact schema conformance with specification",
|
|
106
|
+
"Extensible enums support vendor-specific values via ext:* pattern",
|
|
107
|
+
"UUID validators enforce RFC4122 v1-v5 format compliance",
|
|
108
|
+
"DateTime validators enforce ISO8601 format with optional timezone",
|
|
109
|
+
"All request/response payloads are JSON objects (no XML)",
|
|
110
|
+
"CAT engine treated as black box - input/output contracts standardized, internal algorithms not",
|
|
111
|
+
"Support for custom parameters allows CAT engines to require engine-specific configuration",
|
|
112
|
+
],
|
|
113
|
+
knownLimitations: [
|
|
114
|
+
"This version focuses on core 6 operations - may not cover all CAT engine extensions",
|
|
115
|
+
"Custom parameters are typed as z.record(z.string(), z.unknown()) - consider stricter validation for specific CAT engines",
|
|
116
|
+
"Item metadata format is flexible (z.record) - specific metadata types not yet standardized",
|
|
117
|
+
],
|
|
118
|
+
futureEnhancements: [
|
|
119
|
+
"Define standardized CustomParameters interfaces for common CAT engines",
|
|
120
|
+
"Add ItemMetadata schema for QTI metadata bindings",
|
|
121
|
+
"Support for QTI Usage Data (Item Statistics) vocabulary",
|
|
122
|
+
"Support for CSM (Curriculum Standards Mapping) vocabulary",
|
|
123
|
+
],
|
|
124
|
+
};
|