@tmlmobilidade/types 20260323.400.54 → 20260324.1220.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/_common/index.d.ts +0 -1
  2. package/dist/_common/index.js +0 -1
  3. package/dist/vehicle-events/index.d.ts +2 -4
  4. package/dist/vehicle-events/index.js +2 -4
  5. package/dist/vehicle-events/raw/cmet/index.d.ts +1 -0
  6. package/dist/vehicle-events/raw/cmet/index.js +1 -0
  7. package/dist/vehicle-events/raw/cmet/v1.d.ts +574 -0
  8. package/dist/vehicle-events/raw/cmet/v1.js +50 -0
  9. package/dist/vehicle-events/raw/index.d.ts +4 -0
  10. package/dist/vehicle-events/raw/index.js +4 -0
  11. package/dist/vehicle-events/raw/raw-vehicle-event-base.d.ts +27 -0
  12. package/dist/vehicle-events/raw/raw-vehicle-event-base.js +12 -0
  13. package/dist/vehicle-events/raw/raw-vehicle-event.d.ts +582 -0
  14. package/dist/vehicle-events/raw/raw-vehicle-event.js +9 -0
  15. package/dist/vehicle-events/raw/ttsl/index.d.ts +1 -0
  16. package/dist/vehicle-events/raw/ttsl/index.js +1 -0
  17. package/dist/vehicle-events/raw/ttsl/v1.d.ts +374 -0
  18. package/dist/vehicle-events/raw/ttsl/v1.js +37 -0
  19. package/dist/vehicle-events/simplified/index.d.ts +1 -0
  20. package/dist/vehicle-events/simplified/index.js +1 -0
  21. package/dist/vehicle-events/{simplified-vehicle-event.d.ts → simplified/simplified-vehicle-event.d.ts} +2 -2
  22. package/dist/vehicle-events/{simplified-vehicle-event.js → simplified/simplified-vehicle-event.js} +1 -2
  23. package/package.json +1 -1
  24. package/dist/vehicle-events/clickhouse-vehicle-event.d.ts +0 -150
  25. package/dist/vehicle-events/clickhouse-vehicle-event.js +0 -13
  26. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +0 -57
  27. package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +0 -20
  28. package/dist/vehicle-events/raw-vehicle-event.d.ts +0 -68
  29. package/dist/vehicle-events/raw-vehicle-event.js +0 -18
@@ -6,6 +6,5 @@ export * from './mongo.js';
6
6
  export * from './operational-date.js';
7
7
  export * from './position.js';
8
8
  export * from './status.js';
9
- export * from './status.js';
10
9
  export * from './unix-timestamp.js';
11
10
  export * from './utility.js';
@@ -6,6 +6,5 @@ export * from './mongo.js';
6
6
  export * from './operational-date.js';
7
7
  export * from './position.js';
8
8
  export * from './status.js';
9
- export * from './status.js';
10
9
  export * from './unix-timestamp.js';
11
10
  export * from './utility.js';
