@bsv/dpp-profiles 0.3.0-beta.1

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 (96) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +64 -0
  3. package/dist/applicability.d.ts +96 -0
  4. package/dist/applicability.d.ts.map +1 -0
  5. package/dist/applicability.js +181 -0
  6. package/dist/applicability.js.map +1 -0
  7. package/dist/combinations.d.ts +30 -0
  8. package/dist/combinations.d.ts.map +1 -0
  9. package/dist/combinations.js +103 -0
  10. package/dist/combinations.js.map +1 -0
  11. package/dist/evidence-shapes.d.ts +198 -0
  12. package/dist/evidence-shapes.d.ts.map +1 -0
  13. package/dist/evidence-shapes.js +123 -0
  14. package/dist/evidence-shapes.js.map +1 -0
  15. package/dist/gs1-epc-binary.d.ts +81 -0
  16. package/dist/gs1-epc-binary.d.ts.map +1 -0
  17. package/dist/gs1-epc-binary.js +252 -0
  18. package/dist/gs1-epc-binary.js.map +1 -0
  19. package/dist/gs1-resolution.d.ts +392 -0
  20. package/dist/gs1-resolution.d.ts.map +1 -0
  21. package/dist/gs1-resolution.js +696 -0
  22. package/dist/gs1-resolution.js.map +1 -0
  23. package/dist/identifiers.d.ts +57 -0
  24. package/dist/identifiers.d.ts.map +1 -0
  25. package/dist/identifiers.js +117 -0
  26. package/dist/identifiers.js.map +1 -0
  27. package/dist/index.d.ts +235 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +124 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/manifest-v2.d.ts +87 -0
  32. package/dist/manifest-v2.d.ts.map +1 -0
  33. package/dist/manifest-v2.js +31 -0
  34. package/dist/manifest-v2.js.map +1 -0
  35. package/dist/mapping.d.ts +84 -0
  36. package/dist/mapping.d.ts.map +1 -0
  37. package/dist/mapping.js +88 -0
  38. package/dist/mapping.js.map +1 -0
  39. package/dist/projections.d.ts +233 -0
  40. package/dist/projections.d.ts.map +1 -0
  41. package/dist/projections.js +466 -0
  42. package/dist/projections.js.map +1 -0
  43. package/frozen.json +42 -0
  44. package/generated/consumer/battery-v2.json +2248 -0
  45. package/generated/consumer/battery-v3.json +4354 -0
  46. package/generated/consumer/general-v1.json +9 -0
  47. package/generated/consumer/general-v2.json +714 -0
  48. package/generated/consumer/textile-v1.json +101 -0
  49. package/generated/consumer/textile-v2.json +1033 -0
  50. package/generated/consumer/textile-v3.json +2011 -0
  51. package/generated/index.json +86 -0
  52. package/generated/mapping/battery@2.md +116 -0
  53. package/generated/mapping/battery@3.md +130 -0
  54. package/generated/mapping/general@2.md +50 -0
  55. package/generated/mapping/textile@2.md +61 -0
  56. package/generated/mapping/textile@3.md +73 -0
  57. package/generated/payload-schema/battery@2.public.schema.json +609 -0
  58. package/generated/payload-schema/battery@2.restricted.schema.json +377 -0
  59. package/generated/payload-schema/battery@3.public.schema.json +1364 -0
  60. package/generated/payload-schema/battery@3.restricted.schema.json +1097 -0
  61. package/generated/payload-schema/general@1.public.schema.json +37 -0
  62. package/generated/payload-schema/general@1.restricted.schema.json +9 -0
  63. package/generated/payload-schema/general@2.public.schema.json +352 -0
  64. package/generated/payload-schema/general@2.restricted.schema.json +52 -0
  65. package/generated/payload-schema/textile@1.public.schema.json +82 -0
  66. package/generated/payload-schema/textile@1.restricted.schema.json +22 -0
  67. package/generated/payload-schema/textile@2.public.schema.json +464 -0
  68. package/generated/payload-schema/textile@2.restricted.schema.json +78 -0
  69. package/generated/payload-schema/textile@3.public.schema.json +1299 -0
  70. package/generated/payload-schema/textile@3.restricted.schema.json +78 -0
  71. package/manifests/battery@2.json +4047 -0
  72. package/manifests/battery@3.json +6164 -0
  73. package/manifests/exchange/untp-0.7.0-jose@1.json +191 -0
  74. package/manifests/exchange/vc-di-ecdsa-rdfc-2019@1.json +74 -0
  75. package/manifests/exchange/vsc-draft-compat@0.1.0.json +64 -0
  76. package/manifests/general@1.json +148 -0
  77. package/manifests/general@2.json +1266 -0
  78. package/manifests/interoperability/epcis-json@1.json +69 -0
  79. package/manifests/interoperability/epcis-vsc@1.json +64 -0
  80. package/manifests/interoperability/gs1-digital-link@1.json +71 -0
  81. package/manifests/operator/federated-operators@1.json +54 -0
  82. package/manifests/operator/single-operator@1.json +52 -0
  83. package/manifests/textile@1.json +383 -0
  84. package/manifests/textile@2.json +1682 -0
  85. package/manifests/textile@3.json +2763 -0
  86. package/package.json +59 -0
  87. package/schemas/exchange-profile.schema.json +134 -0
  88. package/schemas/gs1/NOTICE.md +11 -0
  89. package/schemas/gs1/resolver-description-file-schema-1.2.0.json +124 -0
  90. package/schemas/gs1/resolver-linkset-context-1.2.1.jsonld +39 -0
  91. package/schemas/gs1/resolver-linkset-schema-1.2.1.json +96 -0
  92. package/schemas/interoperability-profile.schema.json +347 -0
  93. package/schemas/operator-profile.schema.json +108 -0
  94. package/schemas/product-identity.schema.json +45 -0
  95. package/schemas/profile-manifest-v2.schema.json +1087 -0
  96. package/schemas/profile-manifest.schema.json +291 -0
