@carrot-foundation/schemas 0.1.20 → 0.1.21

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 (36) hide show
  1. package/README.md +45 -0
  2. package/dist/index.cjs +1104 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.cts +552 -0
  5. package/dist/index.d.ts +552 -2
  6. package/dist/index.js +1100 -1
  7. package/dist/index.js.map +1 -0
  8. package/package.json +6 -4
  9. package/dist/index.d.ts.map +0 -1
  10. package/dist/mass-id/index.d.ts +0 -3
  11. package/dist/mass-id/index.d.ts.map +0 -1
  12. package/dist/mass-id/index.js +0 -2
  13. package/dist/mass-id/mass-id.data.schema.d.ts +0 -256
  14. package/dist/mass-id/mass-id.data.schema.d.ts.map +0 -1
  15. package/dist/mass-id/mass-id.data.schema.js +0 -348
  16. package/dist/mass-id/mass-id.schema.d.ts +0 -297
  17. package/dist/mass-id/mass-id.schema.d.ts.map +0 -1
  18. package/dist/mass-id/mass-id.schema.js +0 -163
  19. package/dist/shared/base.schema.d.ts +0 -111
  20. package/dist/shared/base.schema.d.ts.map +0 -1
  21. package/dist/shared/base.schema.js +0 -127
  22. package/dist/shared/definitions.schema.d.ts +0 -96
  23. package/dist/shared/definitions.schema.d.ts.map +0 -1
  24. package/dist/shared/definitions.schema.js +0 -283
  25. package/dist/shared/entities/location.schema.d.ts +0 -55
  26. package/dist/shared/entities/location.schema.d.ts.map +0 -1
  27. package/dist/shared/entities/location.schema.js +0 -68
  28. package/dist/shared/entities/participant.schema.d.ts +0 -8
  29. package/dist/shared/entities/participant.schema.d.ts.map +0 -1
  30. package/dist/shared/entities/participant.schema.js +0 -24
  31. package/dist/shared/helpers.schema.d.ts +0 -4
  32. package/dist/shared/helpers.schema.d.ts.map +0 -1
  33. package/dist/shared/helpers.schema.js +0 -16
  34. package/dist/shared/nft.schema.d.ts +0 -116
  35. package/dist/shared/nft.schema.d.ts.map +0 -1
  36. package/dist/shared/nft.schema.js +0 -193
