@tracepass/dpp-schemas 1.16.4 → 1.17.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.
package/README.md CHANGED
@@ -285,6 +285,15 @@ record.
285
285
  **`aiHints`** lists the synonyms a supplier datasheet might use for the field. If you are
286
286
  extracting values from unstructured PDFs, these are the search terms that work.
287
287
 
288
+ **`entryProperties`** types the entries of an `array` field whose entries are objects:
289
+ each member has a `type` (`string` | `number` | `boolean`), and optionally `required`,
290
+ `enum`, `format` (`date`, `iso3166-alpha2`, `cas-number`) and a `description`. Battery
291
+ composition, for example, is a list of `{substanceName, casNumber, massPercent}`, with
292
+ `massPercent` as a share of the battery's total mass. Audit check [22] requires
293
+ `aiHints.expectedFormat` to name every declared member, and to use no member that is
294
+ not declared, so the extraction hint and the declared shape cannot drift apart. Fields
295
+ without it are untyped lists.
296
+
288
297
  ## No build step
289
298
 
290
299
  There is nothing to compile and nothing to install. Read the JSON.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracepass/dpp-schemas",
3
- "version": "1.16.4",
3
+ "version": "1.17.0",
4
4
  "description": "Machine-readable field specifications for EU Digital Product Passports (ESPR) — 13 product categories, 991 fields, each traced to the article of EU law that mandates it. Pure JSON, no dependencies.",
5
5
  "keywords": [
6
6
  "digital-product-passport",
package/schema.json CHANGED
@@ -250,6 +250,48 @@
250
250
  "file_reference"
251
251
  ]
252
252
  },
253
+ "entryProperties": {
254
+ "type": "object",
255
+ "description": "For an `array` field whose entries are objects: the members of one entry. Lets consumers type the list (the VC profile emits `items` from it) and is checked against `aiHints.expectedFormat`, which must name every member (audit [22]). Member names are camelCase.",
256
+ "minProperties": 1,
257
+ "additionalProperties": {
258
+ "type": "object",
259
+ "required": [
260
+ "type"
261
+ ],
262
+ "additionalProperties": false,
263
+ "properties": {
264
+ "type": {
265
+ "enum": [
266
+ "string",
267
+ "number",
268
+ "boolean"
269
+ ]
270
+ },
271
+ "description": {
272
+ "type": "string"
273
+ },
274
+ "required": {
275
+ "type": "boolean",
276
+ "description": "The entry is incomplete without this member."
277
+ },
278
+ "enum": {
279
+ "type": "array",
280
+ "items": {
281
+ "type": "string"
282
+ },
283
+ "minItems": 1
284
+ },
285
+ "format": {
286
+ "enum": [
287
+ "date",
288
+ "iso3166-alpha2",
289
+ "cas-number"
290
+ ]
291
+ }
292
+ }
293
+ }
294
+ },
253
295
  "unit": {
254
296
  "description": "Unit of measure. Must be a canonical key from units.json — the historical free-text spellings are no longer permitted. `null` when the field has no unit.",
255
297
  "oneOf": [
@@ -4602,6 +4602,21 @@
4602
4602
  "el": "Κατάλογος ενεργών υλικών καθόδου με όνομα και ποσοστό κατά βάρος"
4603
4603
  },
4604
4604
  "dataType": "array",
4605
+ "entryProperties": {
4606
+ "substanceName": {
4607
+ "type": "string",
4608
+ "required": true
4609
+ },
4610
+ "casNumber": {
4611
+ "type": "string",
4612
+ "format": "cas-number"
4613
+ },
4614
+ "massPercent": {
4615
+ "type": "number",
4616
+ "description": "% of the battery's total mass",
4617
+ "required": true
4618
+ }
4619
+ },
4605
4620
  "unit": null,
4606
4621
  "translatable": false,
4607
4622
  "defaultValue": null,
@@ -4671,7 +4686,7 @@
4671
4686
  "cathode composition",
4672
4687
  "CAM"
4673
4688
  ],
