@uncefact/untp-utils 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +40 -12
  2. package/artefacts/context/untp/0.6.0/dcc.json +1241 -0
  3. package/artefacts/context/untp/0.6.0/dfr.json +619 -0
  4. package/artefacts/context/untp/0.6.0/dia.json +162 -0
  5. package/artefacts/context/untp/0.6.0/dpp.json +1078 -0
  6. package/artefacts/context/untp/0.6.0/dte.json +1285 -0
  7. package/artefacts/context/untp/0.6.1/dcc.json +1388 -0
  8. package/artefacts/context/untp/0.6.1/dfr.json +690 -0
  9. package/artefacts/context/untp/0.6.1/dia.json +196 -0
  10. package/artefacts/context/untp/0.6.1/dpp.json +1164 -0
  11. package/artefacts/context/untp/0.6.1/dte.json +1340 -0
  12. package/artefacts/context/untp/0.7.0/untp.json +3493 -0
  13. package/artefacts/context/vcdm/2/credentials.json +301 -0
  14. package/artefacts/manifest.json +214 -0
  15. package/artefacts/schema/untp/0.6.0/dcc.json +1131 -0
  16. package/artefacts/schema/untp/0.6.0/dfr.json +1028 -0
  17. package/artefacts/schema/untp/0.6.0/dia.json +236 -0
  18. package/artefacts/schema/untp/0.6.0/dpp.json +1219 -0
  19. package/artefacts/schema/untp/0.6.0/dte.json +845 -0
  20. package/artefacts/schema/untp/0.6.1/dcc.json +1196 -0
  21. package/artefacts/schema/untp/0.6.1/dfr.json +1037 -0
  22. package/artefacts/schema/untp/0.6.1/dia.json +236 -0
  23. package/artefacts/schema/untp/0.6.1/dpp.json +1229 -0
  24. package/artefacts/schema/untp/0.6.1/dte.json +845 -0
  25. package/artefacts/schema/untp/0.7.0/cvc.json +701 -0
  26. package/artefacts/schema/untp/0.7.0/dcc.json +1133 -0
  27. package/artefacts/schema/untp/0.7.0/dfr.json +1245 -0
  28. package/artefacts/schema/untp/0.7.0/dia.json +443 -0
  29. package/artefacts/schema/untp/0.7.0/dpp.json +1300 -0
  30. package/artefacts/schema/untp/0.7.0/dte.json +1226 -0
  31. package/artefacts/schema/untp/0.7.0/linkset.json +119 -0
  32. package/artefacts/schema/vcdm/2/verifiable-credential.json +318 -0
  33. package/build/artefacts/detect-version-from-context.d.ts +7 -2
  34. package/build/artefacts/detect-version-from-context.js +17 -6
  35. package/build/artefacts/detect-version-from-context.js.map +1 -1
  36. package/build/artefacts/detect-version-from-context.test.js +59 -0
  37. package/build/artefacts/detect-version-from-context.test.js.map +1 -1
  38. package/build/artefacts/urls.d.ts +8 -1
  39. package/build/artefacts/urls.js +17 -5
  40. package/build/artefacts/urls.js.map +1 -1
  41. package/build/artefacts/urls.test.js +63 -1
  42. package/build/artefacts/urls.test.js.map +1 -1
  43. package/build/bundle/artefacts/context/untp/0.6.0/dcc.d.ts +2 -0
  44. package/build/bundle/artefacts/context/untp/0.6.0/dcc.js +1244 -0
  45. package/build/bundle/artefacts/context/untp/0.6.0/dcc.js.map +1 -0
  46. package/build/bundle/artefacts/context/untp/0.6.0/dfr.d.ts +2 -0
  47. package/build/bundle/artefacts/context/untp/0.6.0/dfr.js +622 -0
  48. package/build/bundle/artefacts/context/untp/0.6.0/dfr.js.map +1 -0
  49. package/build/bundle/artefacts/context/untp/0.6.0/dia.d.ts +2 -0
  50. package/build/bundle/artefacts/context/untp/0.6.0/dia.js +165 -0
  51. package/build/bundle/artefacts/context/untp/0.6.0/dia.js.map +1 -0
  52. package/build/bundle/artefacts/context/untp/0.6.0/dpp.d.ts +2 -0
  53. package/build/bundle/artefacts/context/untp/0.6.0/dpp.js +1081 -0
  54. package/build/bundle/artefacts/context/untp/0.6.0/dpp.js.map +1 -0
  55. package/build/bundle/artefacts/context/untp/0.6.0/dte.d.ts +2 -0
  56. package/build/bundle/artefacts/context/untp/0.6.0/dte.js +1288 -0
  57. package/build/bundle/artefacts/context/untp/0.6.0/dte.js.map +1 -0
  58. package/build/bundle/artefacts/context/untp/0.6.1/dcc.d.ts +2 -0
  59. package/build/bundle/artefacts/context/untp/0.6.1/dcc.js +1391 -0
  60. package/build/bundle/artefacts/context/untp/0.6.1/dcc.js.map +1 -0
  61. package/build/bundle/artefacts/context/untp/0.6.1/dfr.d.ts +2 -0
  62. package/build/bundle/artefacts/context/untp/0.6.1/dfr.js +693 -0
  63. package/build/bundle/artefacts/context/untp/0.6.1/dfr.js.map +1 -0
  64. package/build/bundle/artefacts/context/untp/0.6.1/dia.d.ts +2 -0
  65. package/build/bundle/artefacts/context/untp/0.6.1/dia.js +199 -0
  66. package/build/bundle/artefacts/context/untp/0.6.1/dia.js.map +1 -0
  67. package/build/bundle/artefacts/context/untp/0.6.1/dpp.d.ts +2 -0
  68. package/build/bundle/artefacts/context/untp/0.6.1/dpp.js +1167 -0
  69. package/build/bundle/artefacts/context/untp/0.6.1/dpp.js.map +1 -0
  70. package/build/bundle/artefacts/context/untp/0.6.1/dte.d.ts +2 -0
  71. package/build/bundle/artefacts/context/untp/0.6.1/dte.js +1343 -0
  72. package/build/bundle/artefacts/context/untp/0.6.1/dte.js.map +1 -0
  73. package/build/bundle/artefacts/context/untp/0.7.0/untp.d.ts +2 -0
  74. package/build/bundle/artefacts/context/untp/0.7.0/untp.js +3496 -0
  75. package/build/bundle/artefacts/context/untp/0.7.0/untp.js.map +1 -0
  76. package/build/bundle/artefacts/context/vcdm/2/credentials.d.ts +2 -0
  77. package/build/bundle/artefacts/context/vcdm/2/credentials.js +304 -0
  78. package/build/bundle/artefacts/context/vcdm/2/credentials.js.map +1 -0
  79. package/build/bundle/artefacts/schema/untp/0.6.0/dcc.d.ts +2 -0
  80. package/build/bundle/artefacts/schema/untp/0.6.0/dcc.js +1134 -0
  81. package/build/bundle/artefacts/schema/untp/0.6.0/dcc.js.map +1 -0
  82. package/build/bundle/artefacts/schema/untp/0.6.0/dfr.d.ts +2 -0
  83. package/build/bundle/artefacts/schema/untp/0.6.0/dfr.js +1031 -0
  84. package/build/bundle/artefacts/schema/untp/0.6.0/dfr.js.map +1 -0
  85. package/build/bundle/artefacts/schema/untp/0.6.0/dia.d.ts +2 -0
  86. package/build/bundle/artefacts/schema/untp/0.6.0/dia.js +239 -0
  87. package/build/bundle/artefacts/schema/untp/0.6.0/dia.js.map +1 -0
  88. package/build/bundle/artefacts/schema/untp/0.6.0/dpp.d.ts +2 -0
  89. package/build/bundle/artefacts/schema/untp/0.6.0/dpp.js +1222 -0
  90. package/build/bundle/artefacts/schema/untp/0.6.0/dpp.js.map +1 -0
  91. package/build/bundle/artefacts/schema/untp/0.6.0/dte.d.ts +2 -0
  92. package/build/bundle/artefacts/schema/untp/0.6.0/dte.js +848 -0
  93. package/build/bundle/artefacts/schema/untp/0.6.0/dte.js.map +1 -0
  94. package/build/bundle/artefacts/schema/untp/0.6.1/dcc.d.ts +2 -0
  95. package/build/bundle/artefacts/schema/untp/0.6.1/dcc.js +1199 -0
  96. package/build/bundle/artefacts/schema/untp/0.6.1/dcc.js.map +1 -0
  97. package/build/bundle/artefacts/schema/untp/0.6.1/dfr.d.ts +2 -0
  98. package/build/bundle/artefacts/schema/untp/0.6.1/dfr.js +1040 -0
  99. package/build/bundle/artefacts/schema/untp/0.6.1/dfr.js.map +1 -0
  100. package/build/bundle/artefacts/schema/untp/0.6.1/dia.d.ts +2 -0
  101. package/build/bundle/artefacts/schema/untp/0.6.1/dia.js +239 -0
  102. package/build/bundle/artefacts/schema/untp/0.6.1/dia.js.map +1 -0
  103. package/build/bundle/artefacts/schema/untp/0.6.1/dpp.d.ts +2 -0
  104. package/build/bundle/artefacts/schema/untp/0.6.1/dpp.js +1232 -0
  105. package/build/bundle/artefacts/schema/untp/0.6.1/dpp.js.map +1 -0
  106. package/build/bundle/artefacts/schema/untp/0.6.1/dte.d.ts +2 -0
  107. package/build/bundle/artefacts/schema/untp/0.6.1/dte.js +848 -0
  108. package/build/bundle/artefacts/schema/untp/0.6.1/dte.js.map +1 -0
  109. package/build/bundle/artefacts/schema/untp/0.7.0/cvc.d.ts +2 -0
  110. package/build/bundle/artefacts/schema/untp/0.7.0/cvc.js +704 -0
  111. package/build/bundle/artefacts/schema/untp/0.7.0/cvc.js.map +1 -0
  112. package/build/bundle/artefacts/schema/untp/0.7.0/dcc.d.ts +2 -0
  113. package/build/bundle/artefacts/schema/untp/0.7.0/dcc.js +1136 -0
  114. package/build/bundle/artefacts/schema/untp/0.7.0/dcc.js.map +1 -0
  115. package/build/bundle/artefacts/schema/untp/0.7.0/dfr.d.ts +2 -0
  116. package/build/bundle/artefacts/schema/untp/0.7.0/dfr.js +1248 -0
  117. package/build/bundle/artefacts/schema/untp/0.7.0/dfr.js.map +1 -0
  118. package/build/bundle/artefacts/schema/untp/0.7.0/dia.d.ts +2 -0
  119. package/build/bundle/artefacts/schema/untp/0.7.0/dia.js +446 -0
  120. package/build/bundle/artefacts/schema/untp/0.7.0/dia.js.map +1 -0
  121. package/build/bundle/artefacts/schema/untp/0.7.0/dpp.d.ts +2 -0
  122. package/build/bundle/artefacts/schema/untp/0.7.0/dpp.js +1303 -0
  123. package/build/bundle/artefacts/schema/untp/0.7.0/dpp.js.map +1 -0
  124. package/build/bundle/artefacts/schema/untp/0.7.0/dte.d.ts +2 -0
  125. package/build/bundle/artefacts/schema/untp/0.7.0/dte.js +1229 -0
  126. package/build/bundle/artefacts/schema/untp/0.7.0/dte.js.map +1 -0
  127. package/build/bundle/artefacts/schema/untp/0.7.0/linkset.d.ts +2 -0
  128. package/build/bundle/artefacts/schema/untp/0.7.0/linkset.js +122 -0
  129. package/build/bundle/artefacts/schema/untp/0.7.0/linkset.js.map +1 -0
  130. package/build/bundle/artefacts/schema/vcdm/2/verifiable-credential.d.ts +2 -0
  131. package/build/bundle/artefacts/schema/vcdm/2/verifiable-credential.js +321 -0
  132. package/build/bundle/artefacts/schema/vcdm/2/verifiable-credential.js.map +1 -0
  133. package/build/bundle/fallback.d.ts +41 -0
  134. package/build/bundle/fallback.js +62 -0
  135. package/build/bundle/fallback.js.map +1 -0
  136. package/build/bundle/fallback.test.d.ts +1 -0
  137. package/build/bundle/fallback.test.js +124 -0
  138. package/build/bundle/fallback.test.js.map +1 -0
  139. package/build/bundle/index.d.ts +4 -0
  140. package/build/bundle/index.js +77 -0
  141. package/build/bundle/index.js.map +1 -0
  142. package/build/bundle/lookup.d.ts +14 -0
  143. package/build/bundle/lookup.js +40 -0
  144. package/build/bundle/lookup.js.map +1 -0
  145. package/build/bundle/lookup.test.d.ts +1 -0
  146. package/build/bundle/lookup.test.js +70 -0
  147. package/build/bundle/lookup.test.js.map +1 -0
  148. package/build/bundle/public.d.ts +29 -0
  149. package/build/bundle/public.js +60 -0
  150. package/build/bundle/public.js.map +1 -0
  151. package/build/bundle/public.test.d.ts +1 -0
  152. package/build/bundle/public.test.js +41 -0
  153. package/build/bundle/public.test.js.map +1 -0
  154. package/build/bundle/refresh-classify.test.d.ts +1 -0
  155. package/build/bundle/refresh-classify.test.js +20 -0
  156. package/build/bundle/refresh-classify.test.js.map +1 -0
  157. package/build/bundle/refresh-main.test.d.ts +1 -0
  158. package/build/bundle/refresh-main.test.js +98 -0
  159. package/build/bundle/refresh-main.test.js.map +1 -0
  160. package/build/common/as-date-time.d.ts +13 -0
  161. package/build/common/as-date-time.js +44 -0
  162. package/build/common/as-date-time.js.map +1 -0
  163. package/build/common/as-date-time.test.d.ts +1 -0
  164. package/build/common/as-date-time.test.js +42 -0
  165. package/build/common/as-date-time.test.js.map +1 -0
  166. package/build/common/as-non-empty-string.d.ts +11 -4
  167. package/build/common/as-non-empty-string.js +15 -5
  168. package/build/common/as-non-empty-string.js.map +1 -1
  169. package/build/common/as-non-empty-string.test.js +7 -2
  170. package/build/common/as-non-empty-string.test.js.map +1 -1
  171. package/build/common/canonical-json.d.ts +10 -0
  172. package/build/common/canonical-json.js +29 -0
  173. package/build/common/canonical-json.js.map +1 -0
  174. package/build/common/canonical-json.test.d.ts +1 -0
  175. package/build/common/canonical-json.test.js +20 -0
  176. package/build/common/canonical-json.test.js.map +1 -0
  177. package/build/common/index.d.ts +5 -0
  178. package/build/common/index.js +6 -0
  179. package/build/common/index.js.map +1 -0
  180. package/build/common/validity-window.d.ts +45 -0
  181. package/build/common/validity-window.js +68 -0
  182. package/build/common/validity-window.js.map +1 -0
  183. package/build/common/validity-window.test.d.ts +1 -0
  184. package/build/common/validity-window.test.js +67 -0
  185. package/build/common/validity-window.test.js.map +1 -0
  186. package/build/conformity-vocabulary/codes.d.ts +4 -0
  187. package/build/conformity-vocabulary/codes.js +4 -0
  188. package/build/conformity-vocabulary/codes.js.map +1 -1
  189. package/build/conformity-vocabulary/parse-conformity-scheme.test.js +150 -0
  190. package/build/conformity-vocabulary/parse-conformity-scheme.test.js.map +1 -1
  191. package/build/conformity-vocabulary/parsers/v0-7-0.parser.js +225 -0
  192. package/build/conformity-vocabulary/parsers/v0-7-0.parser.js.map +1 -1
  193. package/build/conformity-vocabulary/types.d.ts +69 -15
  194. package/build/conformity-vocabulary/validate-conformity-claim.d.ts +17 -11
  195. package/build/conformity-vocabulary/validate-conformity-claim.js +118 -13
  196. package/build/conformity-vocabulary/validate-conformity-claim.js.map +1 -1
  197. package/build/conformity-vocabulary/validate-conformity-claim.test.js +265 -0
  198. package/build/conformity-vocabulary/validate-conformity-claim.test.js.map +1 -1
  199. package/build/loaders/index.d.ts +2 -0
  200. package/build/loaders/index.js +1 -0
  201. package/build/loaders/index.js.map +1 -1
  202. package/build/loaders/jsonld-document-loader.d.ts +7 -5
  203. package/build/loaders/jsonld-document-loader.js +11 -2
  204. package/build/loaders/jsonld-document-loader.js.map +1 -1
  205. package/build/loaders/jsonld-document-loader.test.js +41 -1
  206. package/build/loaders/jsonld-document-loader.test.js.map +1 -1
  207. package/build/loaders/schema-loader.d.ts +13 -3
  208. package/build/loaders/schema-loader.js +24 -8
  209. package/build/loaders/schema-loader.js.map +1 -1
  210. package/build/loaders/schema-loader.test.js +56 -1
  211. package/build/loaders/schema-loader.test.js.map +1 -1
  212. package/build/node/errors.d.ts +9 -3
  213. package/build/node/errors.js +9 -3
  214. package/build/node/errors.js.map +1 -1
  215. package/build/node/index.d.ts +1 -1
  216. package/build/node/index.js +1 -1
  217. package/build/node/index.js.map +1 -1
  218. package/build/node/is-private-ip.d.ts +8 -4
  219. package/build/node/is-private-ip.fail-closed.test.d.ts +1 -0
  220. package/build/node/is-private-ip.fail-closed.test.js +36 -0
  221. package/build/node/is-private-ip.fail-closed.test.js.map +1 -0
  222. package/build/node/is-private-ip.js +77 -12
  223. package/build/node/is-private-ip.js.map +1 -1
  224. package/build/node/is-private-ip.test.js +28 -0
  225. package/build/node/is-private-ip.test.js.map +1 -1
  226. package/build/node/validate-public-url.d.ts +43 -11
  227. package/build/node/validate-public-url.js +68 -34
  228. package/build/node/validate-public-url.js.map +1 -1
  229. package/build/node/validate-public-url.test.js +161 -14
  230. package/build/node/validate-public-url.test.js.map +1 -1
  231. package/build/resolvers/errors.d.ts +36 -6
  232. package/build/resolvers/errors.js +41 -7
  233. package/build/resolvers/errors.js.map +1 -1
  234. package/build/resolvers/resolve-document-if-changed.test.js +7 -0
  235. package/build/resolvers/resolve-document-if-changed.test.js.map +1 -1
  236. package/build/resolvers/resolve-document.d.ts +29 -9
  237. package/build/resolvers/resolve-document.integration.test.d.ts +1 -0
  238. package/build/resolvers/resolve-document.integration.test.js +108 -0
  239. package/build/resolvers/resolve-document.integration.test.js.map +1 -0
  240. package/build/resolvers/resolve-document.js +129 -49
  241. package/build/resolvers/resolve-document.js.map +1 -1
  242. package/build/resolvers/resolve-document.test.js +462 -12
  243. package/build/resolvers/resolve-document.test.js.map +1 -1
  244. package/build/resolvers/resolve-json-document.d.ts +11 -8
  245. package/build/resolvers/resolve-json-document.js +7 -6
  246. package/build/resolvers/resolve-json-document.js.map +1 -1
  247. package/build/resolvers/resolve-json-document.test.js +21 -4
  248. package/build/resolvers/resolve-json-document.test.js.map +1 -1
  249. package/build/validation/describe-jsonld-failure.d.ts +48 -8
  250. package/build/validation/describe-jsonld-failure.js +94 -27
  251. package/build/validation/describe-jsonld-failure.js.map +1 -1
  252. package/build/validation/describe-jsonld-failure.test.js +98 -13
  253. package/build/validation/describe-jsonld-failure.test.js.map +1 -1
  254. package/build/validation/index.d.ts +3 -2
  255. package/build/validation/index.js +2 -2
  256. package/build/validation/index.js.map +1 -1
  257. package/build/validation/validate-jsonld.d.ts +29 -3
  258. package/build/validation/validate-jsonld.js +49 -22
  259. package/build/validation/validate-jsonld.js.map +1 -1
  260. package/build/validation/validate-jsonld.test.js +62 -5
  261. package/build/validation/validate-jsonld.test.js.map +1 -1
  262. package/package.json +23 -3
