@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.
Files changed (187) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/.turbo/turbo-format.log +6 -0
  3. package/.turbo/turbo-lint.log +4 -0
  4. package/.turbo/turbo-test.log +196 -0
  5. package/.turbo/turbo-typecheck.log +2 -0
  6. package/README.md +52 -0
  7. package/caliper-v1_2-zod-templates.md +123 -0
  8. package/case-v1_1-zod-templates.md +290 -0
  9. package/cat-v1_0-zod-templates.md +73 -0
  10. package/cc-v1_3-zod-templates.md +531 -0
  11. package/cc-v1_4-zod-templates.md +247 -0
  12. package/clr-v2_0-zod-templates.md +117 -0
  13. package/cmi5-v1_0-zod-templates.md +9 -0
  14. package/lti-zod-templates.md +11 -0
  15. package/oneroster-v1_2-zod-templates.md +76 -0
  16. package/open-badges-v3_0-zod-templates.md +66 -0
  17. package/package.json +42 -0
  18. package/qti-v2_1-zod-templates.md +45 -0
  19. package/qti-v2_2-zod-templates.md +32 -0
  20. package/qti-v3_0_1-zod-templates.md +421 -0
  21. package/src/adapter.ts +83 -0
  22. package/src/caliper/v1_2/caliper_v1p2_bootcamp_schema.ts +781 -0
  23. package/src/caliper/v1_2/index.ts +37 -0
  24. package/src/caliper/v1_2/shared.ts +122 -0
  25. package/src/caliper/v1_2/textual_requirements.ts +219 -0
  26. package/src/case/v1_1/case_v1p1_cfassociation_jsonschema1.ts +1 -0
  27. package/src/case/v1_1/case_v1p1_cfassociationgrouping_jsonschema1.ts +1 -0
  28. package/src/case/v1_1/case_v1p1_cfassociationset_jsonschema1.ts +1 -0
  29. package/src/case/v1_1/case_v1p1_cfconceptset_jsonschema1.ts +1 -0
  30. package/src/case/v1_1/case_v1p1_cfdocument_jsonschema1.ts +1 -0
  31. package/src/case/v1_1/case_v1p1_cfdocumentset_jsonschema1.ts +1 -0
  32. package/src/case/v1_1/case_v1p1_cfitem_jsonschema1.ts +1 -0
  33. package/src/case/v1_1/case_v1p1_cfitemtypeset_jsonschema1.ts +1 -0
  34. package/src/case/v1_1/case_v1p1_cflicense_jsonschema1.ts +1 -0
  35. package/src/case/v1_1/case_v1p1_cfpackage_jsonschema1.ts +1 -0
  36. package/src/case/v1_1/case_v1p1_cfrubric_jsonschema1.ts +1 -0
  37. package/src/case/v1_1/case_v1p1_cfsubjectset_jsonschema1.ts +1 -0
  38. package/src/case/v1_1/case_v1p1_imsx_statusinfo_jsonschema1.ts +1 -0
  39. package/src/case/v1_1/case_v1p1_openapi3_restbinding_schema.ts +113 -0
  40. package/src/case/v1_1/index.ts +95 -0
  41. package/src/case/v1_1/shared.ts +384 -0
  42. package/src/cat/v1_0/cat_v1p0_restbinding_operations_schema.ts +75 -0
  43. package/src/cat/v1_0/index.ts +124 -0
  44. package/src/cat/v1_0/shared.ts +345 -0
  45. package/src/clr/v2_0/clr_v2p0_achievementcredential_schema.ts +16 -0
  46. package/src/clr/v2_0/clr_v2p0_clrcredential_schema.ts +9 -0
  47. package/src/clr/v2_0/clr_v2p0_endorsementcredential_schema.ts +11 -0
  48. package/src/clr/v2_0/clr_v2p0_getclrcredentialsresponse_schema.ts +1 -0
  49. package/src/clr/v2_0/clr_v2p0_imsx_statusinfo_schema.ts +8 -0
  50. package/src/clr/v2_0/clr_v2p0_profile_schema.ts +9 -0
  51. package/src/clr/v2_0/index.ts +22 -0
  52. package/src/clr/v2_0/shared.ts +206 -0
  53. package/src/cmi5/index.ts +3 -0
  54. package/src/cmi5/v1_0/index.ts +134 -0
  55. package/src/common-cartridge/v1_3/ccv1p3_imsccauth_v1p3.ts +26 -0
  56. package/src/common-cartridge/v1_3/ccv1p3_imscp_v1p2_v1p0.ts +352 -0
  57. package/src/common-cartridge/v1_3/ccv1p3_imscsmd_v1p0.ts +35 -0
  58. package/src/common-cartridge/v1_3/ccv1p3_imsdt_v1p3.ts +33 -0
  59. package/src/common-cartridge/v1_3/ccv1p3_imswl_v1p3.ts +23 -0
  60. package/src/common-cartridge/v1_3/ccv1p3_lomccltilink_v1p0.ts +14 -0
  61. package/src/common-cartridge/v1_3/ccv1p3_lommanifest_v1p0.ts +14 -0
  62. package/src/common-cartridge/v1_3/ccv1p3_lomresource_v1p0.ts +14 -0
  63. package/src/common-cartridge/v1_3/ccv1p3_qtiasiv1p2p1_v1p0.ts +964 -0
  64. package/src/common-cartridge/v1_3/index.ts +41 -0
  65. package/src/common-cartridge/v1_3/lom-internal.ts +396 -0
  66. package/src/common-cartridge/v1_3/shared.ts +68 -0
  67. package/src/common-cartridge/v1_4/core/ccv1p4_imscp_v1p2_v1p0.ts +360 -0
  68. package/src/common-cartridge/v1_4/core/ccv1p4_lommanifest_v1p0.ts +14 -0
  69. package/src/common-cartridge/v1_4/core/ccv1p4_lomresource_v1p0.ts +14 -0
  70. package/src/common-cartridge/v1_4/extension/cc_extresource_assignmentv1p0_v1p0.ts +61 -0
  71. package/src/common-cartridge/v1_4/extension/ccv1p4_cpextensionv1p2_v1p0.ts +20 -0
  72. package/src/common-cartridge/v1_4/extension/ims_openvideov1p0_v1p0.ts +325 -0
  73. package/src/common-cartridge/v1_4/index.ts +104 -0
  74. package/src/common-cartridge/v1_4/k12/ccv1p4_imscp_v1p2_v1p0.ts +19 -0
  75. package/src/common-cartridge/v1_4/k12/ccv1p4_imscp_v1p2_v1p0_thin.ts +17 -0
  76. package/src/common-cartridge/v1_4/k12/ccv1p4_lommanifest_v1p0.ts +14 -0
  77. package/src/common-cartridge/v1_4/k12/ccv1p4_lomresource_v1p0.ts +14 -0
  78. package/src/common-cartridge/v1_4/lom-internal.ts +476 -0
  79. package/src/common-cartridge/v1_4/shared/ccv1p4_imsccauth_v1p4.ts +26 -0
  80. package/src/common-cartridge/v1_4/shared/ccv1p4_imscsmd_v1p1.ts +36 -0
  81. package/src/common-cartridge/v1_4/shared/ccv1p4_imsdt_v1p4.ts +33 -0
  82. package/src/common-cartridge/v1_4/shared/ccv1p4_imslticc_v1p4.ts +45 -0
  83. package/src/common-cartridge/v1_4/shared/ccv1p4_imswl_v1p4.ts +23 -0
  84. package/src/common-cartridge/v1_4/shared/ccv1p4_lomccltilink_v1p0.ts +14 -0
  85. package/src/common-cartridge/v1_4/shared/ccv1p4_qtiasiv1p2p1_v1p0.ts +964 -0
  86. package/src/common-cartridge/v1_4/shared/imsbasiclti_v1p0p1.ts +24 -0
  87. package/src/common-cartridge/v1_4/shared/imslticm_v1p0.ts +23 -0
  88. package/src/common-cartridge/v1_4/shared/imslticp_v1p0.ts +57 -0
  89. package/src/common-cartridge/v1_4/shared/lineitem_v1p0.ts +35 -0
  90. package/src/common-cartridge/v1_4/shared/resourcea11ymetadata-20210915.ts +110 -0
  91. package/src/common-cartridge/v1_4/shared.ts +68 -0
  92. package/src/common-cartridge/v1_4/thin/ccv1p4_imscp_v1p2_v1p0.ts +243 -0
  93. package/src/common-cartridge/v1_4/thin/ccv1p4_lommanifest_v1p0.ts +14 -0
  94. package/src/common-cartridge/v1_4/thin/ccv1p4_lomresource_v1p0.ts +14 -0
  95. package/src/common-cartridge/v1_4/vdex/imsmd_loose_v1p3p2.ts +13 -0
  96. package/src/common-cartridge/v1_4/vdex/imsvdex_v1p0.ts +124 -0
  97. package/src/config.ts +121 -0
  98. package/src/index.ts +32 -0
  99. package/src/lti/ags/v2_0/index.ts +97 -0
  100. package/src/lti/deep-linking/v2_0/index.ts +100 -0
  101. package/src/lti/index.ts +26 -0
  102. package/src/lti/nrps/v2_0/index.ts +69 -0
  103. package/src/lti/proctoring/v1_0/index.ts +131 -0
  104. package/src/lti/shared.ts +66 -0
  105. package/src/lti/v1_3/index.ts +84 -0
  106. package/src/oneroster/v1_2/index.ts +156 -0
  107. package/src/oneroster/v1_2/or_v1p2_csv_binding_schema.ts +427 -0
  108. package/src/oneroster/v1_2/or_v1p2_gradebook_restbinding_schema.ts +120 -0
  109. package/src/oneroster/v1_2/or_v1p2_gradebook_service_schema.ts +243 -0
  110. package/src/oneroster/v1_2/or_v1p2_resource_restbinding_schema.ts +24 -0
  111. package/src/oneroster/v1_2/or_v1p2_resource_service_schema.ts +47 -0
  112. package/src/oneroster/v1_2/or_v1p2_rostering_restbinding_schema.ts +84 -0
  113. package/src/oneroster/v1_2/or_v1p2_rostering_service_schema.ts +288 -0
  114. package/src/oneroster/v1_2/shared.ts +90 -0
  115. package/src/open-badges/v3_0/index.ts +20 -0
  116. package/src/open-badges/v3_0/ob_v3p0_achievementcredential_schema.ts +17 -0
  117. package/src/open-badges/v3_0/ob_v3p0_endorsementcredential_schema.ts +11 -0
  118. package/src/open-badges/v3_0/ob_v3p0_getopenbadgecredentialsresponse_schema.ts +1 -0
  119. package/src/open-badges/v3_0/ob_v3p0_imsx_statusinfo_schema.ts +8 -0
  120. package/src/open-badges/v3_0/ob_v3p0_profile_schema.ts +9 -0
  121. package/src/open-badges/v3_0/shared.ts +458 -0
  122. package/src/qti/v2-internal.ts +1683 -0
  123. package/src/qti/v2_1/apipv1p0_qtiextv2p1_v1p0.ts +3 -0
  124. package/src/qti/v2_1/imsqti_metadata_v2p1.ts +3 -0
  125. package/src/qti/v2_1/imsqti_result_v2p1.ts +3 -0
  126. package/src/qti/v2_1/imsqti_usagedata_v2p1.ts +3 -0
  127. package/src/qti/v2_1/imsqti_v2p1p2.ts +71 -0
  128. package/src/qti/v2_1/index.ts +53 -0
  129. package/src/qti/v2_1/qtiv2p1_imscpv1p2_v1p0.ts +3 -0
  130. package/src/qti/v2_1/schemas.ts +15 -0
  131. package/src/qti/v2_1/shared.ts +3 -0
  132. package/src/qti/v2_2/apipv1p0_qtiextv2p2_v1p0p1.ts +3 -0
  133. package/src/qti/v2_2/imsqti_metadata_v2p2.ts +3 -0
  134. package/src/qti/v2_2/imsqti_result_v2p2.ts +3 -0
  135. package/src/qti/v2_2/imsqti_usagedata_v2p2.ts +3 -0
  136. package/src/qti/v2_2/imsqti_v2p2p4.ts +76 -0
  137. package/src/qti/v2_2/imsqtiv2p2p4_html5_v1p0.ts +8 -0
  138. package/src/qti/v2_2/index.ts +59 -0
  139. package/src/qti/v2_2/qtiv2p2_csm_v2p2.ts +4 -0
  140. package/src/qti/v2_2/qtiv2p2_imscpv1p2_v1p0.ts +3 -0
  141. package/src/qti/v2_2/schemas.ts +19 -0
  142. package/src/qti/v2_2/shared.ts +3 -0
  143. package/src/qti/v3_0_1/assessment-internal.ts +1509 -0
  144. package/src/qti/v3_0_1/imsqti_asiv3p0p1_v1p0.ts +57 -0
  145. package/src/qti/v3_0_1/imsqti_itemv3p0p1_v1p0.ts +60 -0
  146. package/src/qti/v3_0_1/imsqti_metadatav3p0_v1p0.ts +73 -0
  147. package/src/qti/v3_0_1/imsqti_outcomev3p0p1_v1p0.ts +11 -0
  148. package/src/qti/v3_0_1/imsqti_responseprocessingv3p0p1_v1p0.ts +17 -0
  149. package/src/qti/v3_0_1/imsqti_resultv3p0_v1p0.ts +222 -0
  150. package/src/qti/v3_0_1/imsqti_sectionv3p0p1_v1p0.ts +15 -0
  151. package/src/qti/v3_0_1/imsqti_stimulusv3p0p1_v1p0.ts +15 -0
  152. package/src/qti/v3_0_1/imsqti_testv3p0p1_v1p0.ts +49 -0
  153. package/src/qti/v3_0_1/imsqti_usagedatav3p0_v1p0.ts +77 -0
  154. package/src/qti/v3_0_1/imsqtiv3p0_afa3p0pnp_v1p0.ts +269 -0
  155. package/src/qti/v3_0_1/index.ts +50 -0
  156. package/src/qti/v3_0_1/processing-internal.ts +667 -0
  157. package/src/qti/v3_0_1/shared.ts +146 -0
  158. package/src/qti/v3_0_1/variables-internal.ts +274 -0
  159. package/src/shared/imsx-status.ts +49 -0
  160. package/src/summary.ts +70 -0
  161. package/src/vc-data-model/v2_0/index.ts +27 -0
  162. package/src/vc-data-model/v2_0/shared.ts +206 -0
  163. package/src/xapi/index.ts +12 -0
  164. package/src/xapi/shared.ts +444 -0
  165. package/src/xapi/v1_0_3/index.ts +169 -0
  166. package/src/xapi/v2_0/index.ts +256 -0
  167. package/test/caliper-v1_2.test.ts +270 -0
  168. package/test/case-v1_1.test.ts +147 -0
  169. package/test/cat-v1_0.test.ts +338 -0
  170. package/test/cc-v1_4.test.ts +239 -0
  171. package/test/clr-v2_0.test.ts +225 -0
  172. package/test/cmi5-v1_0.test.ts +196 -0
  173. package/test/contracts.test.ts +125 -0
  174. package/test/fixtures/cmi5/extended-cmi5.xml +72 -0
  175. package/test/fixtures/cmi5/simple-cmi5.xml +26 -0
  176. package/test/lti.test.ts +146 -0
  177. package/test/oneroster-v1_2.test.ts +234 -0
  178. package/test/open-badges-v3_0.test.ts +144 -0
  179. package/test/qti-v2_1.test.ts +146 -0
  180. package/test/qti-v2_2.test.ts +154 -0
  181. package/test/qti-v3_0_1.test.ts +576 -0
  182. package/test/schema-examples.test.ts +101 -0
  183. package/test/vc-data-model-v2_0.test.ts +63 -0
  184. package/test/xapi.test.ts +384 -0
  185. package/tsconfig.json +7 -0
  186. package/vc-data-model-v2_0-zod-templates.md +43 -0
  187. package/xapi-zod-templates.md +95 -0