4674
- "expectedFormat": "Array of objects: [{name: 'Lithium Nickel Manganese Cobalt Oxide', weightPercent: 85.0}]",
4689
+ "expectedFormat": "Array of objects: [{substanceName: 'Lithium Nickel Cobalt Aluminum Oxide', casNumber: '193214-24-3', massPercent: 32.5}]. Each item: substanceName (string), casNumber (string, when known), massPercent (number, % of the battery's total mass).",
4675
4690
  "extractionPriority": 7
4676
4691
  }
4677
4692
  },
@@ -4730,6 +4745,21 @@
4730
4745
  "el": "Κατάλογος ενεργών υλικών ανόδου με όνομα και ποσοστό κατά βάρος"
4731
4746
  },
4732
4747
  "dataType": "array",
4748
+ "entryProperties": {
4749
+ "substanceName": {
4750
+ "type": "string",
4751
+ "required": true
4752
+ },
4753
+ "casNumber": {
4754
+ "type": "string",
4755
+ "format": "cas-number"
4756
+ },
4757
+ "massPercent": {
4758
+ "type": "number",
4759
+ "description": "% of the battery's total mass",
4760
+ "required": true
4761
+ }
4762
+ },
4733
4763
  "unit": null,
4734
4764
  "translatable": false,
4735
4765
  "defaultValue": null,
@@ -4799,7 +4829,7 @@
4799
4829
  "anode composition",
4800
4830
  "AAM"
4801
4831
  ],
4802
- "expectedFormat": "Array of objects: [{name: 'Graphite', weightPercent: 95.0}]",
4832
+ "expectedFormat": "Array of objects: [{substanceName: 'Graphite', casNumber: '7782-42-5', massPercent: 18.2}]. Each item: substanceName (string), casNumber (string, when known), massPercent (number, % of the battery's total mass).",
4803
4833
  "extractionPriority": 7
4804
4834
  }
4805
4835
  },
@@ -4858,6 +4888,21 @@
4858
4888
  "el": "Κατάλογος συστατικών ηλεκτρολύτη με όνομα και ποσοστό κατά βάρος"
4859
4889
  },
4860
4890
  "dataType": "array",
4891
+ "entryProperties": {
4892
+ "substanceName": {
4893
+ "type": "string",
4894
+ "required": true
4895
+ },
4896
+ "casNumber": {
4897
+ "type": "string",
4898
+ "format": "cas-number"
4899
+ },
4900
+ "massPercent": {
4901
+ "type": "number",
4902
+ "description": "% of the battery's total mass",
4903
+ "required": true
4904
+ }
4905
+ },
4861
4906
  "unit": null,
4862
4907
  "translatable": false,
4863
4908
  "defaultValue": null,
@@ -4927,7 +4972,7 @@
4927
4972
  "electrolyte components",
4928
4973
  "solvent composition"
4929
4974
  ],
4930
- "expectedFormat": "Array of objects: [{name: 'LiPF6', weightPercent: 12.0}]",
4975
+ "expectedFormat": "Array of objects: [{substanceName: 'Lithium hexafluorophosphate (LiPF6)', casNumber: '21324-40-3', massPercent: 1.5}]. Each item: substanceName (string), casNumber (string, when known), massPercent (number, % of the battery's total mass).",
4931
4976
  "extractionPriority": 6
4932
4977
  }
4933
4978
  },
@@ -4986,6 +5031,21 @@
4986
5031
  "el": "Κρίσιμες πρώτες ύλες που περιέχονται στην μπαταρία σε συγκέντρωση άνω του 0,1 % κατά βάρος (παράρτημα VI μέρος Α σημείο 10, μέσω του παραρτήματος XIII σημείο 1 στοιχείο α)). Αναφέρετε την καθεμία με την ονομασία και το ποσοστό της."
4987
5032
  },
4988
5033
  "dataType": "array",
5034
+ "entryProperties": {
5035
+ "material": {
5036
+ "type": "string",
5037
+ "required": true
5038
+ },
5039
+ "massPercent": {
5040
+ "type": "number",
5041
+ "description": "% of the battery's total mass",
5042
+ "required": true
5043
+ },
5044
+ "countryOfOrigin": {
5045
+ "type": "string",
5046
+ "format": "iso3166-alpha2"
5047
+ }
5048
+ },
4989
5049
  "unit": null,