@@ -21,6 +21,30 @@ export interface ConformityTopic {
21
21
  /** Free-text definition, when present. */
22
22
  definition?: string;
23
23
  }
24
+ /** A code published by a conformity scoring framework. */
25
+ export interface ConformityScore {
26
+ /** Exact score code. Empty strings are retained when published. */
27
+ code: string;
28
+ rank?: number;
29
+ definition?: string;
30
+ }
31
+ /** A named set of scores published by a scheme or profile. */
32
+ export interface ConformityScoringFramework {
33
+ name: string;
34
+ description?: string;
35
+ scores: ConformityScore[];
36
+ }
37
+ /**
38
+ * A criterion's required performance, which may be a metric, a score, both, or
39
+ * neither when the publisher supplies neither.
40
+ */
41
+ export interface ConformityRequiredPerformance {
42
+ metric?: {
43
+ canonicalId?: string;
44
+ name?: string;
45
+ };
46
+ score?: ConformityScore;
47
+ }
24
48
  /**
25
49
  * A single auditable criterion within a profile.
26
50
  *
@@ -42,6 +66,8 @@ export interface ConformityCriterion {
42
66
  topics: ConformityTopic[];
43
67
  /** Free-form tags attached to the criterion. */
44
68
  tags: string[];
69
+ /** Performance levels required by this criterion, when published. */
70
+ requiredPerformance?: ConformityRequiredPerformance[];
45
71
  }
