@carrot-foundation/schemas 0.1.36 → 0.1.38

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 (42) hide show
  1. package/dist/index.cjs +1778 -36
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +1510 -14
  4. package/dist/index.d.ts +1510 -14
  5. package/dist/index.js +1735 -37
  6. package/dist/index.js.map +1 -1
  7. package/package.json +1 -1
  8. package/schemas/ipfs/collection/collection.example.json +1 -0
  9. package/schemas/ipfs/collection/collection.schema.json +306 -32
  10. package/schemas/ipfs/credit/credit.example.json +1 -0
  11. package/schemas/ipfs/credit/credit.schema.json +327 -45
  12. package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.example.json +290 -0
  13. package/schemas/ipfs/credit-purchase-receipt/credit-purchase-receipt.schema.json +1772 -0
  14. package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.example.json +280 -0
  15. package/schemas/ipfs/credit-retirement-receipt/credit-retirement-receipt.schema.json +1704 -0
  16. package/schemas/ipfs/gas-id/gas-id.schema.json +7 -6
  17. package/schemas/ipfs/mass-id/mass-id.schema.json +7 -6
  18. package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +30 -29
  19. package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +637 -15
  20. package/schemas/ipfs/methodology/methodology.example.json +27 -26
  21. package/schemas/ipfs/methodology/methodology.schema.json +458 -15
  22. package/schemas/ipfs/recycled-id/recycled-id.schema.json +7 -6
  23. package/schemas/ipfs/gas-id/gas-id.attributes.schema.json +0 -219
  24. package/schemas/ipfs/gas-id/gas-id.data.schema.json +0 -120
  25. package/schemas/ipfs/mass-id-audit/mass-id-audit.data.schema.json +0 -130
  26. package/schemas/ipfs/methodology/methodology.data.schema.json +0 -121
  27. package/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json +0 -91
  28. package/schemas/ipfs/purchase-id/purchase-id.data.schema.json +0 -337
  29. package/schemas/ipfs/purchase-id/purchase-id.example.json +0 -224
  30. package/schemas/ipfs/purchase-id/purchase-id.schema.json +0 -29
  31. package/schemas/ipfs/recycled-id/recycled-id.attributes.schema.json +0 -202
  32. package/schemas/ipfs/recycled-id/recycled-id.data.schema.json +0 -63
  33. package/schemas/ipfs/shared/base/base.schema.json +0 -163
  34. package/schemas/ipfs/shared/certificate/certificate.schema.json +0 -145
  35. package/schemas/ipfs/shared/definitions/definitions.schema.json +0 -255
  36. package/schemas/ipfs/shared/entities/location/location.schema.json +0 -90
  37. package/schemas/ipfs/shared/entities/participant/participant.schema.json +0 -28
  38. package/schemas/ipfs/shared/nft/nft.schema.json +0 -182
  39. package/schemas/ipfs/shared/references/audit-reference/audit-reference.schema.json +0 -42
  40. package/schemas/ipfs/shared/references/gas-id-reference/gas-id-reference.schema.json +0 -27
  41. package/schemas/ipfs/shared/references/mass-id-reference/mass-id-reference.schema.json +0 -27
  42. package/schemas/ipfs/shared/references/methodology-reference/methodology-reference.schema.json +0 -34
@@ -1,26 +1,648 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json",
4
3
  "title": "MassID Audit IPFS Record",
