@conform-ed/contracts 0.0.12 → 0.0.14

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 (82) hide show
  1. package/.turbo/turbo-build.log +1 -2
  2. package/.turbo/turbo-format.log +5 -5
  3. package/.turbo/turbo-lint.log +3 -3
  4. package/.turbo/turbo-test.log +228 -223
  5. package/.turbo/turbo-typecheck.log +1 -1
  6. package/package.json +4 -4
  7. package/src/adapter.ts +1 -1
  8. package/src/caliper/v1_2/caliper_v1p2_bootcamp_schema.ts +6 -6
  9. package/src/caliper/v1_2/shared.ts +2 -2
  10. package/src/case/v1_1/case_v1p1_openapi3_restbinding_schema.ts +1 -0
  11. package/src/case/v1_1/index.ts +41 -41
  12. package/src/cat/v1_0/index.ts +39 -39
  13. package/src/cat/v1_0/shared.ts +1 -1
  14. package/src/clr/v2_0/shared.ts +19 -17
  15. package/src/cmi5/v1_0/index.ts +19 -19
  16. package/src/common-cartridge/v1_3/ccv1p3_imscp_v1p2_v1p0.ts +3 -3
  17. package/src/common-cartridge/v1_3/ccv1p3_lomccltilink_v1p0.ts +2 -1
  18. package/src/common-cartridge/v1_3/ccv1p3_lommanifest_v1p0.ts +2 -1
  19. package/src/common-cartridge/v1_3/ccv1p3_lomresource_v1p0.ts +2 -1
  20. package/src/common-cartridge/v1_3/ccv1p3_qtiasiv1p2p1_v1p0.ts +16 -13
  21. package/src/common-cartridge/v1_3/index.ts +3 -3
  22. package/src/common-cartridge/v1_3/lom-internal.ts +19 -19
  23. package/src/common-cartridge/v1_3/shared.ts +1 -1
  24. package/src/common-cartridge/v1_4/core/ccv1p4_imscp_v1p2_v1p0.ts +6 -6
  25. package/src/common-cartridge/v1_4/core/ccv1p4_lommanifest_v1p0.ts +2 -1
  26. package/src/common-cartridge/v1_4/core/ccv1p4_lomresource_v1p0.ts +2 -1
  27. package/src/common-cartridge/v1_4/extension/ccv1p4_cpextensionv1p2_v1p0.ts +1 -0
  28. package/src/common-cartridge/v1_4/index.ts +5 -5
  29. package/src/common-cartridge/v1_4/k12/ccv1p4_lommanifest_v1p0.ts +2 -1
  30. package/src/common-cartridge/v1_4/k12/ccv1p4_lomresource_v1p0.ts +2 -1
  31. package/src/common-cartridge/v1_4/lom-internal.ts +30 -27
  32. package/src/common-cartridge/v1_4/shared/ccv1p4_lomccltilink_v1p0.ts +2 -1
  33. package/src/common-cartridge/v1_4/shared/ccv1p4_qtiasiv1p2p1_v1p0.ts +16 -13
  34. package/src/common-cartridge/v1_4/shared.ts +1 -1
  35. package/src/common-cartridge/v1_4/thin/ccv1p4_imscp_v1p2_v1p0.ts +5 -5
  36. package/src/common-cartridge/v1_4/thin/ccv1p4_lommanifest_v1p0.ts +2 -1
  37. package/src/common-cartridge/v1_4/thin/ccv1p4_lomresource_v1p0.ts +2 -1
  38. package/src/common-cartridge/v1_4/vdex/imsmd_loose_v1p3p2.ts +2 -1
  39. package/src/common-cartridge/v1_4/vdex/imsvdex_v1p0.ts +1 -1
  40. package/src/config.ts +3 -3
  41. package/src/h5p/v1/content.ts +1 -0
  42. package/src/h5p/v1/h5p-json.ts +4 -3
  43. package/src/h5p/v1/index.ts +21 -21
  44. package/src/h5p/v1/library-json.ts +2 -1
  45. package/src/lti/ags/v2_0/index.ts +12 -12
  46. package/src/lti/deep-linking/v2_0/index.ts +10 -10
  47. package/src/lti/index.ts +2 -2
  48. package/src/lti/nrps/v2_0/index.ts +10 -10
  49. package/src/lti/proctoring/v1_0/index.ts +11 -11
  50. package/src/lti/v1_3/index.ts +17 -17
  51. package/src/oneroster/v1_2/index.ts +45 -45
  52. package/src/oneroster/v1_2/or_v1p2_gradebook_restbinding_schema.ts +3 -3
  53. package/src/oneroster/v1_2/or_v1p2_resource_restbinding_schema.ts +1 -1
  54. package/src/oneroster/v1_2/or_v1p2_rostering_restbinding_schema.ts +1 -1
  55. package/src/oneroster/v1_2/or_v1p2_rostering_service_schema.ts +1 -1
  56. package/src/open-badges/v3_0/shared.ts +31 -29
  57. package/src/qti/v2-internal.ts +12 -11
  58. package/src/qti/v3_0_1/assessment-internal.ts +239 -197
  59. package/src/qti/v3_0_1/imsqti_asiv3p0p1_v1p0.ts +4 -4
  60. package/src/qti/v3_0_1/imsqti_itemv3p0p1_v1p0.ts +1 -1
  61. package/src/qti/v3_0_1/imsqti_metadatav3p0_v1p0.ts +1 -1
  62. package/src/qti/v3_0_1/imsqti_responseprocessingv3p0p1_v1p0.ts +1 -1
  63. package/src/qti/v3_0_1/imsqti_resultv3p0_v1p0.ts +4 -3
  64. package/src/qti/v3_0_1/imsqti_sectionv3p0p1_v1p0.ts +1 -1
  65. package/src/qti/v3_0_1/imsqti_stimulusv3p0p1_v1p0.ts +1 -1
  66. package/src/qti/v3_0_1/imsqti_testv3p0p1_v1p0.ts +2 -2
  67. package/src/qti/v3_0_1/imsqti_usagedatav3p0_v1p0.ts +1 -1
  68. package/src/qti/v3_0_1/processing-internal.ts +44 -33
  69. package/src/qti/v3_0_1/shared.ts +2 -2
  70. package/src/vc-data-model/v2_0/shared.ts +4 -4
  71. package/src/xapi/shared.ts +11 -14
  72. package/src/xapi/v1_0_3/index.ts +54 -54
  73. package/src/xapi/v2_0/index.ts +56 -56
  74. package/test/caliper-v1_2.test.ts +1 -1
  75. package/test/cat-v1_0.test.ts +1 -0
  76. package/test/cmi5-v1_0.test.ts +33 -31
  77. package/test/contracts.test.ts +1 -0
  78. package/test/h5p-v1.test.ts +1 -0
  79. package/test/lti.test.ts +1 -0
  80. package/test/qti-v3_0_1.test.ts +109 -0
  81. package/test/schema-examples.test.ts +1 -0
  82. package/test/xapi.test.ts +1 -0