46
72
  /**
47
73
  * A profile within a scheme. Profile URI is stable and versioned per spec.
@@ -60,6 +86,8 @@ export interface ConformityProfile {
60
86
  validFrom?: string;
61
87
  /** Criteria inlined within this profile. */
62
88
  criteria: ConformityCriterion[];
89
+ /** Scoring frameworks applied to criteria in this profile, when published. */
90
+ criterionScoringFrameworks?: ConformityScoringFramework[];
63
91
  }
64
92
  /**
65
93
  * A parsed conformity scheme as published by a scheme owner.
@@ -82,6 +110,21 @@ export interface ConformityScheme {
82
110
  documentation?: string;
83
111
  owner?: ConformitySchemeOwner;
84
112
  profiles: ConformityProfile[];
113
+ /** Overall scoring framework published by the scheme, when present. */
114
+ scoringFramework?: ConformityScoringFramework;
115
+ }
116
+ /** A catalogue match for an id that may belong to a different vocabulary tier. */
117
+ export interface ConformityReferenceMatch {
118
+ tier: 'scheme' | 'profile' | 'criterion';
119
+ /** Canonical ids of the visible schemes containing the matched entry. */
120
+ schemes: string[];
121
+ /** Canonical ids of the visible profiles containing a matched criterion, read by wrong-tier diagnostic messages. */
122
+ profiles?: string[];
123
+ }
124
+ /** Catalogue matches supplied by a caller that has resolved submitted ids. */
125
+ export interface ConformityReferenceResolution {
126
+ scheme?: ConformityReferenceMatch[];
127
+ profile?: ConformityReferenceMatch[];
85
128
  }
