@carrot-foundation/schemas 0.1.6 → 0.1.15

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.
@@ -0,0 +1,2 @@
1
+ export * from './mass-id';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './mass-id.data.schema.js';
2
+ export * from './mass-id.schema.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mass-id/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,256 @@
1
+ import { z } from 'zod';
2
+ declare const MassIDLocalClassificationSchema: z.ZodObject<{
3
+ code: z.ZodString;
4
+ description: z.ZodString;
5
+ system: z.ZodString;
6
+ }, z.core.$strict>;
7
+ export type MassIDLocalClassification = z.infer<typeof MassIDLocalClassificationSchema>;
8
+ declare const MassIDMeasurementUnitSchema: z.ZodEnum<{
9
+ kg: "kg";
10
+ ton: "ton";
11
+ }>;
12
+ export type MassIDMeasurementUnit = z.infer<typeof MassIDMeasurementUnitSchema>;
13
+ declare const ContaminationLevelSchema: z.ZodEnum<{
14
+ None: "None";
15
+ Low: "Low";
16
+ Medium: "Medium";
17
+ High: "High";
18
+ }>;
19
+ export type ContaminationLevel = z.infer<typeof ContaminationLevelSchema>;
20
+ declare const MassIDWasteClassificationSchema: z.ZodObject<{
21
+ primary_type: z.ZodString;
22
+ subtype: z.ZodString;
23
+ local_classification: z.ZodOptional<z.ZodObject<{
24
+ code: z.ZodString;
25
+ description: z.ZodString;
26
+ system: z.ZodString;
27
+ }, z.core.$strict>>;
28
+ measurement_unit: z.ZodEnum<{
29
+ kg: "kg";
30
+ ton: "ton";
31
+ }>;
32
+ net_weight: z.ZodNumber;
33
+ contamination_level: z.ZodOptional<z.ZodEnum<{
34
+ None: "None";
35
+ Low: "Low";
36
+ Medium: "Medium";
37
+ High: "High";
38
+ }>>;
39
+ }, z.core.$strict>;
40
+ export type MassIDWasteClassification = z.infer<typeof MassIDWasteClassificationSchema>;
41
+ declare const EventAttributeFormatSchema: z.ZodEnum<{
42
+ KILOGRAM: "KILOGRAM";
43
+ DATE: "DATE";
44
+ CURRENCY: "CURRENCY";
45
+ PERCENTAGE: "PERCENTAGE";
46
+ COORDINATE: "COORDINATE";
47
+ }>;
48
+ export type EventAttributeFormat = z.infer<typeof EventAttributeFormatSchema>;
49
+ declare const EventAttributeSchema: z.ZodObject<{
50
+ name: z.ZodString;
51
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
52
+ format: z.ZodOptional<z.ZodEnum<{
53
+ KILOGRAM: "KILOGRAM";
54
+ DATE: "DATE";
55
+ CURRENCY: "CURRENCY";
56
+ PERCENTAGE: "PERCENTAGE";
57
+ COORDINATE: "COORDINATE";
58
+ }>>;
59
+ }, z.core.$strict>;
60
+ export type EventAttribute = z.infer<typeof EventAttributeSchema>;
61
+ declare const EventDocumentSchema: z.ZodObject<{
62
+ type: z.ZodString;
63
+ document_number: z.ZodOptional<z.ZodString>;
64
+ reference: z.ZodString;
65
+ issue_date: z.ZodOptional<z.ZodISODate>;
66
+ issuer: z.ZodOptional<z.ZodString>;
67
+ }, z.core.$strict>;
68
+ export type EventDocumentation = z.infer<typeof EventDocumentSchema>;
69
+ declare const MassIDChainOfCustodyEventSchema: z.ZodObject<{
70
+ event_id: z.ZodUUID;
71
+ event_name: z.ZodString;
72
+ description: z.ZodOptional<z.ZodString>;
73
+ timestamp: z.ZodISODateTime;
74
+ participant_id: z.ZodUUID;
75
+ location_id: z.ZodUUID;
76
+ weight: z.ZodOptional<z.ZodNumber>;
77
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ name: z.ZodString;
79
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
80
+ format: z.ZodOptional<z.ZodEnum<{
81
+ KILOGRAM: "KILOGRAM";
82
+ DATE: "DATE";
83
+ CURRENCY: "CURRENCY";
84
+ PERCENTAGE: "PERCENTAGE";
85
+ COORDINATE: "COORDINATE";
86
+ }>>;
87
+ }, z.core.$strict>>>;
88
+ documentation: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ type: z.ZodString;
90
+ document_number: z.ZodOptional<z.ZodString>;
91
+ reference: z.ZodString;
92
+ issue_date: z.ZodOptional<z.ZodISODate>;
93
+ issuer: z.ZodOptional<z.ZodString>;
94
+ }, z.core.$strict>>>;
95
+ notes: z.ZodOptional<z.ZodString>;
96
+ }, z.core.$strict>;
97
+ export type MassIDChainOfCustodyEvent = z.infer<typeof MassIDChainOfCustodyEventSchema>;
98
+ declare const MassIDChainOfCustodySchema: z.ZodObject<{
99
+ events: z.ZodArray<z.ZodObject<{
100
+ event_id: z.ZodUUID;
101
+ event_name: z.ZodString;
102
+ description: z.ZodOptional<z.ZodString>;
103
+ timestamp: z.ZodISODateTime;
104
+ participant_id: z.ZodUUID;
105
+ location_id: z.ZodUUID;
106
+ weight: z.ZodOptional<z.ZodNumber>;
107
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
+ name: z.ZodString;
109
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
110
+ format: z.ZodOptional<z.ZodEnum<{
111
+ KILOGRAM: "KILOGRAM";
112
+ DATE: "DATE";
113
+ CURRENCY: "CURRENCY";
114
+ PERCENTAGE: "PERCENTAGE";
115
+ COORDINATE: "COORDINATE";
116
+ }>>;
117
+ }, z.core.$strict>>>;
118
+ documentation: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ type: z.ZodString;
120
+ document_number: z.ZodOptional<z.ZodString>;
121
+ reference: z.ZodString;
122
+ issue_date: z.ZodOptional<z.ZodISODate>;
123
+ issuer: z.ZodOptional<z.ZodString>;
124
+ }, z.core.$strict>>>;
125
+ notes: z.ZodOptional<z.ZodString>;
126
+ }, z.core.$strict>>;
127
+ total_distance_km: z.ZodNumber;
128
+ total_duration_hours: z.ZodNumber;
129
+ }, z.core.$strict>;
130
+ export type MassIDChainOfCustody = z.infer<typeof MassIDChainOfCustodySchema>;
131
+ declare const MassIDTransportRouteSchema: z.ZodObject<{
132
+ from_location_id: z.ZodUUID;
133
+ to_location_id: z.ZodUUID;
134
+ distance_km: z.ZodNumber;
135
+ transport_method: z.ZodString;
136
+ duration_hours: z.ZodNumber;
137
+ }, z.core.$strict>;
138
+ export type MassIDTransportRoute = z.infer<typeof MassIDTransportRouteSchema>;
139
+ declare const MassIDGeographicDataSchema: z.ZodObject<{
140
+ origin_location_id: z.ZodUUID;
141
+ processing_location_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
142
+ final_destination_id: z.ZodUUID;
143
+ transport_routes: z.ZodArray<z.ZodObject<{
144
+ from_location_id: z.ZodUUID;
145
+ to_location_id: z.ZodUUID;
146
+ distance_km: z.ZodNumber;
147
+ transport_method: z.ZodString;
148
+ duration_hours: z.ZodNumber;
149
+ }, z.core.$strict>>;
150
+ }, z.core.$strict>;
151
+ export type MassIDGeographicData = z.infer<typeof MassIDGeographicDataSchema>;
152
+ export declare const MassIDDataSchema: z.ZodObject<{
153
+ waste_classification: z.ZodObject<{
154
+ primary_type: z.ZodString;
155
+ subtype: z.ZodString;
156
+ local_classification: z.ZodOptional<z.ZodObject<{
157
+ code: z.ZodString;
158
+ description: z.ZodString;
159
+ system: z.ZodString;
160
+ }, z.core.$strict>>;
161
+ measurement_unit: z.ZodEnum<{
162
+ kg: "kg";
163
+ ton: "ton";
164
+ }>;
165
+ net_weight: z.ZodNumber;
166
+ contamination_level: z.ZodOptional<z.ZodEnum<{
167
+ None: "None";
168
+ Low: "Low";
169
+ Medium: "Medium";
170
+ High: "High";
171
+ }>>;
172
+ }, z.core.$strict>;
173
+ locations: z.ZodArray<z.ZodObject<{
174
+ id: z.ZodUUID;
175
+ municipality: z.ZodString;
176
+ administrative_division: z.ZodString;
177
+ administrative_division_code: z.ZodOptional<z.ZodString>;
178
+ country: z.ZodString;
179
+ country_code: z.ZodString;
180
+ responsible_participant_id: z.ZodUUID;
181
+ coordinates: z.ZodObject<{
182
+ latitude: z.ZodNumber;
183
+ longitude: z.ZodNumber;
184
+ precision_level: z.ZodEnum<{
185
+ exact: "exact";
186
+ neighborhood: "neighborhood";
187
+ city: "city";
188
+ region: "region";
189
+ country: "country";
190
+ }>;
191
+ }, z.core.$strict>;
192
+ facility_type: z.ZodOptional<z.ZodEnum<{
193
+ "Waste Generation": "Waste Generation";
194
+ "Collection Point": "Collection Point";
195
+ "Transfer Station": "Transfer Station";
196
+ "Sorting Facility": "Sorting Facility";
197
+ "Composting Facility": "Composting Facility";
198
+ "Recycling Facility": "Recycling Facility";
199
+ "Processing Facility": "Processing Facility";
200
+ "Disposal Facility": "Disposal Facility";
201
+ "Administrative Office": "Administrative Office";
202
+ }>>;
203
+ }, z.core.$strict>>;
204
+ participants: z.ZodArray<z.ZodObject<{
205
+ id: z.ZodUUID;
206
+ name: z.ZodString;
207
+ roles: z.ZodArray<z.ZodString>;
208
+ }, z.core.$strict>>;
209
+ chain_of_custody: z.ZodObject<{
210
+ events: z.ZodArray<z.ZodObject<{
211
+ event_id: z.ZodUUID;
212
+ event_name: z.ZodString;
213
+ description: z.ZodOptional<z.ZodString>;
214
+ timestamp: z.ZodISODateTime;
215
+ participant_id: z.ZodUUID;
216
+ location_id: z.ZodUUID;
217
+ weight: z.ZodOptional<z.ZodNumber>;
218
+ attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
219
+ name: z.ZodString;
220
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
221
+ format: z.ZodOptional<z.ZodEnum<{
222
+ KILOGRAM: "KILOGRAM";
223
+ DATE: "DATE";
224
+ CURRENCY: "CURRENCY";
225
+ PERCENTAGE: "PERCENTAGE";
226
+ COORDINATE: "COORDINATE";
227
+ }>>;
228
+ }, z.core.$strict>>>;
229
+ documentation: z.ZodOptional<z.ZodArray<z.ZodObject<{
230
+ type: z.ZodString;
231
+ document_number: z.ZodOptional<z.ZodString>;
232
+ reference: z.ZodString;
233
+ issue_date: z.ZodOptional<z.ZodISODate>;
234
+ issuer: z.ZodOptional<z.ZodString>;
235
+ }, z.core.$strict>>>;
236
+ notes: z.ZodOptional<z.ZodString>;
237
+ }, z.core.$strict>>;
238
+ total_distance_km: z.ZodNumber;
239
+ total_duration_hours: z.ZodNumber;
240
+ }, z.core.$strict>;
241
+ geographic_data: z.ZodObject<{
242
+ origin_location_id: z.ZodUUID;
243
+ processing_location_ids: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
244
+ final_destination_id: z.ZodUUID;
245
+ transport_routes: z.ZodArray<z.ZodObject<{
246
+ from_location_id: z.ZodUUID;
247
+ to_location_id: z.ZodUUID;
248
+ distance_km: z.ZodNumber;
249
+ transport_method: z.ZodString;
250
+ duration_hours: z.ZodNumber;
251
+ }, z.core.$strict>>;
252
+ }, z.core.$strict>;
253
+ }, z.core.$strict>;
254
+ export type MassIDData = z.infer<typeof MassIDDataSchema>;
255
+ export {};
256
+ //# sourceMappingURL=mass-id.data.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mass-id.data.schema.d.ts","sourceRoot":"","sources":["../../src/mass-id/mass-id.data.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,QAAA,MAAM,+BAA+B;;;;kBAiCjC,CAAC;AAEL,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,+BAA+B,CACvC,CAAC;AAEF,QAAA,MAAM,2BAA2B;;;EAI/B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,C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B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8DzB,CAAC;AAEL,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -3,7 +3,7 @@ import { UuidSchema, WasteTypeSchema, WasteSubtypeSchema, NonEmptyStringSchema,
3
3
  import { LocationSchema } from '../shared/entities/location.schema.js';