@@ -0,0 +1,781 @@
1
+ import { z } from "zod";
2
+
3
+ import { CALIPER_BOOTCAMP_ONLY_EVENT_TYPES, CALIPER_TEXTUAL_EVENT_RULES } from "./textual_requirements";
4
+ import {
5
+ CALIPER_CONTEXT_V1P1,
6
+ CALIPER_CONTEXT_V1P2,
7
+ CaliperContextStringSchema,
8
+ CaliperDateTimeSchema,
9
+ CaliperEventIdSchema,
10
+ CaliperExtensionsSchema,
11
+ CaliperIriSchema,
12
+ CaliperNestedContextSchema,
13
+ createCaliperEntitySchema,
14
+ createCaliperEventSchema,
15
+ getReferenceType,
16
+ } from "./shared";
17
+
18
+ export const CALIPER_ACTIONS = [
19
+ "Abandoned",
20
+ "Accepted",
21
+ "Activated",
22
+ "Added",
23
+ "Archived",
24
+ "Attached",
25
+ "Bookmarked",
26
+ "ChangedResolution",
27
+ "ChangedSize",
28
+ "ChangedSpeed",
29
+ "ChangedVolume",
30
+ "Classified",
31
+ "ClosedPopout",
32
+ "Commented",
33
+ "Completed",
34
+ "Copied",
35
+ "Created",
36
+ "Deactivated",
37
+ "Declined",
38
+ "Deleted",
39
+ "Described",
40
+ "DisabledClosedCaptioning",
41
+ "Disliked",
42
+ "Downloaded",
43
+ "EnabledClosedCaptioning",
44
+ "Ended",
45
+ "EnteredFullScreen",
46
+ "ExitedFullScreen",
47
+ "ForwardedTo",
48
+ "Graded",
49
+ "Hid",
50
+ "Highlighted",
51
+ "Identified",
52
+ "JumpedTo",
53
+ "Launched",
54
+ "Liked",
55
+ "Linked",
56
+ "LoggedIn",
57
+ "LoggedOut",
58
+ "MarkedAsRead",
59
+ "MarkedAsUnread",
60
+ "Modified",
61
+ "Muted",
62
+ "NavigatedTo",
63
+ "OpenedPopout",
64
+ "OptedIn",
65
+ "OptedOut",
66
+ "Paused",
67
+ "Posted",
68
+ "Printed",
69
+ "Published",
70
+ "Questioned",
71
+ "Ranked",
72
+ "Recommended",
73
+ "Removed",
74
+ "Reset",
75
+ "Restarted",
76
+ "Restored",
77
+ "Resumed",
78
+ "Retrieved",
79
+ "Returned",
80
+ "Reviewed",
81
+ "Rewound",
82
+ "Saved",
83
+ "Searched",
84
+ "Sent",
85
+ "Shared",
86
+ "Showed",
87
+ "Skipped",
88
+ "Started",
89
+ "Submitted",
90
+ "Subscribed",
91
+ "Tagged",
92
+ "TimedOut",
93
+ "Unmuted",
94
+ "Unpublished",
95
+ "Unsubscribed",
96
+ "Uploaded",
97
+ "Used",
98
+ "Viewed",
99
+ ] as const;
100
+
101
+ export const CALIPER_METRICS = [
102
+ "AssessmentsPassed",
103
+ "AssessmentsSubmitted",
104
+ "MinutesOnTask",
105
+ "SkillsMastered",
106
+ "StandardsMastered",
107
+ "UnitsCompleted",
108
+ "UnitsPassed",
109
+ "WordsRead",
110
+ ] as const;
111
+
112
+ export const CALIPER_PROFILES = [
113
+ "AnnotationProfile",
114
+ "AssessmentProfile",
115
+ "AssignableProfile",
116
+ "FeedbackProfile",
117
+ "ForumProfile",
118
+ "GeneralProfile",
119
+ "GradingProfile",
120
+ "MediaProfile",
121
+ "ReadingProfile",
122
+ "ResourceManagementProfile",
123
+ "SearchProfile",
124
+ "SessionProfile",
125
+ "SurveyProfile",
126
+ "ToolLaunchProfile",
127
+ "ToolUseProfile",
128
+ ] as const;
129
+
130
+ export const CALIPER_STATUSES = ["Active", "Inactive"] as const;
131
+
132
+ export const ActionSchema = z.enum(CALIPER_ACTIONS);
133
+ export const MetricSchema = z.enum(CALIPER_METRICS);
134
+ export const ProfileSchema = z.enum(CALIPER_PROFILES);
135
+ export const StatusSchema = z.enum(CALIPER_STATUSES);
136
+
137
+ const ActionValueSchema = z.union([ActionSchema, z.literal("MarkedAsUnRead")]);
138
+
139
+ const normalizeAction = (action: string): string => (action === "MarkedAsUnRead" ? "MarkedAsUnread" : action);
140
+
141
+ const ENTITY_SUPERTYPE_MEMBERS: Record<string, readonly string[]> = {
142
+ Agent: ["Agent", "Organization", "CourseOffering", "CourseSection", "Group", "Person", "SoftwareApplication"],
143
+ Annotation: ["Annotation", "BookmarkAnnotation", "HighlightAnnotation", "SharedAnnotation", "TagAnnotation"],
144
+ DigitalResource: [
145
+ "DigitalResource",
146
+ "AssignableDigitalResource",
147
+ "AssessmentItem",
148
+ "Chapter",
149
+ "Document",
150
+ "Frame",
151
+ "LtiLink",
152
+ "MediaLocation",
153
+ "MediaObject",
154
+ "AudioObject",
155
+ "ImageObject",
156
+ "VideoObject",
157
+ "Message",
158
+ "Page",
159
+ "Question",
160
+ "DateTimeQuestion",
161
+ "MultiselectQuestion",
162
+ "OpenEndedQuestion",
163
+ "RatingScaleQuestion",
164
+ "QuestionnaireItem",
165
+ "Reading",
166
+ "SurveyInvitation",
167
+ "WebPage",
168
+ "epubChapter",
169
+ "epubPart",
170
+ "epubSubChapter",
171
+ "epubVolume",
172
+ ],
173
+ MediaObject: ["MediaObject", "AudioObject", "ImageObject", "VideoObject"],
174
+ Response: [
175
+ "Response",
176
+ "DateTimeResponse",
177
+ "FillinBlankResponse",
178
+ "MultiselectResponse",
179
+ "MultipleChoiceResponse",
180
+ "MultipleResponseResponse",
181
+ "OpenEndedResponse",
182
+ "RatingScaleResponse",
183
+ "SelectTextResponse",
184
+ "TrueFalseResponse",
185
+ ],
186
+ };
187
+
188
+ const expandAllowedTypes = (types: readonly string[]) => {
189
+ const expanded = new Set<string>();
190
+ for (const type of types) {
191
+ expanded.add(type);
192
+ const members = ENTITY_SUPERTYPE_MEMBERS[type];
193
+ if (members) {
194
+ for (const member of members) {
195
+ expanded.add(member);
196
+ }
197
+ }
198
+ }
199
+ return expanded;
200
+ };
201
+
202
+ const addReferenceTypeIssue = (
203
+ value: unknown,
204
+ allowedTypes: Set<string>,
205
+ key: "actor" | "object" | "generated" | "target",
206
+ ctx: z.RefinementCtx,
207
+ ) => {
208
+ if (typeof value === "string") {
209
+ return;
210
+ }
211
+
212
+ const refType = getReferenceType(value);
213
+ if (!refType) {
214
+ return;
215
+ }
216
+
217
+ if (!allowedTypes.has(refType)) {
218
+ ctx.addIssue({
219
+ code: "custom",
220
+ path: [key, "type"],
221
+ message: `Unsupported ${key} type "${refType}"`,
222
+ });
223
+ }
224
+ };
225
+
226
+ const createCaliperEventWithRules = <TType extends string>(eventType: TType) => {
227
+ const baseSchema = createCaliperEventSchema(eventType, ActionValueSchema);
228
+ const textualRule = CALIPER_TEXTUAL_EVENT_RULES[eventType];
229
+
230
+ if (!textualRule) {
231
+ return baseSchema;
232
+ }
233
+
234
+ const allowedActionValues = new Set<string>(
235
+ [...textualRule.supportedActions, ...textualRule.deprecatedActions].map((action) => normalizeAction(action)),
236
+ );
237
+ const allowedActorTypes = expandAllowedTypes(textualRule.supportedActors);
238
+ const allowedObjectTypes = expandAllowedTypes(textualRule.supportedObjects);
239
+ const allowedGeneratedTypes = expandAllowedTypes(textualRule.supportedGeneratedEntities);
240
+ const allowedTargetTypes = expandAllowedTypes(textualRule.supportedTargetEntities);
241
+
242
+ return baseSchema.superRefine((event, ctx) => {
243
+ const action = normalizeAction(event.action);
244
+ if (!allowedActionValues.has(action)) {
245
+ ctx.addIssue({
246
+ code: "custom",
247
+ path: ["action"],
248
+ message: `Action "${event.action}" is not supported for ${eventType}`,
249
+ });
250
+ }
251
+
252
+ addReferenceTypeIssue(event.actor, allowedActorTypes, "actor", ctx);
253
+ addReferenceTypeIssue(event.object, allowedObjectTypes, "object", ctx);
254
+
255
+ if (event.generated !== undefined) {
256
+ if (allowedGeneratedTypes.size === 0) {
257
+ ctx.addIssue({
258
+ code: "custom",
259
+ path: ["generated"],
260
+ message: `${eventType} does not define a generated entity`,
261
+ });
262
+ } else {
263
+ addReferenceTypeIssue(event.generated, allowedGeneratedTypes, "generated", ctx);
264
+ }
265
+ }
266
+
267
+ if (event.target !== undefined) {
268
+ if (allowedTargetTypes.size === 0) {
269
+ ctx.addIssue({
270
+ code: "custom",
271
+ path: ["target"],
272
+ message: `${eventType} does not define a target entity`,
273
+ });
274
+ } else {
275
+ addReferenceTypeIssue(event.target, allowedTargetTypes, "target", ctx);
276
+ }
277
+ }
278
+
279
+ if (event.profile !== undefined && event.profile !== textualRule.profile) {
280
+ ctx.addIssue({
281
+ code: "custom",
282
+ path: ["profile"],
283
+ message: `Expected profile "${textualRule.profile}" for ${eventType}`,
284
+ });
285
+ }
286
+ });
287
+ };
288
+
289
+ export const CaliperTypeDefinitionsSchema = z
290
+ .object({
291
+ extensions: CaliperExtensionsSchema.optional(),
292
+ })
293
+ .passthrough();
294
+
295
+ export const RoleSchema = z.object({}).passthrough();
296
+ export const SelectorSchema = z.object({}).passthrough();
297
+
298
+ export const TextPositionSelectorSchema = z
299
+ .object({
300
+ type: z.literal("TextPositionSelector"),
301
+ start: z.number().int().nonnegative(),
302
+ end: z.number().int().nonnegative(),
303
+ "@context": CaliperNestedContextSchema.optional(),
304
+ extensions: CaliperExtensionsSchema.optional(),
305
+ })
306
+ .strict();
307
+
308
+ export const CaliperDataSchema = z
309
+ .object({
310
+ id: CaliperEventIdSchema.optional(),
311
+ context: z
312
+ .union([CaliperContextStringSchema, z.array(z.string()).min(1), z.record(z.string(), z.unknown())])
313
+ .optional(),
314
+ })
315
+ .passthrough();
316
+
317
+ export const SystemIdentifierSchema = z
318
+ .object({
319
+ type: z.literal("SystemIdentifier"),
320
+ identifier: z.string(),
321
+ identifierType: z.literal("LtiUserId"),
322
+ source: z.object({}).passthrough().optional(),
323
+ "@context": CaliperNestedContextSchema.optional(),
324
+ extensions: CaliperExtensionsSchema.optional(),
325
+ })
326
+ .strict();
327
+
328
+ export const AgentSchema = createCaliperEntitySchema("Agent");
329
+ export const AggregateMeasureSchema = createCaliperEntitySchema("AggregateMeasure");
330
+ export const AggregateMeasureCollectionSchema = createCaliperEntitySchema("AggregateMeasureCollection");
331
+ export const AnnotationSchema = createCaliperEntitySchema("Annotation");
332
+ export const AssessmentSchema = createCaliperEntitySchema("Assessment");
333
+ export const AssessmentItemSchema = createCaliperEntitySchema("AssessmentItem");
334
+ export const AssignableDigitalResourceSchema = createCaliperEntitySchema("AssignableDigitalResource");
335
+ export const AttemptSchema = createCaliperEntitySchema("Attempt");
336
+ export const AudioObjectSchema = createCaliperEntitySchema("AudioObject");
337
+ export const ChapterSchema = createCaliperEntitySchema("Chapter");
338
+ export const CollectionSchema = createCaliperEntitySchema("Collection");
339
+ export const CommentSchema = createCaliperEntitySchema("Comment");
340
+ export const CourseOfferingSchema = createCaliperEntitySchema("CourseOffering");
341
+ export const CourseSectionSchema = createCaliperEntitySchema("CourseSection");
342
+ export const DateTimeQuestionSchema = createCaliperEntitySchema("DateTimeQuestion");
343
+ export const DateTimeResponseSchema = createCaliperEntitySchema("DateTimeResponse");
344
+ export const DigitalResourceSchema = createCaliperEntitySchema("DigitalResource");
345
+ export const DigitalResourceCollectionSchema = createCaliperEntitySchema("DigitalResourceCollection");
346
+ export const DocumentSchema = createCaliperEntitySchema("Document");
347
+ export const EntitySchema = createCaliperEntitySchema("Entity");
348
+ export const FillinBlankResponseSchema = createCaliperEntitySchema("FillinBlankResponse");
349
+ export const FrameSchema = createCaliperEntitySchema("Frame");
350
+ export const GroupSchema = createCaliperEntitySchema("Group");
351
+ export const ImageObjectSchema = createCaliperEntitySchema("ImageObject");
352
+ export const LearningObjectiveSchema = createCaliperEntitySchema("LearningObjective");
353
+ export const LikertScaleSchema = createCaliperEntitySchema("LikertScale");
354
+ export const LinkSchema = createCaliperEntitySchema("Link");
355
+ export const LtiLinkSchema = createCaliperEntitySchema("LtiLink");
356
+ export const LtiSessionSchema = createCaliperEntitySchema("LtiSession");
357
+ export const MediaLocationSchema = createCaliperEntitySchema("MediaLocation");
358
+ export const MediaObjectSchema = createCaliperEntitySchema("MediaObject");
359
+ export const MembershipSchema = createCaliperEntitySchema("Membership");
360
+ export const MessageSchema = createCaliperEntitySchema("Message");
361
+ export const MultipleChoiceResponseSchema = createCaliperEntitySchema("MultipleChoiceResponse");
362
+ export const MultipleResponseResponseSchema = createCaliperEntitySchema("MultipleResponseResponse");
363
+ export const MultiselectQuestionSchema = createCaliperEntitySchema("MultiselectQuestion");
364
+ export const MultiselectResponseSchema = createCaliperEntitySchema("MultiselectResponse");
365
+ export const MultiselectScaleSchema = createCaliperEntitySchema("MultiselectScale");
366
+ export const NumericScaleSchema = createCaliperEntitySchema("NumericScale");
367
+ export const OpenEndedQuestionSchema = createCaliperEntitySchema("OpenEndedQuestion");
368
+ export const OpenEndedResponseSchema = createCaliperEntitySchema("OpenEndedResponse");
369
+ export const OrganizationSchema = createCaliperEntitySchema("Organization");
370
+ export const PageSchema = createCaliperEntitySchema("Page");
371
+ export const PersonSchema = createCaliperEntitySchema("Person");
372
+ export const QuerySchema = createCaliperEntitySchema("Query");
373
+ export const QuestionSchema = createCaliperEntitySchema("Question");
374
+ export const QuestionnaireItemSchema = createCaliperEntitySchema("QuestionnaireItem");
375
+ export const RatingSchema = createCaliperEntitySchema("Rating");
376
+ export const RatingScaleQuestionSchema = createCaliperEntitySchema("RatingScaleQuestion");
377
+ export const RatingScaleResponseSchema = createCaliperEntitySchema("RatingScaleResponse");
378
+ export const ReadingSchema = createCaliperEntitySchema("Reading");
379
+ export const ResponseSchema = createCaliperEntitySchema("Response");
380
+ export const ResultSchema = createCaliperEntitySchema("Result");
381
+ export const ScaleSchema = createCaliperEntitySchema("Scale");
382
+ export const ScoreSchema = createCaliperEntitySchema("Score");
383
+ export const SearchResponseSchema = createCaliperEntitySchema("SearchResponse");
384
+ export const SelectTextResponseSchema = createCaliperEntitySchema("SelectTextResponse");
385
+ export const SessionSchema = createCaliperEntitySchema("Session");
386
+ export const SoftwareApplicationSchema = createCaliperEntitySchema("SoftwareApplication");
387
+ export const SurveySchema = createCaliperEntitySchema("Survey");
388
+ export const SurveyInvitationSchema = createCaliperEntitySchema("SurveyInvitation");
389
+ export const TrueFalseResponseSchema = createCaliperEntitySchema("TrueFalseResponse");
390
+ export const VideoObjectSchema = createCaliperEntitySchema("VideoObject");
391
+ export const WebPageSchema = createCaliperEntitySchema("WebPage");
392
+ export const EpubChapterSchema = createCaliperEntitySchema("epubChapter");
393
+ export const EpubPartSchema = createCaliperEntitySchema("epubPart");
394
+ export const EpubSubChapterSchema = createCaliperEntitySchema("epubSubChapter");
395
+ export const EpubVolumeSchema = createCaliperEntitySchema("epubVolume");
396
+ export const BookmarkAnnotationSchema = createCaliperEntitySchema("BookmarkAnnotation");
397
+ export const ForumSchema = createCaliperEntitySchema("Forum");
398
+ export const HighlightAnnotationSchema = createCaliperEntitySchema("HighlightAnnotation");
399
+ export const QuestionnaireSchema = createCaliperEntitySchema("Questionnaire");
400
+ export const SharedAnnotationSchema = createCaliperEntitySchema("SharedAnnotation");
401
+ export const TagAnnotationSchema = createCaliperEntitySchema("TagAnnotation");
402
+ export const ThreadSchema = createCaliperEntitySchema("Thread");
403
+
404
+ export const AnnotationEventSchema = createCaliperEventWithRules("AnnotationEvent");
405
+ export const AssessmentEventSchema = createCaliperEventWithRules("AssessmentEvent");
406
+ export const AssessmentItemEventSchema = createCaliperEventWithRules("AssessmentItemEvent");
407
+ export const AssignableEventSchema = createCaliperEventWithRules("AssignableEvent");
408
+ export const EventSchema = createCaliperEventWithRules("Event");
409
+ export const FeedbackEventSchema = createCaliperEventWithRules("FeedbackEvent");
410
+ export const ForumEventSchema = createCaliperEventWithRules("ForumEvent");
411
+ export const GradeEventSchema = createCaliperEventWithRules("GradeEvent");
412
+ export const MediaEventSchema = createCaliperEventWithRules("MediaEvent");
413
+ export const MessageEventSchema = createCaliperEventWithRules("MessageEvent");
414
+ export const NavigationEventSchema = createCaliperEventWithRules("NavigationEvent");
415
+ export const OutcomeEventSchema = createCaliperEventWithRules("OutcomeEvent");
416
+ export const QuestionnaireEventSchema = createCaliperEventWithRules("QuestionnaireEvent");
417
+ export const QuestionnaireItemEventSchema = createCaliperEventWithRules("QuestionnaireItemEvent");
418
+ export const ReadingEventSchema = createCaliperEventWithRules("ReadingEvent");
419
+ export const ResourceManagementEventSchema = createCaliperEventWithRules("ResourceManagementEvent");
420
+ export const SearchEventSchema = createCaliperEventWithRules("SearchEvent");
421
+ export const SessionEventSchema = createCaliperEventWithRules("SessionEvent");
422
+ export const SurveyEventSchema = createCaliperEventWithRules("SurveyEvent");
423
+ export const SurveyInvitationEventSchema = createCaliperEventWithRules("SurveyInvitationEvent");
424
+ export const ThreadEventSchema = createCaliperEventWithRules("ThreadEvent");
425
+ export const ToolLaunchEventSchema = createCaliperEventWithRules("ToolLaunchEvent");
426
+ export const ToolUseEventSchema = createCaliperEventWithRules("ToolUseEvent");
427
+ export const ViewEventSchema = createCaliperEventWithRules("ViewEvent");
428
+
429
+ export const CaliperEventDocumentSchema = z.union([
430
+ AnnotationEventSchema,
431
+ AssessmentEventSchema,
432
+ AssessmentItemEventSchema,
433
+ AssignableEventSchema,
434
+ EventSchema,
435
+ FeedbackEventSchema,
436
+ ForumEventSchema,
437
+ GradeEventSchema,
438
+ MediaEventSchema,
439
+ MessageEventSchema,
440
+ NavigationEventSchema,
441
+ OutcomeEventSchema,
442
+ QuestionnaireEventSchema,
443
+ QuestionnaireItemEventSchema,
444
+ ReadingEventSchema,
445
+ ResourceManagementEventSchema,
446
+ SearchEventSchema,
447
+ SessionEventSchema,
448
+ SurveyEventSchema,
449
+ SurveyInvitationEventSchema,
450
+ ThreadEventSchema,
451
+ ToolLaunchEventSchema,
452
+ ToolUseEventSchema,
453
+ ViewEventSchema,
454
+ ]);
455
+
456
+ export const CaliperEntityDocumentSchema = z.union([
457
+ AgentSchema,
458
+ AggregateMeasureSchema,
459
+ AggregateMeasureCollectionSchema,
460
+ AnnotationSchema,
461
+ AssessmentSchema,
462
+ AssessmentItemSchema,
463
+ AssignableDigitalResourceSchema,
464
+ AttemptSchema,
465
+ AudioObjectSchema,
466
+ BookmarkAnnotationSchema,
467
+ ChapterSchema,
468
+ CollectionSchema,
469
+ CommentSchema,
470
+ CourseOfferingSchema,
471
+ CourseSectionSchema,
472
+ DateTimeQuestionSchema,
473
+ DateTimeResponseSchema,
474
+ DigitalResourceSchema,
475
+ DigitalResourceCollectionSchema,
476
+ DocumentSchema,
477
+ EntitySchema,
478
+ FillinBlankResponseSchema,
479
+ ForumSchema,
480
+ FrameSchema,
481
+ GroupSchema,
482
+ HighlightAnnotationSchema,
483
+ ImageObjectSchema,
484
+ LearningObjectiveSchema,
485
+ LikertScaleSchema,
486
+ LinkSchema,
487
+ LtiLinkSchema,
488
+ LtiSessionSchema,
489
+ MediaLocationSchema,
490
+ MediaObjectSchema,
491
+ MembershipSchema,
492
+ MessageSchema,
493
+ MultipleChoiceResponseSchema,
494
+ MultipleResponseResponseSchema,
495
+ MultiselectQuestionSchema,
496
+ MultiselectResponseSchema,
497
+ MultiselectScaleSchema,
498
+ NumericScaleSchema,
499
+ OpenEndedQuestionSchema,
500
+ OpenEndedResponseSchema,
501
+ OrganizationSchema,
502
+ PageSchema,
503
+ PersonSchema,
504
+ QuerySchema,
505
+ QuestionSchema,
506
+ QuestionnaireSchema,
507
+ QuestionnaireItemSchema,
508
+ RatingSchema,
509
+ RatingScaleQuestionSchema,
510
+ RatingScaleResponseSchema,
511
+ ReadingSchema,
512
+ ResponseSchema,
513
+ ResultSchema,
514
+ ScaleSchema,
515
+ ScoreSchema,
516
+ SearchResponseSchema,
517
+ SelectTextResponseSchema,
518
+ SessionSchema,
519
+ SharedAnnotationSchema,
520
+ SoftwareApplicationSchema,
521
+ SurveySchema,
522
+ SurveyInvitationSchema,
523
+ TagAnnotationSchema,
524
+ ThreadSchema,
525
+ TrueFalseResponseSchema,
526
+ VideoObjectSchema,
527
+ WebPageSchema,
528
+ EpubChapterSchema,
529
+ EpubPartSchema,
530
+ EpubSubChapterSchema,
531
+ EpubVolumeSchema,
532
+ SystemIdentifierSchema,
533
+ TextPositionSelectorSchema,
534
+ ]);
535
+
536
+ export const CaliperEnvelopeDataItemSchema = z.union([CaliperEventDocumentSchema, CaliperEntityDocumentSchema]);
537
+
538
+ export const EnvelopeSchema = z
539
+ .object({
540
+ sensor: CaliperIriSchema,
541
+ sendTime: CaliperDateTimeSchema,
542
+ dataVersion: CaliperContextStringSchema,
543
+ data: z.array(CaliperEnvelopeDataItemSchema).min(1),
544
+ })
545
+ .strict();
546
+
547
+ export const CaliperV1P2JsonSchemaEntryPoints = {
548
+ Action: ActionSchema,
549
+ Agent: AgentSchema,
550
+ AggregateMeasure: AggregateMeasureSchema,
551
+ AggregateMeasureCollection: AggregateMeasureCollectionSchema,
552
+ Annotation: AnnotationSchema,
553
+ AnnotationEvent: AnnotationEventSchema,
554
+ Assessment: AssessmentSchema,
555
+ AssessmentEvent: AssessmentEventSchema,
556
+ AssessmentItem: AssessmentItemSchema,
557
+ AssessmentItemEvent: AssessmentItemEventSchema,
558
+ AssignableDigitalResource: AssignableDigitalResourceSchema,
559
+ AssignableEvent: AssignableEventSchema,
560
+ Attempt: AttemptSchema,
561
+ AudioObject: AudioObjectSchema,
562
+ BookmarkAnnotation: BookmarkAnnotationSchema,
563
+ CaliperData: CaliperDataSchema,
564
+ CaliperTypeDefinitions: CaliperTypeDefinitionsSchema,
565
+ Chapter: ChapterSchema,
566
+ Collection: CollectionSchema,
567
+ Comment: CommentSchema,
568
+ CourseOffering: CourseOfferingSchema,
569
+ CourseSection: CourseSectionSchema,
570
+ DateTimeQuestion: DateTimeQuestionSchema,
571
+ DateTimeResponse: DateTimeResponseSchema,
572
+ DigitalResource: DigitalResourceSchema,
573
+ DigitalResourceCollection: DigitalResourceCollectionSchema,
574
+ Document: DocumentSchema,
575
+ Entity: EntitySchema,
576
+ Envelope: EnvelopeSchema,
577
+ Event: EventSchema,
578
+ FeedbackEvent: FeedbackEventSchema,
579
+ FillinBlankResponse: FillinBlankResponseSchema,
580
+ Forum: ForumSchema,
581
+ ForumEvent: ForumEventSchema,
582
+ Frame: FrameSchema,
583
+ GradeEvent: GradeEventSchema,
584
+ Group: GroupSchema,
585
+ HighlightAnnotation: HighlightAnnotationSchema,
586
+ ImageObject: ImageObjectSchema,
587
+ LearningObjective: LearningObjectiveSchema,
588
+ LikertScale: LikertScaleSchema,
589
+ Link: LinkSchema,
590
+ LtiLink: LtiLinkSchema,
591
+ LtiSession: LtiSessionSchema,
592
+ MediaEvent: MediaEventSchema,
593
+ MediaLocation: MediaLocationSchema,
594
+ MediaObject: MediaObjectSchema,
595
+ Membership: MembershipSchema,
596
+ Message: MessageSchema,
597
+ MessageEvent: MessageEventSchema,
598
+ Metric: MetricSchema,
599
+ MultipleChoiceResponse: MultipleChoiceResponseSchema,
600
+ MultipleResponseResponse: MultipleResponseResponseSchema,
601
+ MultiselectQuestion: MultiselectQuestionSchema,
602
+ MultiselectResponse: MultiselectResponseSchema,
603
+ MultiselectScale: MultiselectScaleSchema,
604
+ NavigationEvent: NavigationEventSchema,
605
+ NumericScale: NumericScaleSchema,
606
+ OpenEndedQuestion: OpenEndedQuestionSchema,
607
+ OpenEndedResponse: OpenEndedResponseSchema,
608
+ Organization: OrganizationSchema,
609
+ OutcomeEvent: OutcomeEventSchema,
610
+ Page: PageSchema,
611
+ Person: PersonSchema,
612
+ Profile: ProfileSchema,
613
+ Query: QuerySchema,
614
+ Question: QuestionSchema,
615
+ Questionnaire: QuestionnaireSchema,
616
+ QuestionnaireEvent: QuestionnaireEventSchema,
617
+ QuestionnaireItem: QuestionnaireItemSchema,
618
+ QuestionnaireItemEvent: QuestionnaireItemEventSchema,
619
+ Rating: RatingSchema,
620
+ RatingScaleQuestion: RatingScaleQuestionSchema,
621
+ RatingScaleResponse: RatingScaleResponseSchema,
622
+ Reading: ReadingSchema,
623
+ ReadingEvent: ReadingEventSchema,
624
+ ResourceManagementEvent: ResourceManagementEventSchema,
625
+ Response: ResponseSchema,
626
+ Result: ResultSchema,
627
+ Role: RoleSchema,
628
+ Scale: ScaleSchema,
629
+ Score: ScoreSchema,
630
+ SearchEvent: SearchEventSchema,
631
+ SearchResponse: SearchResponseSchema,
632
+ SelectTextResponse: SelectTextResponseSchema,
633
+ Selector: SelectorSchema,
634
+ Session: SessionSchema,
635
+ SessionEvent: SessionEventSchema,
636
+ SharedAnnotation: SharedAnnotationSchema,
637
+ SoftwareApplication: SoftwareApplicationSchema,
638
+ Status: StatusSchema,
639
+ Survey: SurveySchema,
640
+ SurveyEvent: SurveyEventSchema,
641
+ SurveyInvitation: SurveyInvitationSchema,
642
+ SurveyInvitationEvent: SurveyInvitationEventSchema,
643
+ SystemIdentifier: SystemIdentifierSchema,
644
+ TagAnnotation: TagAnnotationSchema,
645
+ TextPositionSelector: TextPositionSelectorSchema,
646
+ Thread: ThreadSchema,
647
+ ThreadEvent: ThreadEventSchema,
648
+ ToolLaunchEvent: ToolLaunchEventSchema,
649
+ ToolUseEvent: ToolUseEventSchema,
650
+ TrueFalseResponse: TrueFalseResponseSchema,
651
+ VideoObject: VideoObjectSchema,
652
+ ViewEvent: ViewEventSchema,
653
+ WebPage: WebPageSchema,
654
+ epubChapter: EpubChapterSchema,
655
+ epubPart: EpubPartSchema,
656
+ epubSubChapter: EpubSubChapterSchema,
657
+ epubVolume: EpubVolumeSchema,
658
+ } as const;
659
+
660
+ export const CaliperV1P2ConformanceMetadata = {
661
+ supportedTextualEventRules: CALIPER_TEXTUAL_EVENT_RULES,
662
+ bootcampOnlyEventTypes: CALIPER_BOOTCAMP_ONLY_EVENT_TYPES,
663
+ contextUris: {
664
+ v1p1: CALIPER_CONTEXT_V1P1,
665
+ v1p2: CALIPER_CONTEXT_V1P2,
666
+ },
667
+ } as const;
668
+ // Inferred types from exported Zod validators.
669
+ export type Action = z.infer<typeof ActionSchema>;
670
+ export type Metric = z.infer<typeof MetricSchema>;
671
+ export type Profile = z.infer<typeof ProfileSchema>;
672
+ export type Status = z.infer<typeof StatusSchema>;
673
+ export type CaliperTypeDefinitions = z.infer<typeof CaliperTypeDefinitionsSchema>;
674
+ export type Role = z.infer<typeof RoleSchema>;
675
+ export type Selector = z.infer<typeof SelectorSchema>;
676
+ export type TextPositionSelector = z.infer<typeof TextPositionSelectorSchema>;
677
+ export type CaliperData = z.infer<typeof CaliperDataSchema>;
678
+ export type SystemIdentifier = z.infer<typeof SystemIdentifierSchema>;
679
+ export type Agent = z.infer<typeof AgentSchema>;
680
+ export type AggregateMeasure = z.infer<typeof AggregateMeasureSchema>;
681
+ export type AggregateMeasureCollection = z.infer<typeof AggregateMeasureCollectionSchema>;
682
+ export type Annotation = z.infer<typeof AnnotationSchema>;
683
+ export type Assessment = z.infer<typeof AssessmentSchema>;
684
+ export type AssessmentItem = z.infer<typeof AssessmentItemSchema>;
685
+ export type AssignableDigitalResource = z.infer<typeof AssignableDigitalResourceSchema>;
686
+ export type Attempt = z.infer<typeof AttemptSchema>;
687
+ export type AudioObject = z.infer<typeof AudioObjectSchema>;
688
+ export type Chapter = z.infer<typeof ChapterSchema>;
689
+ export type Collection = z.infer<typeof CollectionSchema>;
690
+ export type Comment = z.infer<typeof CommentSchema>;
691
+ export type CourseOffering = z.infer<typeof CourseOfferingSchema>;
692
+ export type CourseSection = z.infer<typeof CourseSectionSchema>;
693
+ export type DateTimeQuestion = z.infer<typeof DateTimeQuestionSchema>;
694
+ export type DateTimeResponse = z.infer<typeof DateTimeResponseSchema>;
695
+ export type DigitalResource = z.infer<typeof DigitalResourceSchema>;
696
+ export type DigitalResourceCollection = z.infer<typeof DigitalResourceCollectionSchema>;
697
+ export type Document = z.infer<typeof DocumentSchema>;
698
+ export type Entity = z.infer<typeof EntitySchema>;
699
+ export type FillinBlankResponse = z.infer<typeof FillinBlankResponseSchema>;
700
+ export type Frame = z.infer<typeof FrameSchema>;
701
+ export type Group = z.infer<typeof GroupSchema>;
702
+ export type ImageObject = z.infer<typeof ImageObjectSchema>;
703
+ export type LearningObjective = z.infer<typeof LearningObjectiveSchema>;
704
+ export type LikertScale = z.infer<typeof LikertScaleSchema>;
705
+ export type Link = z.infer<typeof LinkSchema>;
706
+ export type LtiLink = z.infer<typeof LtiLinkSchema>;
707
+ export type LtiSession = z.infer<typeof LtiSessionSchema>;
708
+ export type MediaLocation = z.infer<typeof MediaLocationSchema>;
709
+ export type MediaObject = z.infer<typeof MediaObjectSchema>;
710
+ export type Membership = z.infer<typeof MembershipSchema>;
711
+ export type Message = z.infer<typeof MessageSchema>;
712
+ export type MultipleChoiceResponse = z.infer<typeof MultipleChoiceResponseSchema>;
713
+ export type MultipleResponseResponse = z.infer<typeof MultipleResponseResponseSchema>;
714
+ export type MultiselectQuestion = z.infer<typeof MultiselectQuestionSchema>;
715
+ export type MultiselectResponse = z.infer<typeof MultiselectResponseSchema>;
716
+ export type MultiselectScale = z.infer<typeof MultiselectScaleSchema>;
717
+ export type NumericScale = z.infer<typeof NumericScaleSchema>;
718
+ export type OpenEndedQuestion = z.infer<typeof OpenEndedQuestionSchema>;
719
+ export type OpenEndedResponse = z.infer<typeof OpenEndedResponseSchema>;
720
+ export type Organization = z.infer<typeof OrganizationSchema>;
721
+ export type Page = z.infer<typeof PageSchema>;
722
+ export type Person = z.infer<typeof PersonSchema>;
723
+ export type Query = z.infer<typeof QuerySchema>;
724
+ export type Question = z.infer<typeof QuestionSchema>;
725
+ export type QuestionnaireItem = z.infer<typeof QuestionnaireItemSchema>;
726
+ export type Rating = z.infer<typeof RatingSchema>;
727
+ export type RatingScaleQuestion = z.infer<typeof RatingScaleQuestionSchema>;
728
+ export type RatingScaleResponse = z.infer<typeof RatingScaleResponseSchema>;
729
+ export type Reading = z.infer<typeof ReadingSchema>;
730
+ export type Response = z.infer<typeof ResponseSchema>;
731
+ export type Result = z.infer<typeof ResultSchema>;
732
+ export type Scale = z.infer<typeof ScaleSchema>;
733
+ export type Score = z.infer<typeof ScoreSchema>;
734
+ export type SearchResponse = z.infer<typeof SearchResponseSchema>;
735
+ export type SelectTextResponse = z.infer<typeof SelectTextResponseSchema>;
736
+ export type Session = z.infer<typeof SessionSchema>;
737
+ export type SoftwareApplication = z.infer<typeof SoftwareApplicationSchema>;
738
+ export type Survey = z.infer<typeof SurveySchema>;
739
+ export type SurveyInvitation = z.infer<typeof SurveyInvitationSchema>;
740
+ export type TrueFalseResponse = z.infer<typeof TrueFalseResponseSchema>;
741
+ export type VideoObject = z.infer<typeof VideoObjectSchema>;
742
+ export type WebPage = z.infer<typeof WebPageSchema>;
743
+ export type EpubChapter = z.infer<typeof EpubChapterSchema>;
744
+ export type EpubPart = z.infer<typeof EpubPartSchema>;
745
+ export type EpubSubChapter = z.infer<typeof EpubSubChapterSchema>;
746
+ export type EpubVolume = z.infer<typeof EpubVolumeSchema>;
747
+ export type BookmarkAnnotation = z.infer<typeof BookmarkAnnotationSchema>;
748
+ export type Forum = z.infer<typeof ForumSchema>;
749
+ export type HighlightAnnotation = z.infer<typeof HighlightAnnotationSchema>;
750
+ export type Questionnaire = z.infer<typeof QuestionnaireSchema>;
751
+ export type SharedAnnotation = z.infer<typeof SharedAnnotationSchema>;
752
+ export type TagAnnotation = z.infer<typeof TagAnnotationSchema>;
753
+ export type Thread = z.infer<typeof ThreadSchema>;
754
+ export type AnnotationEvent = z.infer<typeof AnnotationEventSchema>;
755
+ export type AssessmentEvent = z.infer<typeof AssessmentEventSchema>;
756
+ export type AssessmentItemEvent = z.infer<typeof AssessmentItemEventSchema>;
757
+ export type AssignableEvent = z.infer<typeof AssignableEventSchema>;
758
+ export type Event = z.infer<typeof EventSchema>;
759
+ export type FeedbackEvent = z.infer<typeof FeedbackEventSchema>;
760
+ export type ForumEvent = z.infer<typeof ForumEventSchema>;
761
+ export type GradeEvent = z.infer<typeof GradeEventSchema>;
762
+ export type MediaEvent = z.infer<typeof MediaEventSchema>;
763
+ export type MessageEvent = z.infer<typeof MessageEventSchema>;
764
+ export type NavigationEvent = z.infer<typeof NavigationEventSchema>;
765
+ export type OutcomeEvent = z.infer<typeof OutcomeEventSchema>;
766
+ export type QuestionnaireEvent = z.infer<typeof QuestionnaireEventSchema>;
767
+ export type QuestionnaireItemEvent = z.infer<typeof QuestionnaireItemEventSchema>;
768
+ export type ReadingEvent = z.infer<typeof ReadingEventSchema>;
769
+ export type ResourceManagementEvent = z.infer<typeof ResourceManagementEventSchema>;
770
+ export type SearchEvent = z.infer<typeof SearchEventSchema>;
771
+ export type SessionEvent = z.infer<typeof SessionEventSchema>;
772
+ export type SurveyEvent = z.infer<typeof SurveyEventSchema>;
773
+ export type SurveyInvitationEvent = z.infer<typeof SurveyInvitationEventSchema>;
774
+ export type ThreadEvent = z.infer<typeof ThreadEventSchema>;
775
+ export type ToolLaunchEvent = z.infer<typeof ToolLaunchEventSchema>;
776
+ export type ToolUseEvent = z.infer<typeof ToolUseEventSchema>;
777
+ export type ViewEvent = z.infer<typeof ViewEventSchema>;
778
+ export type CaliperEventDocument = z.infer<typeof CaliperEventDocumentSchema>;
779
+ export type CaliperEntityDocument = z.infer<typeof CaliperEntityDocumentSchema>;
780
+ export type CaliperEnvelopeDataItem = z.infer<typeof CaliperEnvelopeDataItemSchema>;
781
+ export type Envelope = z.infer<typeof EnvelopeSchema>;