@tmlmobilidade/types 20250910.1344.34 → 20250910.1526.7

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.
@@ -10,9 +10,9 @@ export declare const facilitiesSchema: z.ZodEnum<["fire_station", "health_clinic
10
10
  export declare const hasAnySchema: z.ZodEnum<["yes", "no", "unknown"]>;
11
11
  export declare const equipmentSchema: z.ZodEnum<["pip", "mupi", "mini_pip"]>;
12
12
  export declare const StopSchema: z.ZodObject<{
13
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
13
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
14
14
  created_by: z.ZodDefault<z.ZodString>;
15
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
15
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
16
16
  updated_by: z.ZodDefault<z.ZodString>;
17
17
  } & {
18
18
  _id: z.ZodString;
@@ -37,15 +37,15 @@ export declare const StopSchema: z.ZodObject<{
37
37
  road_type: z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>;
38
38
  shelter_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
39
  shelter_frame_size: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
40
- shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
40
+ shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
41
41
  shelter_maintainer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
42
  shelter_make: z.ZodOptional<z.ZodNullable<z.ZodString>>;
43
43
  shelter_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
44
  shelter_status: z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>;
45
- last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
46
- last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
47
- last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
48
- last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
45
+ last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
46
+ last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
47
+ last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
48
+ last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
49
49
  connections: z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">;
50
50
  facilities: z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">;
51
51
  equipment: z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">;
@@ -57,30 +57,156 @@ export declare const StopSchema: z.ZodObject<{
57
57
  has_stop_sign: z.ZodEnum<["yes", "no", "unknown"]>;
58
58
  file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
59
59
  image_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
60
- comments: z.ZodArray<z.ZodObject<{
61
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
60
+ comments: z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
61
+ _id: z.ZodString;
62
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
62
63
  created_by: z.ZodDefault<z.ZodString>;
63
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
64
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
64
65
  updated_by: z.ZodDefault<z.ZodString>;
65
66
  } & {
67
+ message: z.ZodString;
68
+ type: z.ZodLiteral<"note">;
69
+ }, "strip", z.ZodTypeAny, {
70
+ _id: string;
71
+ created_at: number & {
72
+ __brand: "UnixTimestamp";
73
+ };
74
+ created_by: string;
75
+ updated_at: number & {
76
+ __brand: "UnixTimestamp";
77
+ };
78
+ updated_by: string;
79
+ message: string;
80
+ type: "note";
81
+ }, {
82
+ _id: string;
83
+ created_at: number;
84
+ updated_at: number;
85
+ message: string;
86
+ type: "note";
87
+ created_by?: string | undefined;
88
+ updated_by?: string | undefined;
89
+ }>, z.ZodObject<{
66
90
  _id: z.ZodString;
67
- text: z.ZodString;
68
- }, "strict", z.ZodTypeAny, {
91
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
92
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
93
+ } & {
94
+ created_by: z.ZodLiteral<"system">;
95
+ message: z.ZodString;
96
+ type: z.ZodLiteral<"system_info">;
97
+ updated_by: z.ZodLiteral<"system">;
98
+ }, "strip", z.ZodTypeAny, {
69
99
  _id: string;
70
100
  created_at: number & {
71
101
  __brand: "UnixTimestamp";
72
- } & z.BRAND<"UnixTimestamp">;
102
+ };
103
+ created_by: "system";
104
+ updated_at: number & {
105
+ __brand: "UnixTimestamp";
106
+ };
107
+ updated_by: "system";
108
+ message: string;
109
+ type: "system_info";
110
+ }, {
111
+ _id: string;
112
+ created_at: number;
113
+ created_by: "system";
114
+ updated_at: number;
115
+ updated_by: "system";
116
+ message: string;
117
+ type: "system_info";
118
+ }>, z.ZodObject<{
119
+ _id: z.ZodString;
120
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
121
+ created_by: z.ZodDefault<z.ZodString>;
122
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
123
+ updated_by: z.ZodDefault<z.ZodString>;
124
+ } & {
125
+ curr_status: z.ZodString;
126
+ prev_status: z.ZodString;
127
+ type: z.ZodLiteral<"statusChanged">;
128
+ }, "strip", z.ZodTypeAny, {
129
+ _id: string;
130
+ created_at: number & {
131
+ __brand: "UnixTimestamp";
132
+ };
73
133
  created_by: string;
74
134
  updated_at: number & {
75
135
  __brand: "UnixTimestamp";
76
- } & z.BRAND<"UnixTimestamp">;
136
+ };
77
137
  updated_by: string;
78
- text: string;
138
+ type: "statusChanged";
139
+ curr_status: string;
140
+ prev_status: string;
79
141
  }, {
80
142
  _id: string;
81
143
  created_at: number;
82
144
  updated_at: number;
83
- text: string;
145
+ type: "statusChanged";
146
+ curr_status: string;
147
+ prev_status: string;
148
+ created_by?: string | undefined;
149
+ updated_by?: string | undefined;
150
+ }>]>, {
151
+ _id: string;
152
+ created_at: number & {
153
+ __brand: "UnixTimestamp";
154
+ };
155
+ created_by: string;
156
+ updated_at: number & {
157
+ __brand: "UnixTimestamp";
158
+ };
159
+ updated_by: string;
160
+ message: string;
161
+ type: "note";
162
+ } | {
163
+ _id: string;
164
+ created_at: number & {
165
+ __brand: "UnixTimestamp";
166
+ };
167
+ created_by: "system";
168
+ updated_at: number & {
169
+ __brand: "UnixTimestamp";
170
+ };
171
+ updated_by: "system";
172
+ message: string;
173
+ type: "system_info";
174
+ } | {
175
+ _id: string;
176
+ created_at: number & {
177
+ __brand: "UnixTimestamp";
178
+ };
179
+ created_by: string;
180
+ updated_at: number & {
181
+ __brand: "UnixTimestamp";
182
+ };
183
+ updated_by: string;
184
+ type: "statusChanged";
185
+ curr_status: string;
186
+ prev_status: string;
187
+ }, {
188
+ _id: string;
189
+ created_at: number;
190
+ updated_at: number;
191
+ message: string;
192
+ type: "note";
193
+ created_by?: string | undefined;
194
+ updated_by?: string | undefined;
195
+ } | {
196
+ _id: string;
197
+ created_at: number;
198
+ created_by: "system";
199
+ updated_at: number;
200
+ updated_by: "system";
201
+ message: string;
202
+ type: "system_info";
203
+ } | {
204
+ _id: string;
205
+ created_at: number;
206
+ updated_at: number;
207
+ type: "statusChanged";
208
+ curr_status: string;
209
+ prev_status: string;
84
210
  created_by?: string | undefined;
85
211
  updated_by?: string | undefined;
86
212
  }>, "many">;
@@ -89,11 +215,11 @@ export declare const StopSchema: z.ZodObject<{
89
215
  _id: string;
90
216
  created_at: number & {
91
217
  __brand: "UnixTimestamp";
92
- } & z.BRAND<"UnixTimestamp">;
218
+ };
93
219
  created_by: string;
94
220
  updated_at: number & {
95
221
  __brand: "UnixTimestamp";
96
- } & z.BRAND<"UnixTimestamp">;
222
+ };
97
223
  updated_by: string;