4990
5050
  "translatable": false,
4991
5051
  "defaultValue": null,
@@ -5066,7 +5126,7 @@
5066
5126
  "graphite",
5067
5127
  "manganese"
5068
5128
  ],
5069
- "expectedFormat": "Array of objects: [{crmName: 'Cobalt', weightPercent: 12.5, countryOfOrigin: 'CD'}]. Each item has crmName (string), weightPercent (number), countryOfOrigin (ISO 3166 string, restricted access)",
5129
+ "expectedFormat": "Array of objects: [{material: 'Cobalt', massPercent: 4.8, countryOfOrigin: 'CD'}]. Each item: material (string), massPercent (number, % of the battery's total mass), countryOfOrigin (ISO 3166 alpha-2, restricted access).",
5070
5130
  "extractionPriority": 8
5071
5131
  }
5072
5132
  },
@@ -5125,6 +5185,25 @@
5125
5185
  "el": "Επικίνδυνες ουσίες που περιέχονται στην μπαταρία, εκτός από υδράργυρο, κάδμιο ή μόλυβδο: ουσίες που ταξινομούνται ως επικίνδυνες σύμφωνα με το άρθρο 3 του κανονισμού (ΕΚ) αριθ. 1272/2008 (παράρτημα VI μέρος Α σημείο 8, μέσω του παραρτήματος XIII σημείο 1 στοιχείο α)). Αναφέρετε την καθεμία με την ονομασία της, τον αριθμό CAS της, εφόσον υπάρχει, και τη θέση της στην μπαταρία."
5126
5186
  },
5127
5187
  "dataType": "array",
5188
+ "entryProperties": {
5189
+ "substanceName": {
5190
+ "type": "string",
5191
+ "required": true
5192
+ },
5193
+ "casNumber": {
5194
+ "type": "string",
5195
+ "format": "cas-number"
5196
+ },
5197
+ "concentrationPercent": {
5198
+ "type": "number"
5199
+ },
5200
+ "hazardClassification": {
5201
+ "type": "string"
5202
+ },
5203
+ "locationInBattery": {
5204
+ "type": "string"
5205
+ }
5206
+ },
5128
5207
  "unit": null,
5129
5208
  "translatable": false,
5130
5209
  "defaultValue": null,
@@ -12375,6 +12454,26 @@
12375
12454
  "el": "Αρχείο αρνητικών συμβάντων όπως βαθιά εκφόρτιση, ακραίες θερμοκρασίες ή ατυχήματα"
12376
12455
  },
12377
12456
  "dataType": "array",
12457
+ "entryProperties": {
12458
+ "date": {
12459
+ "type": "string",
12460
+ "format": "date",
12461
+ "required": true
12462
+ },
12463
+ "type": {
12464
+ "type": "string",
12465
+ "required": true,
12466
+ "enum": [
12467
+ "deep_discharge",
12468
+ "extreme_temp",
12469
+ "accident",
12470
+ "other"
12471
+ ]
12472
+ },
12473
+ "description": {
12474
+ "type": "string"
12475
+ }
12476
+ },
12378
12477
  "unit": null,
12379
12478
  "translatable": false,
12380
12479
  "defaultValue": null,
@@ -13577,6 +13676,16 @@
13577
13676
  "el": "Αριθμοί ανταλλακτικών για τα κατασκευαστικά στοιχεία που υπόκεινται σε αντικατάσταση, σύμφωνα με το παράρτημα XIII σημείο 2 στοιχείο β. Δομημένος κατάλογος με την ονομασία του κατασκευαστικού στοιχείου και τον αριθμό ανταλλακτικού."
13578
13677
  },
13579
13678
  "dataType": "array",
13679
+ "entryProperties": {
13680
+ "componentName": {
13681
+ "type": "string",
13682
+ "required": true
13683
+ },
13684
+ "partNumber": {
13685
+ "type": "string",
13686
+ "required": true
13687
+ }
13688
+ },
13580
13689
  "unit": null,
13581
13690
  "translatable": false,
13582
13691
  "defaultValue": null,