@tracepass/dpp-schemas 0.3.1 → 0.4.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.
package/README.md CHANGED
@@ -105,7 +105,37 @@ its stated gate is met — so a passport legitimately leaves it empty otherwise.
105
105
  }
106
106
  ```
107
107
 
108
- Four things are worth pointing out.
108
+ Five things are worth pointing out.
109
+
110
+ **`regulation.effectiveDate` is the date the passport obligation begins — not the date
111
+ the regulation applies.** Those are different dates and can sit years apart. PPWR
112
+ (EU) 2025/40 has applied since 12 August 2026, but its packaging DPP provisions phase
113
+ in from 2027, so `packaging` carries `2027`, not `2026-08-12`.
114
+
115
+ Read both dates with their precision marker. `datePrecision` / `mandatoryDatePrecision`
116
+ are `"day"` or `"year"`; absent means `"day"`:
117
+
118
+ - **`"day"`** — a real statutory date. Battery is `2027-02-18`, set by ESPR Article 77.
119
+ - **`"year"`** — only the year is known, because the governing delegated or implementing
120
+ act is not yet adopted. The day and month are filler. **Do not render these as a
121
+ deadline.** Eleven of the twelve categories are currently `"year"`; only battery is
122
+ `"day"`.
123
+
124
+ ```python
125
+ r = template["regulation"]
126
+ if r.get("datePrecision", "day") == "year":
127
+ print(f"DPP obligation expected in {r['effectiveDate'][:4]}") # "2027"
128
+ else:
129
+ print(f"DPP obligation from {r['effectiveDate']}") # "2027-02-18"
130
+ ```
131
+
132
+ > **Upgrading from 0.3.x?** The date values did not change and no key was removed, so
133
+ > code that reads this data keeps working. One case does break: if you **vendored a copy
134
+ > of `schema.json` from 0.3.x** and validate 0.4.0 template data against it, eleven of
135
+ > the twelve templates are rejected — that version closed the `regulation` object with
136
+ > `additionalProperties: false`, so the new precision keys are refused. Take the
137
+ > `schema.json` shipped in this package alongside the data. From 0.4.1 the `regulation`
138
+ > object is open, so later additive keys will not do this again.
109
139
 
110
140
  **`regulationRef`** is the reason this data is worth having. Every field says which
111
141
  article and annex mandates it, so a compliance report can cite its source rather than
package/index.json CHANGED
@@ -39,7 +39,9 @@
39
39
  "name": "EU ESPR - Chemicals",
40
40
  "number": "(EU) 2024/1781",
41
41
  "effectiveDate": "2029-09-01",
42
- "mandatoryDate": "2029-09-01"
42
+ "datePrecision": "year",
43
+ "mandatoryDate": "2029-09-01",
44
+ "mandatoryDatePrecision": "year"
43
45
  }
44
46
  },
45
47
  {
@@ -54,7 +56,9 @@
54
56
  "name": "Construction Products Regulation",
55
57
  "number": "(EU) 2024/3110",
56
58
  "effectiveDate": "2029-01-01",
57
- "mandatoryDate": "2029-01-01"
59
+ "datePrecision": "year",
60
+ "mandatoryDate": "2029-01-01",
61
+ "mandatoryDatePrecision": "year"
58
62
  }
59
63
  },
60
64
  {
@@ -69,7 +73,9 @@
69
73
  "name": "EU ESPR - Electronics",
70
74
  "number": "(EU) 2024/1781",
71
75
  "effectiveDate": "2028-01-01",
72
- "mandatoryDate": "2029-01-01"
76
+ "datePrecision": "year",
77
+ "mandatoryDate": "2029-01-01",
78
+ "mandatoryDatePrecision": "year"
73
79
  }
74
80
  },
75
81
  {
@@ -84,7 +90,9 @@
84
90
  "name": "EU ESPR - FMCG",
85
91
  "number": "(EU) 2024/1781",
86
92
  "effectiveDate": "2028-01-01",
87
- "mandatoryDate": "2030-01-01"
93
+ "datePrecision": "year",
94
+ "mandatoryDate": "2030-01-01",
95
+ "mandatoryDatePrecision": "year"
88
96
  }
89
97
  },
90
98
  {
@@ -99,7 +107,9 @@
99
107
  "name": "EU ESPR - Furniture",
100
108
  "number": "(EU) 2024/1781",
101
109
  "effectiveDate": "2029-01-01",
102
- "mandatoryDate": "2030-01-01"
110
+ "datePrecision": "year",
111
+ "mandatoryDate": "2030-01-01",
112
+ "mandatoryDatePrecision": "year"
103
113
  }
104
114
  },
105
115
  {
@@ -114,7 +124,9 @@
114
124
  "name": "EU ESPR - Jewelry",
115
125
  "number": "(EU) 2024/1781",
116
126
  "effectiveDate": "2030-01-01",
117
- "mandatoryDate": "2030-01-01"
127
+ "datePrecision": "year",
128
+ "mandatoryDate": "2030-01-01",
129
+ "mandatoryDatePrecision": "year"
118
130
  }
119
131
  },
120
132
  {
@@ -129,7 +141,9 @@
129
141
  "name": "Packaging and Packaging Waste Regulation",
130
142
  "number": "(EU) 2025/40",
131
143
  "effectiveDate": "2027-01-01",
132
- "mandatoryDate": "2030-01-01"
144
+ "datePrecision": "year",
145
+ "mandatoryDate": "2030-01-01",
146
+ "mandatoryDatePrecision": "year"
133
147
  }
134
148
  },
135
149
  {
@@ -144,7 +158,9 @@
144
158
  "name": "EU ESPR - Iron, Steel & Aluminium",
145
159
  "number": "(EU) 2024/1781",
146
160
  "effectiveDate": "2027-01-01",
147
- "mandatoryDate": "2028-01-01"
161
+ "datePrecision": "year",
162
+ "mandatoryDate": "2028-01-01",
163
+ "mandatoryDatePrecision": "year"
148
164
  }
149
165
  },
150
166
  {
@@ -159,7 +175,9 @@
159
175
  "name": "EU ESPR - Textiles",
160
176
  "number": "(EU) 2024/1781",
161
177
  "effectiveDate": "2028-01-01",
162
- "mandatoryDate": "2029-01-01"
178
+ "datePrecision": "year",
179
+ "mandatoryDate": "2029-01-01",
180
+ "mandatoryDatePrecision": "year"
163
181
  }
164
182
  },
165
183
  {
@@ -174,7 +192,9 @@
174
192
  "name": "EU ESPR - Toys",
175
193
  "number": "(EU) 2024/1781",
176
194
  "effectiveDate": "2030-01-01",
177
- "mandatoryDate": "2030-01-01"
195
+ "datePrecision": "year",
196
+ "mandatoryDate": "2030-01-01",
197
+ "mandatoryDatePrecision": "year"
178
198
  }
179
199
  },
180
200
  {
@@ -189,7 +209,9 @@
189
209
  "name": "EU ESPR - Tyres",
190
210
  "number": "(EU) 2024/1781",
191
211
  "effectiveDate": "2028-01-01",
192
- "mandatoryDate": "2029-01-01"
212
+ "datePrecision": "year",
213
+ "mandatoryDate": "2029-01-01",
214
+ "mandatoryDatePrecision": "year"
193
215
  }
194
216
  }
195
217
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracepass/dpp-schemas",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Machine-readable field specifications for EU Digital Product Passports (ESPR) \u2014 12 product categories, 937 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
@@ -42,14 +42,14 @@
42
42
  },
43
43
  "regulation": {
44
44
  "type": "object",
45
- "description": "The EU instrument that mandates this category's passport.",
45
+ "description": "The EU instrument that mandates this category's passport. Deliberately open to extra properties, unlike the rest of this schema: the regulatory picture gains detail as delegated and implementing acts land, and a closed object makes every additive key a breaking change for anyone validating newer data against a pinned older copy of this file. Adding a key here is a MINOR bump; removing or retyping one is MAJOR.",
46
46
  "required": [
47
47
  "name",
48
48
  "number",
49
49
  "effectiveDate",
50
50
  "mandatoryDate"
51
51
  ],
52
- "additionalProperties": false,
52
+ "additionalProperties": true,
53
53
  "properties": {
54
54
  "name": {
55
55
  "type": "string",
@@ -67,12 +67,30 @@
67
67
  "effectiveDate": {
68
68
  "type": "string",
69
69
  "format": "date",
70
- "description": "ISO 8601 date (YYYY-MM-DD). A string, not a timestamp."
70
+ "description": "ISO 8601 date (YYYY-MM-DD). A string, not a timestamp. This is the date the DIGITAL PRODUCT PASSPORT obligation begins for the category — NOT the date the instrument itself enters into force or starts applying. The two can differ by years: PPWR (EU) 2025/40 has applied since 2026-08-12, but its packaging DPP provisions phase in from 2027. Read with datePrecision: where that is \"year\", only the year is significant and the day/month are filler."
71
+ },
72
+ "datePrecision": {
73
+ "type": "string",
74
+ "enum": [
75
+ "day",
76
+ "year"
77
+ ],
78
+ "default": "day",
79
+ "description": "How much of effectiveDate is real. \"day\" = a specific statutory date (e.g. battery, 2027-02-18, ESPR Art. 77). \"year\" = only the year is known, because the governing delegated or implementing act is not yet adopted; the day/month are placeholders and MUST NOT be presented to end users as a deadline."
71
80
  },
72
81
  "mandatoryDate": {
73
82
  "type": "string",
74
83
  "format": "date",
75
- "description": "ISO 8601 date (YYYY-MM-DD) from which the passport is legally required."
84
+ "description": "ISO 8601 date (YYYY-MM-DD) from which the passport is legally required. Read with mandatoryDatePrecision — see datePrecision for the semantics."
85
+ },
86
+ "mandatoryDatePrecision": {
87
+ "type": "string",
88
+ "enum": [
89
+ "day",
90
+ "year"
91
+ ],
92
+ "default": "day",
93
+ "description": "How much of mandatoryDate is real. Same semantics as datePrecision."
76
94
  }
77
95
  }
78
96
  },
@@ -13982,4 +13982,4 @@
13982
13982
  ],
13983
13983
  "createdBy": "system",
13984
13984
  "changelog": "v3: Per-category field applicability (requiredBy) for the EV/LMT/industrial state-of-health inversion (DP 33, 61-66). Demoted carbon-footprint (DP 17/18 deferred format) and due-diligence (DP 19 deferred format) fields to anticipated. Demoted truly optional/conditional fields (DP 5 manufacturer web/email, DP 35 commercial warranty, DP 41 Cd/Pb symbols, DP 68-71 if-applicable SoH). Added 6 new fields: DP 24 renewable content share, DP 37 RTE at 50% cycle-life, DP 46 component part numbers, DP 53 dynamic power, DP 57 dynamic energy RTE, DP 64 remaining round-trip efficiency. Fixed DP 40/41 citations per Corrigendum 2026/90285. | v4: Add 13 Annex XIII fields (pre/post-consumer recycled shares Ni/Co/Li, SoC-split power capability, temperature information, cadmium/lead symbols URL, component part numbers URL, spare parts sources URL, accidents information URL). Closes GEFEG mapping gaps."
13985
- }
13985
+ }
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Chemicals",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2029-09-01",
35
- "mandatoryDate": "2029-09-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2029-09-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "Construction Products Regulation",
33
33
  "number": "(EU) 2024/3110",
34
34
  "effectiveDate": "2029-01-01",
35
- "mandatoryDate": "2029-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2029-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Electronics",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2028-01-01",
35
- "mandatoryDate": "2029-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2029-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - FMCG",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2028-01-01",
35
- "mandatoryDate": "2030-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2030-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Furniture",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2029-01-01",
35
- "mandatoryDate": "2030-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2030-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Jewelry",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2030-01-01",
35
- "mandatoryDate": "2030-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2030-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "Packaging and Packaging Waste Regulation",
33
33
  "number": "(EU) 2025/40",
34
34
  "effectiveDate": "2027-01-01",
35
- "mandatoryDate": "2030-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2030-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Iron, Steel & Aluminium",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2027-01-01",
35
- "mandatoryDate": "2028-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2028-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Textiles",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2028-01-01",
35
- "mandatoryDate": "2029-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2029-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Toys",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2030-01-01",
35
- "mandatoryDate": "2030-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2030-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {
@@ -32,7 +32,9 @@
32
32
  "name": "EU ESPR - Tyres",
33
33
  "number": "(EU) 2024/1781",
34
34
  "effectiveDate": "2028-01-01",
35
- "mandatoryDate": "2029-01-01"
35
+ "datePrecision": "year",
36
+ "mandatoryDate": "2029-01-01",
37
+ "mandatoryDatePrecision": "year"
36
38
  },
37
39
  "fields": [
38
40
  {