86
129
  /**
87
130
  * One entry in the UNTP Conformity Vocabulary Catalogue Register. Ingestion
@@ -124,25 +167,31 @@ export interface ConformityClaimCriterion {
124
167
  }
125
168
  /**
126
169
  * A single assessment entry on a credential's conformity claim: the criteria
127
- * the assessment references and the topics it declares for itself. The
128
- * declared topics are validated against the deduplicated union of the
129
- * published topics of the assessment's criteria, in one direction only: a
130
- * declared topic outside the union warns, while a union topic the assessment
131
- * does not declare is acceptable, because the assessment's topics are a
132
- * categorisation rather than an exhaustive enumeration.
170
+ * the assessment references, the topics it declares for itself, and the
171
+ * performance score codes it carries. The declared topics are validated
172
+ * against the deduplicated union of the published topics of the assessment's
173
+ * criteria, in one direction only: a declared topic outside the union warns,
174
+ * while a union topic the assessment does not declare is acceptable, because
175
+ * the assessment's topics are a categorisation rather than an exhaustive
176
+ * enumeration.
133
177
  */
134
178
  export interface ConformityClaimAssessment {
135
179
  /**
136
180
  * Criterion URIs the assessment references. Extractors must also emit every
137
181
  * entry here as a {@link ConformityClaimCriterion} in the claim's `criteria`
138
- * list: the validator's assessment check skips unresolved criteria on the
139
- * assumption that `conformity-criterion.not-in-profile` has already surfaced
140
- * them from `criteria`, so an entry present only here would silently escape
141
- * both checks.
182
+ * list: the validator's assessment topic and score checks both skip
183
+ * unresolved criteria on the assumption that
184
+ * `conformity-criterion.not-in-profile` has already surfaced them from
185
+ * `criteria`, so an entry present only here would silently escape the
186
+ * criterion, topic and score checks alike.
142
187
  */
143
188
  criteria: string[];
144
189
  /** Topic URIs the assessment declares for itself. */
145
190
  conformityTopics: string[];
191
+ /** Performance score codes extracted from this assessment; absent and empty both mean nothing to check. */
192
+ assessedScores?: {
193
+ code: string;
194
+ }[];
146
195
  }