@@ -1,4 +1,2 @@
1
- export * from './clickhouse-vehicle-event.js';
2
- export * from './gtfs-rt-vehicle-event-extended.js';
3
- export * from './raw-vehicle-event.js';
4
- export * from './simplified-vehicle-event.js';
1
+ export * from './raw/index.js';
2
+ export * from './simplified/index.js';
@@ -1,4 +1,2 @@
1
- export * from './clickhouse-vehicle-event.js';
2
- export * from './gtfs-rt-vehicle-event-extended.js';
3
- export * from './raw-vehicle-event.js';
4
- export * from './simplified-vehicle-event.js';
1
+ export * from './raw/index.js';
2
+ export * from './simplified/index.js';
@@ -0,0 +1 @@
1
+ export * from './v1.js';
@@ -0,0 +1 @@
1
+ export * from './v1.js';
@@ -0,0 +1,574 @@
1
+ import { z } from 'zod';
2
+ export declare const RawVehicleEventPayloadCmetV1Schema: z.ZodObject<{
3
+ header: z.ZodObject<{
4
+ gtfsRealtimeVersion: z.ZodLiteral<"2.0">;
5
+ incrementality: z.ZodLiteral<"DIFFERENTIAL">;
6
+ timestamp: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ timestamp: number;
9
+ incrementality: "DIFFERENTIAL";
10
+ gtfsRealtimeVersion: "2.0";
11
+ }, {
12
+ timestamp: number;
13
+ incrementality: "DIFFERENTIAL";
14
+ gtfsRealtimeVersion: "2.0";
15
+ }>;
16
+ vehicle: z.ZodObject<{
17
+ agencyId: z.ZodString;
18
+ currentStatus: z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>;
19
+ occupancyStatus: z.ZodEnum<["EMPTY", "PARTIALLY_OCCUPIED", "FULL"]>;
20
+ operationPlanId: z.ZodString;
21
+ position: z.ZodObject<{
22
+ bearing: z.ZodNumber;
23
+ latitude: z.ZodNumber;
24
+ longitude: z.ZodNumber;
25
+ odometer: z.ZodNumber;
26
+ speed: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ latitude: number;
29
+ longitude: number;
30
+ bearing: number;
31
+ odometer: number;
32
+ speed: number;
33
+ }, {
34
+ latitude: number;
35
+ longitude: number;
36
+ bearing: number;
37
+ odometer: number;
38
+ speed: number;
39
+ }>;
40
+ stopId: z.ZodString;
41
+ timestamp: z.ZodNumber;
42
+ trigger: z.ZodObject<{
43
+ activity: z.ZodEnum<["NO_CHANGE", "CHANGE"]>;
44
+ door: z.ZodEnum<["NO_CHANGE", "CHANGE"]>;
45
+ }, "strip", z.ZodTypeAny, {
46
+ activity: "NO_CHANGE" | "CHANGE";
47
+ door: "NO_CHANGE" | "CHANGE";
48
+ }, {
49
+ activity: "NO_CHANGE" | "CHANGE";
50
+ door: "NO_CHANGE" | "CHANGE";
51
+ }>;
52
+ trip: z.ZodObject<{
53
+ extraTripId: z.ZodString;
54
+ lineId: z.ZodString;
55
+ patternId: z.ZodString;
56
+ routeId: z.ZodString;
57
+ scheduleRelationship: z.ZodEnum<["SCHEDULED", "NOT_SCHEDULED"]>;
58
+ tripId: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ extraTripId: string;
61
+ lineId: string;
62
+ patternId: string;
63
+ routeId: string;
64
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
65
+ tripId: string;
66
+ }, {
67
+ extraTripId: string;
68
+ lineId: string;
69
+ patternId: string;
70
+ routeId: string;
71
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
72
+ tripId: string;
73
+ }>;
74
+ vehicle: z.ZodObject<{
75
+ _id: z.ZodString;
76
+ blockId: z.ZodString;
77
+ driverId: z.ZodString;
78
+ shiftId: z.ZodString;
79
+ }, "strip", z.ZodTypeAny, {
80
+ _id: string;
81
+ blockId: string;
82
+ driverId: string;
83
+ shiftId: string;
84
+ }, {
85
+ _id: string;
86
+ blockId: string;
87
+ driverId: string;
88
+ shiftId: string;
89
+ }>;
90
+ }, "strip", z.ZodTypeAny, {
91
+ trip: {
92
+ extraTripId: string;
93
+ lineId: string;
94
+ patternId: string;
95
+ routeId: string;
96
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
97
+ tripId: string;
98
+ };
99
+ position: {
100
+ latitude: number;
101
+ longitude: number;
102
+ bearing: number;
103
+ odometer: number;
104
+ speed: number;
105
+ };
106
+ timestamp: number;
107
+ vehicle: {
108
+ _id: string;
109
+ blockId: string;
110
+ driverId: string;
111
+ shiftId: string;
112
+ };
113
+ agencyId: string;
114
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
115
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
116
+ operationPlanId: string;
117
+ stopId: string;
118
+ trigger: {
119
+ activity: "NO_CHANGE" | "CHANGE";
120
+ door: "NO_CHANGE" | "CHANGE";
121
+ };
122
+ }, {
123
+ trip: {
124
+ extraTripId: string;
125
+ lineId: string;
126
+ patternId: string;
127
+ routeId: string;
128
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
129
+ tripId: string;
130
+ };
131
+ position: {
132
+ latitude: number;
133
+ longitude: number;
134
+ bearing: number;
135
+ odometer: number;
136
+ speed: number;
137
+ };
138
+ timestamp: number;
139
+ vehicle: {
140
+ _id: string;
141
+ blockId: string;
142
+ driverId: string;
143
+ shiftId: string;
144
+ };
145
+ agencyId: string;
146
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
147
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
148
+ operationPlanId: string;
149
+ stopId: string;
150
+ trigger: {
151
+ activity: "NO_CHANGE" | "CHANGE";
152
+ door: "NO_CHANGE" | "CHANGE";
153
+ };
154
+ }>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ vehicle: {
157
+ trip: {
158
+ extraTripId: string;
159
+ lineId: string;
160
+ patternId: string;
161
+ routeId: string;
162
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
163
+ tripId: string;
164
+ };
165
+ position: {
166
+ latitude: number;
167
+ longitude: number;
168
+ bearing: number;
169
+ odometer: number;
170
+ speed: number;
171
+ };
172
+ timestamp: number;
173
+ vehicle: {
174
+ _id: string;
175
+ blockId: string;
176
+ driverId: string;
177
+ shiftId: string;
178
+ };
179
+ agencyId: string;
180
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
181
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
182
+ operationPlanId: string;
183
+ stopId: string;
184
+ trigger: {
185
+ activity: "NO_CHANGE" | "CHANGE";
186
+ door: "NO_CHANGE" | "CHANGE";
187
+ };
188
+ };
189
+ header: {
190
+ timestamp: number;
191
+ incrementality: "DIFFERENTIAL";
192
+ gtfsRealtimeVersion: "2.0";
193
+ };
194
+ }, {
195
+ vehicle: {
196
+ trip: {
197
+ extraTripId: string;
198
+ lineId: string;
199
+ patternId: string;
200
+ routeId: string;
201
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
202
+ tripId: string;
203
+ };
204
+ position: {
205
+ latitude: number;
206
+ longitude: number;
207
+ bearing: number;
208
+ odometer: number;
209
+ speed: number;
210
+ };
211
+ timestamp: number;
212
+ vehicle: {
213
+ _id: string;
214
+ blockId: string;
215
+ driverId: string;
216
+ shiftId: string;
217
+ };
218
+ agencyId: string;
219
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
220
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
221
+ operationPlanId: string;
222
+ stopId: string;
223
+ trigger: {
224
+ activity: "NO_CHANGE" | "CHANGE";
225
+ door: "NO_CHANGE" | "CHANGE";
226
+ };
227
+ };
228
+ header: {
229
+ timestamp: number;
230
+ incrementality: "DIFFERENTIAL";
231
+ gtfsRealtimeVersion: "2.0";
232
+ };
233
+ }>;
234
+ export type RawVehicleEventPayloadCmetV1 = z.infer<typeof RawVehicleEventPayloadCmetV1Schema>;
235
+ export declare const RawVehicleEventCmetV1Schema: z.ZodObject<{
236
+ _id: z.ZodString;
237
+ agency_id: z.ZodString;
238
+ created_at: z.ZodEffects<z.ZodNumber, import("../../../index.js").UnixTimestamp, number>;
239
+ entity_id: z.ZodString;
240
+ received_at: z.ZodEffects<z.ZodNumber, import("../../../index.js").UnixTimestamp, number>;
241
+ } & {
242
+ payload: z.ZodObject<{
243
+ header: z.ZodObject<{
244
+ gtfsRealtimeVersion: z.ZodLiteral<"2.0">;
245
+ incrementality: z.ZodLiteral<"DIFFERENTIAL">;
246
+ timestamp: z.ZodNumber;
247
+ }, "strip", z.ZodTypeAny, {
248
+ timestamp: number;
249
+ incrementality: "DIFFERENTIAL";
250
+ gtfsRealtimeVersion: "2.0";
251
+ }, {
252
+ timestamp: number;
253
+ incrementality: "DIFFERENTIAL";
254
+ gtfsRealtimeVersion: "2.0";
255
+ }>;
256
+ vehicle: z.ZodObject<{
257
+ agencyId: z.ZodString;
258
+ currentStatus: z.ZodEnum<["INCOMING_AT", "STOPPED_AT", "IN_TRANSIT_TO"]>;
259
+ occupancyStatus: z.ZodEnum<["EMPTY", "PARTIALLY_OCCUPIED", "FULL"]>;
260
+ operationPlanId: z.ZodString;
261
+ position: z.ZodObject<{
262
+ bearing: z.ZodNumber;
263
+ latitude: z.ZodNumber;
264
+ longitude: z.ZodNumber;
265
+ odometer: z.ZodNumber;
266
+ speed: z.ZodNumber;
267
+ }, "strip", z.ZodTypeAny, {
268
+ latitude: number;
269
+ longitude: number;
270
+ bearing: number;
271
+ odometer: number;
272
+ speed: number;
273
+ }, {
274
+ latitude: number;
275
+ longitude: number;
276
+ bearing: number;
277
+ odometer: number;
278
+ speed: number;
279
+ }>;
280
+ stopId: z.ZodString;
281
+ timestamp: z.ZodNumber;
282
+ trigger: z.ZodObject<{
283
+ activity: z.ZodEnum<["NO_CHANGE", "CHANGE"]>;
284
+ door: z.ZodEnum<["NO_CHANGE", "CHANGE"]>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ activity: "NO_CHANGE" | "CHANGE";
287
+ door: "NO_CHANGE" | "CHANGE";
288
+ }, {
289
+ activity: "NO_CHANGE" | "CHANGE";
290
+ door: "NO_CHANGE" | "CHANGE";
291
+ }>;
292
+ trip: z.ZodObject<{
293
+ extraTripId: z.ZodString;
294
+ lineId: z.ZodString;
295
+ patternId: z.ZodString;
296
+ routeId: z.ZodString;
297
+ scheduleRelationship: z.ZodEnum<["SCHEDULED", "NOT_SCHEDULED"]>;
298
+ tripId: z.ZodString;
299
+ }, "strip", z.ZodTypeAny, {
300
+ extraTripId: string;
301
+ lineId: string;
302
+ patternId: string;
303
+ routeId: string;
304
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
305
+ tripId: string;
306
+ }, {
307
+ extraTripId: string;
308
+ lineId: string;
309
+ patternId: string;
310
+ routeId: string;
311
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
312
+ tripId: string;
313
+ }>;
314
+ vehicle: z.ZodObject<{
315
+ _id: z.ZodString;
316
+ blockId: z.ZodString;
317
+ driverId: z.ZodString;
318
+ shiftId: z.ZodString;
319
+ }, "strip", z.ZodTypeAny, {
320
+ _id: string;
321
+ blockId: string;
322
+ driverId: string;
323
+ shiftId: string;
324
+ }, {
325
+ _id: string;
326
+ blockId: string;
327
+ driverId: string;
328
+ shiftId: string;
329
+ }>;
330
+ }, "strip", z.ZodTypeAny, {
331
+ trip: {
332
+ extraTripId: string;
333
+ lineId: string;
334
+ patternId: string;
335
+ routeId: string;
336
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
337
+ tripId: string;
338
+ };
339
+ position: {
340
+ latitude: number;
341
+ longitude: number;
342
+ bearing: number;
343
+ odometer: number;
344
+ speed: number;
345
+ };
346
+ timestamp: number;
347
+ vehicle: {
348
+ _id: string;
349
+ blockId: string;
350
+ driverId: string;
351
+ shiftId: string;
352
+ };
353
+ agencyId: string;
354
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
355
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
356
+ operationPlanId: string;
357
+ stopId: string;
358
+ trigger: {
359
+ activity: "NO_CHANGE" | "CHANGE";
360
+ door: "NO_CHANGE" | "CHANGE";
361
+ };
362
+ }, {
363
+ trip: {
364
+ extraTripId: string;
365
+ lineId: string;
366
+ patternId: string;
367
+ routeId: string;
368
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
369
+ tripId: string;
370
+ };
371
+ position: {
372
+ latitude: number;
373
+ longitude: number;
374
+ bearing: number;
375
+ odometer: number;
376
+ speed: number;
377
+ };
378
+ timestamp: number;
379
+ vehicle: {
380
+ _id: string;
381
+ blockId: string;
382
+ driverId: string;
383
+ shiftId: string;
384
+ };
385
+ agencyId: string;
386
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
387
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
388
+ operationPlanId: string;
389
+ stopId: string;
390
+ trigger: {
391
+ activity: "NO_CHANGE" | "CHANGE";
392
+ door: "NO_CHANGE" | "CHANGE";
393
+ };
394
+ }>;
395
+ }, "strip", z.ZodTypeAny, {
396
+ vehicle: {
397
+ trip: {
398
+ extraTripId: string;
399
+ lineId: string;
400
+ patternId: string;
401
+ routeId: string;
402
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
403
+ tripId: string;
404
+ };
405
+ position: {
406
+ latitude: number;
407
+ longitude: number;
408
+ bearing: number;
409
+ odometer: number;
410
+ speed: number;
411
+ };
412
+ timestamp: number;
413
+ vehicle: {
414
+ _id: string;
415
+ blockId: string;
416
+ driverId: string;
417
+ shiftId: string;
418
+ };
419
+ agencyId: string;
420
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
421
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
422
+ operationPlanId: string;
423
+ stopId: string;
424
+ trigger: {
425
+ activity: "NO_CHANGE" | "CHANGE";
426
+ door: "NO_CHANGE" | "CHANGE";
427
+ };
428
+ };
429
+ header: {
430
+ timestamp: number;
431
+ incrementality: "DIFFERENTIAL";
432
+ gtfsRealtimeVersion: "2.0";
433
+ };
434
+ }, {
435
+ vehicle: {
436
+ trip: {
437
+ extraTripId: string;
438
+ lineId: string;
439
+ patternId: string;
440
+ routeId: string;
441
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
442
+ tripId: string;
443
+ };
444
+ position: {
445
+ latitude: number;
446
+ longitude: number;
447
+ bearing: number;
448
+ odometer: number;
449
+ speed: number;
450
+ };
451
+ timestamp: number;
452
+ vehicle: {
453
+ _id: string;
454
+ blockId: string;
455
+ driverId: string;
456
+ shiftId: string;
457
+ };
458
+ agencyId: string;
459
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
460
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
461
+ operationPlanId: string;
462
+ stopId: string;
463
+ trigger: {
464
+ activity: "NO_CHANGE" | "CHANGE";
465
+ door: "NO_CHANGE" | "CHANGE";
466
+ };
467
+ };
468
+ header: {
469
+ timestamp: number;
470
+ incrementality: "DIFFERENTIAL";
471
+ gtfsRealtimeVersion: "2.0";
472
+ };
473
+ }>;
474
+ version: z.ZodLiteral<"cmet-v1">;
475
+ }, "strip", z.ZodTypeAny, {
476
+ _id: string;
477
+ created_at: number & {
478
+ __brand: "UnixTimestamp";
479
+ };
480
+ agency_id: string;
481
+ received_at: number & {
482
+ __brand: "UnixTimestamp";
483
+ };
484
+ payload: {
485
+ vehicle: {
486
+ trip: {
487
+ extraTripId: string;
488
+ lineId: string;
489
+ patternId: string;
490
+ routeId: string;
491
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
492
+ tripId: string;
493
+ };
494
+ position: {
495
+ latitude: number;
496
+ longitude: number;
497
+ bearing: number;
498
+ odometer: number;
499
+ speed: number;
500
+ };
501
+ timestamp: number;
502
+ vehicle: {
503
+ _id: string;
504
+ blockId: string;
505
+ driverId: string;
506
+ shiftId: string;
507
+ };
508
+ agencyId: string;
509
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
510
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
511
+ operationPlanId: string;
512
+ stopId: string;
513
+ trigger: {
514
+ activity: "NO_CHANGE" | "CHANGE";
515
+ door: "NO_CHANGE" | "CHANGE";
516
+ };
517
+ };
518
+ header: {
519
+ timestamp: number;
520
+ incrementality: "DIFFERENTIAL";
521
+ gtfsRealtimeVersion: "2.0";
522
+ };
523
+ };
524
+ entity_id: string;
525
+ version: "cmet-v1";
526
+ }, {
527
+ _id: string;
528
+ created_at: number;
529
+ agency_id: string;
530
+ received_at: number;
531
+ payload: {
532
+ vehicle: {
533
+ trip: {
534
+ extraTripId: string;
535
+ lineId: string;
536
+ patternId: string;
537
+ routeId: string;
538
+ scheduleRelationship: "SCHEDULED" | "NOT_SCHEDULED";
539
+ tripId: string;
540
+ };
541
+ position: {
542
+ latitude: number;
543
+ longitude: number;
544
+ bearing: number;
545
+ odometer: number;
546
+ speed: number;
547
+ };
548
+ timestamp: number;
549
+ vehicle: {
550
+ _id: string;
551
+ blockId: string;
552
+ driverId: string;
553
+ shiftId: string;
554
+ };
555
+ agencyId: string;
556
+ currentStatus: "INCOMING_AT" | "STOPPED_AT" | "IN_TRANSIT_TO";
557
+ occupancyStatus: "EMPTY" | "FULL" | "PARTIALLY_OCCUPIED";
558
+ operationPlanId: string;
559
+ stopId: string;
560
+ trigger: {
561
+ activity: "NO_CHANGE" | "CHANGE";
562
+ door: "NO_CHANGE" | "CHANGE";
563
+ };
564
+ };
565
+ header: {
566
+ timestamp: number;
567
+ incrementality: "DIFFERENTIAL";
568
+ gtfsRealtimeVersion: "2.0";
569
+ };
570
+ };
571
+ entity_id: string;
572
+ version: "cmet-v1";
573
+ }>;
574
+ export type RawVehicleEventCmetV1 = z.infer<typeof RawVehicleEventCmetV1Schema>;
@@ -0,0 +1,50 @@
1
+ /* * */
2
+ ;
3
+ import { RawVehicleEventBaseSchema } from '../raw-vehicle-event-base.js';
4
+ import { z } from 'zod';
5
+ /* * */
6
+ export const RawVehicleEventPayloadCmetV1Schema = z.object({
7
+ header: z.object({
8
+ gtfsRealtimeVersion: z.literal('2.0'),
9
+ incrementality: z.literal('DIFFERENTIAL'),
10
+ timestamp: z.number(),
11
+ }),
12
+ vehicle: z.object({
13
+ agencyId: z.string(),
14
+ currentStatus: z.enum(['INCOMING_AT', 'STOPPED_AT', 'IN_TRANSIT_TO']),
15
+ occupancyStatus: z.enum(['EMPTY', 'PARTIALLY_OCCUPIED', 'FULL']),
16
+ operationPlanId: z.string(),
17
+ position: z.object({
18
+ bearing: z.number(),
19
+ latitude: z.number(),
20
+ longitude: z.number(),
21
+ odometer: z.number(),
22
+ speed: z.number(),
23
+ }),
24
+ stopId: z.string(),
25
+ timestamp: z.number(),
26
+ trigger: z.object({
27
+ activity: z.enum(['NO_CHANGE', 'CHANGE']),
28
+ door: z.enum(['NO_CHANGE', 'CHANGE']),
29
+ }),
30
+ trip: z.object({
31
+ extraTripId: z.string(),
32
+ lineId: z.string(),
33
+ patternId: z.string(),
34
+ routeId: z.string(),
35
+ scheduleRelationship: z.enum(['SCHEDULED', 'NOT_SCHEDULED']),
36
+ tripId: z.string(),
37
+ }),
38
+ vehicle: z.object({
39
+ _id: z.string(),
40
+ blockId: z.string(),
41
+ driverId: z.string(),
42
+ shiftId: z.string(),
43
+ }),
44
+ }),
45
+ });
46
+ /* * */
47
+ export const RawVehicleEventCmetV1Schema = RawVehicleEventBaseSchema.extend({
48
+ payload: RawVehicleEventPayloadCmetV1Schema,
49
+ version: z.literal('cmet-v1'),
50
+ });
@@ -0,0 +1,4 @@
1
+ export * from './cmet/index.js';
2
+ export * from './raw-vehicle-event-base.js';
3
+ export * from './raw-vehicle-event.js';
4
+ export * from './ttsl/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './cmet/index.js';
2
+ export * from './raw-vehicle-event-base.js';
3
+ export * from './raw-vehicle-event.js';
4
+ export * from './ttsl/index.js';