@@ -0,0 +1,1087 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://bsv-blockchain.github.io/dpp/profiles/schemas/profile-manifest-v2.schema.json",
4
+ "title": "DPP industry profile manifest, version 2",
5
+ "description": "The canonical, immutable definition of one industry data profile under manifest version 2 (spec/profiles.md section 2, spec/passport-projections.md section 6). Everything version 1 declares survives unchanged; version 2 adds a requirement status per field (what asks for the value, and whether that is enacted, guidance, anticipated, under review or explicitly not to be displayed), a declarative applicability rule that composes category, jurisdiction, effective date and technical thresholds and can say unresolved, date precision, subject scope and override declarations per field, the shared evidence value types, and a succession record naming the version this one follows and the migration outcome of every changed field. Forms, validators, consumer documents and registry endpoints are generated from it and never edit it.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "manifestVersion",
10
+ "id",
11
+ "version",
12
+ "profile",
13
+ "kind",
14
+ "status",
15
+ "title",
16
+ "regulatoryLine",
17
+ "baseline",
18
+ "roles",
19
+ "applicability",
20
+ "schemaDialect",
21
+ "schemaUri",
22
+ "schemaDigest",
23
+ "restrictedSchemaUri",
24
+ "restrictedSchemaDigest",
25
+ "contextRefs",
26
+ "extends",
27
+ "stamps",
28
+ "fields",
29
+ "eventMappings",
30
+ "accessPolicyRef",
31
+ "accessTiers",
32
+ "sourceRefs",
33
+ "identity"
34
+ ],
35
+ "properties": {
36
+ "manifestVersion": {
37
+ "const": "2"
38
+ },
39
+ "id": {
40
+ "type": "string",
41
+ "pattern": "^[a-z][a-z0-9-]*$"
42
+ },
43
+ "version": {
44
+ "type": "integer",
45
+ "minimum": 1
46
+ },
47
+ "profile": {
48
+ "type": "string",
49
+ "pattern": "^[a-z][a-z0-9-]*@[0-9]+$"
50
+ },
51
+ "kind": {
52
+ "const": "industry"
53
+ },
54
+ "status": {
55
+ "enum": [
56
+ "draft",
57
+ "current",
58
+ "superseded"
59
+ ]
60
+ },
61
+ "supersededBy": {
62
+ "type": "string",
63
+ "pattern": "^[a-z][a-z0-9-]*@[0-9]+$"
64
+ },
65
+ "title": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "description": {
70
+ "type": "string"
71
+ },
72
+ "regulatoryLine": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "One sentence, aligned with and never compliant."
76
+ },
77
+ "baseline": {
78
+ "type": "string",
79
+ "pattern": "^[a-z][a-z0-9-]*@[0-9]+$"
80
+ },
81
+ "roles": {
82
+ "type": "array",
83
+ "minItems": 1,
84
+ "items": {
85
+ "enum": [
86
+ "passport-writer",
87
+ "attestation-issuer",
88
+ "registry",
89
+ "passport-reader"
90
+ ]
91
+ }
92
+ },
93
+ "applicability": {
94
+ "type": "object",
95
+ "additionalProperties": false,
96
+ "required": [
97
+ "categories",
98
+ "jurisdictions",
99
+ "statements"
100
+ ],
101
+ "properties": {
102
+ "categories": {
103
+ "type": "array",
104
+ "items": {
105
+ "$ref": "#/$defs/option"
106
+ }
107
+ },
108
+ "categoryKey": {
109
+ "type": "string",
110
+ "description": "The payload key that names the product category the applicability rules read."
111
+ },
112
+ "jurisdictions": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "string"
116
+ }
117
+ },
118
+ "statements": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": [
124
+ "text",
125
+ "status"
126
+ ],
127
+ "properties": {
128
+ "text": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "status": {
133
+ "enum": [
134
+ "enacted",
135
+ "anticipated",
136
+ "needs-review",
137
+ "guidance"
138
+ ]
139
+ },
140
+ "source": {
141
+ "type": "string"
142
+ },
143
+ "effectiveDate": {
144
+ "type": "string",
145
+ "format": "date"
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ },
152
+ "schemaDialect": {
153
+ "const": "https://json-schema.org/draft/2020-12/schema"
154
+ },
155
+ "schemaUri": {
156
+ "type": "string",
157
+ "minLength": 1,
158
+ "description": "The generated JSON Schema for the public payload."
159
+ },
160
+ "schemaDigest": {
161
+ "type": "string",
162
+ "pattern": "^[0-9a-f]{64}$"
163
+ },
164
+ "restrictedSchemaUri": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "description": "The generated JSON Schema for the off-chain restricted tiers."
168
+ },
169
+ "restrictedSchemaDigest": {
170
+ "type": "string",
171
+ "pattern": "^[0-9a-f]{64}$"
172
+ },
173
+ "contextRefs": {
174
+ "type": "array",
175
+ "items": {
176
+ "type": "object",
177
+ "additionalProperties": false,
178
+ "required": [
179
+ "id",
180
+ "name",
181
+ "version",
182
+ "use"
183
+ ],
184
+ "properties": {
185
+ "id": {
186
+ "type": "string"
187
+ },
188
+ "name": {
189
+ "type": "string"
190
+ },
191
+ "version": {
192
+ "type": "string"
193
+ },
194
+ "repository": {
195
+ "type": "string"
196
+ },
197
+ "licence": {
198
+ "type": "string"
199
+ },
200
+ "retrieved": {
201
+ "type": "string",
202
+ "format": "date"
203
+ },
204
+ "urnPattern": {
205
+ "type": "string"
206
+ },
207
+ "use": {
208
+ "type": "string"
209
+ }
210
+ }
211
+ }
212
+ },
213
+ "extends": {
214
+ "type": [
215
+ "string",
216
+ "null"
217
+ ],
218
+ "pattern": "^[a-z][a-z0-9-]*@[0-9]+$"
219
+ },
220
+ "stamps": {
221
+ "type": "array",
222
+ "description": "Reserved payload keys the platform writes and a consumer must not read as product data.",
223
+ "items": {
224
+ "type": "object",
225
+ "additionalProperties": false,
226
+ "required": [
227
+ "key",
228
+ "description",
229
+ "valueType"
230
+ ],
231
+ "properties": {
232
+ "key": {
233
+ "type": "string"
234
+ },
235
+ "description": {
236
+ "type": "string"
237
+ },
238
+ "valueType": {
239
+ "enum": [
240
+ "text",
241
+ "id",
242
+ "integer",
243
+ "enum"
244
+ ]
245
+ },
246
+ "const": {
247
+ "type": [
248
+ "string",
249
+ "integer"
250
+ ]
251
+ },
252
+ "codeList": {
253
+ "$ref": "#/$defs/codeList"
254
+ },
255
+ "pattern": {
256
+ "type": "string"
257
+ }
258
+ }
259
+ }
260
+ },
261
+ "fields": {
262
+ "type": "array",
263
+ "items": {
264
+ "$ref": "#/$defs/field"
265
+ }
266
+ },
267
+ "eventMappings": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": [
273
+ "nativeOperation",
274
+ "eventType",
275
+ "externalEvent",
276
+ "requires",
277
+ "withoutEvidence"
278
+ ],
279
+ "properties": {
280
+ "nativeOperation": {
281
+ "enum": [
282
+ "ACTIVATE",
283
+ "SOLD",
284
+ "RESOLD",
285
+ "REPAIRED",
286
+ "RECYCLED",
287
+ "EDIT",
288
+ "TRANSFER"
289
+ ]
290
+ },
291
+ "eventType": {
292
+ "enum": [
293
+ "Origin",
294
+ "Transfer",
295
+ "Transformation",
296
+ "Disposition"
297
+ ]
298
+ },
299
+ "externalEvent": {
300
+ "type": "string",
301
+ "description": "The external lifecycle semantics the operation may map to when its evidence condition holds."
302
+ },
303
+ "requires": {
304
+ "type": "string",
305
+ "description": "The evidence without which the mapping is not made."
306
+ },
307
+ "withoutEvidence": {
308
+ "enum": [
309
+ "insufficient-data",
310
+ "unsupported",
311
+ "transformed"
312
+ ]
313
+ }
314
+ }
315
+ }
316
+ },
317
+ "accessPolicyRef": {
318
+ "type": "string"
319
+ },
320
+ "accessTiers": {
321
+ "type": "array",
322
+ "items": {
323
+ "type": "object",
324
+ "additionalProperties": false,
325
+ "required": [
326
+ "id",
327
+ "description",
328
+ "storage"
329
+ ],
330
+ "properties": {
331
+ "id": {
332
+ "enum": [
333
+ "public",
334
+ "owner",
335
+ "legitimate",
336
+ "authority"
337
+ ]
338
+ },
339
+ "description": {
340
+ "type": "string"
341
+ },
342
+ "storage": {
343
+ "enum": [
344
+ "on-chain public payload",
345
+ "off-chain encrypted"
346
+ ]
347
+ }
348
+ }
349
+ }
350
+ },
351
+ "sourceRefs": {
352
+ "type": "array",
353
+ "items": {
354
+ "type": "object",
355
+ "additionalProperties": false,
356
+ "required": [
357
+ "id",
358
+ "name",
359
+ "use"
360
+ ],
361
+ "properties": {
362
+ "id": {
363
+ "type": "string"
364
+ },
365
+ "name": {
366
+ "type": "string"
367
+ },
368
+ "reference": {
369
+ "type": "string"
370
+ },
371
+ "version": {
372
+ "type": "string"
373
+ },
374
+ "licence": {
375
+ "type": "string"
376
+ },
377
+ "licensedText": {
378
+ "type": "boolean",
379
+ "description": "True when the text is licensed and is cited by clause only, never reproduced."
380
+ },
381
+ "use": {
382
+ "type": "string"
383
+ },
384
+ "fields": {
385
+ "type": "array",
386
+ "items": {
387
+ "type": "string"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ },
393
+ "groups": {
394
+ "type": "array",
395
+ "description": "Presentation grouping, informative.",
396
+ "items": {
397
+ "type": "object",
398
+ "additionalProperties": false,
399
+ "required": [
400
+ "id",
401
+ "title"
402
+ ],
403
+ "properties": {
404
+ "id": {
405
+ "type": "string"
406
+ },
407
+ "title": {
408
+ "type": "string"
409
+ },
410
+ "blurb": {
411
+ "type": "string"
412
+ }
413
+ }
414
+ }
415
+ },
416
+ "identity": {
417
+ "type": "object",
418
+ "additionalProperties": false,
419
+ "required": [
420
+ "passportIdentifier",
421
+ "granularities",
422
+ "parentRelations"
423
+ ],
424
+ "properties": {
425
+ "passportIdentifier": {
426
+ "type": "string",
427
+ "description": "How the enduring passport identifier is formed for this profile."
428
+ },
429
+ "granularities": {
430
+ "type": "array",
431
+ "items": {
432
+ "enum": [
433
+ "model",
434
+ "batch",
435
+ "item"
436
+ ]
437
+ }
438
+ },
439
+ "itemIdentifier": {
440
+ "type": "string",
441
+ "description": "The field key that identifies the one physical unit, when the profile declares one."
442
+ },
443
+ "modelIdentifier": {
444
+ "type": "string"
445
+ },
446
+ "batchIdentifier": {
447
+ "type": "string"
448
+ },
449
+ "parentRelations": {
450
+ "type": "array",
451
+ "items": {
452
+ "type": "object",
453
+ "additionalProperties": false,
454
+ "required": [
455
+ "child",
456
+ "parent"
457
+ ],
458
+ "properties": {
459
+ "child": {
460
+ "enum": [
461
+ "item",
462
+ "batch"
463
+ ]
464
+ },
465
+ "parent": {
466
+ "enum": [
467
+ "model",
468
+ "batch"
469
+ ]
470
+ }
471
+ }
472
+ }
473
+ }
474
+ }
475
+ },
476
+ "succession": {
477
+ "type": "object",
478
+ "additionalProperties": false,
479
+ "required": [
480
+ "of",
481
+ "migration"
482
+ ],
483
+ "description": "The profile version this manifest succeeds and what became of every field whose meaning, type or key changed. A field not listed is unchanged. The old manifest is never edited; a reader of a state under the old version decodes it under the old version.",
484
+ "properties": {
485
+ "of": {
486
+ "type": "string",
487
+ "pattern": "^[a-z][a-z0-9-]*@[0-9]+$"
488
+ },
489
+ "migration": {
490
+ "type": "array",
491
+ "items": {
492
+ "type": "object",
493
+ "additionalProperties": false,
494
+ "required": [
495
+ "from",
496
+ "outcome",
497
+ "note"
498
+ ],
499
+ "properties": {
500
+ "from": {
501
+ "type": "string",
502
+ "minLength": 1,
503
+ "description": "The field key in the preceding version, or the new key for outcome new."
504
+ },
505
+ "to": {
506
+ "type": "string",
507
+ "minLength": 1
508
+ },
509
+ "outcome": {
510
+ "enum": [
511
+ "unchanged",
512
+ "renamed",
513
+ "retyped",
514
+ "split",
515
+ "new",
516
+ "withdrawn",
517
+ "relabelled"
518
+ ]
519
+ },
520
+ "note": {
521
+ "type": "string",
522
+ "minLength": 1
523
+ }
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "$defs": {
531
+ "option": {
532
+ "type": "object",
533
+ "additionalProperties": false,
534
+ "required": [
535
+ "value",
536
+ "label"
537
+ ],
538
+ "properties": {
539
+ "value": {
540
+ "type": "string"
541
+ },
542
+ "label": {
543
+ "type": "string"
544
+ }
545
+ }
546
+ },
547
+ "codeList": {
548
+ "type": "object",
549
+ "additionalProperties": false,
550
+ "required": [
551
+ "closed",
552
+ "options"
553
+ ],
554
+ "properties": {
555
+ "closed": {
556
+ "type": "boolean",
557
+ "description": "True: a value outside the options is invalid. False: the list is what is known in practice and a value outside it is valid."
558
+ },
559
+ "options": {
560
+ "type": "array",
561
+ "items": {
562
+ "$ref": "#/$defs/option"
563
+ }
564
+ }
565
+ }
566
+ },
567
+ "valueType": {
568
+ "enum": [
569
+ "id",
570
+ "text",
571
+ "enum",
572
+ "multi",
573
+ "decimal",
574
+ "integer",
575
+ "percent",
576
+ "monthYear",
577
+ "date",
578
+ "url",
579
+ "document",
580
+ "graphic",
581
+ "country",
582
+ "record",
583
+ "any",
584
+ "measurement",
585
+ "certification",
586
+ "claimEvidence",
587
+ "localisedText",
588
+ "relatedDocument",
589
+ "warrantyTerms"
590
+ ]
591
+ },
592
+ "constraints": {
593
+ "type": "object",
594
+ "additionalProperties": false,
595
+ "properties": {
596
+ "minimum": {
597
+ "type": "number"
598
+ },
599
+ "maximum": {
600
+ "type": "number"
601
+ },
602
+ "step": {
603
+ "type": "number"
604
+ },
605
+ "pattern": {
606
+ "type": "string"
607
+ },
608
+ "patternHint": {
609
+ "type": "string"
610
+ },
611
+ "maxLength": {
612
+ "type": "integer",
613
+ "minimum": 1
614
+ }
615
+ }
616
+ },
617
+ "part": {
618
+ "type": "object",
619
+ "additionalProperties": false,
620
+ "required": [
621
+ "key",
622
+ "label",
623
+ "valueType"
624
+ ],
625
+ "properties": {
626
+ "key": {
627
+ "type": "string"
628
+ },
629
+ "label": {
630
+ "type": "string"
631
+ },
632
+ "valueType": {
633
+ "enum": [
634
+ "text",
635
+ "decimal",
636
+ "percent",
637
+ "integer",
638
+ "enum",
639
+ "country"
640
+ ]
641
+ },
642
+ "unit": {
643
+ "type": "string"
644
+ },
645
+ "codeList": {
646
+ "$ref": "#/$defs/codeList"
647
+ },
648
+ "constraints": {
649
+ "$ref": "#/$defs/constraints"
650
+ },
651
+ "required": {
652
+ "type": "boolean"
653
+ }
654
+ }
655
+ },
656
+ "applicabilityRule": {
657
+ "description": "always: the field applies. category-in: it applies only to the named categories. needs-review: an obligation holds only under a condition a form cannot decide, stated in words, and is unresolved until a person decides. all and any compose rules; jurisdiction-in, effective and threshold are decidable from the context an evaluator is given; unresolved records that the primary source could not be established and is never satisfied. Unknown applicability cannot become a pass, and it does not prevent an adopter retaining incomplete draft data.",
658
+ "oneOf": [
659
+ {
660
+ "type": "object",
661
+ "additionalProperties": false,
662
+ "required": [
663
+ "rule"
664
+ ],
665
+ "properties": {
666
+ "rule": {
667
+ "const": "always"
668
+ }
669
+ }
670
+ },
671
+ {
672
+ "type": "object",
673
+ "additionalProperties": false,
674
+ "required": [
675
+ "rule",
676
+ "categories"
677
+ ],
678
+ "properties": {
679
+ "rule": {
680
+ "const": "category-in"
681
+ },
682
+ "categories": {
683
+ "type": "array",
684
+ "minItems": 1,
685
+ "items": {
686
+ "type": "string"
687
+ }
688
+ }
689
+ }
690
+ },
691
+ {
692
+ "type": "object",
693
+ "additionalProperties": false,
694
+ "required": [
695
+ "rule",
696
+ "condition"
697
+ ],
698
+ "properties": {
699
+ "rule": {
700
+ "const": "needs-review"
701
+ },
702
+ "condition": {
703
+ "type": "string",
704
+ "minLength": 1
705
+ },
706
+ "categories": {
707
+ "type": "array",
708
+ "minItems": 1,
709
+ "items": {
710
+ "type": "string"
711
+ },
712
+ "description": "Narrows the categories the review concerns."
713
+ }
714
+ }
715
+ },
716
+ {
717
+ "type": "object",
718
+ "additionalProperties": false,
719
+ "required": [
720
+ "rule",
721
+ "rules"
722
+ ],
723
+ "properties": {
724
+ "rule": {
725
+ "enum": [
726
+ "all",
727
+ "any"
728
+ ]
729
+ },
730
+ "rules": {
731
+ "type": "array",
732
+ "minItems": 1,
733
+ "items": {
734
+ "$ref": "#/$defs/applicabilityRule"
735
+ }
736
+ }
737
+ }
738
+ },
739
+ {
740
+ "type": "object",
741
+ "additionalProperties": false,
742
+ "required": [
743
+ "rule",
744
+ "jurisdictions"
745
+ ],
746
+ "properties": {
747
+ "rule": {
748
+ "const": "jurisdiction-in"
749
+ },
750
+ "jurisdictions": {
751
+ "type": "array",
752
+ "minItems": 1,
753
+ "items": {
754
+ "type": "string",
755
+ "minLength": 1
756
+ }
757
+ }
758
+ }
759
+ },
760
+ {
761
+ "type": "object",
762
+ "additionalProperties": false,
763
+ "required": [
764
+ "rule"
765
+ ],
766
+ "properties": {
767
+ "rule": {
768
+ "const": "effective"
769
+ },
770
+ "from": {
771
+ "type": "string",
772
+ "format": "date"
773
+ },
774
+ "until": {
775
+ "type": "string",
776
+ "format": "date"
777
+ }
778
+ },
779
+ "minProperties": 2,
780
+ "description": "At least one of from and until, so the interval is never empty."
781
+ },
782
+ {
783
+ "type": "object",
784
+ "additionalProperties": false,
785
+ "required": [
786
+ "rule",
787
+ "field",
788
+ "operator",
789
+ "value"
790
+ ],
791
+ "properties": {
792
+ "rule": {
793
+ "const": "threshold"
794
+ },
795
+ "field": {
796
+ "type": "string",
797
+ "minLength": 1,
798
+ "description": "The payload key the threshold reads, for example a capacity in kWh."
799
+ },
800
+ "operator": {
801
+ "enum": [
802
+ "gt",
803
+ "gte",
804
+ "lt",
805
+ "lte",
806
+ "eq"
807
+ ]
808
+ },
809
+ "value": {
810
+ "type": "number"
811
+ },
812
+ "unit": {
813
+ "type": "string",
814
+ "minLength": 1
815
+ }
816
+ }
817
+ },
818
+ {
819
+ "type": "object",
820
+ "additionalProperties": false,
821
+ "required": [
822
+ "rule",
823
+ "reason"
824
+ ],
825
+ "properties": {
826
+ "rule": {
827
+ "const": "unresolved"
828
+ },
829
+ "reason": {
830
+ "type": "string",
831
+ "minLength": 1
832
+ },
833
+ "source": {
834
+ "type": "string",
835
+ "minLength": 1
836
+ }
837
+ }
838
+ }
839
+ ]
840
+ },
841
+ "field": {
842
+ "type": "object",
843
+ "additionalProperties": false,
844
+ "required": [
845
+ "key",
846
+ "pointer",
847
+ "label",
848
+ "valueType",
849
+ "cardinality",
850
+ "granularity",
851
+ "provenance",
852
+ "accessTier",
853
+ "obligation",
854
+ "legalBasis",
855
+ "applicability",
856
+ "requirement"
857
+ ],
858
+ "properties": {
859
+ "key": {
860
+ "type": "string",
861
+ "minLength": 1
862
+ },
863
+ "pointer": {
864
+ "type": "string",
865
+ "pattern": "^/"
866
+ },
867
+ "label": {
868
+ "type": "string"
869
+ },
870
+ "semanticUri": {
871
+ "type": "string"
872
+ },
873
+ "valueType": {
874
+ "$ref": "#/$defs/valueType"
875
+ },
876
+ "unit": {
877
+ "type": "string"
878
+ },
879
+ "codeList": {
880
+ "$ref": "#/$defs/codeList"
881
+ },
882
+ "constraints": {
883
+ "$ref": "#/$defs/constraints"
884
+ },
885
+ "cardinality": {
886
+ "enum": [
887
+ "one",
888
+ "many"
889
+ ]
890
+ },
891
+ "granularity": {
892
+ "enum": [
893
+ "model",
894
+ "batch",
895
+ "item"
896
+ ]
897
+ },
898
+ "provenance": {
899
+ "type": "object",
900
+ "additionalProperties": false,
901
+ "required": [
902
+ "capture"
903
+ ],
904
+ "properties": {
905
+ "capture": {
906
+ "enum": [
907
+ "form",
908
+ "brand",
909
+ "platform",
910
+ "event",
911
+ "derived",
912
+ "deferred"
913
+ ]
914
+ },
915
+ "dynamic": {
916
+ "type": "boolean"
917
+ },
918
+ "prose": {
919
+ "type": "boolean"
920
+ },
921
+ "onLabel": {
922
+ "type": "boolean"
923
+ },
924
+ "needsBms": {
925
+ "type": "boolean"
926
+ },
927
+ "kind": {
928
+ "enum": [
929
+ "fact",
930
+ "declaration",
931
+ "calculation",
932
+ "assessment"
933
+ ],
934
+ "description": "What the value is: a recorded fact, the maker's declaration, a calculated figure or a third party's assessment."
935
+ }
936
+ }
937
+ },
938
+ "accessTier": {
939
+ "enum": [
940
+ "public",
941
+ "owner",
942
+ "legitimate",
943
+ "authority"
944
+ ]
945
+ },
946
+ "obligation": {
947
+ "enum": [
948
+ "required",
949
+ "recommended",
950
+ "optional"
951
+ ]
952
+ },
953
+ "legalBasis": {
954
+ "type": "string",
955
+ "minLength": 1,
956
+ "description": "The instrument that asks for the value, or the plain statement that none does. Separate from obligation."
957
+ },
958
+ "applicability": {
959
+ "$ref": "#/$defs/applicabilityRule"
960
+ },
961
+ "sourceRefs": {
962
+ "type": "array",
963
+ "items": {
964
+ "type": "object",
965
+ "additionalProperties": false,
966
+ "required": [
967
+ "source"
968
+ ],
969
+ "properties": {
970
+ "source": {
971
+ "type": "string"
972
+ },
973
+ "clause": {
974
+ "type": "string"
975
+ },
976
+ "name": {
977
+ "type": "string"
978
+ },
979
+ "property": {
980
+ "type": "string"
981
+ }
982
+ }
983
+ }
984
+ },
985
+ "awaitingAct": {
986
+ "type": "string"
987
+ },
988
+ "supersedes": {
989
+ "type": "string",
990
+ "description": "The previous version's key this field replaces."
991
+ },
992
+ "group": {
993
+ "type": "string"
994
+ },
995
+ "parts": {
996
+ "type": "array",
997
+ "items": {
998
+ "$ref": "#/$defs/part"
999
+ }
1000
+ },
1001
+ "note": {
1002
+ "type": "string"
1003
+ },
1004
+ "requirement": {
1005
+ "$ref": "#/$defs/requirement"
1006
+ },
1007
+ "precision": {
1008
+ "enum": [
1009
+ "day",
1010
+ "month",
1011
+ "year"
1012
+ ],
1013
+ "description": "For a date field: the precision the source supplies. A month is never turned into a day."
1014
+ },
1015
+ "scope": {
1016
+ "enum": [
1017
+ "model",
1018
+ "batch",
1019
+ "item",
1020
+ "component"
1021
+ ],
1022
+ "description": "The subject the fact describes when finer than granularity allows, for example a component of an item."
1023
+ },
1024
+ "componentScoped": {
1025
+ "type": "boolean",
1026
+ "description": "True when the value is declared per component, and the payload carries one entry per component with its componentRef."
1027
+ },
1028
+ "overridable": {
1029
+ "type": "object",
1030
+ "additionalProperties": false,
1031
+ "required": [
1032
+ "at",
1033
+ "policy"
1034
+ ],
1035
+ "description": "Whether a batch or item source may carry a value that takes precedence over the model's for this field, and under which named policy. Absent means a conflicting value at another granularity is a conflict, never an override.",
1036
+ "properties": {
1037
+ "at": {
1038
+ "enum": [
1039
+ "batch",
1040
+ "item"
1041
+ ]
1042
+ },
1043
+ "policy": {
1044
+ "type": "string",
1045
+ "minLength": 1
1046
+ }
1047
+ }
1048
+ }
1049
+ }
1050
+ },
1051
+ "requirement": {
1052
+ "type": "object",
1053
+ "additionalProperties": false,
1054
+ "required": [
1055
+ "status",
1056
+ "source"
1057
+ ],
1058
+ "description": "What asks for the value and how settled that is. enacted: an instrument in force names it. guidance: published guidance names it and no instrument settles its form. anticipated: an act not yet adopted or a later application date. needs-review: the primary source could not be confirmed. not-to-be-displayed: guidance says the value is not to be filled or displayed as of the effective date, for the reason stated; a consumer never shows it as required. This is separate from obligation, which is this profile's own requirement, and from legalBasis, which names the instrument in words. none: no instrument or guidance asks for the value; the field is the profile's own addition, and its obligation is the profile's alone.",
1059
+ "properties": {
1060
+ "status": {
1061
+ "enum": [
1062
+ "enacted",
1063
+ "guidance",
1064
+ "anticipated",
1065
+ "needs-review",
1066
+ "not-to-be-displayed",
1067
+ "none"
1068
+ ]
1069
+ },
1070
+ "source": {
1071
+ "type": "string",
1072
+ "minLength": 1
1073
+ },
1074
+ "clause": {
1075
+ "type": "string"
1076
+ },
1077
+ "effectiveDate": {
1078
+ "type": "string",
1079
+ "format": "date"
1080
+ },
1081
+ "note": {
1082
+ "type": "string"
1083
+ }
1084
+ }
1085
+ }
1086
+ }
1087
+ }