147
196
  /**
148
197
  * A conformity claim extracted from a Digital Conformity Credential, in the
@@ -165,16 +214,21 @@ export interface ConformityClaim {
165
214
  /**
166
215
  * Profile URI the claim references. Optional because not every data model
167
216
  * requires a profile reference. When absent, the validator checks the scheme
168
- * reference only and emits a `conformity-profile.not-specified` advisory,
169
- * since criteria are published per versioned profile.
217
+ * reference and the attestation `profileScore`, and emits a
218
+ * `conformity-profile.not-specified` advisory, since criteria are published
219
+ * per versioned profile.
170
220
  */
171
221
  profile?: string;
222
+ /** Overall score code for the referenced profile, when carried by the claim. */
223
+ profileScore?: {
224
+ code: string;
225
+ };
172
226
  /** Criteria the claim addresses. */
173
227
  criteria: ConformityClaimCriterion[];
174
228
  /**
175
- * Assessment-level topic declarations. Optional and version-specific: an
176
- * extractor populates it only when its data model classifies assessments by
177
- * topic.
229
+ * Assessment-level topic and performance-score declarations. Optional and
230
+ * version-specific: an extractor populates it when its data model classifies
231
+ * assessments by topic, carries assessment performance scores, or both.
178
232
  */
179
233
  assessments?: ConformityClaimAssessment[];