5
- "unevaluatedProperties": false,
6
- "allOf": [
7
- {
8
- "$ref": "../shared/base/base.schema.json"
4
+ "description": "MassID audit metadata stored in IPFS, extending the base schema with audit results and references",
5
+ "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/tags/0.1.38/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json",
6
+ "version": "0.1.38",
7
+ "type": "object",
8
+ "properties": {
9
+ "$schema": {
10
+ "title": "JSON Schema URI",
11
+ "description": "URI of the JSON Schema used to validate this record",
12
+ "example": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/shared/base/base.schema.json",
13
+ "type": "string",
14
+ "format": "uri"
9
15
  },
10
- {
16
+ "schema": {
11
17
  "type": "object",
12
18
  "properties": {
13
- "schema": {
14
- "properties": {
15
- "type": {
16
- "const": "MassID Audit"
19
+ "hash": {
20
+ "title": "Schema Hash",
21
+ "description": "Keccak256 hash of the JSON Schema this record was validated against",
22
+ "examples": [
23
+ "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
24
+ "0xac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f"
25
+ ],
26
+ "anyOf": [
27
+ {
28
+ "title": "Keccak256 Hash",
29
+ "description": "Keccak256 cryptographic hash as hexadecimal string",
30
+ "examples": [
31
+ "ac08c3cf2e175e55961d6affdb38bc24591b84ceef7f3707c69ae3d52c148b2f",
32
+ "b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2"
33
+ ],
34
+ "type": "string",
35
+ "pattern": "^[0-9a-fA-F]{64}$"
36
+ },
37
+ {
38
+ "type": "string",
39
+ "pattern": "^0x[a-fA-F0-9]{64}$"
17
40
  }
18
- }
41
+ ]
42
+ },
43
+ "type": {
44
+ "title": "MassID Audit Schema Type",
45
+ "description": "MassID Audit schema type",
46
+ "type": "string",
47
+ "const": "MassID Audit"
48
+ },
49
+ "version": {
50
+ "title": "Schema Version",
51
+ "description": "Version of the schema, using semantic versioning",
52
+ "examples": [
53
+ "0.1.0",
54
+ "1.0.0",
55
+ "2.1.3"
56
+ ],
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
60
+ }
61
+ },
62
+ "required": [
63
+ "hash",
64
+ "type",
65
+ "version"
66
+ ],
67
+ "additionalProperties": false
68
+ },
69
+ "created_at": {
70
+ "title": "Created At",
71
+ "description": "ISO 8601 creation timestamp for this record",
72
+ "examples": [
73
+ "2024-12-05T11:02:47.000Z",
74
+ "2025-02-22T10:35:12.000Z"
75
+ ],
76
+ "type": "string",
77
+ "format": "date-time",
78
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
79
+ },
80
+ "external_id": {
81
+ "title": "External ID",
82
+ "description": "Off-chain reference ID (UUID from Carrot backend)",
83
+ "examples": [
84
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
85
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
86
+ ],
87
+ "type": "string",
88
+ "format": "uuid",
89
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
90
+ },
91
+ "external_url": {
92
+ "title": "External URL",
93
+ "description": "External URL of the content",
94
+ "examples": [
95
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
96
+ "https://carrot.eco/whitepaper.pdf"
97
+ ],
98
+ "type": "string",
99
+ "format": "uri"
100
+ },
101
+ "original_content_hash": {
102
+ "title": "Original Content Hash",
103
+ "description": "SHA-256 hash of the original JSON content including private data before schema validation",
104
+ "examples": [
105
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
106
+ "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
107
+ ],
108
+ "type": "string",
109
+ "pattern": "^[0-9a-fA-F]{64}$"
110
+ },
111
+ "content_hash": {
112
+ "title": "Content Hash",
113
+ "description": "SHA-256 hash of RFC 8785 canonicalized JSON after schema validation",
114
+ "examples": [
115
+ "87f633634cc4b02f628685651f0a29b7bfa22a0bd841f725c6772dd00a58d489",
116
+ "6e83b8e6373847bbdc056549bedda38dc88854ce41ba4fca11e0fc6ce3e07ef6"
117
+ ],
118
+ "type": "string",
119
+ "pattern": "^[0-9a-fA-F]{64}$"
120
+ },
121
+ "creator": {
122
+ "title": "Creator",
123
+ "description": "Entity that created this record",
124
+ "type": "object",
125
+ "properties": {
126
+ "name": {
127
+ "title": "Creator Name",
128
+ "description": "Company or individual name that created this record",
129
+ "examples": [
130
+ "Carrot Foundation"
131
+ ],
132
+ "type": "string"
19
133
  },
20
- "data": {
21
- "$ref": "./mass-id-audit.data.schema.json"
134
+ "id": {
135
+ "title": "Creator ID",
136
+ "description": "Unique identifier for the creator",
137
+ "examples": [
138
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
139
+ "6f520d88-864d-432d-bf9f-5c3166c4818f",
140
+ "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
141
+ ],
142
+ "type": "string",
143
+ "format": "uuid",
144
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
22
145
  }
146
+ },
147
+ "required": [
148
+ "name",
149
+ "id"
150
+ ],
151
+ "additionalProperties": false
152
+ },
153
+ "relationships": {
154
+ "title": "Relationships",
155
+ "description": "References to other IPFS records this record relates to",
156
+ "type": "array",
157
+ "items": {
158
+ "title": "Relationship",
159
+ "description": "Relationship to another IPFS record",
160
+ "type": "object",
161
+ "properties": {
162
+ "target_uri": {
163
+ "title": "Target IPFS URI",
164
+ "description": "Target IPFS URI of the referenced record",
165
+ "examples": [
166
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
167
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
168
+ ],
169
+ "type": "string",
170
+ "minLength": 1,
171
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
172
+ },
173
+ "type": {
174
+ "title": "Relationship Type",
175
+ "description": "Type of relationship to the referenced record",
176
+ "examples": [
177
+ "mass-id",
178
+ "collection",
179
+ "credit-purchase-receipt"
180
+ ],
181
+ "type": "string",
182
+ "enum": [
183
+ "collection",
184
+ "credit",
185
+ "gas-id",
186
+ "mass-id",
187
+ "mass-id-audit",
188
+ "methodology",
189
+ "credit-purchase-receipt",
190
+ "credit-retirement-receipt",
191
+ "recycled-id"
192
+ ]
193
+ },
194
+ "description": {
195
+ "title": "Relationship Description",
196
+ "description": "Human-readable description of the relationship",
197
+ "examples": [
198
+ "This record supersedes the previous version",
199
+ "Related carbon credit batch",
200
+ "Source document for this verification",
201
+ "Child record derived from this parent",
202
+ "Updated version of original record"
203
+ ],
204
+ "type": "string"
205
+ }
206
+ },
207
+ "required": [
208
+ "target_uri",
209
+ "type"
210
+ ],
211
+ "additionalProperties": false
23
212
  }
213
+ },
214
+ "environment": {
215
+ "title": "Environment",
216
+ "description": "Environment information",
217
+ "type": "object",
218
+ "properties": {
219
+ "blockchain_network": {
220
+ "title": "Blockchain Network",
221
+ "description": "Blockchain Network Environment",
222
+ "type": "string",
223
+ "enum": [
224
+ "mainnet",
225
+ "testnet"
226
+ ]
227
+ },
228
+ "deployment": {
229
+ "title": "Deployment Environment",
230
+ "description": "System environment where this record was generated",
231
+ "type": "string",
232
+ "enum": [
233
+ "production",
234
+ "development",
235
+ "testing"
236
+ ]
237
+ },
238
+ "data_set_name": {
239
+ "title": "Data Set Name",
240
+ "description": "Name of the data set for this record",
241
+ "type": "string",
242
+ "enum": [
243
+ "TEST",
244
+ "PROD"
245
+ ]
246
+ }
247
+ },
248
+ "required": [
249
+ "blockchain_network",
250
+ "deployment",
251
+ "data_set_name"
252
+ ],
253
+ "additionalProperties": false
254
+ },
255
+ "data": {
256
+ "title": "MassID Audit Data",
257
+ "description": "Complete data structure for MassID Audit records",
258
+ "type": "object",
259
+ "properties": {
260
+ "methodology": {
261
+ "title": "Methodology Reference",
262
+ "description": "Reference to a methodology record",
263
+ "type": "object",
264
+ "properties": {
265
+ "external_id": {
266
+ "title": "Methodology External ID",
267
+ "description": "Unique identifier for the methodology",
268
+ "examples": [
269
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
270
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
271
+ ],
272
+ "type": "string",
273
+ "format": "uuid",
274
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
275
+ },
276
+ "name": {
277
+ "title": "Methodology Name",
278
+ "description": "Human-readable name of the methodology",
279
+ "examples": [
280
+ "BOLD Carbon (CH₄)",
281
+ "BOLD Recycling"
282
+ ],
283
+ "type": "string",
284
+ "minLength": 5,
285
+ "maxLength": 150
286
+ },
287
+ "version": {
288
+ "title": "Methodology Version",
289
+ "description": "Version of the methodology",
290
+ "examples": [
291
+ "0.1.0",
292
+ "1.0.0",
293
+ "2.1.3"
294
+ ],
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
298
+ },
299
+ "external_url": {
300
+ "title": "Methodology External URL",
301
+ "description": "URL to view the methodology on Carrot Explorer",
302
+ "examples": [
303
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
304
+ "https://carrot.eco/whitepaper.pdf"
305
+ ],
306
+ "type": "string",
307
+ "format": "uri"
308
+ },
309
+ "uri": {
310
+ "title": "Methodology IPFS URI",
311
+ "description": "IPFS URI to the methodology record",
312
+ "examples": [
313
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
314
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
315
+ ],
316
+ "type": "string",
317
+ "minLength": 1,
318
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
319
+ }
320
+ },
321
+ "required": [
322
+ "external_id",
323
+ "name",
324
+ "version",
325
+ "external_url"
326
+ ],
327
+ "additionalProperties": false
328
+ },
329
+ "mass_id": {
330
+ "title": "MassID Reference",
331
+ "description": "Reference to a MassID record",
332
+ "type": "object",
333
+ "properties": {
334
+ "external_id": {
335
+ "title": "MassID External ID",
336
+ "description": "Unique identifier for the MassID",
337
+ "examples": [
338
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
339
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
340
+ ],
341
+ "type": "string",
342
+ "format": "uuid",
343
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
344
+ },
345
+ "token_id": {
346
+ "title": "MassID Token ID",
347
+ "description": "NFT token ID of the MassID",
348
+ "examples": [
349
+ "123",
350
+ "456789",
351
+ "1000000"
352
+ ],
353
+ "type": "string",
354
+ "minLength": 1,
355
+ "pattern": "^\\d+$"
356
+ },
357
+ "external_url": {
358
+ "title": "MassID External URL",
359
+ "description": "URL to view the MassID on Carrot Explorer",
360
+ "examples": [
361
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
362
+ "https://carrot.eco/whitepaper.pdf"
363
+ ],
364
+ "type": "string",
365
+ "format": "uri"
366
+ },
367
+ "uri": {
368
+ "title": "MassID IPFS URI",
369
+ "description": "IPFS URI of the MassID record",
370
+ "examples": [
371
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
372
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
373
+ ],
374
+ "type": "string",
375
+ "minLength": 1,
376
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
377
+ }
378
+ },
379
+ "required": [
380
+ "external_id",
381
+ "token_id",
382
+ "external_url",
383
+ "uri"
384
+ ],
385
+ "additionalProperties": false
386
+ },
387
+ "gas_id": {
388
+ "title": "GasID Reference",
389
+ "description": "Reference to a GasID record",
390
+ "type": "object",
391
+ "properties": {
392
+ "external_id": {
393
+ "title": "GasID External ID",
394
+ "description": "Unique identifier for the GasID",
395
+ "examples": [
396
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
397
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
398
+ ],
399
+ "type": "string",
400
+ "format": "uuid",
401
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
402
+ },
403
+ "token_id": {
404
+ "title": "GasID Token ID",
405
+ "description": "NFT token ID of the GasID",
406
+ "examples": [
407
+ "123",
408
+ "456789",
409
+ "1000000"
410
+ ],
411
+ "type": "string",
412
+ "minLength": 1,
413
+ "pattern": "^\\d+$"
414
+ },
415
+ "external_url": {
416
+ "title": "GasID External URL",
417
+ "description": "URL to view the GasID on Carrot Explorer",
418
+ "examples": [
419
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
420
+ "https://carrot.eco/whitepaper.pdf"
421
+ ],
422
+ "type": "string",
423
+ "format": "uri"
424
+ },
425
+ "uri": {
426
+ "title": "GasID IPFS URI",
427
+ "description": "IPFS URI of the GasID record",
428
+ "examples": [
429
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
430
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
431
+ ],
432
+ "type": "string",
433
+ "minLength": 1,
434
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
435
+ }
436
+ },
437
+ "required": [
438
+ "external_id",
439
+ "token_id",
440
+ "external_url",
441
+ "uri"
442
+ ],
443
+ "additionalProperties": false
444
+ },
445
+ "audit_summary": {
446
+ "title": "Audit Summary",
447
+ "description": "Summary of audit execution results",
448
+ "type": "object",
449
+ "properties": {
450
+ "audit_date": {
451
+ "title": "Audit Date",
452
+ "description": "Date when the audit was completed",
453
+ "examples": [
454
+ "2024-12-05",
455
+ "2025-02-22",
456
+ "2024-02-10"
457
+ ],
458
+ "type": "string",
459
+ "format": "date",
460
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
461
+ },
462
+ "methodology_compliance": {
463
+ "title": "Methodology Compliance",
464
+ "description": "Overall outcome of the audit process",
465
+ "examples": [
466
+ "PASSED",
467
+ "FAILED"
468
+ ],
469
+ "type": "string",
470
+ "enum": [
471
+ "PASSED",
472
+ "FAILED"
473
+ ]
474
+ },
475
+ "total_rules_executed": {
476
+ "title": "Total Rules Executed",
477
+ "description": "Total number of audit rules executed",
478
+ "examples": [
479
+ 0,
480
+ 123,
481
+ 4126
482
+ ],
483
+ "type": "integer",
484
+ "minimum": 0,
485
+ "maximum": 9007199254740991
486
+ },
487
+ "passed_rules": {
488
+ "title": "Passed Rules Count",
489
+ "description": "Number of rules that passed verification",
490
+ "examples": [
491
+ 0,
492
+ 123,
493
+ 4126
494
+ ],
495
+ "type": "integer",
496
+ "minimum": 0,
497
+ "maximum": 9007199254740991
498
+ },
499
+ "failed_rules": {
500
+ "title": "Failed Rules Count",
501
+ "description": "Number of rules that failed verification",
502
+ "examples": [
503
+ 0,
504
+ 123,
505
+ 4126
506
+ ],
507
+ "type": "integer",
508
+ "minimum": 0,
509
+ "maximum": 9007199254740991
510
+ }
511
+ },
512
+ "required": [
513
+ "audit_date",
514
+ "methodology_compliance",
515
+ "total_rules_executed",
516
+ "passed_rules",
517
+ "failed_rules"
518
+ ],
519
+ "additionalProperties": false
520
+ },
521
+ "rules_execution_results": {
522
+ "title": "Audit Rule Execution Results",
523
+ "description": "Detailed results of each audit rule execution",
524
+ "type": "array",
525
+ "items": {
526
+ "title": "Audit Rule Execution Result",
527
+ "description": "Detailed result of an audit rule execution",
528
+ "type": "object",
529
+ "properties": {
530
+ "rule_name": {
531
+ "title": "Rule Name",
532
+ "description": "Human-readable name of the audit rule",
533
+ "examples": [
534
+ "Example text",
535
+ "Sample value",
536
+ "Test string"
537
+ ],
538
+ "type": "string",
539
+ "minLength": 1
540
+ },
541
+ "rule_id": {
542
+ "title": "Rule ID",
543
+ "description": "Unique identifier for the rule",
544
+ "examples": [
545
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
546
+ "6f520d88-864d-432d-bf9f-5c3166c4818f",
547
+ "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
548
+ ],
549
+ "type": "string",
550
+ "format": "uuid",
551
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$"
552
+ },
553
+ "rule_slug": {
554
+ "title": "Rule Slug",
555
+ "description": "URL-friendly identifier for the rule",
556
+ "examples": [
557
+ "mass-id-123",
558
+ "recycled-plastic",
559
+ "organic-waste"
560
+ ],
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "maxLength": 100,
564
+ "pattern": "^[a-z0-9-]+$"
565
+ },
566
+ "execution_order": {
567
+ "title": "Rule Execution Order",
568
+ "description": "Sequential order in which this rule was executed",
569
+ "examples": [
570
+ 1,
571
+ 123,
572
+ 456
573
+ ],
574
+ "type": "integer",
575
+ "minimum": 1,
576
+ "maximum": 9007199254740991
577
+ },
578
+ "result": {
579
+ "title": "Rule Execution Result",
580
+ "description": "Result of the rule execution",
581
+ "examples": [
582
+ "PASSED",
583
+ "FAILED"
584
+ ],
585
+ "type": "string",
586
+ "enum": [
587
+ "PASSED",
588
+ "FAILED"
589
+ ]
590
+ },
591
+ "description": {
592
+ "title": "Rule Description",
593
+ "description": "Detailed description of what this rule validates",
594
+ "type": "string",
595
+ "minLength": 1,
596
+ "maxLength": 2000
597
+ },
598
+ "rule_processor_checksum": {
599
+ "title": "Rule Processor Checksum",
600
+ "description": "Checksum for rule processor integrity verification",
601
+ "type": "string",
602
+ "minLength": 1,
603
+ "maxLength": 200
604
+ },
605
+ "rule_source_code_version": {
606
+ "title": "Rule Source Code Version",
607
+ "description": "Version identifier for the rule source code",
608
+ "type": "string",
609
+ "minLength": 1,
610
+ "maxLength": 200
611
+ }
612
+ },
613
+ "required": [
614
+ "rule_name",
615
+ "rule_id",
616
+ "rule_slug",
617
+ "execution_order",
618
+ "result",
619
+ "description",
620
+ "rule_processor_checksum",
621
+ "rule_source_code_version"
622
+ ],
623
+ "additionalProperties": false
624
+ }
625
+ }
626
+ },
627
+ "required": [
628
+ "methodology",
629
+ "mass_id",
630
+ "gas_id",
631
+ "audit_summary",
632
+ "rules_execution_results"
633
+ ],
634
+ "additionalProperties": false
24
635
  }
25
- ]
26
- }
636
+ },
637
+ "required": [
638
+ "$schema",
639
+ "schema",
640
+ "created_at",
641
+ "external_id",
642
+ "external_url",
643
+ "original_content_hash",
644
+ "content_hash",
645
+ "data"
646
+ ],
647
+ "additionalProperties": false
648
+ }