@@ -1,348 +0,0 @@
1
- import { z } from 'zod';
2
- import { UuidSchema, WasteTypeSchema, WasteSubtypeSchema, NonEmptyStringSchema, NonNegativeFloatSchema, IsoTimestampSchema, IsoDateSchema, HoursSchema, } from '../shared/definitions.schema.js';
3
- import { LocationSchema } from '../shared/entities/location.schema.js';
4
- import { ParticipantSchema } from '../shared/entities/participant.schema.js';
5
- import { uniqueBy } from '../shared/helpers.schema.js';
6
- const MassIDLocalClassificationSchema = z
7
- .strictObject({
8
- code: NonEmptyStringSchema.max(20).meta({
9
- title: 'Classification Code',
10
- description: 'Local waste classification code',
11
- examples: ['20 01 01', 'D001', 'EWC-150101', 'IBAMA-A001'],
12
- }),
13
- description: NonEmptyStringSchema.max(200).meta({
14
- title: 'Classification Description',
15
- description: 'Local waste classification description',
16
- examples: [
17
- 'Paper and cardboard packaging',
18
- 'Ignitable waste',
19
- 'Paper and cardboard packaging waste',
20
- 'Municipal solid waste - organic fraction',
21
- ],
22
- }),
23
- system: NonEmptyStringSchema.max(50).meta({
24
- title: 'Classification System',
25
- description: 'Classification system name (e.g., "Ibama Waste Code", "European Waste Catalogue", "US EPA Codes")',
26
- examples: [
27
- 'European Waste Catalogue',
28
- 'US EPA Codes',
29
- 'Ibama Waste Code',
30
- 'Brazilian ABNT Classification',
31
- ],
32
- }),
33
- })
34
- .meta({
35
- title: 'Local Classification',
36
- description: 'Local or regional waste classification codes and descriptions',
37
- });
38
- const MassIDMeasurementUnitSchema = z.enum(['kg', 'ton']).meta({
39
- title: 'Measurement Unit',
40
- description: 'Unit of measurement for the waste quantity',
41
- examples: ['kg', 'ton'],
42
- });
43
- const ContaminationLevelSchema = z
44
- .enum(['None', 'Low', 'Medium', 'High'])
45
- .meta({
46
- title: 'Contamination Level',
47
- description: 'Level of contamination in the waste batch',
48
- examples: ['Low', 'Medium', 'None'],
49
- });
50
- const MassIDWasteClassificationSchema = z
51
- .strictObject({
52
- primary_type: WasteTypeSchema.meta({
53
- title: 'Primary Waste Type',
54
- description: 'Primary waste material category',
55
- }),
56
- subtype: WasteSubtypeSchema.meta({
57
- title: 'Waste Subtype',
58
- description: 'Specific subcategory of waste material',
59
- }),
60
- local_classification: MassIDLocalClassificationSchema.optional(),
61
- measurement_unit: MassIDMeasurementUnitSchema,
62
- net_weight: NonNegativeFloatSchema.meta({
63
- title: 'Net Weight',
64
- description: 'Net weight of the waste batch in the specified measurement unit',
65
- }),
66
- contamination_level: ContaminationLevelSchema.optional(),
67
- })
68
- .meta({
69
- title: 'Waste Classification',
70
- description: 'Standardized waste material classification and regulatory information',
71
- });
72
- const EventAttributeFormatSchema = z
73
- .enum(['KILOGRAM', 'DATE', 'CURRENCY', 'PERCENTAGE', 'COORDINATE'])
74
- .meta({
75
- title: 'Event Attribute Format',
76
- description: 'Data format hint for proper display',
77
- examples: ['KILOGRAM', 'DATE', 'PERCENTAGE'],
78
- });
79
- const EventAttributeSchema = z
80
- .strictObject({
81
- name: NonEmptyStringSchema.max(100).meta({
82
- title: 'Attribute Name',
83
- description: 'Event attribute name',
84
- examples: [
85
- 'temperature',
86
- 'humidity',
87
- 'contamination_percentage',
88
- 'quality_grade',
89
- 'batch_number',
90
- 'operator_id',
91
- 'equipment_used',
92
- 'processing_cost',
93
- ],
94
- }),
95
- value: z.union([z.string(), z.number(), z.boolean()]).meta({
96
- title: 'Attribute Value',
97
- description: 'Event attribute value',
98
- examples: [
99
- 25.5,
100
- 'Grade A',
101
- true,
102
- 'BATCH-2024-001',
103
- 12.75,
104
- 'Shredder-X200',
105
- false,
106
- 'OP-456',
107
- ],
108
- }),
109
- format: EventAttributeFormatSchema.optional(),
110
- })
111
- .meta({
112
- title: 'Event Attribute',
113
- description: 'Additional attribute specific to an event',
114
- });
115
- const EventDocumentSchema = z
116
- .strictObject({
117
- type: NonEmptyStringSchema.max(50).meta({
118
- title: 'Document Type',
119
- description: 'Type of supporting documentation',
120
- examples: [
121
- 'Waste Transfer Note',
122
- 'Certificate of Disposal',
123
- 'Certificate of Final Destination',
124
- 'Quality Assessment Report',
125
- 'Transport Manifest',
126
- 'Processing Receipt',
127
- 'Environmental Permit',
128
- 'Invoice',
129
- ],
130
- }),
131
- document_number: NonEmptyStringSchema.max(50)
132
- .optional()
133
- .meta({
134
- title: 'Document Number',
135
- description: 'Official document number if applicable',
136
- examples: [
137
- 'WTN-2024-001234',
138
- 'CD-ENV-456789',
139
- 'INV-2024-QTR1-789',
140
- 'PERMIT-EPA-2024-001',
141
- 'MANIFEST-DOT-567890',
142
- ],
143
- }),
144
- reference: NonEmptyStringSchema.meta({
145
- title: 'Document Reference',
146
- description: 'Reference to document (IPFS hash, file name, or external URL)',
147
- examples: [
148
- 'QmYjtig7VJQ6XsnUjqqJvj7QaMcCAwtrgNdahSiFofrE7o',
149
- 'waste_transfer_note_2024_001.pdf',
150
- 'https://docs.example.com/certificates/disposal_cert_456.pdf',
151
- 'bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi',
152
- 'processing_receipt_20240315.jpg',
153
- ],
154
- }),
155
- issue_date: IsoDateSchema.optional().meta({
156
- title: 'Issue Date',
157
- description: 'Date the document was issued',
158
- }),
159
- issuer: NonEmptyStringSchema.max(100)
160
- .optional()
161
- .meta({
162
- title: 'Document Issuer',
163
- description: 'Entity that issued the document',
164
- examples: [
165
- 'Environmental Protection Agency',
166
- 'Waste Management Solutions Ltd',
167
- 'Green Recycling Corp',
168
- 'City Waste Authority',
169
- 'EcoProcess Industries',
170
- 'Regional Environmental Office',
171
- ],
172
- }),
173
- })
174
- .meta({
175
- title: 'Event Document',
176
- description: 'Supporting event document',
177
- });
178
- const MassIDChainOfCustodyEventSchema = z
179
- .strictObject({
180
- event_id: UuidSchema.meta({
181
- title: 'Event ID',
182
- description: 'Unique event identifier',
183
- }),
184
- event_name: NonEmptyStringSchema.max(50).meta({
185
- title: 'Event Name',
186
- description: 'Name of custody or processing event',
187
- examples: ['Sorting', 'Processing', 'Recycling', 'Weighing'],
188
- }),
189
- description: NonEmptyStringSchema.max(200)
190
- .optional()
191
- .meta({
192
- title: 'Event Description',
193
- description: 'Detailed description of what happened during this event',
194
- examples: [
195
- 'Waste collected from residential area using collection truck',
196
- 'Material sorted into recyclable and non-recyclable fractions',
197
- 'Plastic waste processed through shredding and washing',
198
- 'Waste transferred to authorized recycling facility',
199
- 'Final disposal at licensed landfill site',
200
- 'Quality inspection and contamination assessment completed',
201
- ],
202
- }),
203
- timestamp: IsoTimestampSchema.meta({
204
- title: 'Event Timestamp',
205
- description: 'ISO 8601 timestamp when the event occurred',
206
- }),
207
- participant_id: UuidSchema.meta({
208
- title: 'Participant ID',
209
- description: 'Reference to participant in the participants array',
210
- }),
211
- location_id: UuidSchema.meta({
212
- title: 'Location ID',
213
- description: 'Reference to location in the locations array',
214
- }),
215
- weight: NonNegativeFloatSchema.optional().meta({
216
- title: 'Event Weight',
217
- description: 'Mass weight after this event',
218
- }),
219
- attributes: z.array(EventAttributeSchema).optional().meta({
220
- title: 'Event Attributes',
221
- description: 'Additional attributes specific to this event',
222
- }),
223
- documentation: z.array(EventDocumentSchema).optional().meta({
224
- title: 'Event Documentation',
225
- description: 'Associated documentation for this event',
226
- }),
227
- notes: NonEmptyStringSchema.max(500).optional().meta({
228
- title: 'Event Notes',
229
- description: 'Additional notes or comments about this event',
230
- }),
231
- })
232
- .meta({
233
- title: 'Chain of Custody Event',
234
- description: 'Chain of custody event',
235
- });
236
- const MassIDChainOfCustodySchema = z
237
- .strictObject({
238
- events: z.array(MassIDChainOfCustodyEventSchema).min(1).meta({
239
- title: 'Custody Events',
240
- description: 'Chronological sequence of custody transfer and processing events',
241
- }),
242
- total_distance_km: NonNegativeFloatSchema.meta({
243
- title: 'Total Distance (km)',
244
- description: 'Total distance traveled across all transport events',
245
- }),
246
- total_duration_hours: HoursSchema.meta({
247
- title: 'Total Duration (hours)',
248
- description: 'Total time from first to last event in hours',
249
- }),
250
- })
251
- .meta({
252
- title: 'Chain of Custody',
253
- description: 'Complete chain of custody tracking from waste generation to final processing',
254
- });
255
- const MassIDTransportRouteSchema = z
256
- .strictObject({
257
- from_location_id: UuidSchema.meta({
258
- title: 'From Location ID',
259
- description: 'Reference to the origin location in the locations array',
260
- }),
261
- to_location_id: UuidSchema.meta({
262
- title: 'To Location ID',
263
- description: 'Reference to the destination location in the locations array',
264
- }),
265
- distance_km: NonNegativeFloatSchema.meta({
266
- title: 'Distance (km)',
267
- description: 'Distance for this route segment in kilometers',
268
- }),
269
- transport_method: NonEmptyStringSchema.max(50).meta({
270
- title: 'Transport Method',
271
- description: 'Method of transportation for this segment',
272
- examples: [
273
- 'Truck',
274
- 'Rail',
275
- 'Barge',
276
- 'Container Ship',
277
- 'Conveyor Belt',
278
- 'Pipeline',
279
- 'Walking',
280
- 'Forklift',
281
- ],
282
- }),
283
- duration_hours: HoursSchema.meta({
284
- title: 'Duration (hours)',
285
- description: 'Time taken for this route segment in hours',
286
- }),
287
- })
288
- .meta({
289
- title: 'Transport Route',
290
- description: 'Transport route segment information',
291
- });
292
- const MassIDGeographicDataSchema = z
293
- .strictObject({
294
- origin_location_id: UuidSchema.meta({
295
- title: 'Origin Location ID',
296
- description: 'Reference to origin location in the locations array',
297
- }),
298
- processing_location_ids: z.array(UuidSchema).optional().meta({
299
- title: 'Processing Location IDs',
300
- description: 'Locations where the waste was processed or handled',
301
- }),
302
- final_destination_id: UuidSchema.meta({
303
- title: 'Final Destination ID',
304
- description: 'Reference to final destination in the locations array',
305
- }),
306
- transport_routes: z.array(MassIDTransportRouteSchema).meta({
307
- title: 'Transport Routes',
308
- description: 'Detailed transport route information',
309
- }),
310
- })
311
- .meta({
312
- title: 'Geographic Data',
313
- description: 'Geographic information about waste origin and processing locations',
314
- });
315
- export const MassIDDataSchema = z
316
- .strictObject({
317
- waste_classification: MassIDWasteClassificationSchema,
318
- locations: uniqueBy(LocationSchema, (loc) => loc.id, 'Location IDs must be unique')
319
- .min(1)
320
- .meta({
321
- title: 'Locations',
322
- description: 'All locations referenced in this MassID, indexed by ID',
323
- }),
324
- participants: uniqueBy(ParticipantSchema, (p) => p.id, 'Participant IDs must be unique')
325
- .min(1)
326
- .meta({
327
- title: 'Participants',
328
- description: 'All participants referenced in this MassID, indexed by ID',
329
- }),
330
- chain_of_custody: MassIDChainOfCustodySchema,
331
- geographic_data: MassIDGeographicDataSchema,
332
- })
333
- .refine((data) => {
334
- const participantIdSet = new Set(data.participants.map((participant) => participant.id));
335
- const eventParticipantIds = data.chain_of_custody.events.map((event) => event.participant_id);
336
- const allEventParticipantsExist = eventParticipantIds.every((participantId) => participantIdSet.has(participantId));
337
- return allEventParticipantsExist;
338
- }, 'All participant IDs in chain of custody events must exist in participants array')
339
- .refine((data) => {
340
- const locationIdSet = new Set(data.locations.map((location) => location.id));
341
- const eventLocationIds = data.chain_of_custody.events.map((event) => event.location_id);
342
- const allEventLocationsExist = eventLocationIds.every((locationId) => locationIdSet.has(locationId));
343
- return allEventLocationsExist;
344
- }, 'All location IDs in chain of custody events must exist in locations array')
345
- .meta({
346
- title: 'MassID Data',
347
- description: 'MassID data containing waste tracking and chain of custody information',
348
- });
@@ -1,297 +0,0 @@
1
- import { z } from 'zod';
2
- declare const AttributeWasteTypeSchema: z.ZodObject<{
3
- trait_type: z.ZodLiteral<"Waste Type">;
4
- value: z.ZodString;
5
- }, z.core.$strict>;
6
- export type AttributeWasteType = z.infer<typeof AttributeWasteTypeSchema>;
7
- declare const AttributeWasteSubtypeSchema: z.ZodObject<{
8
- trait_type: z.ZodLiteral<"Waste Subtype">;
9
- value: z.ZodString;
10
- }, z.core.$strict>;
11
- export type AttributeWasteSubtype = z.infer<typeof AttributeWasteSubtypeSchema>;
12
- declare const AttributeWeightSchema: z.ZodObject<{
13
- trait_type: z.ZodLiteral<"Weight (kg)">;
14
- value: z.ZodNumber;
15
- display_type: z.ZodLiteral<"number">;
16
- }, z.core.$strict>;
17
- export type AttributeWeight = z.infer<typeof AttributeWeightSchema>;
18
- declare const AttributeOriginCountrySchema: z.ZodObject<{
19
- trait_type: z.ZodLiteral<"Origin Country">;
20
- value: z.ZodString;
21
- }, z.core.$strict>;
22
- export type AttributeOriginCountry = z.infer<typeof AttributeOriginCountrySchema>;
23
- declare const AttributeOriginMunicipalitySchema: z.ZodObject<{
24
- trait_type: z.ZodLiteral<"Origin Municipality">;
25
- value: z.ZodString;
26
- }, z.core.$strict>;
27
- export type AttributeOriginMunicipality = z.infer<typeof AttributeOriginMunicipalitySchema>;
28
- declare const AttributeOriginDivisionSchema: z.ZodObject<{
29
- trait_type: z.ZodLiteral<"Origin Administrative Division">;
30
- value: z.ZodString;
31
- }, z.core.$strict>;
32
- export type AttributeOriginDivision = z.infer<typeof AttributeOriginDivisionSchema>;
33
- declare const AttributeRecyclerSchema: z.ZodObject<{
34
- trait_type: z.ZodLiteral<"Recycler">;
35
- value: z.ZodString;
36
- }, z.core.$strict>;
37
- export type AttributeRecycler = z.infer<typeof AttributeRecyclerSchema>;
38
- declare const AttributeIntegratorSchema: z.ZodObject<{
39
- trait_type: z.ZodLiteral<"Integrator">;
40
- value: z.ZodString;
41
- }, z.core.$strict>;
42
- export type AttributeIntegrator = z.infer<typeof AttributeIntegratorSchema>;
43
- declare const AttributePickUpDateSchema: z.ZodObject<{
44
- trait_type: z.ZodLiteral<"Pick-up Date">;
45
- value: z.ZodString;
46
- display_type: z.ZodLiteral<"date">;
47
- }, z.core.$strict>;
48
- export type AttributePickUpDate = z.infer<typeof AttributePickUpDateSchema>;
49
- declare const AttributeRecyclingDateSchema: z.ZodObject<{
50
- trait_type: z.ZodLiteral<"Recycling Date">;
51
- value: z.ZodString;
52
- display_type: z.ZodLiteral<"date">;
53
- }, z.core.$strict>;
54
- export type AttributeRecyclingDate = z.infer<typeof AttributeRecyclingDateSchema>;
55
- declare const MassIDAttributesSchema: z.ZodTuple<[z.ZodObject<{
56
- trait_type: z.ZodLiteral<"Waste Type">;
57
- value: z.ZodString;
58
- }, z.core.$strict>, z.ZodObject<{
59
- trait_type: z.ZodLiteral<"Waste Subtype">;
60
- value: z.ZodString;
61
- }, z.core.$strict>, z.ZodObject<{
62
- trait_type: z.ZodLiteral<"Weight (kg)">;
63
- value: z.ZodNumber;
64
- display_type: z.ZodLiteral<"number">;
65
- }, z.core.$strict>, z.ZodObject<{
66
- trait_type: z.ZodLiteral<"Origin Country">;
67
- value: z.ZodString;
68
- }, z.core.$strict>, z.ZodObject<{
69
- trait_type: z.ZodLiteral<"Origin Municipality">;
70
- value: z.ZodString;
71
- }, z.core.$strict>, z.ZodObject<{
72
- trait_type: z.ZodLiteral<"Origin Administrative Division">;
73
- value: z.ZodString;
74
- }, z.core.$strict>, z.ZodObject<{
75
- trait_type: z.ZodLiteral<"Recycler">;
76
- value: z.ZodString;
77
- }, z.core.$strict>, z.ZodObject<{
78
- trait_type: z.ZodLiteral<"Integrator">;
79
- value: z.ZodString;
80
- }, z.core.$strict>, z.ZodObject<{
81
- trait_type: z.ZodLiteral<"Pick-up Date">;
82
- value: z.ZodString;
83
- display_type: z.ZodLiteral<"date">;
84
- }, z.core.$strict>, z.ZodObject<{
85
- trait_type: z.ZodLiteral<"Recycling Date">;
86
- value: z.ZodString;
87
- display_type: z.ZodLiteral<"date">;
88
- }, z.core.$strict>], null>;
89
- export type MassIDAttributes = z.infer<typeof MassIDAttributesSchema>;
90
- export declare const MassIDIpfsSchemaMeta: {
91
- readonly title: "MassID NFT IPFS Record";
92
- readonly description: "Complete MassID NFT IPFS record including fixed attributes and detailed waste tracking data";
93
- readonly $id: "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id/mass-id.schema.json";
94
- readonly version: "1.0.1";
95
- };
96
- export declare const MassIDIpfsSchema: z.ZodObject<{
97
- $schema: z.ZodURL;
98
- created_at: z.ZodISODateTime;
99
- external_id: z.ZodUUID;
100
- external_url: z.ZodURL;
101
- original_content_hash: z.ZodCustomStringFormat<"sha256_hex">;
102
- content_hash: z.ZodCustomStringFormat<"sha256_hex">;
103
- creator: z.ZodOptional<z.ZodObject<{
104
- name: z.ZodString;
105
- id: z.ZodUUID;
106
- }, z.core.$strict>>;
107
- relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
- target_uri: z.ZodString;
109
- type: z.ZodEnum<{
110
- collection: "collection";
111
- credit: "credit";
112
- "gas-id": "gas-id";
113
- "mass-id": "mass-id";
114
- "mass-id-audit": "mass-id-audit";
115
- methodology: "methodology";
116
- "purchase-id": "purchase-id";
117
- "recycled-id": "recycled-id";
118
- }>;
119
- description: z.ZodOptional<z.ZodString>;
120
- }, z.core.$strict>>>;
121
- environment: z.ZodOptional<z.ZodObject<{
122
- blockchain_network: z.ZodEnum<{
123
- mainnet: "mainnet";
124
- testnet: "testnet";
125
- }>;
126
- deployment: z.ZodEnum<{
127
- production: "production";
128
- development: "development";
129
- testing: "testing";
130
- }>;
131
- data_set_name: z.ZodEnum<{
132
- TEST: "TEST";
133
- PROD: "PROD";
134
- }>;
135
- }, z.core.$strict>>;
136
- blockchain: z.ZodObject<{
137
- smart_contract_address: z.ZodString;
138
- chain_id: z.ZodNumber;
139
- network_name: z.ZodString;
140
- token_id: z.ZodString;
141
- }, z.core.$strict>;
142
- name: z.ZodString;
143
- short_name: z.ZodString;
144
- description: z.ZodString;
145
- image: z.ZodString;
146
- background_color: z.ZodOptional<z.ZodString>;
147
- animation_url: z.ZodOptional<z.ZodString>;
148
- external_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
149
- label: z.ZodString;
150
- url: z.ZodURL;
151
- description: z.ZodOptional<z.ZodString>;
152
- }, z.core.$strict>>>;
153
- schema: z.ZodObject<{
154
- hash: z.ZodCustomStringFormat<"sha256_hex">;
155
- version: z.ZodString;
156
- type: z.ZodLiteral<"MassID">;
157
- }, z.core.$strict>;
158
- attributes: z.ZodTuple<[z.ZodObject<{
159
- trait_type: z.ZodLiteral<"Waste Type">;
160
- value: z.ZodString;
161
- }, z.core.$strict>, z.ZodObject<{
162
- trait_type: z.ZodLiteral<"Waste Subtype">;
163
- value: z.ZodString;
164
- }, z.core.$strict>, z.ZodObject<{
165
- trait_type: z.ZodLiteral<"Weight (kg)">;
166
- value: z.ZodNumber;
167
- display_type: z.ZodLiteral<"number">;
168
- }, z.core.$strict>, z.ZodObject<{
169
- trait_type: z.ZodLiteral<"Origin Country">;
170
- value: z.ZodString;
171
- }, z.core.$strict>, z.ZodObject<{
172
- trait_type: z.ZodLiteral<"Origin Municipality">;
173
- value: z.ZodString;
174
- }, z.core.$strict>, z.ZodObject<{
175
- trait_type: z.ZodLiteral<"Origin Administrative Division">;
176
- value: z.ZodString;
177
- }, z.core.$strict>, z.ZodObject<{
178
- trait_type: z.ZodLiteral<"Recycler">;
179
- value: z.ZodString;
180
- }, z.core.$strict>, z.ZodObject<{
181
- trait_type: z.ZodLiteral<"Integrator">;
182
- value: z.ZodString;
183
- }, z.core.$strict>, z.ZodObject<{
184
- trait_type: z.ZodLiteral<"Pick-up Date">;
185
- value: z.ZodString;
186
- display_type: z.ZodLiteral<"date">;
187
- }, z.core.$strict>, z.ZodObject<{
188
- trait_type: z.ZodLiteral<"Recycling Date">;
189
- value: z.ZodString;
190
- display_type: z.ZodLiteral<"date">;
191
- }, z.core.$strict>], null>;
192
- data: z.ZodObject<{
193
- waste_classification: z.ZodObject<{
194
- primary_type: z.ZodString;
195
- subtype: z.ZodString;
196
- local_classification: z.ZodOptional<z.ZodObject<{
197
- code: z.ZodString;
198
- description: z.ZodString;
199
- system: z.ZodString;
200
- }, z.core.$strict>>;
201
- measurement_unit: z.ZodEnum<{
202
- kg: "kg";
203
- ton: "ton";
204
- }>;
205
- net_weight: z.ZodNumber;
206
- contamination_level: z.ZodOptional<z.ZodEnum<{
207
- None: "None";
208
- Low: "Low";
209
- Medium: "Medium";
210
- High: "High";
211
- }>>;
212
- }, z.core.$strict>;
213
- locations: z.ZodArray<z.ZodObject<{
214
- id: z.ZodUUID;
215
- municipality: z.ZodString;
216
- administrative_division: z.ZodString;
217
- administrative_division_code: z.ZodOptional<z.ZodString>;
218
- country: z.ZodString;
219
- country_code: z.ZodString;
220
- responsible_participant_id: z.ZodUUID;
221
- coordinates: z.ZodObject<{
222
- latitude: z.ZodNumber;
223
- longitude: z.ZodNumber;
224
- precision_level: z.ZodEnum<{
225
- exact: "exact";
226
- neighborhood: "neighborhood";
227
- city: "city";
228
- region: "region";
229
- country: "country";
230
- }>;
231
- }, z.core.$strict>;
232
- facility_type: z.ZodOptional<z.ZodEnum<{
233
- "Waste Generation": "Waste Generation";
234
- "Collection Point": "Collection Point";
235
- "Transfer Station": "Transfer Station";
236
- "Sorting Facility": "Sorting Facility";
237
- "Composting Facility": "Composting Facility";
238
- "Recycling Facility": "Recycling Facility";
239
- "Processing Facility": "Processing Facility";
240
- "Disposal Facility": "Disposal Facility";
241
- "Administrative Office": "Administrative Office";
242
- }>>;
243
- }, z.core.$strict>>;
244
- participants: z.ZodArray<z.ZodObject<{
245
- id: z.ZodUUID;
246
- name: z.ZodString;
247
- roles: z.ZodArray<z.ZodString>;
248
- }, z.core.$strict>>;
249
- chain_of_custody: z.ZodObject<{
250
- events: z.ZodArray<z.ZodObject<{
251
- event_id: z.ZodUUID;
252
- event_name: z.ZodString;
253
- description: z.ZodOptional<z.ZodString>;
254
- timestamp: z.ZodISODateTime;
255
- participant_id: z.ZodUUID;
256
- location_id: z.ZodUUID;
257
- weight: z.ZodOptional<z.ZodNumber>;
258
- attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
259
- name: z.ZodString;
260
- value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
261
- format: z.ZodOptional<z.ZodEnum<{
262
- KILOGRAM: "KILOGRAM";
263
- DATE: "DATE";
264
- CURRENCY: "CURRENCY";
265
- PERCENTAGE: "PERCENTAGE";
266
- COORDINATE: "COORDINATE";
267
- }>>;
268
- }, z.core.$strict>>>;
269
- documentation: z.ZodOptional<z.ZodArray<z.ZodObject<{
270
- type: z.ZodString;
271
- document_number: z.ZodOptional<z.ZodString>;
272
- reference: z.ZodString;
273
- issue_date: z.ZodOptional<z.ZodISODate>;
274
- issuer: z.ZodOptional<z.ZodString>;
275
- }, z.core.$strict>>>;
276
- notes: z.ZodOptional<z.ZodString>;
277
- }, z.core.$strict>>;
278
- total_distance_km: z.ZodNumber;
279
- total_duration_hours: z.ZodNumber;
280
- }, z.core.$strict>;
281
- geographic_data: z.ZodObject<{
282
- origin_location_id: z.ZodUUID;
283
- processing_location_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
284
- final_destination_id: z.ZodUUID;
285
- transport_routes: z.ZodArray<z.ZodObject<{
286
- from_location_id: z.ZodUUID;
287
- to_location_id: z.ZodUUID;
288
- distance_km: z.ZodNumber;
289
- transport_method: z.ZodString;
290
- duration_hours: z.ZodNumber;
291
- }, z.core.$strict>>;
292
- }, z.core.$strict>;
293
- }, z.core.$strict>;
294
- }, z.core.$strict>;
295
- export type MassIDIpfs = z.infer<typeof MassIDIpfsSchema>;
296
- export {};
297
- //# sourceMappingURL=mass-id.schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mass-id.schema.d.ts","sourceRoot":"","sources":["../../src/mass-id/mass-id.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,QAAA,MAAM,wBAAwB;;;kBAQ1B,CAAC;AAEL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,QAAA,MAAM,2BAA2B;;;kBAQ7B,CAAC;AAEL,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,QAAA,MAAM,qBAAqB;;;;kBASvB,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,QAAA,MAAM,4BAA4B;;;kBAW9B,CAAC;AAEL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,QAAA,MAAM,iCAAiC;;;kBAWnC,CAAC;AAEL,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAEF,QAAA,MAAM,6BAA6B;;;kBAY/B,CAAC;AAEL,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,QAAA,MAAM,uBAAuB;;;kBAWzB,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,QAAA,MAAM,yBAAyB;;;kBAY3B,CAAC;AAEL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,QAAA,MAAM,yBAAyB;;;;kBAe3B,CAAC;AAEL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,QAAA,MAAM,4BAA4B;;;;kBAe9B,CAAC;AAEL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAgBxB,CAAC;AAEL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,oBAAoB;;;;;CAMvB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiBA,CAAC;AAE9B,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}