180
234
  }
@@ -1,16 +1,22 @@
1
- import type { ConformityClaim, ConformityScheme, ConformityWarning } from './types.js';
1
+ import type { ConformityClaim, ConformityReferenceResolution, ConformityScheme, ConformityWarning } from './types.js';
2
2
  /**
3
3
  * Validates a credential's conformity claim against a parsed scheme.
4
4
  *
5
5
  * Short-circuits at the first miss:
6
- * - scheme null or `canonicalId` mismatch → only `conformity-scheme.not-found`.
7
- * - profile absent on the claim scheme check plus a
8
- * `conformity-profile.not-specified` advisory; criteria are published per
9
- * versioned profile, so without one the criterion and topic checks cannot
10
- * run, and silence would be indistinguishable from a clean pass.
11
- * - profile not in schemeonly `conformity-profile.not-found`.
12
- * - otherwise criteria-level, criterion-topic, and assessment-topic warnings
13
- * accumulate.
6
+ * - scheme null or `canonicalId` mismatch → only `conformity-scheme.not-found`,
7
+ * unless the caller supplied a wrong-tier reference diagnosis.
8
+ * - attestation `profileScore` outside the codes the scheme's framework
9
+ * publishes `conformity-attestation.score-not-in-framework`. This check
10
+ * runs before the profile branches, so its warning can accompany any of them.
11
+ * - profile absent on the claim the checks above plus a
12
+ * `conformity-profile.not-specified` advisory. Criteria are published per
13
+ * versioned profile, so without one the criterion, topic and performance-score
14
+ * checks cannot run, and silence would be indistinguishable from a clean pass.
15
+ * - profile not in scheme → `conformity-profile.not-found` or
16
+ * `conformity-profile.wrong-tier`, beside any attestation-score warning
17
+ * already raised.
18
+ * - otherwise → criteria-level, criterion-topic, assessment-topic and
19
+ * assessment-score warnings accumulate.
14
20
  *
15
21
  * Pointers are relative to `claim`. A consumer that holds the document the
16
22
  * claim was extracted from re-maps them onto it, and prepending a wrapper path
@@ -21,6 +27,6 @@ import type { ConformityClaim, ConformityScheme, ConformityWarning } from './typ
21
27
  * that filters empty or malformed entries shifts both `/assessments/{i}` and
22
28
  * topic indices away from their source positions (#753).
23
29
  *
24
- * @see ADR-033 §3 for warning code definitions.
30
+ * @see ADR-033 §3 and ADR-059 for warning code definitions.
25
31
  */
26
- export declare function validateConformityClaim(claim: ConformityClaim, scheme: ConformityScheme | null): readonly ConformityWarning[];
32
+ export declare function validateConformityClaim(claim: ConformityClaim, scheme: ConformityScheme | null, references?: ConformityReferenceResolution): readonly ConformityWarning[];
@@ -3,14 +3,20 @@ import { ConformityWarningCode } from './codes.js';
3
3
  * Validates a credential's conformity claim against a parsed scheme.
4
4
  *
5
5
  * Short-circuits at the first miss:
