@carrot-foundation/schemas 0.1.36 → 0.1.37

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 (40) hide show
  1. package/dist/index.cjs +1124 -36
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +959 -13
  4. package/dist/index.d.ts +959 -13
  5. package/dist/index.js +1102 -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 +305 -32
  10. package/schemas/ipfs/credit/credit.example.json +1 -0
  11. package/schemas/ipfs/credit/credit.schema.json +326 -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 +1768 -0
  14. package/schemas/ipfs/gas-id/gas-id.schema.json +6 -6
  15. package/schemas/ipfs/mass-id/mass-id.schema.json +6 -6
  16. package/schemas/ipfs/mass-id-audit/mass-id-audit.example.json +30 -29
  17. package/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json +636 -15
  18. package/schemas/ipfs/methodology/methodology.example.json +27 -26
  19. package/schemas/ipfs/methodology/methodology.schema.json +457 -15
  20. package/schemas/ipfs/recycled-id/recycled-id.schema.json +6 -6
  21. package/schemas/ipfs/gas-id/gas-id.attributes.schema.json +0 -219
  22. package/schemas/ipfs/gas-id/gas-id.data.schema.json +0 -120
  23. package/schemas/ipfs/mass-id-audit/mass-id-audit.data.schema.json +0 -130
  24. package/schemas/ipfs/methodology/methodology.data.schema.json +0 -121
  25. package/schemas/ipfs/purchase-id/purchase-id.attributes.schema.json +0 -91
  26. package/schemas/ipfs/purchase-id/purchase-id.data.schema.json +0 -337
  27. package/schemas/ipfs/purchase-id/purchase-id.example.json +0 -224
  28. package/schemas/ipfs/purchase-id/purchase-id.schema.json +0 -29
  29. package/schemas/ipfs/recycled-id/recycled-id.attributes.schema.json +0 -202
  30. package/schemas/ipfs/recycled-id/recycled-id.data.schema.json +0 -63
  31. package/schemas/ipfs/shared/base/base.schema.json +0 -163
  32. package/schemas/ipfs/shared/certificate/certificate.schema.json +0 -145
  33. package/schemas/ipfs/shared/definitions/definitions.schema.json +0 -255
  34. package/schemas/ipfs/shared/entities/location/location.schema.json +0 -90
  35. package/schemas/ipfs/shared/entities/participant/participant.schema.json +0 -28
  36. package/schemas/ipfs/shared/nft/nft.schema.json +0 -182
  37. package/schemas/ipfs/shared/references/audit-reference/audit-reference.schema.json +0 -42
  38. package/schemas/ipfs/shared/references/gas-id-reference/gas-id-reference.schema.json +0 -27
  39. package/schemas/ipfs/shared/references/mass-id-reference/mass-id-reference.schema.json +0 -27
  40. package/schemas/ipfs/shared/references/methodology-reference/methodology-reference.schema.json +0 -34
@@ -1,26 +1,647 @@
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.37/schemas/ipfs/mass-id-audit/mass-id-audit.schema.json",
6
+ "version": "0.1.37",
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
+ "recycled-id"
191
+ ]
192
+ },
193
+ "description": {
194
+ "title": "Relationship Description",
195
+ "description": "Human-readable description of the relationship",
196
+ "examples": [
197
+ "This record supersedes the previous version",
198
+ "Related carbon credit batch",
199
+ "Source document for this verification",
200
+ "Child record derived from this parent",
201
+ "Updated version of original record"
202
+ ],
203
+ "type": "string"
204
+ }
205
+ },
206
+ "required": [
207
+ "target_uri",
208
+ "type"
209
+ ],
210
+ "additionalProperties": false
23
211
  }