98
224
  name: string;
99
225
  has_bench: "unknown" | "yes" | "no";
@@ -103,18 +229,44 @@ export declare const StopSchema: z.ZodObject<{
103
229
  has_stop_sign: "unknown" | "yes" | "no";
104
230
  municipality_id: string;
105
231
  is_locked: boolean;
106
- comments: {
232
+ comments: ({
107
233
  _id: string;
108
234
  created_at: number & {
109
235
  __brand: "UnixTimestamp";
110
- } & z.BRAND<"UnixTimestamp">;
236
+ };
111
237
  created_by: string;
112
238
  updated_at: number & {
113
239
  __brand: "UnixTimestamp";
114
- } & z.BRAND<"UnixTimestamp">;
240
+ };
115
241
  updated_by: string;
116
- text: string;
117
- }[];
242
+ message: string;
243
+ type: "note";
244
+ } | {
245
+ _id: string;
246
+ created_at: number & {
247
+ __brand: "UnixTimestamp";
248
+ };
249
+ created_by: "system";
250
+ updated_at: number & {
251
+ __brand: "UnixTimestamp";
252
+ };
253
+ updated_by: "system";
254
+ message: string;
255
+ type: "system_info";
256
+ } | {
257
+ _id: string;
258
+ created_at: number & {
259
+ __brand: "UnixTimestamp";
260
+ };
261
+ created_by: string;
262
+ updated_at: number & {
263
+ __brand: "UnixTimestamp";
264
+ };
265
+ updated_by: string;
266
+ type: "statusChanged";
267
+ curr_status: string;
268
+ prev_status: string;
269
+ })[];
118
270
  is_archived: boolean;
