@carrot-foundation/schemas 0.1.21 → 0.1.23

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/dist/index.d.cts CHANGED
@@ -3,7 +3,9 @@ import { z } from 'zod';
3
3
  declare const MassIDLocalClassificationSchema: z.ZodObject<{
4
4
  code: z.ZodString;
5
5
  description: z.ZodString;
6
- system: z.ZodString;
6
+ system: z.ZodEnum<{
7
+ IBAMA: "IBAMA";
8
+ }>;
7
9
  }, z.core.$strict>;
8
10
  type MassIDLocalClassification = z.infer<typeof MassIDLocalClassificationSchema>;
9
11
  declare const MassIDMeasurementUnitSchema: z.ZodEnum<{
@@ -18,13 +20,15 @@ declare const ContaminationLevelSchema: z.ZodEnum<{
18
20
  High: "High";
19
21
  }>;
20
22
  type ContaminationLevel = z.infer<typeof ContaminationLevelSchema>;
21
- declare const MassIDWasteClassificationSchema: z.ZodObject<{
22
- primary_type: z.ZodString;
23
+ declare const MassIDWastePropertiesSchema: z.ZodObject<{
24
+ type: z.ZodString;
23
25
  subtype: z.ZodString;
24
26
  local_classification: z.ZodOptional<z.ZodObject<{
25
27
  code: z.ZodString;
26
28
  description: z.ZodString;
27
- system: z.ZodString;
29
+ system: z.ZodEnum<{
30
+ IBAMA: "IBAMA";
31
+ }>;
28
32
  }, z.core.$strict>>;
29
33
  measurement_unit: z.ZodEnum<{
30
34
  kg: "kg";
@@ -38,7 +42,7 @@ declare const MassIDWasteClassificationSchema: z.ZodObject<{
38
42
  High: "High";
39
43
  }>>;
40
44
  }, z.core.$strict>;
41
- type MassIDWasteClassification = z.infer<typeof MassIDWasteClassificationSchema>;
45
+ type MassIDWasteProperties = z.infer<typeof MassIDWastePropertiesSchema>;
42
46
  declare const EventAttributeFormatSchema: z.ZodEnum<{
43
47
  KILOGRAM: "KILOGRAM";
44
48
  DATE: "DATE";
@@ -49,7 +53,8 @@ declare const EventAttributeFormatSchema: z.ZodEnum<{
49
53
  type EventAttributeFormat = z.infer<typeof EventAttributeFormatSchema>;
50
54
  declare const EventAttributeSchema: z.ZodObject<{
51
55
  name: z.ZodString;
52
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
56
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
57
+ preserved_sensitivity: z.ZodOptional<z.ZodBoolean>;
53
58
  format: z.ZodOptional<z.ZodEnum<{
54
59
  KILOGRAM: "KILOGRAM";
55
60
  DATE: "DATE";
@@ -72,12 +77,13 @@ declare const MassIDChainOfCustodyEventSchema: z.ZodObject<{
72
77
  event_name: z.ZodString;
73
78
  description: z.ZodOptional<z.ZodString>;
74
79
  timestamp: z.ZodISODateTime;
75
- participant_id: z.ZodUUID;
76
- location_id: z.ZodUUID;
80
+ participant_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
81
+ location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
77
82
  weight: z.ZodOptional<z.ZodNumber>;
78
83
  attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
84
  name: z.ZodString;
80
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
85
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
86
+ preserved_sensitivity: z.ZodOptional<z.ZodBoolean>;
81
87
  format: z.ZodOptional<z.ZodEnum<{
82
88
  KILOGRAM: "KILOGRAM";
83
89
  DATE: "DATE";
@@ -102,12 +108,13 @@ declare const MassIDChainOfCustodySchema: z.ZodObject<{
102
108
  event_name: z.ZodString;
103
109
  description: z.ZodOptional<z.ZodString>;
104
110
  timestamp: z.ZodISODateTime;
105
- participant_id: z.ZodUUID;
106
- location_id: z.ZodUUID;
111
+ participant_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
112
+ location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
107
113
  weight: z.ZodOptional<z.ZodNumber>;
108
114
  attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
115
  name: z.ZodString;
110
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
116
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
117
+ preserved_sensitivity: z.ZodOptional<z.ZodBoolean>;
111
118
  format: z.ZodOptional<z.ZodEnum<{
112
119
  KILOGRAM: "KILOGRAM";
113
120
  DATE: "DATE";
@@ -130,20 +137,20 @@ declare const MassIDChainOfCustodySchema: z.ZodObject<{
130
137
  }, z.core.$strict>;
131
138
  type MassIDChainOfCustody = z.infer<typeof MassIDChainOfCustodySchema>;
132
139
  declare const MassIDTransportRouteSchema: z.ZodObject<{
133
- from_location_id: z.ZodUUID;
134
- to_location_id: z.ZodUUID;
140
+ from_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
141
+ to_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
135
142
  distance_km: z.ZodNumber;
136
143
  transport_method: z.ZodString;
137
144
  duration_hours: z.ZodNumber;
138
145
  }, z.core.$strict>;
139
146
  type MassIDTransportRoute = z.infer<typeof MassIDTransportRouteSchema>;
140
147
  declare const MassIDGeographicDataSchema: z.ZodObject<{
141
- origin_location_id: z.ZodUUID;
142
- processing_location_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
143
- final_destination_id: z.ZodUUID;
148
+ origin_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
149
+ processing_location_id_hashes: z.ZodOptional<z.ZodArray<z.ZodCustomStringFormat<"sha256_hex">>>;
150
+ final_destination_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
144
151
  transport_routes: z.ZodArray<z.ZodObject<{
145
- from_location_id: z.ZodUUID;
146
- to_location_id: z.ZodUUID;
152
+ from_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
153
+ to_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
147
154
  distance_km: z.ZodNumber;
148
155
  transport_method: z.ZodString;
149
156
  duration_hours: z.ZodNumber;
@@ -151,13 +158,15 @@ declare const MassIDGeographicDataSchema: z.ZodObject<{
151
158
  }, z.core.$strict>;
152
159
  type MassIDGeographicData = z.infer<typeof MassIDGeographicDataSchema>;
153
160
  declare const MassIDDataSchema: z.ZodObject<{
154
- waste_classification: z.ZodObject<{
155
- primary_type: z.ZodString;
161
+ waste_properties: z.ZodObject<{
162
+ type: z.ZodString;
156
163
  subtype: z.ZodString;
157
164
  local_classification: z.ZodOptional<z.ZodObject<{
158
165
  code: z.ZodString;
159
166
  description: z.ZodString;
160
- system: z.ZodString;
167
+ system: z.ZodEnum<{
168
+ IBAMA: "IBAMA";
169
+ }>;
161
170
  }, z.core.$strict>>;
162
171
  measurement_unit: z.ZodEnum<{
163
172
  kg: "kg";
@@ -172,13 +181,13 @@ declare const MassIDDataSchema: z.ZodObject<{
172
181
  }>>;
173
182
  }, z.core.$strict>;
174
183
  locations: z.ZodArray<z.ZodObject<{
175
- id: z.ZodUUID;
184
+ id_hash: z.ZodCustomStringFormat<"sha256_hex">;
176
185
  municipality: z.ZodString;
177
186
  administrative_division: z.ZodString;
178
187
  administrative_division_code: z.ZodOptional<z.ZodString>;
179
188
  country: z.ZodString;
180
189
  country_code: z.ZodString;
181
- responsible_participant_id: z.ZodUUID;
190
+ responsible_participant_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
182
191
  coordinates: z.ZodObject<{
183
192
  latitude: z.ZodNumber;
184
193
  longitude: z.ZodNumber;
@@ -191,19 +200,14 @@ declare const MassIDDataSchema: z.ZodObject<{
191
200
  }>;
192
201
  }, z.core.$strict>;
193
202
  facility_type: z.ZodOptional<z.ZodEnum<{
194
- "Waste Generation": "Waste Generation";
195
203
  "Collection Point": "Collection Point";
196
- "Transfer Station": "Transfer Station";
197
- "Sorting Facility": "Sorting Facility";
198
- "Composting Facility": "Composting Facility";
199
204
  "Recycling Facility": "Recycling Facility";
200
- "Processing Facility": "Processing Facility";
201
- "Disposal Facility": "Disposal Facility";
202
205
  "Administrative Office": "Administrative Office";
206
+ Other: "Other";
203
207
  }>>;
204
208
  }, z.core.$strict>>;
205
209
  participants: z.ZodArray<z.ZodObject<{
206
- id: z.ZodUUID;
210
+ id_hash: z.ZodCustomStringFormat<"sha256_hex">;
207
211
  name: z.ZodString;
208
212
  roles: z.ZodArray<z.ZodString>;
209
213
  }, z.core.$strict>>;
@@ -213,12 +217,13 @@ declare const MassIDDataSchema: z.ZodObject<{
213
217
  event_name: z.ZodString;
214
218
  description: z.ZodOptional<z.ZodString>;
215
219
  timestamp: z.ZodISODateTime;
216
- participant_id: z.ZodUUID;
217
- location_id: z.ZodUUID;
220
+ participant_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
221
+ location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
218
222
  weight: z.ZodOptional<z.ZodNumber>;
219
223
  attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
220
224
  name: z.ZodString;
221
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
225
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
226
+ preserved_sensitivity: z.ZodOptional<z.ZodBoolean>;
222
227
  format: z.ZodOptional<z.ZodEnum<{
223
228
  KILOGRAM: "KILOGRAM";
224
229
  DATE: "DATE";
@@ -240,12 +245,12 @@ declare const MassIDDataSchema: z.ZodObject<{
240
245
  total_duration_hours: z.ZodNumber;
241
246
  }, z.core.$strict>;
242
247
  geographic_data: z.ZodObject<{
243
- origin_location_id: z.ZodUUID;
244
- processing_location_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
245
- final_destination_id: z.ZodUUID;
248
+ origin_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
249
+ processing_location_id_hashes: z.ZodOptional<z.ZodArray<z.ZodCustomStringFormat<"sha256_hex">>>;
250
+ final_destination_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
246
251
  transport_routes: z.ZodArray<z.ZodObject<{
247
- from_location_id: z.ZodUUID;
248
- to_location_id: z.ZodUUID;
252
+ from_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
253
+ to_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
249
254
  distance_km: z.ZodNumber;
250
255
  transport_method: z.ZodString;
251
256
  duration_hours: z.ZodNumber;
@@ -297,7 +302,7 @@ declare const AttributeIntegratorSchema: z.ZodObject<{
297
302
  type AttributeIntegrator = z.infer<typeof AttributeIntegratorSchema>;
298
303
  declare const AttributePickUpDateSchema: z.ZodObject<{
299
304
  trait_type: z.ZodLiteral<"Pick-up Date">;
300
- value: z.ZodString;
305
+ value: z.ZodNumber;
301
306
  display_type: z.ZodLiteral<"date">;
302
307
  }, z.core.$strict>;
303
308
  type AttributePickUpDate = z.infer<typeof AttributePickUpDateSchema>;
@@ -334,7 +339,7 @@ declare const MassIDAttributesSchema: z.ZodTuple<[z.ZodObject<{
334
339
  value: z.ZodString;
335
340
  }, z.core.$strict>, z.ZodObject<{
336
341
  trait_type: z.ZodLiteral<"Pick-up Date">;
337
- value: z.ZodString;
342
+ value: z.ZodNumber;
338
343
  display_type: z.ZodLiteral<"date">;
339
344
  }, z.core.$strict>, z.ZodObject<{
340
345
  trait_type: z.ZodLiteral<"Recycling Date">;
@@ -345,8 +350,8 @@ type MassIDAttributes = z.infer<typeof MassIDAttributesSchema>;
345
350
  declare const MassIDIpfsSchemaMeta: {
346
351
  readonly title: "MassID NFT IPFS Record";
347
352
  readonly description: "Complete MassID NFT IPFS record including fixed attributes and detailed waste tracking data";
348
- readonly $id: "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id/mass-id.schema.json";
349
- readonly version: "1.0.1";
353
+ readonly $id: string;
354
+ readonly version: string;
350
355
  };
351
356
  declare const MassIDIpfsSchema: z.ZodObject<{
352
357
  $schema: z.ZodURL;
@@ -437,7 +442,7 @@ declare const MassIDIpfsSchema: z.ZodObject<{
437
442
  value: z.ZodString;
438
443
  }, z.core.$strict>, z.ZodObject<{
439
444
  trait_type: z.ZodLiteral<"Pick-up Date">;
440
- value: z.ZodString;
445
+ value: z.ZodNumber;
441
446
  display_type: z.ZodLiteral<"date">;
442
447
  }, z.core.$strict>, z.ZodObject<{
443
448
  trait_type: z.ZodLiteral<"Recycling Date">;
@@ -445,13 +450,15 @@ declare const MassIDIpfsSchema: z.ZodObject<{
445
450
  display_type: z.ZodLiteral<"date">;
446
451
  }, z.core.$strict>], null>;
447
452
  data: z.ZodObject<{
448
- waste_classification: z.ZodObject<{
449
- primary_type: z.ZodString;
453
+ waste_properties: z.ZodObject<{
454
+ type: z.ZodString;
450
455
  subtype: z.ZodString;
451
456
  local_classification: z.ZodOptional<z.ZodObject<{
452
457
  code: z.ZodString;
453
458
  description: z.ZodString;
454
- system: z.ZodString;
459
+ system: z.ZodEnum<{
460
+ IBAMA: "IBAMA";
461
+ }>;
455
462
  }, z.core.$strict>>;
456
463
  measurement_unit: z.ZodEnum<{
457
464
  kg: "kg";
@@ -466,13 +473,13 @@ declare const MassIDIpfsSchema: z.ZodObject<{
466
473
  }>>;
467
474
  }, z.core.$strict>;
468
475
  locations: z.ZodArray<z.ZodObject<{
469
- id: z.ZodUUID;
476
+ id_hash: z.ZodCustomStringFormat<"sha256_hex">;
470
477
  municipality: z.ZodString;
471
478
  administrative_division: z.ZodString;
472
479
  administrative_division_code: z.ZodOptional<z.ZodString>;
473
480
  country: z.ZodString;
474
481
  country_code: z.ZodString;
475
- responsible_participant_id: z.ZodUUID;
482
+ responsible_participant_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
476
483
  coordinates: z.ZodObject<{
477
484
  latitude: z.ZodNumber;
478
485
  longitude: z.ZodNumber;
@@ -485,19 +492,14 @@ declare const MassIDIpfsSchema: z.ZodObject<{
485
492
  }>;
486
493
  }, z.core.$strict>;
487
494
  facility_type: z.ZodOptional<z.ZodEnum<{
488
- "Waste Generation": "Waste Generation";
489
495
  "Collection Point": "Collection Point";
490
- "Transfer Station": "Transfer Station";
491
- "Sorting Facility": "Sorting Facility";
492
- "Composting Facility": "Composting Facility";
493
496
  "Recycling Facility": "Recycling Facility";
494
- "Processing Facility": "Processing Facility";
495
- "Disposal Facility": "Disposal Facility";
496
497
  "Administrative Office": "Administrative Office";
498
+ Other: "Other";
497
499
  }>>;
498
500
  }, z.core.$strict>>;
499
501
  participants: z.ZodArray<z.ZodObject<{
500
- id: z.ZodUUID;
502
+ id_hash: z.ZodCustomStringFormat<"sha256_hex">;
501
503
  name: z.ZodString;
502
504
  roles: z.ZodArray<z.ZodString>;
503
505
  }, z.core.$strict>>;
@@ -507,12 +509,13 @@ declare const MassIDIpfsSchema: z.ZodObject<{
507
509
  event_name: z.ZodString;
508
510
  description: z.ZodOptional<z.ZodString>;
509
511
  timestamp: z.ZodISODateTime;
510
- participant_id: z.ZodUUID;
511
- location_id: z.ZodUUID;
512
+ participant_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
513
+ location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
512
514
  weight: z.ZodOptional<z.ZodNumber>;
513
515
  attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
514
516
  name: z.ZodString;
515
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
517
+ value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
518
+ preserved_sensitivity: z.ZodOptional<z.ZodBoolean>;
516
519
  format: z.ZodOptional<z.ZodEnum<{
517
520
  KILOGRAM: "KILOGRAM";
518
521
  DATE: "DATE";
@@ -534,12 +537,12 @@ declare const MassIDIpfsSchema: z.ZodObject<{
534
537
  total_duration_hours: z.ZodNumber;
535
538
  }, z.core.$strict>;
536
539
  geographic_data: z.ZodObject<{
537
- origin_location_id: z.ZodUUID;
538
- processing_location_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
539
- final_destination_id: z.ZodUUID;
540
+ origin_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
541
+ processing_location_id_hashes: z.ZodOptional<z.ZodArray<z.ZodCustomStringFormat<"sha256_hex">>>;
542
+ final_destination_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
540
543
  transport_routes: z.ZodArray<z.ZodObject<{
541
- from_location_id: z.ZodUUID;
542
- to_location_id: z.ZodUUID;
544
+ from_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
545
+ to_location_id_hash: z.ZodCustomStringFormat<"sha256_hex">;
543
546
  distance_km: z.ZodNumber;
544
547
  transport_method: z.ZodString;
545
548
  duration_hours: z.ZodNumber;
@@ -549,4 +552,4 @@ declare const MassIDIpfsSchema: z.ZodObject<{
549
552
  }, z.core.$strict>;
550
553
  type MassIDIpfs = z.infer<typeof MassIDIpfsSchema>;
551
554
 
552
- export { type AttributeIntegrator, type AttributeOriginCountry, type AttributeOriginDivision, type AttributeOriginMunicipality, type AttributePickUpDate, type AttributeRecycler, type AttributeRecyclingDate, type AttributeWasteSubtype, type AttributeWasteType, type AttributeWeight, type ContaminationLevel, type EventAttribute, type EventAttributeFormat, type EventDocumentation, type MassIDAttributes, type MassIDChainOfCustody, type MassIDChainOfCustodyEvent, type MassIDData, MassIDDataSchema, type MassIDGeographicData, type MassIDIpfs, MassIDIpfsSchema, MassIDIpfsSchemaMeta, type MassIDLocalClassification, type MassIDMeasurementUnit, type MassIDTransportRoute, type MassIDWasteClassification };
555
+ export { type AttributeIntegrator, type AttributeOriginCountry, type AttributeOriginDivision, type AttributeOriginMunicipality, type AttributePickUpDate, type AttributeRecycler, type AttributeRecyclingDate, type AttributeWasteSubtype, type AttributeWasteType, type AttributeWeight, type ContaminationLevel, type EventAttribute, type EventAttributeFormat, type EventDocumentation, type MassIDAttributes, type MassIDChainOfCustody, type MassIDChainOfCustodyEvent, type MassIDData, MassIDDataSchema, type MassIDGeographicData, type MassIDIpfs, MassIDIpfsSchema, MassIDIpfsSchemaMeta, type MassIDLocalClassification, type MassIDMeasurementUnit, type MassIDTransportRoute, type MassIDWasteProperties };