@@ -24,7 +24,7 @@ export const MembershipSchema = strictObject({
24
24
  givenName: z.string().optional(),
25
25
  familyName: z.string().optional(),
26
26
  middleName: z.string().optional(),
27
- email: z.string().email().optional(),
27
+ email: z.email().optional(),
28
28
  userId: NonEmptyStringSchema,
29
29
  lisPersonSourcedId: NonEmptyStringSchema.optional(),
30
30
  roles: z.array(UriReferenceSchema).min(1),
@@ -37,15 +37,15 @@ export const MembershipContainerSchema = strictObject({
37
37
  members: z.array(MembershipSchema).min(1),
38
38
  });
39
39
 
40
- export namespace LtiNrpsV2_0 {
41
- export namespace Schemas {
42
- export const NamesRoleService = NamesRoleServiceSchema;
43
- export const Membership = MembershipSchema;
44
- export const MembershipContainer = MembershipContainerSchema;
45
- export const MembershipContext = MembershipContextSchema;
46
- export const MembershipStatus = MembershipStatusSchema;
47
- }
48
- }
40
+ export const LtiNrpsV2_0 = {
41
+ Schemas: {
42
+ NamesRoleService: NamesRoleServiceSchema,
43
+ Membership: MembershipSchema,
44
+ MembershipContainer: MembershipContainerSchema,
45
+ MembershipContext: MembershipContextSchema,
46
+ MembershipStatus: MembershipStatusSchema,
47
+ },
48
+ } as const;
49
49
 
50
50
  export type LtiNrpsV2_0Schemas = typeof LtiNrpsV2_0.Schemas;
51
51
 
@@ -95,17 +95,17 @@ export const AssessmentControlResponseSchema = strictObject({
95
95
  extraTime: z.number().int().nonnegative().optional(),
96
96
  });
97
97
 
98
- export namespace LtiProctoringV1_0 {
99
- export namespace Schemas {
100
- export const AssessmentProctoringSettings = AssessmentProctoringSettingsSchema;
101
- export const StartProctoringMessage = StartProctoringMessageSchema;
102
- export const StartAssessmentMessage = StartAssessmentMessageSchema;
103
- export const EndAssessmentMessage = EndAssessmentMessageSchema;
104
- export const AssessmentControlRequest = AssessmentControlRequestSchema;
105
- export const AssessmentControlResponse = AssessmentControlResponseSchema;
106
- export const AssessmentControlSeverity = AssessmentControlSeveritySchema;
107
- }
108
- }
98
+ export const LtiProctoringV1_0 = {
99
+ Schemas: {
100
+ AssessmentProctoringSettings: AssessmentProctoringSettingsSchema,
101
+ StartProctoringMessage: StartProctoringMessageSchema,
102
+ StartAssessmentMessage: StartAssessmentMessageSchema,
103
+ EndAssessmentMessage: EndAssessmentMessageSchema,
104
+ AssessmentControlRequest: AssessmentControlRequestSchema,
105
+ AssessmentControlResponse: AssessmentControlResponseSchema,
106
+ AssessmentControlSeverity: AssessmentControlSeveritySchema,
107
+ },
108
+ } as const;
109
109
 
110
110
  export type LtiProctoringV1_0Schemas = typeof LtiProctoringV1_0.Schemas;
111
111
 
@@ -30,29 +30,29 @@ export const CoreLaunchRequestSchema = strictObject({
30
30
  name: NonEmptyStringSchema.optional(),
31
31
  givenName: NonEmptyStringSchema.optional(),
32
32
  familyName: NonEmptyStringSchema.optional(),
33
- email: z.string().email().optional(),
33
+ email: z.email().optional(),
34
34
  locale: NonEmptyStringSchema.optional(),
35
35
  });
36
36
 
37
37
  export const CoreLaunchClaimsSchema = CoreLaunchRequestSchema;
38
38
 
39
- export namespace LtiV1_3 {
40
- export namespace Schemas {
41
- export const ResourceLink = ResourceLinkSchema;
42
- export const Context = ContextSchema;
43
- export const LaunchPresentation = LaunchPresentationSchema;
44
- export const Lis = LisSchema;
45
- export const CoreLaunchRequest = CoreLaunchRequestSchema;
46
- export const CoreLaunchClaims = CoreLaunchClaimsSchema;
47
- }
39
+ export const LtiV1_3 = {
40
+ Schemas: {
41
+ ResourceLink: ResourceLinkSchema,
42
+ Context: ContextSchema,
43
+ LaunchPresentation: LaunchPresentationSchema,
44
+ Lis: LisSchema,
45
+ CoreLaunchRequest: CoreLaunchRequestSchema,
46
+ CoreLaunchClaims: CoreLaunchClaimsSchema,
47
+ },
48
48
 
49
- export namespace Shared {
50
- export const Version = LtiVersionSchema;
51
- export const Url = UrlSchema;
52
- export const NonEmptyString = NonEmptyStringSchema;
53
- export const Roles = RolesSchema;
54
- }
55
- }
49
+ Shared: {
50
+ Version: LtiVersionSchema,
51
+ Url: UrlSchema,
52
+ NonEmptyString: NonEmptyStringSchema,
53
+ Roles: RolesSchema,
54
+ },
55
+ } as const;
56
56
 
57
57
  export type LtiV1_3Schemas = typeof LtiV1_3.Schemas;
58
58
 
@@ -7,51 +7,6 @@ export * from "./or_v1p2_gradebook_restbinding_schema";
7
7
  export * from "./or_v1p2_resource_restbinding_schema";
8
8
  export * from "./or_v1p2_csv_binding_schema";
9
9
 
10
- import {
11
- AcademicSessionSchema,
12
- AcademicSessionSetSchema,
13
- ClassSchema,
14
- ClassSetSchema,
15
- CourseSchema,
16
- CourseSetSchema,
17
- DemographicsSchema,
18
- DemographicsSetSchema,
19
- EnrollmentSchema,
20
- EnrollmentSetSchema,
21
- OrgSchema,
22
- OrgSetSchema,
23
- SingleAcademicSessionSchema,
24
- SingleClassSchema,
25
- SingleCourseSchema,
26
- SingleDemographicsSchema,
27
- SingleEnrollmentSchema,
28
- SingleOrgSchema,
29
- SingleUserSchema,
30
- UserSchema,
31
- UserSetSchema,
32
- } from "./or_v1p2_rostering_service_schema";
33
- import {
34
- AssessmentLineItemSchema,
35
- AssessmentLineItemSetSchema,
36
- AssessmentResultSchema,
37
- AssessmentResultSetSchema,
38
- CategorySchema,
39
- CategorySetSchema,
40
- GuidPairSetSchema,
41
- LineItemSchema,
42
- LineItemSetSchema,
43
- ResultSchema,
44
- ResultSetSchema,
45
- ScoreScaleSchema,
46
- ScoreScaleSetSchema,
47
- SingleAssessmentLineItemSchema,
48
- SingleAssessmentResultSchema,
49
- SingleCategorySchema,
50
- SingleLineItemSchema,
51
- SingleResultSchema,
52
- SingleScoreScaleSchema,
53
- } from "./or_v1p2_gradebook_service_schema";
54
- import { ResourceSchema, ResourceSetSchema, SingleResourceSchema } from "./or_v1p2_resource_service_schema";
55
10
  import {
56
11
  AcademicSessionsCsvDocumentSchema,
57
12
  CategoriesCsvDocumentSchema,
@@ -78,8 +33,53 @@ import {
78
33
  UsersCsvDocumentSchema,
79
34
  } from "./or_v1p2_csv_binding_schema";
80
35
  import { GradebookRestBindingOperationSchemas } from "./or_v1p2_gradebook_restbinding_schema";
36
+ import {
37
+ AssessmentLineItemSchema,
38
+ AssessmentLineItemSetSchema,
39
+ AssessmentResultSchema,
40
+ AssessmentResultSetSchema,
41
+ CategorySchema,
42
+ CategorySetSchema,
43
+ GuidPairSetSchema,
44
+ LineItemSchema,
45
+ LineItemSetSchema,
46
+ ResultSchema,
47
+ ResultSetSchema,
48
+ ScoreScaleSchema,
49
+ ScoreScaleSetSchema,
50
+ SingleAssessmentLineItemSchema,
51
+ SingleAssessmentResultSchema,
52
+ SingleCategorySchema,
53
+ SingleLineItemSchema,
54
+ SingleResultSchema,
55
+ SingleScoreScaleSchema,
56
+ } from "./or_v1p2_gradebook_service_schema";
81
57
  import { ResourceRestBindingOperationSchemas } from "./or_v1p2_resource_restbinding_schema";
58
+ import { ResourceSchema, ResourceSetSchema, SingleResourceSchema } from "./or_v1p2_resource_service_schema";
82
59
  import { RosteringRestBindingOperationSchemas } from "./or_v1p2_rostering_restbinding_schema";
60
+ import {
61
+ AcademicSessionSchema,
62
+ AcademicSessionSetSchema,
63
+ ClassSchema,
64
+ ClassSetSchema,
65
+ CourseSchema,
66
+ CourseSetSchema,
67
+ DemographicsSchema,
68
+ DemographicsSetSchema,
69
+ EnrollmentSchema,
70
+ EnrollmentSetSchema,
71
+ OrgSchema,
72
+ OrgSetSchema,
73
+ SingleAcademicSessionSchema,
74
+ SingleClassSchema,
75
+ SingleCourseSchema,
76
+ SingleDemographicsSchema,
77
+ SingleEnrollmentSchema,
78
+ SingleOrgSchema,
79
+ SingleUserSchema,
80
+ UserSchema,
81
+ UserSetSchema,
82
+ } from "./or_v1p2_rostering_service_schema";
83
83
  import { ImsxStatusInfoSchema } from "./shared";
84
84
 
85
85
  export const OneRoster12DerivedZodTemplates = {
@@ -19,7 +19,7 @@ import { ImsxStatusInfoSchema } from "./shared";
19
19
 
20
20
  const EmptyPayloadSchema = z.undefined();
21
21
 
22
- function gradebookGetOperation(path: string, successResponsePayload: z.ZodTypeAny) {
22
+ function gradebookGetOperation(path: string, successResponsePayload: z.ZodType) {
23
23
  return {
24
24
  method: "GET",
25
25
  path,
@@ -29,7 +29,7 @@ function gradebookGetOperation(path: string, successResponsePayload: z.ZodTypeAn
29
29
  } as const;
30
30
  }
31
31
 
32
- function gradebookPostOperation(path: string, requestPayload: z.ZodTypeAny, successResponsePayload: z.ZodTypeAny) {
32
+ function gradebookPostOperation(path: string, requestPayload: z.ZodType, successResponsePayload: z.ZodType) {
33
33
  return {
34
34
  method: "POST",
35
35
  path,
@@ -39,7 +39,7 @@ function gradebookPostOperation(path: string, requestPayload: z.ZodTypeAny, succ
39
39
  } as const;
40
40
  }
41
41
 
42
- function gradebookPutOperation(path: string, requestPayload: z.ZodTypeAny) {
42
+ function gradebookPutOperation(path: string, requestPayload: z.ZodType) {
43
43
  return {
44
44
  method: "PUT",
45
45
  path,
@@ -5,7 +5,7 @@ import { ImsxStatusInfoSchema } from "./shared";
5
5
 
6
6
  const EmptyPayloadSchema = z.undefined();
7
7
 
8
- function resourceGetOperation(path: string, successResponsePayload: z.ZodTypeAny) {
8
+ function resourceGetOperation(path: string, successResponsePayload: z.ZodType) {
9
9
  return {
10
10
  method: "GET",
11
11
  path,
@@ -20,7 +20,7 @@ import { ImsxStatusInfoSchema } from "./shared";
20
20
 
21
21
  const EmptyPayloadSchema = z.undefined();
22
22
 
23
- function rosteringGetOperation(path: string, successResponsePayload: z.ZodTypeAny) {
23
+ function rosteringGetOperation(path: string, successResponsePayload: z.ZodType) {
24
24
  return {
25
25
  method: "GET",
26
26
  path,
@@ -51,7 +51,7 @@ export const CredentialSchema = z
51
51
  username: z.string(),
52
52
  password: z.string().optional(),
53
53
  })
54
- .passthrough();
54
+ .loose();
55
55
 
56
56
  export const UserIdSchema = strictObject({
57
57
  type: z.string(),
@@ -27,51 +27,53 @@ const OpenBadgesV30ContextUrlSchema = z
27
27
  .string()
28
28
  .regex(/^https:\/\/purl\.imsglobal\.org\/spec\/ob\/v3p0\/context(-3\.\d\.\d)*\.json$/u);
29
29
 
30
+ // Declared output of a zod schema (z.ZodType<...>): zod's `.optional()` infers `| undefined`, so this must too.
30
31
  type Profile = {
31
32
  id: UriValue;
32
33
  type: unknown;
33
- name?: TextValue;
34
- url?: UriValue;
35
- phone?: TextValue;
36
- description?: TextValue;
37
- endorsement?: OneOrManyValue<EndorsementCredential>;
38
- endorsementJwt?: OneOrManyValue<CompactJwsValue>;
39
- image?: Record<string, unknown>;
40
- email?: TextValue;
41
- address?: Record<string, unknown>;
42
- otherIdentifier?: OneOrManyValue<Record<string, unknown>>;
43
- official?: TextValue;
44
- parentOrg?: Profile;
45
- familyName?: TextValue;
46
- givenName?: TextValue;
47
- additionalName?: TextValue;
48
- patronymicName?: TextValue;
49
- honorificPrefix?: TextValue;
50
- honorificSuffix?: TextValue;
51
- familyNamePrefix?: TextValue;
52
- dateOfBirth?: string;
34
+ name?: TextValue | undefined;
35
+ url?: UriValue | undefined;
36
+ phone?: TextValue | undefined;
37
+ description?: TextValue | undefined;
38
+ endorsement?: OneOrManyValue<EndorsementCredential> | undefined;
39
+ endorsementJwt?: OneOrManyValue<CompactJwsValue> | undefined;
40
+ image?: Record<string, unknown> | undefined;
41
+ email?: TextValue | undefined;
42
+ address?: Record<string, unknown> | undefined;
43
+ otherIdentifier?: OneOrManyValue<Record<string, unknown>> | undefined;
44
+ official?: TextValue | undefined;
45
+ parentOrg?: Profile | undefined;
46
+ familyName?: TextValue | undefined;
47
+ givenName?: TextValue | undefined;
48
+ additionalName?: TextValue | undefined;
49
+ patronymicName?: TextValue | undefined;
50
+ honorificPrefix?: TextValue | undefined;
51
+ honorificSuffix?: TextValue | undefined;
52
+ familyNamePrefix?: TextValue | undefined;
53
+ dateOfBirth?: string | undefined;
53
54
  [key: string]: unknown;
54
55
  };
55
56
 
56
57
  type ProfileRef = Profile | UriValue;
57
58
 
59
+ // Declared output of a zod schema (z.ZodType<...>): zod's `.optional()` infers `| undefined`, so this must too.
58
60
  type EndorsementCredential = {
59
61
  "@context": JsonLdContextEntry[];
60
62
  type: unknown;
61
63
  id: UriValue;
62
64
  name: TextValue;
63
- description?: TextValue;
65
+ description?: TextValue | undefined;
64
66
  credentialSubject: Record<string, unknown>;
65
- awardedDate?: string;
67
+ awardedDate?: string | undefined;
66
68
  issuer: ProfileRef;
67
69
  validFrom: string;
68
- validUntil?: string;
69
- proof?: OneOrManyValue<Record<string, unknown>>;
70
- credentialSchema?: OneOrManyValue<Record<string, unknown>>;
71
- credentialStatus?: Record<string, unknown>;
72
- refreshService?: Record<string, unknown>;
73
- termsOfUse?: OneOrManyValue<Record<string, unknown>>;
74
- evidence?: OneOrManyValue<Record<string, unknown>>;
70
+ validUntil?: string | undefined;
71
+ proof?: OneOrManyValue<Record<string, unknown>> | undefined;
72
+ credentialSchema?: OneOrManyValue<Record<string, unknown>> | undefined;
73
+ credentialStatus?: Record<string, unknown> | undefined;
74
+ refreshService?: Record<string, unknown> | undefined;
75
+ termsOfUse?: OneOrManyValue<Record<string, unknown>> | undefined;
76
+ evidence?: OneOrManyValue<Record<string, unknown>> | undefined;
75
77
  [key: string]: unknown;
76
78
  };
77
79
 
@@ -70,7 +70,7 @@ export function looseObject<T extends z.ZodRawShape>(shape: T) {
70
70
 
71
71
  export function addIssue(context: z.RefinementCtx, path: Array<string | number>, message: string) {
72
72
  context.addIssue({
73
- code: z.ZodIssueCode.custom,
73
+ code: "custom",
74
74
  path,
75
75
  message,
76
76
  });
@@ -110,7 +110,8 @@ function uniqueIdentifiersRefinement(
110
110
  function validateDeclaredValues(
111
111
  cardinality: z.infer<typeof QtiCardinalitySchema>,
112
112
  baseType: z.infer<typeof QtiBaseTypeSchema> | undefined,
113
- values: Array<{ fieldIdentifier?: string }>,
113
+ // Receives zod-parsed values; zod's `.optional()` infers `| undefined`, so this must too.
114
+ values: Array<{ fieldIdentifier?: string | undefined }>,
114
115
  path: Array<string | number>,
115
116
  context: z.RefinementCtx,
116
117
  ) {
@@ -147,7 +148,7 @@ export function createQti2Schemas(config: Qti2Config) {
147
148
  value: z.string(),
148
149
  });
149
150
 
150
- const QtiContentNodeSchema: z.ZodTypeAny = z.lazy(() =>
151
+ const QtiContentNodeSchema: z.ZodType = z.lazy(() =>
151
152
  z.union([
152
153
  QtiTextNodeSchema,
153
154
  looseObject({
@@ -814,7 +815,7 @@ export function createQti2Schemas(config: Qti2Config) {
814
815
  ] as const;
815
816
  const manyKinds = ["and", "or", "sum", "product", "multiple", "ordered", "gcd", "lcm", "max", "min"] as const;
816
817
 
817
- const QtiExpressionSchema: z.ZodTypeAny = z.lazy(() =>
818
+ const QtiExpressionSchema: z.ZodType = z.lazy(() =>
818
819
  z
819
820
  .union([
820
821
  QtiBaseValueExpressionSchema,
@@ -996,7 +997,7 @@ export function createQti2Schemas(config: Qti2Config) {
996
997
  }),
997
998
  ]);
998
999
 
999
- const QtiResponseProcessingRuleSchema: z.ZodTypeAny = z.lazy(() =>
1000
+ const QtiResponseProcessingRuleSchema: z.ZodType = z.lazy(() =>
1000
1001
  z.union([
1001
1002
  QtiSetOutcomeValueSchema,
1002
1003
  QtiLookupOutcomeValueRuleSchema,
@@ -1026,7 +1027,7 @@ export function createQti2Schemas(config: Qti2Config) {
1026
1027
  ]),
1027
1028
  );
1028
1029
 
1029
- const QtiOutcomeProcessingRuleSchema: z.ZodTypeAny = z.lazy(() =>
1030
+ const QtiOutcomeProcessingRuleSchema: z.ZodType = z.lazy(() =>
1030
1031
  z.union([
1031
1032
  QtiSetOutcomeValueSchema,
1032
1033
  QtiLookupOutcomeValueRuleSchema,
@@ -1056,7 +1057,7 @@ export function createQti2Schemas(config: Qti2Config) {
1056
1057
  ]),
1057
1058
  );
1058
1059
 
1059
- const QtiTemplateProcessingRuleSchema: z.ZodTypeAny = z.lazy(() =>
1060
+ const QtiTemplateProcessingRuleSchema: z.ZodType = z.lazy(() =>
1060
1061
  z.union([
1061
1062
  QtiSetTemplateValueSchema,
1062
1063
  QtiSetDefaultValueRuleSchema,
@@ -1192,7 +1193,7 @@ export function createQti2Schemas(config: Qti2Config) {
1192
1193
  category: z.array(NonEmptyStringSchema).optional(),
1193
1194
  });
1194
1195
 
1195
- const QtiAssessmentSectionRawSchema: z.ZodTypeAny = z.lazy(() =>
1196
+ const QtiAssessmentSectionRawSchema: z.ZodType = z.lazy(() =>
1196
1197
  strictObject({
1197
1198
  identifier: QtiIdentifierSchema,
1198
1199
  title: z.string().optional(),
@@ -1220,7 +1221,7 @@ export function createQti2Schemas(config: Qti2Config) {
1220
1221
  }),
1221
1222
  );
1222
1223
 
1223
- const QtiAssessmentSectionSchema: z.ZodTypeAny = QtiAssessmentSectionRawSchema.superRefine((input, context) => {
1224
+ const QtiAssessmentSectionSchema: z.ZodType = QtiAssessmentSectionRawSchema.superRefine((input, context) => {
1224
1225
  const value = input as { children?: unknown[] };
1225
1226
  const identifierValues = asArray(value.children).flatMap((child) => {
1226
1227
  if (!child || typeof child !== "object" || !("identifier" in child)) {
@@ -1276,7 +1277,7 @@ export function createQti2Schemas(config: Qti2Config) {
1276
1277
  uniqueIdentifiersRefinement(value.templateDeclarations, ["templateDeclarations"], "template declaration", context);
1277
1278
  });
1278
1279
 
1279
- const QtiAssessmentStimulusSchema: z.ZodTypeAny = config.includeAssessmentStimulus
1280
+ const QtiAssessmentStimulusSchema: z.ZodType = config.includeAssessmentStimulus
1280
1281
  ? strictObject({
1281
1282
  identifier: QtiIdentifierSchema,
1282
1283
  title: z.string().optional(),
@@ -1547,7 +1548,7 @@ export function createQti2Schemas(config: Qti2Config) {
1547
1548
  assessmentSection: QtiAssessmentSectionSchema,
1548
1549
  });
1549
1550
 
1550
- const QtiAssessmentStimulusDocumentSchema: z.ZodTypeAny = config.includeAssessmentStimulus
1551
+ const QtiAssessmentStimulusDocumentSchema: z.ZodType = config.includeAssessmentStimulus
1551
1552
  ? strictObject({
1552
1553
  assessmentStimulus: QtiAssessmentStimulusSchema,
1553
1554
  })