@tmlmobilidade/types 20250705.105.17 → 20250706.1908.31

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.
@@ -88,6 +88,24 @@ export declare const avgIntervalVehicleEventsSchema: z.ZodObject<{
88
88
  reason: "AVG_INTERVAL_HIGHER_THAN_20_SECONDS" | "AVG_INTERVAL_LOWER_THAN_OR_EQUAL_TO_20_SECONDS" | "NO_VEHICLE_EVENTS_FOUND";
89
89
  }>;
90
90
  export type AvgIntervalVehicleEvents = z.infer<typeof avgIntervalVehicleEventsSchema>;
91
+ export declare const endedAtLastStopSchema: z.ZodObject<{
92
+ grade: z.ZodEnum<["pass", "fail", "error"]>;
93
+ message: z.ZodString;
94
+ value: z.ZodNullable<z.ZodNumber>;
95
+ } & {
96
+ reason: z.ZodEnum<["ENDED_AT_LAST_STOP", "ENDED_OUTSIDE_OF_LAST_STOP", "NO_VEHICLE_EVENTS_FOUND", "NO_PATH_DATA"]>;
97
+ }, "strict", z.ZodTypeAny, {
98
+ value: number | null;
99
+ message: string;
100
+ grade: "error" | "pass" | "fail";
101
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
102
+ }, {
103
+ value: number | null;
104
+ message: string;
105
+ grade: "error" | "pass" | "fail";
106
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
107
+ }>;
108
+ export type EndedAtLastStop = z.infer<typeof endedAtLastStopSchema>;
91
109
  export declare const excessiveVehicleEventDelaySchema: z.ZodObject<{
92
110
  grade: z.ZodEnum<["pass", "fail", "error"]>;
93
111
  message: z.ZodString;
@@ -134,12 +152,12 @@ export declare const matchingLocationTransactionsSchema: z.ZodObject<{
134
152
  value: number | null;
135
153
  message: string;
136
154
  grade: "error" | "pass" | "fail";
137
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
155
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
138
156
  }, {
139
157
  value: number | null;
140
158
  message: string;
141
159
  grade: "error" | "pass" | "fail";
142
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
160
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
143
161
  }>;
144
162
  export type MatchingLocationTransactions = z.infer<typeof matchingLocationTransactionsSchema>;
145
163
  export declare const ontimeStartSchema: z.ZodObject<{
@@ -24,6 +24,10 @@ export const avgIntervalVehicleEventsSchema = RideAnalysisSchema.extend({
24
24
  reason: z.enum(['AVG_INTERVAL_HIGHER_THAN_20_SECONDS', 'AVG_INTERVAL_LOWER_THAN_OR_EQUAL_TO_20_SECONDS', 'NO_VEHICLE_EVENTS_FOUND']),
25
25
  }).strict();
26
26
  /* * */
27
+ export const endedAtLastStopSchema = RideAnalysisSchema.extend({
28
+ reason: z.enum(['ENDED_AT_LAST_STOP', 'ENDED_OUTSIDE_OF_LAST_STOP', 'NO_VEHICLE_EVENTS_FOUND', 'NO_PATH_DATA']),
29
+ }).strict();
30
+ /* * */
27
31
  export const excessiveVehicleEventDelaySchema = RideAnalysisSchema.extend({
28
32
  reason: z.enum(['ALL_VEHICLE_EVENTS_ARE_WITHIN_DELAY_LIMITS', 'THERE_ARE_VEHICLE_EVENTS_WITH_EXCESSIVE_DELAY']),
29
33
  }).strict();
@@ -77,6 +77,23 @@ export declare const RideSchema: z.ZodObject<{
77
77
  grade: "error" | "pass" | "fail";
78
78
  reason: "AVG_INTERVAL_HIGHER_THAN_20_SECONDS" | "AVG_INTERVAL_LOWER_THAN_OR_EQUAL_TO_20_SECONDS" | "NO_VEHICLE_EVENTS_FOUND";
79
79
  }>;
80
+ ENDED_AT_LAST_STOP: z.ZodObject<{
81
+ grade: z.ZodEnum<["pass", "fail", "error"]>;
82
+ message: z.ZodString;
83
+ value: z.ZodNullable<z.ZodNumber>;
84
+ } & {
85
+ reason: z.ZodEnum<["ENDED_AT_LAST_STOP", "ENDED_OUTSIDE_OF_LAST_STOP", "NO_VEHICLE_EVENTS_FOUND", "NO_PATH_DATA"]>;
86
+ }, "strict", z.ZodTypeAny, {
87
+ value: number | null;
88
+ message: string;
89
+ grade: "error" | "pass" | "fail";
90
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
91
+ }, {
92
+ value: number | null;
93
+ message: string;
94
+ grade: "error" | "pass" | "fail";
95
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
96
+ }>;
80
97
  EXCESSIVE_VEHICLE_EVENT_DELAY: z.ZodObject<{
81
98
  grade: z.ZodEnum<["pass", "fail", "error"]>;
82
99
  message: z.ZodString;
@@ -121,12 +138,12 @@ export declare const RideSchema: z.ZodObject<{
121
138
  value: number | null;
122
139
  message: string;
123
140
  grade: "error" | "pass" | "fail";
124
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
141
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
125
142
  }, {
126
143
  value: number | null;
127
144
  message: string;
128
145
  grade: "error" | "pass" | "fail";
129
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
146
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
130
147
  }>;
131
148
  ONTIME_START: z.ZodObject<{
132
149
  grade: z.ZodEnum<["pass", "fail", "error"]>;
@@ -214,6 +231,12 @@ export declare const RideSchema: z.ZodObject<{
214
231
  reason: "ALL_TRANSACTIONS_RECEIVED_SO_FAR" | "MISSING_TRANSACTIONS";
215
232
  }>;
216
233
  }, "strip", z.ZodTypeAny, {
234
+ ENDED_AT_LAST_STOP: {
235
+ value: number | null;
236
+ message: string;
237
+ grade: "error" | "pass" | "fail";
238
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
239
+ };
217
240
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
218
241
  value: number | null;
219
242
  message: string;
@@ -254,7 +277,7 @@ export declare const RideSchema: z.ZodObject<{
254
277
  value: number | null;
255
278
  message: string;
256
279
  grade: "error" | "pass" | "fail";
257
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
280
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
258
281
  };
259
282
  ONTIME_START: {
260
283
  value: number | null;
@@ -287,6 +310,12 @@ export declare const RideSchema: z.ZodObject<{
287
310
  reason: "ALL_TRANSACTIONS_RECEIVED_SO_FAR" | "MISSING_TRANSACTIONS";
288
311
  };
289
312
  }, {
313
+ ENDED_AT_LAST_STOP: {
314
+ value: number | null;
315
+ message: string;
316
+ grade: "error" | "pass" | "fail";
317
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
318
+ };
290
319
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
291
320
  value: number | null;
292
321
  message: string;
@@ -327,7 +356,7 @@ export declare const RideSchema: z.ZodObject<{
327
356
  value: number | null;
328
357
  message: string;
329
358
  grade: "error" | "pass" | "fail";
330
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
359
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
331
360
  };
332
361
  ONTIME_START: {
333
362
  value: number | null;
@@ -396,6 +425,12 @@ export declare const RideSchema: z.ZodObject<{
396
425
  agency_id: string;
397
426
  line_id: number;
398
427
  analysis: {
428
+ ENDED_AT_LAST_STOP: {
429
+ value: number | null;
430
+ message: string;
431
+ grade: "error" | "pass" | "fail";
432
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
433
+ };
399
434
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
400
435
  value: number | null;
401
436
  message: string;
@@ -436,7 +471,7 @@ export declare const RideSchema: z.ZodObject<{
436
471
  value: number | null;
437
472
  message: string;
438
473
  grade: "error" | "pass" | "fail";
439
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
474
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
440
475
  };
441
476
  ONTIME_START: {
442
477
  value: number | null;
@@ -522,6 +557,12 @@ export declare const RideSchema: z.ZodObject<{
522
557
  agency_id: string;
523
558
  line_id: number;
524
559
  analysis: {
560
+ ENDED_AT_LAST_STOP: {
561
+ value: number | null;
562
+ message: string;
563
+ grade: "error" | "pass" | "fail";
564
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
565
+ };
525
566
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
526
567
  value: number | null;
527
568
  message: string;
@@ -562,7 +603,7 @@ export declare const RideSchema: z.ZodObject<{
562
603
  value: number | null;
563
604
  message: string;
564
605
  grade: "error" | "pass" | "fail";
565
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
606
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
566
607
  };
567
608
  ONTIME_START: {
568
609
  value: number | null;
@@ -703,6 +744,23 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
703
744
  grade: "error" | "pass" | "fail";
704
745
  reason: "AVG_INTERVAL_HIGHER_THAN_20_SECONDS" | "AVG_INTERVAL_LOWER_THAN_OR_EQUAL_TO_20_SECONDS" | "NO_VEHICLE_EVENTS_FOUND";
705
746
  }>;
747
+ ENDED_AT_LAST_STOP: z.ZodObject<{
748
+ grade: z.ZodEnum<["pass", "fail", "error"]>;
749
+ message: z.ZodString;
750
+ value: z.ZodNullable<z.ZodNumber>;
751
+ } & {
752
+ reason: z.ZodEnum<["ENDED_AT_LAST_STOP", "ENDED_OUTSIDE_OF_LAST_STOP", "NO_VEHICLE_EVENTS_FOUND", "NO_PATH_DATA"]>;
753
+ }, "strict", z.ZodTypeAny, {
754
+ value: number | null;
755
+ message: string;
756
+ grade: "error" | "pass" | "fail";
757
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
758
+ }, {
759
+ value: number | null;
760
+ message: string;
761
+ grade: "error" | "pass" | "fail";
762
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
763
+ }>;
706
764
  EXCESSIVE_VEHICLE_EVENT_DELAY: z.ZodObject<{
707
765
  grade: z.ZodEnum<["pass", "fail", "error"]>;
708
766
  message: z.ZodString;
@@ -747,12 +805,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
747
805
  value: number | null;
748
806
  message: string;
749
807
  grade: "error" | "pass" | "fail";
750
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
808
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
751
809
  }, {
752
810
  value: number | null;
753
811
  message: string;
754
812
  grade: "error" | "pass" | "fail";
755
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
813
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
756
814
  }>;
757
815
  ONTIME_START: z.ZodObject<{
758
816
  grade: z.ZodEnum<["pass", "fail", "error"]>;
@@ -840,6 +898,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
840
898
  reason: "ALL_TRANSACTIONS_RECEIVED_SO_FAR" | "MISSING_TRANSACTIONS";
841
899
  }>;
842
900
  }, "strip", z.ZodTypeAny, {
901
+ ENDED_AT_LAST_STOP: {
902
+ value: number | null;
903
+ message: string;
904
+ grade: "error" | "pass" | "fail";
905
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
906
+ };
843
907
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
844
908
  value: number | null;
845
909
  message: string;
@@ -880,7 +944,7 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
880
944
  value: number | null;
881
945
  message: string;
882
946
  grade: "error" | "pass" | "fail";
883
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
947
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
884
948
  };
885
949
  ONTIME_START: {
886
950
  value: number | null;
@@ -913,6 +977,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
913
977
  reason: "ALL_TRANSACTIONS_RECEIVED_SO_FAR" | "MISSING_TRANSACTIONS";
914
978
  };
915
979
  }, {
980
+ ENDED_AT_LAST_STOP: {
981
+ value: number | null;
982
+ message: string;
983
+ grade: "error" | "pass" | "fail";
984
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
985
+ };
916
986
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
917
987
  value: number | null;
918
988
  message: string;
@@ -953,7 +1023,7 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
953
1023
  value: number | null;
954
1024
  message: string;
955
1025
  grade: "error" | "pass" | "fail";
956
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1026
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
957
1027
  };
958
1028
  ONTIME_START: {
959
1029
  value: number | null;
@@ -1019,6 +1089,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1019
1089
  agency_id: string;
1020
1090
  line_id: number;
1021
1091
  analysis: {
1092
+ ENDED_AT_LAST_STOP: {
1093
+ value: number | null;
1094
+ message: string;
1095
+ grade: "error" | "pass" | "fail";
1096
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1097
+ };
1022
1098
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
1023
1099
  value: number | null;
1024
1100
  message: string;
@@ -1059,7 +1135,7 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1059
1135
  value: number | null;
1060
1136
  message: string;
1061
1137
  grade: "error" | "pass" | "fail";
1062
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1138
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1063
1139
  };
1064
1140
  ONTIME_START: {
1065
1141
  value: number | null;
@@ -1139,6 +1215,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1139
1215
  agency_id: string;
1140
1216
  line_id: number;
1141
1217
  analysis: {
1218
+ ENDED_AT_LAST_STOP: {
1219
+ value: number | null;
1220
+ message: string;
1221
+ grade: "error" | "pass" | "fail";
1222
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1223
+ };
1142
1224
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
1143
1225
  value: number | null;
1144
1226
  message: string;
@@ -1179,7 +1261,7 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1179
1261
  value: number | null;
1180
1262
  message: string;
1181
1263
  grade: "error" | "pass" | "fail";
1182
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1264
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1183
1265
  };
1184
1266
  ONTIME_START: {
1185
1267
  value: number | null;
@@ -1317,6 +1399,23 @@ export declare const UpdateRideSchema: z.ZodObject<{
1317
1399
  grade: "error" | "pass" | "fail";
1318
1400
  reason: "AVG_INTERVAL_HIGHER_THAN_20_SECONDS" | "AVG_INTERVAL_LOWER_THAN_OR_EQUAL_TO_20_SECONDS" | "NO_VEHICLE_EVENTS_FOUND";
1319
1401
  }>;
1402
+ ENDED_AT_LAST_STOP: z.ZodObject<{
1403
+ grade: z.ZodEnum<["pass", "fail", "error"]>;
1404
+ message: z.ZodString;
1405
+ value: z.ZodNullable<z.ZodNumber>;
1406
+ } & {
1407
+ reason: z.ZodEnum<["ENDED_AT_LAST_STOP", "ENDED_OUTSIDE_OF_LAST_STOP", "NO_VEHICLE_EVENTS_FOUND", "NO_PATH_DATA"]>;
1408
+ }, "strict", z.ZodTypeAny, {
1409
+ value: number | null;
1410
+ message: string;
1411
+ grade: "error" | "pass" | "fail";
1412
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1413
+ }, {
1414
+ value: number | null;
1415
+ message: string;
1416
+ grade: "error" | "pass" | "fail";
1417
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1418
+ }>;
1320
1419
  EXCESSIVE_VEHICLE_EVENT_DELAY: z.ZodObject<{
1321
1420
  grade: z.ZodEnum<["pass", "fail", "error"]>;
1322
1421
  message: z.ZodString;
@@ -1361,12 +1460,12 @@ export declare const UpdateRideSchema: z.ZodObject<{
1361
1460
  value: number | null;
1362
1461
  message: string;
1363
1462
  grade: "error" | "pass" | "fail";
1364
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1463
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1365
1464
  }, {
1366
1465
  value: number | null;
1367
1466
  message: string;
1368
1467
  grade: "error" | "pass" | "fail";
1369
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1468
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1370
1469
  }>;
1371
1470
  ONTIME_START: z.ZodObject<{
1372
1471
  grade: z.ZodEnum<["pass", "fail", "error"]>;
@@ -1454,6 +1553,12 @@ export declare const UpdateRideSchema: z.ZodObject<{
1454
1553
  reason: "ALL_TRANSACTIONS_RECEIVED_SO_FAR" | "MISSING_TRANSACTIONS";
1455
1554
  }>;
1456
1555
  }, "strip", z.ZodTypeAny, {
1556
+ ENDED_AT_LAST_STOP: {
1557
+ value: number | null;
1558
+ message: string;
1559
+ grade: "error" | "pass" | "fail";
1560
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1561
+ };
1457
1562
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
1458
1563
  value: number | null;
1459
1564
  message: string;
@@ -1494,7 +1599,7 @@ export declare const UpdateRideSchema: z.ZodObject<{
1494
1599
  value: number | null;
1495
1600
  message: string;
1496
1601
  grade: "error" | "pass" | "fail";
1497
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1602
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1498
1603
  };
1499
1604
  ONTIME_START: {
1500
1605
  value: number | null;
@@ -1527,6 +1632,12 @@ export declare const UpdateRideSchema: z.ZodObject<{
1527
1632
  reason: "ALL_TRANSACTIONS_RECEIVED_SO_FAR" | "MISSING_TRANSACTIONS";
1528
1633
  };
1529
1634
  }, {
1635
+ ENDED_AT_LAST_STOP: {
1636
+ value: number | null;
1637
+ message: string;
1638
+ grade: "error" | "pass" | "fail";
1639
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1640
+ };
1530
1641
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
1531
1642
  value: number | null;
1532
1643
  message: string;
@@ -1567,7 +1678,7 @@ export declare const UpdateRideSchema: z.ZodObject<{
1567
1678
  value: number | null;
1568
1679
  message: string;
1569
1680
  grade: "error" | "pass" | "fail";
1570
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1681
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1571
1682
  };
1572
1683
  ONTIME_START: {
1573
1684
  value: number | null;
@@ -1634,6 +1745,12 @@ export declare const UpdateRideSchema: z.ZodObject<{
1634
1745
  agency_id?: string | undefined;
1635
1746
  line_id?: number | undefined;
1636
1747
  analysis?: {
1748
+ ENDED_AT_LAST_STOP: {
1749
+ value: number | null;
1750
+ message: string;
1751
+ grade: "error" | "pass" | "fail";
1752
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1753
+ };
1637
1754
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
1638
1755
  value: number | null;
1639
1756
  message: string;
@@ -1674,7 +1791,7 @@ export declare const UpdateRideSchema: z.ZodObject<{
1674
1791
  value: number | null;
1675
1792
  message: string;
1676
1793
  grade: "error" | "pass" | "fail";
1677
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1794
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1678
1795
  };
1679
1796
  ONTIME_START: {
1680
1797
  value: number | null;
@@ -1755,6 +1872,12 @@ export declare const UpdateRideSchema: z.ZodObject<{
1755
1872
  agency_id?: string | undefined;
1756
1873
  line_id?: number | undefined;
1757
1874
  analysis?: {
1875
+ ENDED_AT_LAST_STOP: {
1876
+ value: number | null;
1877
+ message: string;
1878
+ grade: "error" | "pass" | "fail";
1879
+ reason: "NO_VEHICLE_EVENTS_FOUND" | "ENDED_AT_LAST_STOP" | "ENDED_OUTSIDE_OF_LAST_STOP" | "NO_PATH_DATA";
1880
+ };
1758
1881
  AT_LEAST_ONE_EVENT_ON_FIRST_STOP: {
1759
1882
  value: number | null;
1760
1883
  message: string;
@@ -1795,7 +1918,7 @@ export declare const UpdateRideSchema: z.ZodObject<{
1795
1918
  value: number | null;
1796
1919
  message: string;
1797
1920
  grade: "error" | "pass" | "fail";
1798
- reason: "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP" | "NO_PATH_DATA";
1921
+ reason: "NO_PATH_DATA" | "ALL_STOPS_HAVE_LOCATION_TRANSACTIONS" | "MISSING_LOCATION_TRANSACTION_FOR_AT_LEAST_ONE_STOP";
1799
1922
  };
1800
1923
  ONTIME_START: {
1801
1924
  value: number | null;
@@ -2,7 +2,7 @@
2
2
  import { DocumentSchema } from '../_common/document.js';
3
3
  import { validateOperationalDate } from '../_common/operational-date.js';
4
4
  import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
5
- import { atLeasOneEventOnFirstStopSchema, atMostTwoDriverIdsSchema, atMostTwoVehicleIdsSchema, avgIntervalVehicleEventsSchema, excessiveVehicleEventDelaySchema, lessThanTenVehicleEventsSchema, matchingLocationTransactionsSchema, ontimeStartSchema, simpleOneValidationTransactionSchema, simpleOneVehicleEventOrValidationTransactionSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
5
+ import { atLeasOneEventOnFirstStopSchema, atMostTwoDriverIdsSchema, atMostTwoVehicleIdsSchema, avgIntervalVehicleEventsSchema, endedAtLastStopSchema, excessiveVehicleEventDelaySchema, lessThanTenVehicleEventsSchema, matchingLocationTransactionsSchema, ontimeStartSchema, simpleOneValidationTransactionSchema, simpleOneVehicleEventOrValidationTransactionSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
6
6
  import { ProcessingStatus } from '../system/processing-status.js';
7
7
  import { z } from 'zod';
8
8
  /* * */
@@ -13,6 +13,7 @@ export const RideSchema = DocumentSchema.extend({
13
13
  AT_MOST_TWO_DRIVER_IDS: atMostTwoDriverIdsSchema,
14
14
  AT_MOST_TWO_VEHICLE_IDS: atMostTwoVehicleIdsSchema,
15
15
  AVG_INTERVAL_VEHICLE_EVENTS: avgIntervalVehicleEventsSchema,
16
+ ENDED_AT_LAST_STOP: endedAtLastStopSchema,
16
17
  EXCESSIVE_VEHICLE_EVENT_DELAY: excessiveVehicleEventDelaySchema,
17
18
  LESS_THAN_TEN_VEHICLE_EVENTS: lessThanTenVehicleEventsSchema,
18
19
  MATCHING_LOCATION_TRANSACTIONS: matchingLocationTransactionsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20250705.105.17",
3
+ "version": "20250706.1908.31",
4
4
  "author": "João de Vasconcelos & Jusi Monteiro",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "homepage": "https://github.com/tmlmobilidade/services#readme",