6
- * - scheme null or `canonicalId` mismatch → only `conformity-scheme.not-found`.
7
- * - profile absent on the claim scheme check plus a
8
- * `conformity-profile.not-specified` advisory; criteria are published per
9
- * versioned profile, so without one the criterion and topic checks cannot
10
- * run, and silence would be indistinguishable from a clean pass.
11
- * - profile not in schemeonly `conformity-profile.not-found`.
12
- * - otherwise criteria-level, criterion-topic, and assessment-topic warnings
13
- * accumulate.
6
+ * - scheme null or `canonicalId` mismatch → only `conformity-scheme.not-found`,
7
+ * unless the caller supplied a wrong-tier reference diagnosis.
8
+ * - attestation `profileScore` outside the codes the scheme's framework
9
+ * publishes `conformity-attestation.score-not-in-framework`. This check
10
+ * runs before the profile branches, so its warning can accompany any of them.
11
+ * - profile absent on the claim the checks above plus a
12
+ * `conformity-profile.not-specified` advisory. Criteria are published per
13
+ * versioned profile, so without one the criterion, topic and performance-score
14
+ * checks cannot run, and silence would be indistinguishable from a clean pass.
15
+ * - profile not in scheme → `conformity-profile.not-found` or
16
+ * `conformity-profile.wrong-tier`, beside any attestation-score warning
17
+ * already raised.
18
+ * - otherwise → criteria-level, criterion-topic, assessment-topic and
19
+ * assessment-score warnings accumulate.
14
20
  *
15
21
  * Pointers are relative to `claim`. A consumer that holds the document the
16
22
  * claim was extracted from re-maps them onto it, and prepending a wrapper path
@@ -21,12 +27,13 @@ import { ConformityWarningCode } from './codes.js';
21
27
  * that filters empty or malformed entries shifts both `/assessments/{i}` and