4
4
  import { ParticipantSchema } from '../shared/entities/participant.schema.js';
5
5
  import { uniqueBy } from '../shared/helpers.schema.js';
6
- const LocalClassificationSchema = z
6
+ const MassIDLocalClassificationSchema = z
7
7
  .strictObject({
8
8
  code: NonEmptyStringSchema.max(20).meta({
9
9
  title: 'Classification Code',
@@ -35,7 +35,7 @@ const LocalClassificationSchema = z
35
35
  title: 'Local Classification',
36
36
  description: 'Local or regional waste classification codes and descriptions',
37
37
  });
38
- const MeasurementUnitSchema = z.enum(['kg', 'ton']).meta({
38
+ const MassIDMeasurementUnitSchema = z.enum(['kg', 'ton']).meta({
39
39
  title: 'Measurement Unit',
40
40
  description: 'Unit of measurement for the waste quantity',
41
41
  examples: ['kg', 'ton'],
@@ -47,7 +47,7 @@ const ContaminationLevelSchema = z
47
47
  description: 'Level of contamination in the waste batch',
48
48
  examples: ['Low', 'Medium', 'None'],
49
49
  });
50
- const WasteClassificationSchema = z
50
+ const MassIDWasteClassificationSchema = z
51
51
  .strictObject({
52
52
  primary_type: WasteTypeSchema.meta({
53
53
  title: 'Primary Waste Type',
@@ -57,8 +57,8 @@ const WasteClassificationSchema = z
57
57
  title: 'Waste Subtype',
58
58
  description: 'Specific subcategory of waste material',
59
59
  }),
60
- local_classification: LocalClassificationSchema.optional(),
61
- measurement_unit: MeasurementUnitSchema,
60
+ local_classification: MassIDLocalClassificationSchema.optional(),
61
+ measurement_unit: MassIDMeasurementUnitSchema,
62
62
  net_weight: NonNegativeFloatSchema.meta({
63
63
  title: 'Net Weight',
64
64
  description: 'Net weight of the waste batch in the specified measurement unit',
@@ -175,7 +175,7 @@ const EventDocumentSchema = z
175
175
  title: 'Event Document',
176
176
  description: 'Supporting event document',
177
177
  });
178
- const ChainOfCustodyEventSchema = z
178
+ const MassIDChainOfCustodyEventSchema = z
179
179
  .strictObject({
180
180
  event_id: UuidSchema.meta({
181
181
  title: 'Event ID',
@@ -186,7 +186,9 @@ const ChainOfCustodyEventSchema = z
186
186
  description: 'Name of custody or processing event',
187
187
  examples: ['Sorting', 'Processing', 'Recycling', 'Weighing'],
188
188
  }),
189
- description: NonEmptyStringSchema.max(200).meta({
189
+ description: NonEmptyStringSchema.max(200)
190
+ .optional()
191
+ .meta({
190
192
  title: 'Event Description',
191
193
  description: 'Detailed description of what happened during this event',
192
194
  examples: [
@@ -231,9 +233,9 @@ const ChainOfCustodyEventSchema = z
231
233
  title: 'Chain of Custody Event',
232
234
  description: 'Chain of custody event',
233
235
  });
234
- const ChainOfCustodySchema = z
236
+ const MassIDChainOfCustodySchema = z
235
237
  .strictObject({
236
- events: z.array(ChainOfCustodyEventSchema).min(1).meta({
238
+ events: z.array(MassIDChainOfCustodyEventSchema).min(1).meta({
237
239
  title: 'Custody Events',
238
240
  description: 'Chronological sequence of custody transfer and processing events',
239
241
  }),
@@ -250,7 +252,7 @@ const ChainOfCustodySchema = z
250
252
  title: 'Chain of Custody',
251
253
  description: 'Complete chain of custody tracking from waste generation to final processing',
252
254
  });
253
- const TransportRouteSchema = z
255
+ const MassIDTransportRouteSchema = z
254
256
  .strictObject({
255
257
  from_location_id: UuidSchema.meta({
256
258
  title: 'From Location ID',
@@ -287,7 +289,7 @@ const TransportRouteSchema = z
287
289
  title: 'Transport Route',
288
290
  description: 'Transport route segment information',
289
291
  });
290
- const GeographicDataSchema = z
292
+ const MassIDGeographicDataSchema = z
291
293
  .strictObject({
292
294
  origin_location_id: UuidSchema.meta({
293
295
  title: 'Origin Location ID',
@@ -301,7 +303,7 @@ const GeographicDataSchema = z
301
303
  title: 'Final Destination ID',
302
304
  description: 'Reference to final destination in the locations array',
303
305
  }),
304
- transport_routes: z.array(TransportRouteSchema).meta({
306
+ transport_routes: z.array(MassIDTransportRouteSchema).meta({
305
307
  title: 'Transport Routes',
306
308
  description: 'Detailed transport route information',
307
309
  }),
@@ -312,7 +314,7 @@ const GeographicDataSchema = z
312
314
  });
313
315
  export const MassIDDataSchema = z
314
316
  .strictObject({
315
- waste_classification: WasteClassificationSchema,
317
+ waste_classification: MassIDWasteClassificationSchema,
316
318
  locations: uniqueBy(LocationSchema, (loc) => loc.id, 'Location IDs must be unique')
317
319
  .min(1)
318
320
  .meta({
@@ -325,8 +327,8 @@ export const MassIDDataSchema = z
325
327
  title: 'Participants',
326
328
  description: 'All participants referenced in this MassID, indexed by ID',
327
329
  }),
328
- chain_of_custody: ChainOfCustodySchema,
329
- geographic_data: GeographicDataSchema,
330
+ chain_of_custody: MassIDChainOfCustodySchema,
331
+ geographic_data: MassIDGeographicDataSchema,
330
332
  })
331
333
  .refine((data) => {
332
334
  const participantIdSet = new Set(data.participants.map((participant) => participant.id));
@@ -0,0 +1,297 @@
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
@@ -0,0 +1 @@
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,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AAG,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"}
@@ -139,6 +139,12 @@ const MassIDAttributesSchema = z
139
139
  title: 'MassID Attributes',
140
140
  description: 'Fixed set of MassID NFT attributes in required order',
141
141
  });
142
+ export const MassIDIpfsSchemaMeta = {
143
+ title: 'MassID NFT IPFS Record',
144
+ description: 'Complete MassID NFT IPFS record including fixed attributes and detailed waste tracking data',
145
+ $id: 'https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id/mass-id.schema.json',
146
+ version: '1.0.1',
147
+ };
142
148
  export const MassIDIpfsSchema = NftIpfsSchema.safeExtend({
143
149
  schema: NftIpfsSchema.shape.schema.safeExtend({
144
150
  type: z.literal('MassID').meta({
@@ -154,9 +160,4 @@ export const MassIDIpfsSchema = NftIpfsSchema.safeExtend({
154
160
  title: 'MassID Data',
155
161
  description: 'MassID-specific data containing waste tracking and chain of custody information',
156
162
  }),
157
- }).meta({
158
- title: 'MassID NFT IPFS Record',
159
- description: 'Complete MassID NFT IPFS record including fixed attributes and detailed waste tracking data',
160
- $id: 'https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id/mass-id.schema.json',
161
- version: '1.0.0',
162
- });
163
+ }).meta(MassIDIpfsSchemaMeta);
@@ -0,0 +1,111 @@
1
+ import { z } from 'zod';
2
+ declare const SchemaInfoSchema: z.ZodObject<{
3
+ hash: z.ZodCustomStringFormat<"sha256_hex">;
4
+ type: z.ZodEnum<{
5
+ MassID: "MassID";
6
+ "MassID Audit": "MassID Audit";
7
+ RecycledID: "RecycledID";
8
+ GasID: "GasID";
9
+ PurchaseID: "PurchaseID";
10
+ Methodology: "Methodology";
11
+ Credit: "Credit";
12
+ Collection: "Collection";
13
+ }>;
14
+ version: z.ZodString;
15
+ }, z.core.$strict>;
16
+ export type SchemaInfo = z.infer<typeof SchemaInfoSchema>;
17
+ declare const RecordCreatorSchema: z.ZodObject<{
18
+ name: z.ZodString;
19
+ id: z.ZodUUID;
20
+ }, z.core.$strict>;
21
+ export type RecordCreator = z.infer<typeof RecordCreatorSchema>;
22
+ declare const RecordRelationshipSchema: z.ZodObject<{
23
+ target_uri: z.ZodString;
24
+ type: z.ZodEnum<{
25
+ collection: "collection";
26
+ credit: "credit";
27
+ "gas-id": "gas-id";
28
+ "mass-id": "mass-id";
29
+ "mass-id-audit": "mass-id-audit";
30
+ methodology: "methodology";
31
+ "purchase-id": "purchase-id";
32
+ "recycled-id": "recycled-id";
33
+ }>;
34
+ description: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strict>;
36
+ export type RecordRelationship = z.infer<typeof RecordRelationshipSchema>;
37
+ export declare const RecordEnvironmentSchema: z.ZodObject<{
38
+ blockchain_network: z.ZodEnum<{
39
+ mainnet: "mainnet";
40
+ testnet: "testnet";
41
+ }>;
42
+ deployment: z.ZodEnum<{
43
+ production: "production";
44
+ development: "development";
45
+ testing: "testing";
46
+ }>;
47
+ data_set_name: z.ZodEnum<{
48
+ TEST: "TEST";
49
+ PROD: "PROD";
50
+ }>;
51
+ }, z.core.$strict>;
52
+ export type RecordEnvironment = z.infer<typeof RecordEnvironmentSchema>;
53
+ export declare const BaseIpfsSchema: z.ZodObject<{
54
+ $schema: z.ZodURL;
55
+ schema: z.ZodObject<{
56
+ hash: z.ZodCustomStringFormat<"sha256_hex">;
57
+ type: z.ZodEnum<{
58
+ MassID: "MassID";
59
+ "MassID Audit": "MassID Audit";
60
+ RecycledID: "RecycledID";
61
+ GasID: "GasID";
62
+ PurchaseID: "PurchaseID";
63
+ Methodology: "Methodology";
64
+ Credit: "Credit";
65
+ Collection: "Collection";
66
+ }>;
67
+ version: z.ZodString;
68
+ }, z.core.$strict>;
69
+ created_at: z.ZodISODateTime;
70
+ external_id: z.ZodUUID;
71
+ external_url: z.ZodURL;
72
+ original_content_hash: z.ZodCustomStringFormat<"sha256_hex">;
73
+ content_hash: z.ZodCustomStringFormat<"sha256_hex">;
74
+ creator: z.ZodOptional<z.ZodObject<{
75
+ name: z.ZodString;
76
+ id: z.ZodUUID;
77
+ }, z.core.$strict>>;
78
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
+ target_uri: z.ZodString;
80
+ type: z.ZodEnum<{
81
+ collection: "collection";
82
+ credit: "credit";
83
+ "gas-id": "gas-id";
84
+ "mass-id": "mass-id";
85
+ "mass-id-audit": "mass-id-audit";
86
+ methodology: "methodology";
87
+ "purchase-id": "purchase-id";
88
+ "recycled-id": "recycled-id";
89
+ }>;
90
+ description: z.ZodOptional<z.ZodString>;
91
+ }, z.core.$strict>>>;
92
+ environment: z.ZodOptional<z.ZodObject<{
93
+ blockchain_network: z.ZodEnum<{
94
+ mainnet: "mainnet";
95
+ testnet: "testnet";
96
+ }>;
97
+ deployment: z.ZodEnum<{
98
+ production: "production";
99
+ development: "development";
100
+ testing: "testing";
101
+ }>;
102
+ data_set_name: z.ZodEnum<{
103
+ TEST: "TEST";
104
+ PROD: "PROD";
105
+ }>;
106
+ }, z.core.$strict>>;
107
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
108
+ }, z.core.$strict>;
109
+ export type BaseIpfs = z.infer<typeof BaseIpfsSchema>;
110
+ export {};
111
+ //# sourceMappingURL=base.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.schema.d.ts","sourceRoot":"","sources":["../../src/shared/base.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;kBAkBlB,CAAC;AAEL,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,QAAA,MAAM,mBAAmB;;;kBAerB,CAAC;AAEL,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;kBA4B1B,CAAC;AAEL,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;kBAkBhC,CAAC;AAEL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8CvB,CAAC;AAEL,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,96 @@
1
+ import { z } from 'zod';
2
+ export declare const UuidSchema: z.ZodUUID;
3
+ export type Uuid = z.infer<typeof UuidSchema>;
4
+ export declare const EthereumAddressSchema: z.ZodString;
5
+ export type EthereumAddress = z.infer<typeof EthereumAddressSchema>;
6
+ export declare const IsoTimestampSchema: z.ZodISODateTime;
7
+ export type IsoTimestamp = z.infer<typeof IsoTimestampSchema>;
8
+ export declare const IsoDateSchema: z.ZodISODate;
9
+ export type IsoDate = z.infer<typeof IsoDateSchema>;
10
+ export declare const IsoCountryCodeSchema: z.ZodString;
11
+ export type IsoCountryCode = z.infer<typeof IsoCountryCodeSchema>;
12
+ export declare const IsoAdministrativeDivisionCodeSchema: z.ZodString;
13
+ export type IsoAdministrativeDivisionCode = z.infer<typeof IsoAdministrativeDivisionCodeSchema>;
14
+ export declare const LatitudeSchema: z.ZodNumber;
15
+ export type Latitude = z.infer<typeof LatitudeSchema>;
16
+ export declare const LongitudeSchema: z.ZodNumber;
17
+ export type Longitude = z.infer<typeof LongitudeSchema>;
18
+ export declare const WeightKgSchema: z.ZodNumber;
19
+ export type WeightKg = z.infer<typeof WeightKgSchema>;
20
+ export declare const NonEmptyStringSchema: z.ZodString;
21
+ export type NonEmptyString = z.infer<typeof NonEmptyStringSchema>;
22
+ export declare const SlugSchema: z.ZodString;
23
+ export type Slug = z.infer<typeof SlugSchema>;
24
+ export declare const WasteTypeSchema: z.ZodString;
25
+ export type WasteType = z.infer<typeof WasteTypeSchema>;
26
+ export declare const WasteSubtypeSchema: z.ZodString;
27
+ export type WasteSubtype = z.infer<typeof WasteSubtypeSchema>;
28
+ export declare const ParticipantRoleSchema: z.ZodString;
29
+ export type ParticipantRole = z.infer<typeof ParticipantRoleSchema>;
30
+ export declare const ParticipantNameSchema: z.ZodString;
31
+ export type ParticipantName = z.infer<typeof ParticipantNameSchema>;
32
+ export declare const FacilityTypeSchema: z.ZodEnum<{
33
+ "Waste Generation": "Waste Generation";
34
+ "Collection Point": "Collection Point";
35
+ "Transfer Station": "Transfer Station";
36
+ "Sorting Facility": "Sorting Facility";
37
+ "Composting Facility": "Composting Facility";
38
+ "Recycling Facility": "Recycling Facility";
39
+ "Processing Facility": "Processing Facility";
40
+ "Disposal Facility": "Disposal Facility";
41
+ "Administrative Office": "Administrative Office";
42
+ }>;
43
+ export type FacilityType = z.infer<typeof FacilityTypeSchema>;
44
+ export declare const BlockchainChainIdSchema: z.ZodNumber;
45
+ export type BlockchainChainId = z.infer<typeof BlockchainChainIdSchema>;
46
+ export declare const PercentageSchema: z.ZodNumber;
47
+ export type Percentage = z.infer<typeof PercentageSchema>;
48
+ export declare const NonNegativeIntegerSchema: z.ZodNumber;
49
+ export type NonNegativeInteger = z.infer<typeof NonNegativeIntegerSchema>;
50
+ export declare const PositiveIntegerSchema: z.ZodNumber;
51
+ export type PositiveInteger = z.infer<typeof PositiveIntegerSchema>;
52
+ export declare const NonNegativeFloatSchema: z.ZodNumber;
53
+ export type NonNegativeFloat = z.infer<typeof NonNegativeFloatSchema>;
54
+ export declare const HoursSchema: z.ZodNumber;
55
+ export type Hours = z.infer<typeof HoursSchema>;
56
+ export declare const IpfsUriSchema: z.ZodString;
57
+ export type IpfsUri = z.infer<typeof IpfsUriSchema>;
58
+ export declare const SemanticVersionSchema: z.ZodString;
59
+ export type SemanticVersion = z.infer<typeof SemanticVersionSchema>;
60
+ export declare const TokenIdSchema: z.ZodString;
61
+ export type TokenId = z.infer<typeof TokenIdSchema>;
62
+ export declare const HexColorSchema: z.ZodString;
63
+ export type HexColor = z.infer<typeof HexColorSchema>;
64
+ export declare const Sha256HashSchema: z.ZodCustomStringFormat<"sha256_hex">;
65
+ export type Sha256Hash = z.infer<typeof Sha256HashSchema>;
66
+ export declare const Keccak256HashSchema: z.ZodCustomStringFormat<"sha256_hex">;
67
+ export type Keccak256Hash = z.infer<typeof Keccak256HashSchema>;
68
+ export declare const ExternalIdSchema: z.ZodUUID;
69
+ export type ExternalId = z.infer<typeof ExternalIdSchema>;
70
+ export declare const ExternalUrlSchema: z.ZodURL;
71
+ export type ExternalUrl = z.infer<typeof ExternalUrlSchema>;
72
+ export declare const RecordSchemaTypeSchema: z.ZodEnum<{
73
+ MassID: "MassID";
74
+ "MassID Audit": "MassID Audit";
75
+ RecycledID: "RecycledID";
76
+ GasID: "GasID";
77
+ PurchaseID: "PurchaseID";
78
+ Methodology: "Methodology";
79
+ Credit: "Credit";
80
+ Collection: "Collection";
81
+ }>;
82
+ export type RecordSchemaType = z.infer<typeof RecordSchemaTypeSchema>;
83
+ export declare const TokenSymbolSchema: z.ZodString;
84
+ export type TokenSymbol = z.infer<typeof TokenSymbolSchema>;
85
+ export declare const RecordRelationshipTypeSchema: z.ZodEnum<{
86
+ collection: "collection";
87
+ credit: "credit";
88
+ "gas-id": "gas-id";
89
+ "mass-id": "mass-id";
90
+ "mass-id-audit": "mass-id-audit";
91
+ methodology: "methodology";
92
+ "purchase-id": "purchase-id";
93
+ "recycled-id": "recycled-id";
94
+ }>;
95
+ export type RecordRelationshipType = z.infer<typeof RecordRelationshipTypeSchema>;
96
+ //# sourceMappingURL=definitions.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definitions.schema.d.ts","sourceRoot":"","sources":["../../src/shared/definitions.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,WAQrB,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,qBAAqB,aAa9B,CAAC;AAEL,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,kBAAkB,kBAQ3B,CAAC;AAEL,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa,cAMtB,CAAC;AAEL,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,oBAAoB,aAQ7B,CAAC;AAEL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;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,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,gBAAgB,uCAYzB,CAAC;AAEL,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,mBAAmB,uCAO9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,WAO3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB,UAO5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,sBAAsB;;;;;;;;;EAe/B,CAAC;AAEL,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,iBAAiB,aAS1B,CAAC;AAEL,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,4BAA4B;;;;;;;;;EAgBrC,CAAC;AAEL,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ declare const PrecisionLevelSchema: z.ZodEnum<{
3
+ exact: "exact";
4
+ neighborhood: "neighborhood";
5
+ city: "city";
6
+ region: "region";
7
+ country: "country";
8
+ }>;
9
+ export type PrecisionLevel = z.infer<typeof PrecisionLevelSchema>;
10
+ export declare const CoordinatesSchema: z.ZodObject<{
11
+ latitude: z.ZodNumber;
12
+ longitude: z.ZodNumber;
13
+ precision_level: z.ZodEnum<{
14
+ exact: "exact";
15
+ neighborhood: "neighborhood";
16
+ city: "city";
17
+ region: "region";
18
+ country: "country";
19
+ }>;
20
+ }, z.core.$strict>;
21
+ export type Coordinates = z.infer<typeof CoordinatesSchema>;
22
+ export declare const LocationSchema: z.ZodObject<{
23
+ id: z.ZodUUID;
24
+ municipality: z.ZodString;
25
+ administrative_division: z.ZodString;
26
+ administrative_division_code: z.ZodOptional<z.ZodString>;
27
+ country: z.ZodString;
28
+ country_code: z.ZodString;
29
+ responsible_participant_id: z.ZodUUID;
30
+ coordinates: z.ZodObject<{
31
+ latitude: z.ZodNumber;
32
+ longitude: z.ZodNumber;
33
+ precision_level: z.ZodEnum<{
34
+ exact: "exact";
35
+ neighborhood: "neighborhood";
36
+ city: "city";
37
+ region: "region";
38
+ country: "country";
39
+ }>;
40
+ }, z.core.$strict>;
41
+ facility_type: z.ZodOptional<z.ZodEnum<{
42
+ "Waste Generation": "Waste Generation";
43
+ "Collection Point": "Collection Point";
44
+ "Transfer Station": "Transfer Station";
45
+ "Sorting Facility": "Sorting Facility";
46
+ "Composting Facility": "Composting Facility";
47
+ "Recycling Facility": "Recycling Facility";
48
+ "Processing Facility": "Processing Facility";
49
+ "Disposal Facility": "Disposal Facility";
50
+ "Administrative Office": "Administrative Office";
51
+ }>>;
52
+ }, z.core.$strict>;
53
+ export type Location = z.infer<typeof LocationSchema>;
54
+ export {};
55
+ //# sourceMappingURL=location.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.schema.d.ts","sourceRoot":"","sources":["../../../src/shared/entities/location.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,QAAA,MAAM,oBAAoB;;;;;;EAMtB,CAAC;AAEL,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;;;;;;;kBAe1B,CAAC;AACL,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2CvB,CAAC;AAEL,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -39,7 +39,7 @@ export const LocationSchema = z
39
39
  description: 'State, province, or administrative region',
40
40
  examples: ['California', 'Ontario', 'Bavaria', 'Queensland'],
41
41
  }),
42
- administrative_division_code: IsoAdministrativeDivisionCodeSchema.meta({
42
+ administrative_division_code: IsoAdministrativeDivisionCodeSchema.optional().meta({
43
43
  title: 'Administrative Division Code',
44
44
  description: 'ISO 3166-2 administrative division code',
45
45
  }),
@@ -57,7 +57,7 @@ export const LocationSchema = z
57
57
  description: 'ID of the participant responsible for this location',
58
58
  }),
59
59
  coordinates: CoordinatesSchema,
60
- facility_type: FacilityTypeSchema.meta({
60
+ facility_type: FacilityTypeSchema.optional().meta({
61
61
  title: 'Facility Type',
62
62
  description: 'Type of facility at this location',
63
63
  }),
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+ export declare const ParticipantSchema: z.ZodObject<{
3
+ id: z.ZodUUID;
4
+ name: z.ZodString;
5
+ roles: z.ZodArray<z.ZodString>;
6
+ }, z.core.$strict>;
7
+ export type Participant = z.infer<typeof ParticipantSchema>;
8
+ //# sourceMappingURL=participant.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"participant.schema.d.ts","sourceRoot":"","sources":["../../../src/shared/entities/participant.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,iBAAiB;;;;kBAwB1B,CAAC;AAEL,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { z } from 'zod';
2
+ export declare function uniqueArrayItems<T extends z.ZodTypeAny>(schema: T, errorMessage?: string): z.ZodArray<T>;
3
+ export declare function uniqueBy<T extends z.ZodTypeAny, K>(schema: T, selector: (item: z.infer<T>) => K, errorMessage?: string): z.ZodArray<T>;
4
+ //# sourceMappingURL=helpers.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.schema.d.ts","sourceRoot":"","sources":["../../src/shared/helpers.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EACrD,MAAM,EAAE,CAAC,EACT,YAAY,GAAE,MAAqC,iBAOpD;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,CAAC,EAChD,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EACjC,YAAY,GAAE,MAA+B,iBAW9C"}
@@ -0,0 +1,116 @@
1
+ import { z } from 'zod';
2
+ declare const NftSchemaTypeSchema: z.ZodEnum<{
3
+ MassID: "MassID";
4
+ RecycledID: "RecycledID";
5
+ GasID: "GasID";
6
+ PurchaseID: "PurchaseID";
7
+ }>;
8
+ export type NftSchemaType = z.infer<typeof NftSchemaTypeSchema>;
9
+ declare const BlockchainReferenceSchema: z.ZodObject<{
10
+ smart_contract_address: z.ZodString;
11
+ chain_id: z.ZodNumber;
12
+ network_name: z.ZodString;
13
+ token_id: z.ZodString;
14
+ }, z.core.$strict>;
15
+ export type BlockchainReference = z.infer<typeof BlockchainReferenceSchema>;
16
+ declare const ExternalLinkSchema: z.ZodObject<{
17
+ label: z.ZodString;
18
+ url: z.ZodURL;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strict>;
21
+ export type ExternalLink = z.infer<typeof ExternalLinkSchema>;
22
+ declare const NftAttributeSchema: z.ZodObject<{
23
+ trait_type: z.ZodString;
24
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
25
+ display_type: z.ZodOptional<z.ZodEnum<{
26
+ number: "number";
27
+ date: "date";
28
+ boost_number: "boost_number";
29
+ boost_percentage: "boost_percentage";
30
+ }>>;
31
+ max_value: z.ZodOptional<z.ZodNumber>;
32
+ }, z.core.$strict>;
33
+ export type NftAttribute = z.infer<typeof NftAttributeSchema>;
34
+ export declare const NftIpfsSchema: z.ZodObject<{
35
+ $schema: z.ZodURL;
36
+ created_at: z.ZodISODateTime;
37
+ external_id: z.ZodUUID;
38
+ external_url: z.ZodURL;
39
+ original_content_hash: z.ZodCustomStringFormat<"sha256_hex">;
40
+ content_hash: z.ZodCustomStringFormat<"sha256_hex">;
41
+ creator: z.ZodOptional<z.ZodObject<{
42
+ name: z.ZodString;
43
+ id: z.ZodUUID;
44
+ }, z.core.$strict>>;
45
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
46
+ target_uri: z.ZodString;
47
+ type: z.ZodEnum<{
48
+ collection: "collection";
49
+ credit: "credit";
50
+ "gas-id": "gas-id";
51
+ "mass-id": "mass-id";
52
+ "mass-id-audit": "mass-id-audit";
53
+ methodology: "methodology";
54
+ "purchase-id": "purchase-id";
55
+ "recycled-id": "recycled-id";
56
+ }>;
57
+ description: z.ZodOptional<z.ZodString>;
58
+ }, z.core.$strict>>>;
59
+ environment: z.ZodOptional<z.ZodObject<{
60
+ blockchain_network: z.ZodEnum<{
61
+ mainnet: "mainnet";
62
+ testnet: "testnet";
63
+ }>;
64
+ deployment: z.ZodEnum<{
65
+ production: "production";
66
+ development: "development";
67
+ testing: "testing";
68
+ }>;
69
+ data_set_name: z.ZodEnum<{
70
+ TEST: "TEST";
71
+ PROD: "PROD";
72
+ }>;
73
+ }, z.core.$strict>>;
74
+ data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
75
+ schema: z.ZodObject<{
76
+ hash: z.ZodCustomStringFormat<"sha256_hex">;
77
+ version: z.ZodString;
78
+ type: z.ZodEnum<{
79
+ MassID: "MassID";
80
+ RecycledID: "RecycledID";
81
+ GasID: "GasID";
82
+ PurchaseID: "PurchaseID";
83
+ }>;
84
+ }, z.core.$strict>;
85
+ blockchain: z.ZodObject<{
86
+ smart_contract_address: z.ZodString;
87
+ chain_id: z.ZodNumber;
88
+ network_name: z.ZodString;
89
+ token_id: z.ZodString;
90
+ }, z.core.$strict>;
91
+ name: z.ZodString;
92
+ short_name: z.ZodString;
93
+ description: z.ZodString;
94
+ image: z.ZodString;
95
+ background_color: z.ZodOptional<z.ZodString>;
96
+ animation_url: z.ZodOptional<z.ZodString>;
97
+ external_links: z.ZodOptional<z.ZodArray<z.ZodObject<{
98
+ label: z.ZodString;
99
+ url: z.ZodURL;
100
+ description: z.ZodOptional<z.ZodString>;
101
+ }, z.core.$strict>>>;
102
+ attributes: z.ZodArray<z.ZodObject<{
103
+ trait_type: z.ZodString;
104
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
105
+ display_type: z.ZodOptional<z.ZodEnum<{
106
+ number: "number";
107
+ date: "date";
108
+ boost_number: "boost_number";
109
+ boost_percentage: "boost_percentage";
110
+ }>>;
111
+ max_value: z.ZodOptional<z.ZodNumber>;
112
+ }, z.core.$strict>>;
113
+ }, z.core.$strict>;
114
+ export type NftIpfs = z.infer<typeof NftIpfsSchema>;
115
+ export {};
116
+ //# sourceMappingURL=nft.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nft.schema.d.ts","sourceRoot":"","sources":["../../src/shared/nft.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,QAAA,MAAM,mBAAmB;;;;;EAQvB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,QAAA,MAAM,yBAAyB;;;;;kBAqB3B,CAAC;AAEL,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,QAAA,MAAM,kBAAkB;;;;kBAkBpB,CAAC;AAEL,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,QAAA,MAAM,kBAAkB;;;;;;;;;;kBAyBpB,CAAC;AAEL,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0HxB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carrot-foundation/schemas",
3
- "version": "0.1.6",
3
+ "version": "0.1.15",
4
4
  "description": "Carrot schema definitions and zod validation schemas",
5
5
  "license": "Apache-2.0",
6
6
  "private": false,
@@ -24,7 +24,6 @@
24
24
  "dist/**/*",
25
25
  "schemas/**/*"
26
26
  ],
27
- "packageManager": "pnpm@10.14.0",
28
27
  "engines": {
29
28
  "node": ">=22"
30
29
  },
@@ -43,22 +42,6 @@
43
42
  "type": "git",
44
43
  "url": "https://github.com/carrot-foundation/schemas.git"
45
44
  },
46
- "scripts": {
47
- "build": "tsc",
48
- "check-refs": "node scripts/check-refs.js",
49
- "clean": "rm -rf dist",
50
- "generate-ipfs-schemas": "node scripts/generate-ipfs-schemas.js",
51
- "lint": "eslint .",
52
- "lint:fix": "eslint . --fix",
53
- "pkgJsonLint": "npmPkgJsonLint .",
54
- "prebuild": "pnpm clean",
55
- "pregenerate-ipfs-schemas": "pnpm build",
56
- "preinstall": "npx only-allow pnpm",
57
- "prepare": "husky",
58
- "prepublishOnly": "pnpm build",
59
- "type-check": "tsc --noEmit",
60
- "validate-schemas": "node scripts/validate-schemas.js"
61
- },
62
45
  "dependencies": {
63
46
  "zod": "4.1.9"
64
47
  },
@@ -85,5 +68,19 @@
85
68
  },
86
69
  "publishConfig": {
87
70
  "access": "public"
71
+ },
72
+ "scripts": {
73
+ "build": "tsc",
74
+ "check-refs": "node scripts/check-refs.js",
75
+ "clean": "rm -rf dist",
76
+ "generate-ipfs-schemas": "node scripts/generate-ipfs-schemas.js",
77
+ "lint": "eslint .",
78
+ "lint:fix": "eslint . --fix",
79
+ "pkgJsonLint": "npmPkgJsonLint .",
80
+ "prebuild": "pnpm clean",
81
+ "pregenerate-ipfs-schemas": "pnpm build",
82
+ "preinstall": "npx only-allow pnpm",
83
+ "type-check": "tsc --noEmit",
84
+ "validate-schemas": "node scripts/validate-schemas.js"
88
85
  }
89
- }
86
+ }
@@ -3,7 +3,7 @@
3
3
  "title": "MassID NFT IPFS Record",
4
4
  "description": "Complete MassID NFT IPFS record including fixed attributes and detailed waste tracking data",
5
5
  "$id": "https://raw.githubusercontent.com/carrot-foundation/schemas/refs/heads/main/schemas/ipfs/mass-id/mass-id.schema.json",
6
- "version": "1.0.0",
6
+ "version": "1.0.1",
7
7
  "type": "object",
8
8
  "properties": {
9
9
  "$schema": {
@@ -438,12 +438,10 @@
438
438
  "id",
439
439
  "municipality",
440
440
  "administrative_division",
441
- "administrative_division_code",
442
441
  "country",
443
442
  "country_code",
444
443
  "responsible_participant_id",
445
- "coordinates",
446
- "facility_type"
444
+ "coordinates"
447
445
  ],
448
446
  "additionalProperties": false
449
447
  }
@@ -763,7 +761,6 @@
763
761
  "required": [
764
762
  "event_id",
765
763
  "event_name",
766
- "description",
767
764
  "timestamp",
768
765
  "participant_id",
769
766
  "location_id"