212
+ },
213
+ "environment": {
214
+ "title": "Environment",
215
+ "description": "Environment information",
216
+ "type": "object",
217
+ "properties": {
218
+ "blockchain_network": {
219
+ "title": "Blockchain Network",
220
+ "description": "Blockchain Network Environment",
221
+ "type": "string",
222
+ "enum": [
223
+ "mainnet",
224
+ "testnet"
225
+ ]
226
+ },
227
+ "deployment": {
228
+ "title": "Deployment Environment",
229
+ "description": "System environment where this record was generated",
230
+ "type": "string",
231
+ "enum": [
232
+ "production",
233
+ "development",
234
+ "testing"
235
+ ]
236
+ },
237
+ "data_set_name": {
238
+ "title": "Data Set Name",
239
+ "description": "Name of the data set for this record",
240
+ "type": "string",
241
+ "enum": [
242
+ "TEST",
243
+ "PROD"
244
+ ]
245
+ }
246
+ },
247
+ "required": [
248
+ "blockchain_network",
249
+ "deployment",
250
+ "data_set_name"
251
+ ],
252
+ "additionalProperties": false
253
+ },
254
+ "data": {
255
+ "title": "MassID Audit Data",
256
+ "description": "Complete data structure for MassID Audit records",
257
+ "type": "object",
258
+ "properties": {
259
+ "methodology": {
260
+ "title": "Methodology Reference",
261
+ "description": "Reference to a methodology record",
262
+ "type": "object",
263
+ "properties": {
264
+ "external_id": {
265
+ "title": "Methodology External ID",
266
+ "description": "Unique identifier for the methodology",
267
+ "examples": [
268
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
269
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
270
+ ],
271
+ "type": "string",
272
+ "format": "uuid",
273
+ "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})$"
274
+ },
275
+ "name": {
276
+ "title": "Methodology Name",
277
+ "description": "Human-readable name of the methodology",
278
+ "examples": [
279
+ "BOLD Carbon (CH₄)",
280
+ "BOLD Recycling"
281
+ ],
282
+ "type": "string",
283
+ "minLength": 5,
284
+ "maxLength": 150
285
+ },
286
+ "version": {
287
+ "title": "Methodology Version",
288
+ "description": "Version of the methodology",
289
+ "examples": [
290
+ "0.1.0",
291
+ "1.0.0",
292
+ "2.1.3"
293
+ ],
294
+ "type": "string",
295
+ "minLength": 1,
296
+ "pattern": "^v?\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.-]+)?(\\+[a-zA-Z0-9.-]+)?$"
297
+ },
298
+ "external_url": {
299
+ "title": "Methodology External URL",
300
+ "description": "URL to view the methodology on Carrot Explorer",
301
+ "examples": [
302
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
303
+ "https://carrot.eco/whitepaper.pdf"
304
+ ],
305
+ "type": "string",
306
+ "format": "uri"
307
+ },
308
+ "uri": {
309
+ "title": "Methodology IPFS URI",
310
+ "description": "IPFS URI to the methodology record",
311
+ "examples": [
312
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
313
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
314
+ ],
315
+ "type": "string",
316
+ "minLength": 1,
317
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
318
+ }
319
+ },
320
+ "required": [
321
+ "external_id",
322
+ "name",
323
+ "version",
324
+ "external_url"
325
+ ],
326
+ "additionalProperties": false
327
+ },
328
+ "mass_id": {
329
+ "title": "MassID Reference",
330
+ "description": "Reference to a MassID record",
331
+ "type": "object",
332
+ "properties": {
333
+ "external_id": {
334
+ "title": "MassID External ID",
335
+ "description": "Unique identifier for the MassID",
336
+ "examples": [
337
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
338
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
339
+ ],
340
+ "type": "string",
341
+ "format": "uuid",
342
+ "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})$"
343
+ },
344
+ "token_id": {
345
+ "title": "MassID Token ID",
346
+ "description": "NFT token ID of the MassID",
347
+ "examples": [
348
+ "123",
349
+ "456789",
350
+ "1000000"
351
+ ],
352
+ "type": "string",
353
+ "minLength": 1,
354
+ "pattern": "^\\d+$"
355
+ },
356
+ "external_url": {
357
+ "title": "MassID External URL",
358
+ "description": "URL to view the MassID on Carrot Explorer",
359
+ "examples": [
360
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
361
+ "https://carrot.eco/whitepaper.pdf"
362
+ ],
363
+ "type": "string",
364
+ "format": "uri"
365
+ },
366
+ "uri": {
367
+ "title": "MassID IPFS URI",
368
+ "description": "IPFS URI of the MassID record",
369
+ "examples": [
370
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
371
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
372
+ ],
373
+ "type": "string",
374
+ "minLength": 1,
375
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
376
+ }
377
+ },
378
+ "required": [
379
+ "external_id",
380
+ "token_id",
381
+ "external_url",
382
+ "uri"
383
+ ],
384
+ "additionalProperties": false
385
+ },
386
+ "gas_id": {
387
+ "title": "GasID Reference",
388
+ "description": "Reference to a GasID record",
389
+ "type": "object",
390
+ "properties": {
391
+ "external_id": {
392
+ "title": "GasID External ID",
393
+ "description": "Unique identifier for the GasID",
394
+ "examples": [
395
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
396
+ "b2c4e6f8-a1b3-4c5d-9e8f-123456789abc"
397
+ ],
398
+ "type": "string",
399
+ "format": "uuid",
400
+ "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})$"
401
+ },
402
+ "token_id": {
403
+ "title": "GasID Token ID",
404
+ "description": "NFT token ID of the GasID",
405
+ "examples": [
406
+ "123",
407
+ "456789",
408
+ "1000000"
409
+ ],
410
+ "type": "string",
411
+ "minLength": 1,
412
+ "pattern": "^\\d+$"
413
+ },
414
+ "external_url": {
415
+ "title": "GasID External URL",
416
+ "description": "URL to view the GasID on Carrot Explorer",
417
+ "examples": [
418
+ "https://explore.carrot.eco/document/ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
419
+ "https://carrot.eco/whitepaper.pdf"
420
+ ],
421
+ "type": "string",
422
+ "format": "uri"
423
+ },
424
+ "uri": {
425
+ "title": "GasID IPFS URI",
426
+ "description": "IPFS URI of the GasID record",
427
+ "examples": [
428
+ "ipfs://QmTy8w65yBXgyfG2ZBg5TrfB2hPjrDQH3RCQFJGkARStJb/mass-id-organic.png",
429
+ "ipfs://QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o"
430
+ ],
431
+ "type": "string",
432
+ "minLength": 1,
433
+ "pattern": "^ipfs:\\/\\/[a-zA-Z0-9]+(\\/.*)?$"
434
+ }
435
+ },
436
+ "required": [
437
+ "external_id",
438
+ "token_id",
439
+ "external_url",
440
+ "uri"
441
+ ],
442
+ "additionalProperties": false
443
+ },
444
+ "audit_summary": {
445
+ "title": "Audit Summary",
446
+ "description": "Summary of audit execution results",
447
+ "type": "object",
448
+ "properties": {
449
+ "audit_date": {
450
+ "title": "Audit Date",
451
+ "description": "Date when the audit was completed",
452
+ "examples": [
453
+ "2024-12-05",
454
+ "2025-02-22",
455
+ "2024-02-10"
456
+ ],
457
+ "type": "string",
458
+ "format": "date",
459
+ "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])))$"
460
+ },
461
+ "methodology_compliance": {
462
+ "title": "Methodology Compliance",
463
+ "description": "Overall outcome of the audit process",
464
+ "examples": [
465
+ "PASSED",
466
+ "FAILED"
467
+ ],
468
+ "type": "string",
469
+ "enum": [
470
+ "PASSED",
471
+ "FAILED"
472
+ ]
473
+ },
474
+ "total_rules_executed": {
475
+ "title": "Total Rules Executed",
476
+ "description": "Total number of audit rules executed",
477
+ "examples": [
478
+ 0,
479
+ 123,
480
+ 4126
481
+ ],
482
+ "type": "integer",
483
+ "minimum": 0,
484
+ "maximum": 9007199254740991
485
+ },
486
+ "passed_rules": {
487
+ "title": "Passed Rules Count",
488
+ "description": "Number of rules that passed verification",
489
+ "examples": [
490
+ 0,
491
+ 123,
492
+ 4126
493
+ ],
494
+ "type": "integer",
495
+ "minimum": 0,
496
+ "maximum": 9007199254740991
497
+ },
498
+ "failed_rules": {
499
+ "title": "Failed Rules Count",
500
+ "description": "Number of rules that failed verification",
501
+ "examples": [
502
+ 0,
503
+ 123,
504
+ 4126
505
+ ],
506
+ "type": "integer",
507
+ "minimum": 0,
508
+ "maximum": 9007199254740991
509
+ }
510
+ },
511
+ "required": [
512
+ "audit_date",
513
+ "methodology_compliance",
514
+ "total_rules_executed",
515
+ "passed_rules",
516
+ "failed_rules"
517
+ ],
518
+ "additionalProperties": false
519
+ },
520
+ "rules_execution_results": {
521
+ "title": "Audit Rule Execution Results",
522
+ "description": "Detailed results of each audit rule execution",
523
+ "type": "array",
524
+ "items": {
525
+ "title": "Audit Rule Execution Result",
526
+ "description": "Detailed result of an audit rule execution",
527
+ "type": "object",
528
+ "properties": {
529
+ "rule_name": {
530
+ "title": "Rule Name",
531
+ "description": "Human-readable name of the audit rule",
532
+ "examples": [
533
+ "Example text",
534
+ "Sample value",
535
+ "Test string"
536
+ ],
537
+ "type": "string",
538
+ "minLength": 1
539
+ },
540
+ "rule_id": {
541
+ "title": "Rule ID",
542
+ "description": "Unique identifier for the rule",
543
+ "examples": [
544
+ "ad44dd3f-f176-4b98-bf78-5ee6e77d0530",
545
+ "6f520d88-864d-432d-bf9f-5c3166c4818f",
546
+ "f77afa89-1c58-40fd-9bf5-8a86703a8af4"
547
+ ],
548
+ "type": "string",
549
+ "format": "uuid",
550
+ "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})$"
551
+ },
552
+ "rule_slug": {
553
+ "title": "Rule Slug",
554
+ "description": "URL-friendly identifier for the rule",
555
+ "examples": [
556
+ "mass-id-123",
557
+ "recycled-plastic",
558
+ "organic-waste"
559
+ ],
560
+ "type": "string",
561
+ "minLength": 1,
562
+ "maxLength": 100,
563
+ "pattern": "^[a-z0-9-]+$"
564
+ },
565
+ "execution_order": {
566
+ "title": "Rule Execution Order",
567
+ "description": "Sequential order in which this rule was executed",
568
+ "examples": [
569
+ 1,
570
+ 123,
571
+ 456
572
+ ],
573
+ "type": "integer",
574
+ "minimum": 1,
575
+ "maximum": 9007199254740991
576
+ },
577
+ "result": {
578
+ "title": "Rule Execution Result",
579
+ "description": "Result of the rule execution",
580
+ "examples": [
581
+ "PASSED",
582
+ "FAILED"
583
+ ],
584
+ "type": "string",
585
+ "enum": [
586
+ "PASSED",
587
+ "FAILED"
588
+ ]
589
+ },
590
+ "description": {
591
+ "title": "Rule Description",
592
+ "description": "Detailed description of what this rule validates",
593
+ "type": "string",
594
+ "minLength": 1,
595
+ "maxLength": 2000
596
+ },
597
+ "rule_processor_checksum": {
598
+ "title": "Rule Processor Checksum",
599
+ "description": "Checksum for rule processor integrity verification",
600
+ "type": "string",
601
+ "minLength": 1,
602
+ "maxLength": 200
603
+ },
604
+ "rule_source_code_version": {
605
+ "title": "Rule Source Code Version",
606
+ "description": "Version identifier for the rule source code",
607
+ "type": "string",
608
+ "minLength": 1,
609
+ "maxLength": 200
610
+ }
611
+ },
612
+ "required": [
613
+ "rule_name",
614
+ "rule_id",
615
+ "rule_slug",
616
+ "execution_order",
617
+ "result",
618
+ "description",
619
+ "rule_processor_checksum",
620
+ "rule_source_code_version"
621
+ ],
622
+ "additionalProperties": false
623
+ }
624
+ }
625
+ },
626
+ "required": [
627
+ "methodology",
628
+ "mass_id",
629
+ "gas_id",
630
+ "audit_summary",
631
+ "rules_execution_results"
632
+ ],
633
+ "additionalProperties": false
24
634
  }
25
- ]
26
- }
635
+ },
636
+ "required": [
637
+ "$schema",
638
+ "schema",
639
+ "created_at",
640
+ "external_id",
641
+ "external_url",
642
+ "original_content_hash",
643
+ "content_hash",
644
+ "data"
645
+ ],
646
+ "additionalProperties": false
647
+ }