22
28
  * topic indices away from their source positions (#753).
23
29
  *
24
- * @see ADR-033 §3 for warning code definitions.
30
+ * @see ADR-033 §3 and ADR-059 for warning code definitions.
25
31
  */
26
- export function validateConformityClaim(claim, scheme) {
32
+ export function validateConformityClaim(claim, scheme, references) {
27
33
  const warnings = [];
28
34
  if (!scheme || scheme.canonicalId !== claim.scheme) {
29
- warnings.push({
35
+ const wrongTier = schemeWrongTierWarning(claim.scheme, references?.scheme);
36
+ warnings.push(wrongTier ?? {
30
37
  code: ConformityWarningCode.SchemeNotFound,
31
38
  message: 'Scheme URI is not in the known set.',
32
39
  received: claim.scheme,
@@ -34,22 +41,60 @@ export function validateConformityClaim(claim, scheme) {
34
41
  });
35
42
  return warnings;
36
43
  }
44
+ const schemeScoreCodes = uniqueStrings(scheme.scoringFramework?.scores.map((score) => score.code) ?? []);
45
+ if (claim.profileScore != null &&
46
+ schemeScoreCodes.length > 0 &&
47
+ !schemeScoreCodes.includes(claim.profileScore.code)) {
48
+ warnings.push({
49
+ code: ConformityWarningCode.AttestationScoreNotInFramework,
50
+ message: `Profile score code is not published by scheme ${scheme.canonicalId}'s scoring framework.`,
51
+ received: claim.profileScore.code,
52
+ expected: schemeScoreCodes,
53
+ pointer: '/profileScore/code',
54
+ });
55
+ }
37
56
  // `== null` covers undefined and a runtime null from JSON or database rows.
38
57
  if (claim.profile == null) {
39
58
  warnings.push({
40
59
  code: ConformityWarningCode.ProfileNotSpecified,
41
- message: 'The claim references no profile; criterion and topic checks were not performed because criteria are published per profile.',
60
+ message: 'The claim references no profile; assessment performance scores were not checked, and criterion and topic checks were not performed because criteria are published per profile.',
42
61
  pointer: '/profile',
43
62
  });
44
63
  return warnings;
45
64
  }
46
65
  const profile = scheme.profiles.find((p) => p.canonicalId === claim.profile);
47
66
  if (!profile) {
67
+ const expected = uniqueSortedStrings(scheme.profiles.map((p) => p.canonicalId));
68
+ const profileMatch = references?.profile?.find((match) => match.tier === 'profile');
69
+ if (profileMatch) {
70
+ warnings.push({
71
+ code: ConformityWarningCode.ProfileNotFound,
72
+ message: `Profile URI is not among the selected scheme's published profiles; the id belongs to scheme${profileMatch.schemes.length === 1 ? '' : 's'} ${profileMatch.schemes.join(', ')}.`,
73
+ received: claim.profile,
74
+ expected,
75
+ pointer: '/profile',
76
+ });
77
+ return warnings;
78
+ }
79
+ const wrongTier = references?.profile?.find((match) => match.tier !== 'profile' && match.schemes.length > 0);
80
+ if (wrongTier) {
81
+ const message = wrongTier.tier === 'scheme'
82
+ ? 'The referenced id is a scheme, not a profile in the selected scheme.'
83
+ : `The referenced id is a criterion of ${wrongTier.profiles?.length === 1 ? 'profile' : 'profiles'} ${uniqueSortedStrings(wrongTier.profiles ?? []).join(', ')} in ${wrongTier.schemes.length === 1 ? 'scheme' : 'schemes'} ${uniqueSortedStrings(wrongTier.schemes).join(', ')}, not a profile in the selected scheme.`;
84
+ warnings.push({
85
+ code: ConformityWarningCode.ProfileWrongTier,
86
+ message,
87
+ received: claim.profile,
88
+ expected,
89
+ pointer: '/profile',
90
+ });
91
+ return warnings;
92
+ }
48
93
  warnings.push({
49
94
  code: ConformityWarningCode.ProfileNotFound,
50
95
  message: "Profile URI is not among the scheme's published profiles.",
51
96
  received: claim.profile,
52
- expected: scheme.profiles.map((p) => p.canonicalId),
97
+ expected,
53
98
  pointer: '/profile',
54
99
  });
55
100
  return warnings;
@@ -160,6 +205,66 @@ export function validateConformityClaim(claim, scheme) {
160
205
  }
161
206
  });
162
207
  });
208
+ // assessment-score membership is independent of assessment-topic membership.
209
+ // The DCC does not identify the framework for a performance score, so the
210
+ // validator accepts a code published by any applicable framework. An
211
+ // unresolved criterion suppresses only this assessment's score check because
212
+ // that criterion could publish the received code.
213
+ claim.assessments?.forEach((assessment, i) => {
214
+ if (!assessment.assessedScores || assessment.assessedScores.length === 0)
215
+ return;
216
+ const resolvedCriteria = assessment.criteria
217
+ .map((criterionId) => profileCriteriaById.get(criterionId))
218
+ .filter((criterion) => criterion !== undefined);
219
+ if (resolvedCriteria.length !== assessment.criteria.length)
220
+ return;
221
+ const expected = performanceScoreCodes(scheme, profile, resolvedCriteria);
222
+ if (expected.length === 0)
223
+ return;
224
+ assessment.assessedScores.forEach((score, scoreIndex) => {
225
+ if (expected.includes(score.code))
226
+ return;
227
+ warnings.push({
228
+ code: ConformityWarningCode.AssessmentScoreNotInFramework,
229
+ message: `Assessment score code is not published by the scheme, profile or referenced-criterion frameworks that apply to profile ${profile.canonicalId}.`,
230
+ received: score.code,
231
+ expected,
232
+ pointer: `/assessments/${i}/assessedScores/${scoreIndex}/code`,
233
+ });
234
+ });
235
+ });
163
236
  return warnings;
164
237
  }
238
+ function uniqueStrings(values) {
239
+ return [...new Set(values)];
240
+ }
241
+ function uniqueSortedStrings(values) {
242
+ return [...new Set(values)].sort();
243
+ }
244
+ function schemeWrongTierWarning(received, matches) {
245
+ const usableMatches = matches?.filter((match) => match.schemes.length > 0) ?? [];
246
+ if (usableMatches.length === 0 || usableMatches.some((match) => match.tier === 'scheme'))
247
+ return undefined;
248
+ const tiers = uniqueStrings(usableMatches.map((match) => match.tier));
249
+ const expected = uniqueSortedStrings(usableMatches.flatMap((match) => match.schemes));
250
+ return {
251
+ code: ConformityWarningCode.SchemeWrongTier,
252
+ message: `The referenced id is a ${tiers.join(' or ')}, not a scheme; it belongs to scheme${expected.length === 1 ? '' : 's'} ${expected.join(', ')}.`,
253
+ received,
254
+ expected,
255
+ pointer: '/scheme',
256
+ };
257
+ }
258
+ function performanceScoreCodes(scheme, profile, resolvedCriteria) {
259
+ const codes = [];
260
+ scheme.scoringFramework?.scores.forEach((score) => codes.push(score.code));
261
+ profile.criterionScoringFrameworks?.forEach((framework) => framework.scores.forEach((score) => codes.push(score.code)));
262
+ resolvedCriteria.forEach((criterion) => {
263
+ criterion.requiredPerformance?.forEach((performance) => {
264
+ if (performance.score)
265
+ codes.push(performance.score.code);
266
+ });
267
+ });
268
+ return uniqueStrings(codes);
269
+ }
165
270
  //# sourceMappingURL=validate-conformity-claim.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-conformity-claim.js","sourceRoot":"","sources":["../../src/conformity-vocabulary/validate-conformity-claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAsB,EACtB,MAA+B;IAE/B,MAAM,QAAQ,GAAwB,EAAE,CAAC;IAEzC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,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AO,CAAC,WAAW,WAAW;oBACtI,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,CAAC,GAAG,aAAa,CAAC;oBAC5B,OAAO,EAAE,gBAAgB,CAAC,qBAAqB,CAAC,EAAE;iBACnD,CAAC,CAAC;YACL,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"validate-conformity-claim.js","sourceRoot":"","sources":["../../src/conformity-vocabulary/validate-conformity-claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAUnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAsB,EACtB,MAA+B,EAC/B,UAA0C;IAE1C,MAAM,QAAQ,GAAwB,EAAE,CAAC;IAEzC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QACnD,MAAM,SAAS,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;QAC3E,QAAQ,CAAC,IAAI,CACX,SAAS,IAAI;YACX,IAAI,EAAE,qBAAqB,CAAC,cAAc;YAC1C,OAAO,EAAE,qCAAqC;YAC9C,QAAQ,EAAE,KAAK,CAAC,MAAM;YACtB,OAAO,EAAE,SAAS;SACnB,CACF,CAAC;QACF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IACzG,IACE,KAAK,CAAC,YAAY,IAAI,IAAI;QAC1B,gBAAgB,CAAC,MAAM,GAAG,CAAC;QAC3B,CAAC,gBAAgB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