119
271
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
120
272
  operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
@@ -141,23 +293,13 @@ export declare const StopSchema: z.ZodObject<{
141
293
  tts_name?: string | null | undefined;
142
294
  locality_id?: string | null | undefined;
143
295
  shelter_frame_size?: [number, number] | null | undefined;
144
- shelter_installation_date?: (number & {
145
- __brand: "UnixTimestamp";
146
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
296
+ shelter_installation_date?: UnixTimestamp | null | undefined;
147
297
  shelter_make?: string | null | undefined;
148
298
  shelter_model?: string | null | undefined;
149
- last_infrastructure_check?: (number & {
150
- __brand: "UnixTimestamp";
151
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
152
- last_infrastructure_maintenance?: (number & {
153
- __brand: "UnixTimestamp";
154
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
155
- last_schedules_check?: (number & {
156
- __brand: "UnixTimestamp";
157
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
158
- last_schedules_maintenance?: (number & {
159
- __brand: "UnixTimestamp";
160
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
299
+ last_infrastructure_check?: UnixTimestamp | null | undefined;
300
+ last_infrastructure_maintenance?: UnixTimestamp | null | undefined;
301
+ last_schedules_check?: UnixTimestamp | null | undefined;
302
+ last_schedules_maintenance?: UnixTimestamp | null | undefined;
161
303
  observations?: string | null | undefined;
162
304
  }, {
163
305
  _id: string;
@@ -170,14 +312,32 @@ export declare const StopSchema: z.ZodObject<{
170
312
  has_shelter: "unknown" | "yes" | "no";
171
313
  has_stop_sign: "unknown" | "yes" | "no";
172
314
  municipality_id: string;
173
- comments: {
315
+ comments: ({
316
+ _id: string;
317
+ created_at: number;
318
+ updated_at: number;
319
+ message: string;
320
+ type: "note";
321
+ created_by?: string | undefined;
322
+ updated_by?: string | undefined;
323
+ } | {
324
+ _id: string;
325
+ created_at: number;
326
+ created_by: "system";
327
+ updated_at: number;
328
+ updated_by: "system";
329
+ message: string;
330
+ type: "system_info";
331
+ } | {
174
332
  _id: string;
175
333
  created_at: number;
176
334
  updated_at: number;
177
- text: string;
335
+ type: "statusChanged";
336
+ curr_status: string;
337
+ prev_status: string;
178
338
  created_by?: string | undefined;
179
339
  updated_by?: string | undefined;
180
- }[];
340
+ })[];
181
341
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
182
342
  operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
183
343
  district_id: string;
@@ -217,9 +377,9 @@ export declare const StopSchema: z.ZodObject<{
217
377
  observations?: string | null | undefined;
218
378
  }>;
219
379
  export declare const parentStationSchema: z.ZodObject<{
220
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
380
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
221
381
  created_by: z.ZodDefault<z.ZodString>;
222
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
382
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
223
383
  updated_by: z.ZodDefault<z.ZodString>;
224
384
  } & {
225
385
  _id: z.ZodString;
@@ -229,11 +389,11 @@ export declare const parentStationSchema: z.ZodObject<{
229
389
  _id: string;
230
390
  created_at: number & {
231
391
  __brand: "UnixTimestamp";
232
- } & z.BRAND<"UnixTimestamp">;
392
+ };
233
393
  created_by: string;
234
394
  updated_at: number & {
235
395
  __brand: "UnixTimestamp";
236
- } & z.BRAND<"UnixTimestamp">;
396
+ };
237
397
  updated_by: string;
238
398
  agency_id: string;
239
399
  stop_ids: string[];
@@ -247,9 +407,9 @@ export declare const parentStationSchema: z.ZodObject<{
247
407
  updated_by?: string | undefined;
248
408
  }>;
249
409
  export declare const stopAreaSchema: z.ZodObject<{
250
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
410
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
251
411
  created_by: z.ZodDefault<z.ZodString>;
252
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
412
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
253
413
  updated_by: z.ZodDefault<z.ZodString>;
254
414
  } & {
255
415
  _id: z.ZodString;
@@ -258,11 +418,11 @@ export declare const stopAreaSchema: z.ZodObject<{
258
418
  _id: string;
259
419
  created_at: number & {
260
420
  __brand: "UnixTimestamp";
261
- } & z.BRAND<"UnixTimestamp">;
421
+ };
262
422
  created_by: string;
263
423
  updated_at: number & {
264
424
  __brand: "UnixTimestamp";
265
- } & z.BRAND<"UnixTimestamp">;
425
+ };
266
426
  updated_by: string;
267
427
  parent_station_ids: string[];
268
428
  }, {
@@ -282,9 +442,9 @@ export type Connections = z.infer<typeof connectionsSchema>;
282
442
  export type Facilities = z.infer<typeof facilitiesSchema>;
283
443
  export type Equipment = z.infer<typeof equipmentSchema>;
284
444
  export declare const CreateStopSchema: z.ZodObject<Omit<{
285
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
445
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
286
446
  created_by: z.ZodDefault<z.ZodString>;
287
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
447
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
288
448
  updated_by: z.ZodDefault<z.ZodString>;
289
449
  } & {
290
450
  _id: z.ZodString;
@@ -309,15 +469,15 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
309
469
  road_type: z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>;
310
470
  shelter_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
311
471
  shelter_frame_size: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
312
- shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
472
+ shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
313
473
  shelter_maintainer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
314
474
  shelter_make: z.ZodOptional<z.ZodNullable<z.ZodString>>;
315
475
  shelter_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
316
476
  shelter_status: z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>;
317
- last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
318
- last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
319
- last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
320
- last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
477
+ last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
478
+ last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
479
+ last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
480
+ last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
321
481
  connections: z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">;
322
482
  facilities: z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">;
323
483
  equipment: z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">;
@@ -329,30 +489,156 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
329
489
  has_stop_sign: z.ZodEnum<["yes", "no", "unknown"]>;
330
490
  file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
331
491
  image_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
332
- comments: z.ZodArray<z.ZodObject<{
333
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
492
+ comments: z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
493
+ _id: z.ZodString;
494
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
334
495
  created_by: z.ZodDefault<z.ZodString>;
335
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
496
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
336
497
  updated_by: z.ZodDefault<z.ZodString>;
337
498
  } & {
499
+ message: z.ZodString;
500
+ type: z.ZodLiteral<"note">;
501
+ }, "strip", z.ZodTypeAny, {
502
+ _id: string;
503
+ created_at: number & {
504
+ __brand: "UnixTimestamp";
505
+ };
506
+ created_by: string;
507
+ updated_at: number & {
508
+ __brand: "UnixTimestamp";
509
+ };
510
+ updated_by: string;
511
+ message: string;
512
+ type: "note";
513
+ }, {
514
+ _id: string;
515
+ created_at: number;
516
+ updated_at: number;
517
+ message: string;
518
+ type: "note";
519
+ created_by?: string | undefined;
520
+ updated_by?: string | undefined;
521
+ }>, z.ZodObject<{
522
+ _id: z.ZodString;
523
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
524
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
525
+ } & {
526
+ created_by: z.ZodLiteral<"system">;
527
+ message: z.ZodString;
528
+ type: z.ZodLiteral<"system_info">;
529
+ updated_by: z.ZodLiteral<"system">;
530
+ }, "strip", z.ZodTypeAny, {
531
+ _id: string;
532
+ created_at: number & {
533
+ __brand: "UnixTimestamp";
534
+ };
535
+ created_by: "system";
536
+ updated_at: number & {
537
+ __brand: "UnixTimestamp";
538
+ };
539
+ updated_by: "system";
540
+ message: string;
541
+ type: "system_info";
542
+ }, {
543
+ _id: string;
544
+ created_at: number;
545
+ created_by: "system";
546
+ updated_at: number;
547
+ updated_by: "system";
548
+ message: string;
549
+ type: "system_info";
550
+ }>, z.ZodObject<{
338
551
  _id: z.ZodString;
339
- text: z.ZodString;
340
- }, "strict", z.ZodTypeAny, {
552
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
553
+ created_by: z.ZodDefault<z.ZodString>;
554
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
555
+ updated_by: z.ZodDefault<z.ZodString>;
556
+ } & {
557
+ curr_status: z.ZodString;
558
+ prev_status: z.ZodString;
559
+ type: z.ZodLiteral<"statusChanged">;
560
+ }, "strip", z.ZodTypeAny, {
561
+ _id: string;
562
+ created_at: number & {
563
+ __brand: "UnixTimestamp";
564
+ };
565
+ created_by: string;
566
+ updated_at: number & {
567
+ __brand: "UnixTimestamp";
568
+ };
569
+ updated_by: string;
570
+ type: "statusChanged";
571
+ curr_status: string;
572
+ prev_status: string;
573
+ }, {
574
+ _id: string;
575
+ created_at: number;
576
+ updated_at: number;
577
+ type: "statusChanged";
578
+ curr_status: string;
579
+ prev_status: string;
580
+ created_by?: string | undefined;
581
+ updated_by?: string | undefined;
582
+ }>]>, {
583
+ _id: string;
584
+ created_at: number & {
585
+ __brand: "UnixTimestamp";
586
+ };
587
+ created_by: string;
588
+ updated_at: number & {
589
+ __brand: "UnixTimestamp";
590
+ };
591
+ updated_by: string;
592
+ message: string;
593
+ type: "note";
594
+ } | {
341
595
  _id: string;
342
596
  created_at: number & {
343
597
  __brand: "UnixTimestamp";
344
- } & z.BRAND<"UnixTimestamp">;
598
+ };
599
+ created_by: "system";
600
+ updated_at: number & {
601
+ __brand: "UnixTimestamp";
602
+ };
603
+ updated_by: "system";
604
+ message: string;
605
+ type: "system_info";
606
+ } | {
607
+ _id: string;
608
+ created_at: number & {
609
+ __brand: "UnixTimestamp";
610
+ };
345
611
  created_by: string;
346
612
  updated_at: number & {
347
613
  __brand: "UnixTimestamp";
348
- } & z.BRAND<"UnixTimestamp">;
614
+ };
349
615
  updated_by: string;
350
- text: string;
616
+ type: "statusChanged";
617
+ curr_status: string;
618
+ prev_status: string;
351
619
  }, {
352
620
  _id: string;
353
621
  created_at: number;
354
622
  updated_at: number;
355
- text: string;
623
+ message: string;
624
+ type: "note";
625
+ created_by?: string | undefined;
626
+ updated_by?: string | undefined;
627
+ } | {
628
+ _id: string;
629
+ created_at: number;
630
+ created_by: "system";
631
+ updated_at: number;
632
+ updated_by: "system";
633
+ message: string;
634
+ type: "system_info";
635
+ } | {
636
+ _id: string;
637
+ created_at: number;
638
+ updated_at: number;
639
+ type: "statusChanged";
640
+ curr_status: string;
641
+ prev_status: string;
356
642
  created_by?: string | undefined;
357
643
  updated_by?: string | undefined;
358
644
  }>, "many">;
@@ -369,18 +655,44 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
369
655
  has_stop_sign: "unknown" | "yes" | "no";
370
656
  municipality_id: string;
371
657
  is_locked: boolean;
372
- comments: {
658
+ comments: ({
659
+ _id: string;
660
+ created_at: number & {
661
+ __brand: "UnixTimestamp";
662
+ };
663
+ created_by: string;
664
+ updated_at: number & {
665
+ __brand: "UnixTimestamp";
666
+ };
667
+ updated_by: string;
668
+ message: string;
669
+ type: "note";
670
+ } | {
373
671
  _id: string;
374
672
  created_at: number & {
375
673
  __brand: "UnixTimestamp";
376
- } & z.BRAND<"UnixTimestamp">;
674
+ };
675
+ created_by: "system";
676
+ updated_at: number & {
677
+ __brand: "UnixTimestamp";
678
+ };
679
+ updated_by: "system";
680
+ message: string;
681
+ type: "system_info";
682
+ } | {
683
+ _id: string;
684
+ created_at: number & {
685
+ __brand: "UnixTimestamp";
686
+ };
377
687
  created_by: string;
378
688
  updated_at: number & {
379
689
  __brand: "UnixTimestamp";
380
- } & z.BRAND<"UnixTimestamp">;
690
+ };
381
691
  updated_by: string;
382
- text: string;
383
- }[];
692
+ type: "statusChanged";
693
+ curr_status: string;
694
+ prev_status: string;
695
+ })[];
384
696
  is_archived: boolean;
385
697
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
386
698
  operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
@@ -407,23 +719,13 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
407
719
  tts_name?: string | null | undefined;
408
720
  locality_id?: string | null | undefined;
409
721
  shelter_frame_size?: [number, number] | null | undefined;
410
- shelter_installation_date?: (number & {
411
- __brand: "UnixTimestamp";
412
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
722
+ shelter_installation_date?: UnixTimestamp | null | undefined;
413
723
  shelter_make?: string | null | undefined;
414
724
  shelter_model?: string | null | undefined;
415
- last_infrastructure_check?: (number & {
416
- __brand: "UnixTimestamp";
417
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
418
- last_infrastructure_maintenance?: (number & {
419
- __brand: "UnixTimestamp";
420
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
421
- last_schedules_check?: (number & {
422
- __brand: "UnixTimestamp";
423
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
424
- last_schedules_maintenance?: (number & {
425
- __brand: "UnixTimestamp";
426
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
725
+ last_infrastructure_check?: UnixTimestamp | null | undefined;
726
+ last_infrastructure_maintenance?: UnixTimestamp | null | undefined;
727
+ last_schedules_check?: UnixTimestamp | null | undefined;
728
+ last_schedules_maintenance?: UnixTimestamp | null | undefined;
427
729
  observations?: string | null | undefined;
428
730
  }, {
429
731
  _id: string;
@@ -434,14 +736,32 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
434
736
  has_shelter: "unknown" | "yes" | "no";
435
737
  has_stop_sign: "unknown" | "yes" | "no";
436
738
  municipality_id: string;
437
- comments: {
739
+ comments: ({
740
+ _id: string;
741
+ created_at: number;
742
+ updated_at: number;
743
+ message: string;
744
+ type: "note";
745
+ created_by?: string | undefined;
746
+ updated_by?: string | undefined;
747
+ } | {
748
+ _id: string;
749
+ created_at: number;
750
+ created_by: "system";
751
+ updated_at: number;
752
+ updated_by: "system";
753
+ message: string;
754
+ type: "system_info";
755
+ } | {
438
756
  _id: string;
439
757
  created_at: number;
440
758
  updated_at: number;
441
- text: string;
759
+ type: "statusChanged";
760
+ curr_status: string;
761
+ prev_status: string;
442
762
  created_by?: string | undefined;
443
763
  updated_by?: string | undefined;
444
- }[];
764
+ })[];
445
765
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
446
766
  operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
447
767
  district_id: string;
@@ -495,30 +815,156 @@ export declare const UpdateStopSchema: z.ZodObject<{
495
815
  shelter_code: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
496
816
  shelter_maintainer: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
497
817
  is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
498
- comments: z.ZodOptional<z.ZodArray<z.ZodObject<{
499
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
818
+ comments: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
819
+ _id: z.ZodString;
820
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
500
821
  created_by: z.ZodDefault<z.ZodString>;
501
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
822
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
502
823
  updated_by: z.ZodDefault<z.ZodString>;
503
824
  } & {
825
+ message: z.ZodString;
826
+ type: z.ZodLiteral<"note">;
827
+ }, "strip", z.ZodTypeAny, {
828
+ _id: string;
829
+ created_at: number & {
830
+ __brand: "UnixTimestamp";
831
+ };
832
+ created_by: string;
833
+ updated_at: number & {
834
+ __brand: "UnixTimestamp";
835
+ };
836
+ updated_by: string;
837
+ message: string;
838
+ type: "note";
839
+ }, {
840
+ _id: string;
841
+ created_at: number;
842
+ updated_at: number;
843
+ message: string;
844
+ type: "note";
845
+ created_by?: string | undefined;
846
+ updated_by?: string | undefined;
847
+ }>, z.ZodObject<{
504
848
  _id: z.ZodString;
505
- text: z.ZodString;
506
- }, "strict", z.ZodTypeAny, {
849
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
850
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
851
+ } & {
852
+ created_by: z.ZodLiteral<"system">;
853
+ message: z.ZodString;
854
+ type: z.ZodLiteral<"system_info">;
855
+ updated_by: z.ZodLiteral<"system">;
856
+ }, "strip", z.ZodTypeAny, {
507
857
  _id: string;
508
858
  created_at: number & {
509
859
  __brand: "UnixTimestamp";
510
- } & z.BRAND<"UnixTimestamp">;
860
+ };
861
+ created_by: "system";
862
+ updated_at: number & {
863
+ __brand: "UnixTimestamp";
864
+ };
865
+ updated_by: "system";
866
+ message: string;
867
+ type: "system_info";
868
+ }, {
869
+ _id: string;
870
+ created_at: number;
871
+ created_by: "system";
872
+ updated_at: number;
873
+ updated_by: "system";
874
+ message: string;
875
+ type: "system_info";
876
+ }>, z.ZodObject<{
877
+ _id: z.ZodString;
878
+ created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
879
+ created_by: z.ZodDefault<z.ZodString>;
880
+ updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
881
+ updated_by: z.ZodDefault<z.ZodString>;
882
+ } & {
883
+ curr_status: z.ZodString;
884
+ prev_status: z.ZodString;
885
+ type: z.ZodLiteral<"statusChanged">;
886
+ }, "strip", z.ZodTypeAny, {
887
+ _id: string;
888
+ created_at: number & {
889
+ __brand: "UnixTimestamp";
890
+ };
891
+ created_by: string;
892
+ updated_at: number & {
893
+ __brand: "UnixTimestamp";
894
+ };
895
+ updated_by: string;
896
+ type: "statusChanged";
897
+ curr_status: string;
898
+ prev_status: string;
899
+ }, {
900
+ _id: string;
901
+ created_at: number;
902
+ updated_at: number;
903
+ type: "statusChanged";
904
+ curr_status: string;
905
+ prev_status: string;
906
+ created_by?: string | undefined;
907
+ updated_by?: string | undefined;
908
+ }>]>, {
909
+ _id: string;
910
+ created_at: number & {
911
+ __brand: "UnixTimestamp";
912
+ };
913
+ created_by: string;
914
+ updated_at: number & {
915
+ __brand: "UnixTimestamp";
916
+ };
917
+ updated_by: string;
918
+ message: string;
919
+ type: "note";
920
+ } | {
921
+ _id: string;
922
+ created_at: number & {
923
+ __brand: "UnixTimestamp";
924
+ };
925
+ created_by: "system";
926
+ updated_at: number & {
927
+ __brand: "UnixTimestamp";
928
+ };
929
+ updated_by: "system";
930
+ message: string;
931
+ type: "system_info";
932
+ } | {
933
+ _id: string;
934
+ created_at: number & {
935
+ __brand: "UnixTimestamp";
936
+ };
511
937
  created_by: string;
512
938
  updated_at: number & {
513
939
  __brand: "UnixTimestamp";
514
- } & z.BRAND<"UnixTimestamp">;
940
+ };
515
941
  updated_by: string;
516
- text: string;
942
+ type: "statusChanged";
943
+ curr_status: string;
944
+ prev_status: string;
517
945
  }, {
518
946
  _id: string;
519
947
  created_at: number;
520
948
  updated_at: number;
521
- text: string;
949
+ message: string;
950
+ type: "note";
951
+ created_by?: string | undefined;
952
+ updated_by?: string | undefined;
953
+ } | {
954
+ _id: string;
955
+ created_at: number;
956
+ created_by: "system";
957
+ updated_at: number;
958
+ updated_by: "system";
959
+ message: string;
960
+ type: "system_info";
961
+ } | {
962
+ _id: string;
963
+ created_at: number;
964
+ updated_at: number;
965
+ type: "statusChanged";
966
+ curr_status: string;
967
+ prev_status: string;
522
968
  created_by?: string | undefined;
523
969
  updated_by?: string | undefined;
524
970
  }>, "many">>;
@@ -537,14 +983,14 @@ export declare const UpdateStopSchema: z.ZodObject<{
537
983
  pole_status: z.ZodOptional<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
538
984
  road_type: z.ZodOptional<z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>>;
539
985
  shelter_frame_size: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
540
- shelter_installation_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
986
+ shelter_installation_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
541
987
  shelter_make: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
542
988
  shelter_model: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
543
989
  shelter_status: z.ZodOptional<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
544
- last_infrastructure_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
545
- last_infrastructure_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
546
- last_schedules_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
547
- last_schedules_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
990
+ last_infrastructure_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
991
+ last_infrastructure_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
992
+ last_schedules_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
993
+ last_schedules_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
548
994
  connections: z.ZodOptional<z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">>;
549
995
  facilities: z.ZodOptional<z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">>;
550
996
  equipment: z.ZodOptional<z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">>;
@@ -567,18 +1013,44 @@ export declare const UpdateStopSchema: z.ZodObject<{
567
1013
  shelter_code?: string | null | undefined;
568
1014
  shelter_maintainer?: string | null | undefined;
569
1015
  is_locked?: boolean | undefined;
570
- comments?: {
1016
+ comments?: ({
1017
+ _id: string;
1018
+ created_at: number & {
1019
+ __brand: "UnixTimestamp";
1020
+ };
1021
+ created_by: string;
1022
+ updated_at: number & {
1023
+ __brand: "UnixTimestamp";
1024
+ };
1025
+ updated_by: string;
1026
+ message: string;
1027
+ type: "note";
1028
+ } | {
1029
+ _id: string;
1030
+ created_at: number & {
1031
+ __brand: "UnixTimestamp";
1032
+ };
1033
+ created_by: "system";
1034
+ updated_at: number & {
1035
+ __brand: "UnixTimestamp";
1036
+ };
1037
+ updated_by: "system";
1038
+ message: string;
1039
+ type: "system_info";
1040
+ } | {
571
1041
  _id: string;
572
1042
  created_at: number & {
573
1043
  __brand: "UnixTimestamp";
574
- } & z.BRAND<"UnixTimestamp">;
1044
+ };
575
1045
  created_by: string;
576
1046
  updated_at: number & {
577
1047
  __brand: "UnixTimestamp";
578
- } & z.BRAND<"UnixTimestamp">;
1048
+ };
579
1049
  updated_by: string;
580
- text: string;
581
- }[] | undefined;
1050
+ type: "statusChanged";
1051
+ curr_status: string;
1052
+ prev_status: string;
1053
+ })[] | undefined;
582
1054
  is_archived?: boolean | undefined;
583
1055
  jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
584
1056
  legacy_id?: string | null | undefined;
@@ -594,24 +1066,14 @@ export declare const UpdateStopSchema: z.ZodObject<{
594
1066
  pole_status?: "unknown" | "not_applicable" | "missing" | "damaged" | "ok" | undefined;
595
1067
  road_type?: "unknown" | "complementary_itinerary" | "highway" | "main_itinerary" | "national_road" | "regional_road" | "secondary_road" | undefined;
596
1068
  shelter_frame_size?: [number, number] | null | undefined;
597
- shelter_installation_date?: (number & {
598
- __brand: "UnixTimestamp";
599
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
1069
+ shelter_installation_date?: UnixTimestamp | null | undefined;
600
1070
  shelter_make?: string | null | undefined;
601
1071
  shelter_model?: string | null | undefined;
602
1072
  shelter_status?: "unknown" | "not_applicable" | "missing" | "damaged" | "ok" | undefined;
603
- last_infrastructure_check?: (number & {
604
- __brand: "UnixTimestamp";
605
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
606
- last_infrastructure_maintenance?: (number & {
607
- __brand: "UnixTimestamp";
608
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
609
- last_schedules_check?: (number & {
610
- __brand: "UnixTimestamp";
611
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
612
- last_schedules_maintenance?: (number & {
613
- __brand: "UnixTimestamp";
614
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
1073
+ last_infrastructure_check?: UnixTimestamp | null | undefined;
1074
+ last_infrastructure_maintenance?: UnixTimestamp | null | undefined;
1075
+ last_schedules_check?: UnixTimestamp | null | undefined;
1076
+ last_schedules_maintenance?: UnixTimestamp | null | undefined;
615
1077
  connections?: ("ferry" | "light_rail" | "subway" | "train" | "boat" | "airport" | "bike_sharing" | "bike_parking" | "car_parking")[] | undefined;
616
1078
  facilities?: ("school" | "fire_station" | "health_clinic" | "historic_building" | "hospital" | "police_station" | "shopping" | "transit_office" | "university" | "beach")[] | undefined;
617
1079
  equipment?: ("pip" | "mupi" | "mini_pip")[] | undefined;
@@ -634,14 +1096,32 @@ export declare const UpdateStopSchema: z.ZodObject<{
634
1096
  shelter_code?: string | null | undefined;
635
1097
  shelter_maintainer?: string | null | undefined;
636
1098
  is_locked?: boolean | undefined;
637
- comments?: {
1099
+ comments?: ({
1100
+ _id: string;
1101
+ created_at: number;
1102
+ updated_at: number;
1103
+ message: string;
1104
+ type: "note";
1105
+ created_by?: string | undefined;
1106
+ updated_by?: string | undefined;
1107
+ } | {
1108
+ _id: string;
1109
+ created_at: number;
1110
+ created_by: "system";
1111
+ updated_at: number;
1112
+ updated_by: "system";
1113
+ message: string;
1114
+ type: "system_info";
1115
+ } | {
638
1116
  _id: string;
639
1117
  created_at: number;
640
1118
  updated_at: number;
641
- text: string;
1119
+ type: "statusChanged";
1120
+ curr_status: string;
1121
+ prev_status: string;
642
1122
  created_by?: string | undefined;
643
1123
  updated_by?: string | undefined;
644
- }[] | undefined;
1124
+ })[] | undefined;
645
1125
  is_archived?: boolean | undefined;
646
1126
  jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
647
1127
  legacy_id?: string | null | undefined;