@tmlmobilidade/types 20250911.1034.51 → 20250911.1425.9
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.
- package/dist/src/_common/comment.d.ts +20 -20
- package/dist/src/_common/document.d.ts +4 -4
- package/dist/src/_common/document.js +2 -2
- package/dist/src/_common/operational-date.d.ts +1 -1
- package/dist/src/_common/operational-date.js +1 -2
- package/dist/src/_common/proposed-change.d.ts +18 -40
- package/dist/src/_common/proposed-change.js +5 -14
- package/dist/src/agency.d.ts +19 -30
- package/dist/src/agency.js +1 -1
- package/dist/src/alert.d.ts +37 -63
- package/dist/src/alert.js +8 -48
- package/dist/src/auth/login.js +2 -8
- package/dist/src/auth/role.d.ts +15 -22
- package/dist/src/auth/role.js +1 -1
- package/dist/src/auth/session.d.ts +22 -38
- package/dist/src/auth/session.js +3 -3
- package/dist/src/auth/user.d.ts +22 -41
- package/dist/src/auth/user.js +3 -3
- package/dist/src/auth/verification-token.d.ts +22 -34
- package/dist/src/auth/verification-token.js +3 -3
- package/dist/src/gtfs.d.ts +6 -17
- package/dist/src/organization.d.ts +10 -13
- package/dist/src/organization.js +1 -1
- package/dist/src/plans/gtfs-validation.d.ts +34 -72
- package/dist/src/plans/gtfs-validation.js +2 -6
- package/dist/src/plans/plan-controller.d.ts +3 -8
- package/dist/src/plans/plan-controller.js +2 -2
- package/dist/src/plans/plan.d.ts +43 -95
- package/dist/src/plans/plan.js +2 -6
- package/dist/src/rides/ride-audit.d.ts +27 -30
- package/dist/src/rides/ride-audit.js +1 -1
- package/dist/src/rides/ride-justification.d.ts +69 -72
- package/dist/src/rides/ride-justification.js +1 -1
- package/dist/src/rides/ride.d.ts +55 -106
- package/dist/src/rides/ride.js +8 -8
- package/dist/src/sams/sam-analysis.d.ts +5 -13
- package/dist/src/sams/sam-analysis.js +3 -3
- package/dist/src/sams/sam.d.ts +46 -97
- package/dist/src/sams/sam.js +4 -4
- package/dist/src/simplified-apex/simplified-apex-location.d.ts +18 -25
- package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +18 -25
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +28 -38
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
- package/dist/src/simplified-apex/simplified-apex-validation.d.ts +18 -25
- package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
- package/dist/src/stop.d.ts +133 -151
- package/dist/src/stop.js +11 -74
- package/dist/src/vehicle-event.d.ts +9 -14
- package/dist/src/vehicle-event.js +2 -2
- package/dist/src/zone.d.ts +9 -12
- package/dist/src/zone.js +1 -1
- package/package.json +1 -1
package/dist/src/rides/ride.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { type OperationalDate } from '../_common/operational-date.js';
|
|
2
|
-
import { type UnixTimestamp } from '../_common/unix-timestamp.js';
|
|
3
1
|
import { z } from 'zod';
|
|
4
2
|
export declare const RideSchema: z.ZodObject<{
|
|
5
3
|
_id: z.ZodString;
|
|
6
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
7
|
-
created_by: z.
|
|
8
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
9
|
-
updated_by: z.
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
5
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
10
8
|
} & {
|
|
11
9
|
agency_id: z.ZodString;
|
|
12
10
|
analysis: z.ZodNullable<z.ZodObject<{
|
|
@@ -455,15 +453,15 @@ export declare const RideSchema: z.ZodObject<{
|
|
|
455
453
|
apex_on_board_sales_qty: z.ZodNullable<z.ZodNumber>;
|
|
456
454
|
apex_validations_qty: z.ZodNullable<z.ZodNumber>;
|
|
457
455
|
driver_ids: z.ZodArray<z.ZodString, "many">;
|
|
458
|
-
end_time_observed: z.ZodNullable<z.
|
|
459
|
-
end_time_scheduled: z.
|
|
456
|
+
end_time_observed: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
457
|
+
end_time_scheduled: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
460
458
|
extension_observed: z.ZodNullable<z.ZodNumber>;
|
|
461
459
|
extension_scheduled: z.ZodNumber;
|
|
462
460
|
hashed_shape_id: z.ZodString;
|
|
463
461
|
hashed_trip_id: z.ZodString;
|
|
464
462
|
headsign: z.ZodString;
|
|
465
463
|
line_id: z.ZodNumber;
|
|
466
|
-
operational_date: z.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">;
|
|
464
|
+
operational_date: z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">;
|
|
467
465
|
passengers_estimated: z.ZodNullable<z.ZodNumber>;
|
|
468
466
|
passengers_observed: z.ZodNullable<z.ZodNumber>;
|
|
469
467
|
passengers_observed_on_board_sales_amount: z.ZodNullable<z.ZodNumber>;
|
|
@@ -474,10 +472,10 @@ export declare const RideSchema: z.ZodObject<{
|
|
|
474
472
|
pattern_id: z.ZodString;
|
|
475
473
|
plan_id: z.ZodString;
|
|
476
474
|
route_id: z.ZodString;
|
|
477
|
-
seen_first_at: z.ZodNullable<z.
|
|
478
|
-
seen_last_at: z.ZodNullable<z.
|
|
479
|
-
start_time_observed: z.ZodNullable<z.
|
|
480
|
-
start_time_scheduled: z.
|
|
475
|
+
seen_first_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
476
|
+
seen_last_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
477
|
+
start_time_observed: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
478
|
+
start_time_scheduled: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
481
479
|
system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
|
|
482
480
|
trip_id: z.ZodString;
|
|
483
481
|
vehicle_ids: z.ZodArray<z.ZodNumber, "many">;
|
|
@@ -486,11 +484,9 @@ export declare const RideSchema: z.ZodObject<{
|
|
|
486
484
|
created_at: number & {
|
|
487
485
|
__brand: "UnixTimestamp";
|
|
488
486
|
};
|
|
489
|
-
created_by: string;
|
|
490
487
|
updated_at: number & {
|
|
491
488
|
__brand: "UnixTimestamp";
|
|
492
489
|
};
|
|
493
|
-
updated_by: string;
|
|
494
490
|
agency_id: string;
|
|
495
491
|
line_id: number;
|
|
496
492
|
analysis: {
|
|
@@ -593,12 +589,10 @@ export declare const RideSchema: z.ZodObject<{
|
|
|
593
589
|
apex_on_board_sales_qty: number | null;
|
|
594
590
|
apex_validations_qty: number | null;
|
|
595
591
|
driver_ids: string[];
|
|
596
|
-
end_time_observed: (
|
|
597
|
-
__brand: "UnixTimestamp";
|
|
598
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
592
|
+
end_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
599
593
|
end_time_scheduled: number & {
|
|
600
594
|
__brand: "UnixTimestamp";
|
|
601
|
-
}
|
|
595
|
+
};
|
|
602
596
|
extension_observed: number | null;
|
|
603
597
|
extension_scheduled: number;
|
|
604
598
|
hashed_shape_id: string;
|
|
@@ -617,20 +611,16 @@ export declare const RideSchema: z.ZodObject<{
|
|
|
617
611
|
pattern_id: string;
|
|
618
612
|
plan_id: string;
|
|
619
613
|
route_id: string;
|
|
620
|
-
seen_first_at: (
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
seen_last_at: (number & {
|
|
624
|
-
__brand: "UnixTimestamp";
|
|
625
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
626
|
-
start_time_observed: (number & {
|
|
627
|
-
__brand: "UnixTimestamp";
|
|
628
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
614
|
+
seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
615
|
+
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
616
|
+
start_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
629
617
|
start_time_scheduled: number & {
|
|
630
618
|
__brand: "UnixTimestamp";
|
|
631
|
-
}
|
|
619
|
+
};
|
|
632
620
|
system_status: "waiting" | "processing" | "complete" | "error";
|
|
633
621
|
vehicle_ids: number[];
|
|
622
|
+
created_by?: string | undefined;
|
|
623
|
+
updated_by?: string | undefined;
|
|
634
624
|
}, {
|
|
635
625
|
_id: string;
|
|
636
626
|
created_at: number;
|
|
@@ -766,10 +756,10 @@ export declare const RideSchema: z.ZodObject<{
|
|
|
766
756
|
}>;
|
|
767
757
|
export declare const CreateRideSchema: z.ZodObject<Omit<{
|
|
768
758
|
_id: z.ZodOptional<z.ZodString>;
|
|
769
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
770
|
-
created_by: z.
|
|
771
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
772
|
-
updated_by: z.
|
|
759
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
760
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
761
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
762
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
773
763
|
agency_id: z.ZodString;
|
|
774
764
|
line_id: z.ZodNumber;
|
|
775
765
|
analysis: z.ZodNullable<z.ZodObject<{
|
|
@@ -1219,14 +1209,14 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
|
|
|
1219
1209
|
apex_on_board_sales_qty: z.ZodNullable<z.ZodNumber>;
|
|
1220
1210
|
apex_validations_qty: z.ZodNullable<z.ZodNumber>;
|
|
1221
1211
|
driver_ids: z.ZodArray<z.ZodString, "many">;
|
|
1222
|
-
end_time_observed: z.ZodNullable<z.
|
|
1223
|
-
end_time_scheduled: z.
|
|
1212
|
+
end_time_observed: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
1213
|
+
end_time_scheduled: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
1224
1214
|
extension_observed: z.ZodNullable<z.ZodNumber>;
|
|
1225
1215
|
extension_scheduled: z.ZodNumber;
|
|
1226
1216
|
hashed_shape_id: z.ZodString;
|
|
1227
1217
|
hashed_trip_id: z.ZodString;
|
|
1228
1218
|
headsign: z.ZodString;
|
|
1229
|
-
operational_date: z.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">;
|
|
1219
|
+
operational_date: z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">;
|
|
1230
1220
|
passengers_estimated: z.ZodNullable<z.ZodNumber>;
|
|
1231
1221
|
passengers_observed: z.ZodNullable<z.ZodNumber>;
|
|
1232
1222
|
passengers_observed_on_board_sales_amount: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1237,15 +1227,13 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
|
|
|
1237
1227
|
pattern_id: z.ZodString;
|
|
1238
1228
|
plan_id: z.ZodString;
|
|
1239
1229
|
route_id: z.ZodString;
|
|
1240
|
-
seen_first_at: z.ZodNullable<z.
|
|
1241
|
-
seen_last_at: z.ZodNullable<z.
|
|
1242
|
-
start_time_observed: z.ZodNullable<z.
|
|
1243
|
-
start_time_scheduled: z.
|
|
1230
|
+
seen_first_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
1231
|
+
seen_last_at: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
1232
|
+
start_time_observed: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
1233
|
+
start_time_scheduled: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
1244
1234
|
system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
|
|
1245
1235
|
vehicle_ids: z.ZodArray<z.ZodNumber, "many">;
|
|
1246
1236
|
}, "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
|
|
1247
|
-
created_by: string;
|
|
1248
|
-
updated_by: string;
|
|
1249
1237
|
agency_id: string;
|
|
1250
1238
|
line_id: number;
|
|
1251
1239
|
analysis: {
|
|
@@ -1348,12 +1336,10 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
|
|
|
1348
1336
|
apex_on_board_sales_qty: number | null;
|
|
1349
1337
|
apex_validations_qty: number | null;
|
|
1350
1338
|
driver_ids: string[];
|
|
1351
|
-
end_time_observed: (
|
|
1352
|
-
__brand: "UnixTimestamp";
|
|
1353
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
1339
|
+
end_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
1354
1340
|
end_time_scheduled: number & {
|
|
1355
1341
|
__brand: "UnixTimestamp";
|
|
1356
|
-
}
|
|
1342
|
+
};
|
|
1357
1343
|
extension_observed: number | null;
|
|
1358
1344
|
extension_scheduled: number;
|
|
1359
1345
|
hashed_shape_id: string;
|
|
@@ -1372,21 +1358,17 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
|
|
|
1372
1358
|
pattern_id: string;
|
|
1373
1359
|
plan_id: string;
|
|
1374
1360
|
route_id: string;
|
|
1375
|
-
seen_first_at: (
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
seen_last_at: (number & {
|
|
1379
|
-
__brand: "UnixTimestamp";
|
|
1380
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
1381
|
-
start_time_observed: (number & {
|
|
1382
|
-
__brand: "UnixTimestamp";
|
|
1383
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
1361
|
+
seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
1362
|
+
seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
1363
|
+
start_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
1384
1364
|
start_time_scheduled: number & {
|
|
1385
1365
|
__brand: "UnixTimestamp";
|
|
1386
|
-
}
|
|
1366
|
+
};
|
|
1387
1367
|
system_status: "waiting" | "processing" | "complete" | "error";
|
|
1388
1368
|
vehicle_ids: number[];
|
|
1389
1369
|
_id?: string | undefined;
|
|
1370
|
+
created_by?: string | undefined;
|
|
1371
|
+
updated_by?: string | undefined;
|
|
1390
1372
|
}, {
|
|
1391
1373
|
agency_id: string;
|
|
1392
1374
|
line_id: number;
|
|
@@ -1520,8 +1502,7 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
|
|
|
1520
1502
|
}>;
|
|
1521
1503
|
export declare const UpdateRideSchema: z.ZodObject<{
|
|
1522
1504
|
_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1523
|
-
|
|
1524
|
-
updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
1505
|
+
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
1525
1506
|
agency_id: z.ZodOptional<z.ZodString>;
|
|
1526
1507
|
line_id: z.ZodOptional<z.ZodNumber>;
|
|
1527
1508
|
analysis: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1971,14 +1952,14 @@ export declare const UpdateRideSchema: z.ZodObject<{
|
|
|
1971
1952
|
apex_on_board_sales_qty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1972
1953
|
apex_validations_qty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1973
1954
|
driver_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1974
|
-
end_time_observed: z.ZodOptional<z.ZodNullable<z.
|
|
1975
|
-
end_time_scheduled: z.ZodOptional<z.
|
|
1955
|
+
end_time_observed: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1956
|
+
end_time_scheduled: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
1976
1957
|
extension_observed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1977
1958
|
extension_scheduled: z.ZodOptional<z.ZodNumber>;
|
|
1978
1959
|
hashed_shape_id: z.ZodOptional<z.ZodString>;
|
|
1979
1960
|
hashed_trip_id: z.ZodOptional<z.ZodString>;
|
|
1980
1961
|
headsign: z.ZodOptional<z.ZodString>;
|
|
1981
|
-
operational_date: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodString, OperationalDate, string>, "OperationalDate">>;
|
|
1962
|
+
operational_date: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>;
|
|
1982
1963
|
passengers_estimated: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1983
1964
|
passengers_observed: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1984
1965
|
passengers_observed_on_board_sales_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -1989,15 +1970,14 @@ export declare const UpdateRideSchema: z.ZodObject<{
|
|
|
1989
1970
|
pattern_id: z.ZodOptional<z.ZodString>;
|
|
1990
1971
|
plan_id: z.ZodOptional<z.ZodString>;
|
|
1991
1972
|
route_id: z.ZodOptional<z.ZodString>;
|
|
1992
|
-
seen_first_at: z.ZodOptional<z.ZodNullable<z.
|
|
1993
|
-
seen_last_at: z.ZodOptional<z.ZodNullable<z.
|
|
1994
|
-
start_time_observed: z.ZodOptional<z.ZodNullable<z.
|
|
1995
|
-
start_time_scheduled: z.ZodOptional<z.
|
|
1973
|
+
seen_first_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1974
|
+
seen_last_at: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1975
|
+
start_time_observed: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
1976
|
+
start_time_scheduled: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
1996
1977
|
system_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>>;
|
|
1997
1978
|
vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
1998
1979
|
}, "strip", z.ZodTypeAny, {
|
|
1999
1980
|
_id?: string | undefined;
|
|
2000
|
-
created_by?: string | undefined;
|
|
2001
1981
|
updated_by?: string | undefined;
|
|
2002
1982
|
agency_id?: string | undefined;
|
|
2003
1983
|
line_id?: number | undefined;
|
|
@@ -2101,12 +2081,8 @@ export declare const UpdateRideSchema: z.ZodObject<{
|
|
|
2101
2081
|
apex_on_board_sales_qty?: number | null | undefined;
|
|
2102
2082
|
apex_validations_qty?: number | null | undefined;
|
|
2103
2083
|
driver_ids?: string[] | undefined;
|
|
2104
|
-
end_time_observed?: (
|
|
2105
|
-
|
|
2106
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
2107
|
-
end_time_scheduled?: (number & {
|
|
2108
|
-
__brand: "UnixTimestamp";
|
|
2109
|
-
} & z.BRAND<"UnixTimestamp">) | undefined;
|
|
2084
|
+
end_time_observed?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
2085
|
+
end_time_scheduled?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
2110
2086
|
extension_observed?: number | null | undefined;
|
|
2111
2087
|
extension_scheduled?: number | undefined;
|
|
2112
2088
|
hashed_shape_id?: string | undefined;
|
|
@@ -2125,23 +2101,14 @@ export declare const UpdateRideSchema: z.ZodObject<{
|
|
|
2125
2101
|
pattern_id?: string | undefined;
|
|
2126
2102
|
plan_id?: string | undefined;
|
|
2127
2103
|
route_id?: string | undefined;
|
|
2128
|
-
seen_first_at?: (
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
__brand: "UnixTimestamp";
|
|
2133
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
2134
|
-
start_time_observed?: (number & {
|
|
2135
|
-
__brand: "UnixTimestamp";
|
|
2136
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
2137
|
-
start_time_scheduled?: (number & {
|
|
2138
|
-
__brand: "UnixTimestamp";
|
|
2139
|
-
} & z.BRAND<"UnixTimestamp">) | undefined;
|
|
2104
|
+
seen_first_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
2105
|
+
seen_last_at?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
2106
|
+
start_time_observed?: import("../_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
2107
|
+
start_time_scheduled?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
|
|
2140
2108
|
system_status?: "waiting" | "processing" | "complete" | "error" | undefined;
|
|
2141
2109
|
vehicle_ids?: number[] | undefined;
|
|
2142
2110
|
}, {
|
|
2143
2111
|
_id?: string | undefined;
|
|
2144
|
-
created_by?: string | undefined;
|
|
2145
2112
|
updated_by?: string | undefined;
|
|
2146
2113
|
agency_id?: string | undefined;
|
|
2147
2114
|
line_id?: number | undefined;
|
|
@@ -2270,27 +2237,9 @@ export declare const UpdateRideSchema: z.ZodObject<{
|
|
|
2270
2237
|
system_status?: "waiting" | "processing" | "complete" | "error" | undefined;
|
|
2271
2238
|
vehicle_ids?: number[] | undefined;
|
|
2272
2239
|
}>;
|
|
2273
|
-
export
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
end_time_scheduled: null | UnixTimestamp;
|
|
2277
|
-
operational_date: OperationalDate;
|
|
2278
|
-
seen_first_at: null | UnixTimestamp;
|
|
2279
|
-
seen_last_at: null | UnixTimestamp;
|
|
2280
|
-
start_time_observed: null | UnixTimestamp;
|
|
2281
|
-
start_time_scheduled: null | UnixTimestamp;
|
|
2282
|
-
updated_at: UnixTimestamp;
|
|
2283
|
-
}
|
|
2284
|
-
export interface CreateRideDto extends Omit<z.infer<typeof CreateRideSchema>, 'end_time_observed' | 'end_time_scheduled' | 'operational_date' | 'seen_first_at' | 'seen_last_at' | 'start_time_observed' | 'start_time_scheduled'> {
|
|
2285
|
-
end_time_observed: null | UnixTimestamp;
|
|
2286
|
-
end_time_scheduled: null | UnixTimestamp;
|
|
2287
|
-
operational_date: OperationalDate;
|
|
2288
|
-
seen_first_at: null | UnixTimestamp;
|
|
2289
|
-
seen_last_at: null | UnixTimestamp;
|
|
2290
|
-
start_time_observed: null | UnixTimestamp;
|
|
2291
|
-
start_time_scheduled: null | UnixTimestamp;
|
|
2292
|
-
}
|
|
2293
|
-
export type UpdateRideDto = Partial<CreateRideDto>;
|
|
2240
|
+
export type Ride = z.infer<typeof RideSchema>;
|
|
2241
|
+
export type CreateRideDto = z.infer<typeof CreateRideSchema>;
|
|
2242
|
+
export type UpdateRideDto = z.infer<typeof UpdateRideSchema>;
|
|
2294
2243
|
export declare const RidePermissionSchema: z.ZodObject<{
|
|
2295
2244
|
agency_ids: z.ZodArray<z.ZodString, "many">;
|
|
2296
2245
|
}, "strip", z.ZodTypeAny, {
|
package/dist/src/rides/ride.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { DocumentSchema } from '../_common/document.js';
|
|
3
3
|
import { validateOperationalDate } from '../_common/operational-date.js';
|
|
4
|
-
import {
|
|
4
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
5
5
|
import { atLeastOneVehicleEventOnFirstStopSchema, endedAtLastStopSchema, expectedApexValidationIntervalSchema, expectedDriverIdQtySchema, expectedStartTimeSchema, expectedVehicleEventDelaySchema, expectedVehicleEventIntervalSchema, expectedVehicleEventQtySchema, expectedVehicleIdQtySchema, matchingApexLocationsSchema, matchingVehicleIdsSchema, simpleOneApexValidationSchema, simpleOneVehicleEventOrApexValidationSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
|
|
6
6
|
import { ProcessingStatusSchema } from '../system/processing-status.js';
|
|
7
7
|
import { z } from 'zod';
|
|
@@ -32,8 +32,8 @@ export const RideSchema = DocumentSchema.extend({
|
|
|
32
32
|
apex_on_board_sales_qty: z.number().nullable(),
|
|
33
33
|
apex_validations_qty: z.number().nullable(),
|
|
34
34
|
driver_ids: z.array(z.string()),
|
|
35
|
-
end_time_observed:
|
|
36
|
-
end_time_scheduled:
|
|
35
|
+
end_time_observed: unixTimeStampSchema.nullable(),
|
|
36
|
+
end_time_scheduled: unixTimeStampSchema,
|
|
37
37
|
extension_observed: z.number().nullable(),
|
|
38
38
|
extension_scheduled: z.number(),
|
|
39
39
|
hashed_shape_id: z.string(),
|
|
@@ -51,16 +51,16 @@ export const RideSchema = DocumentSchema.extend({
|
|
|
51
51
|
pattern_id: z.string(),
|
|
52
52
|
plan_id: z.string(),
|
|
53
53
|
route_id: z.string(),
|
|
54
|
-
seen_first_at:
|
|
55
|
-
seen_last_at:
|
|
56
|
-
start_time_observed:
|
|
57
|
-
start_time_scheduled:
|
|
54
|
+
seen_first_at: unixTimeStampSchema.nullable(),
|
|
55
|
+
seen_last_at: unixTimeStampSchema.nullable(),
|
|
56
|
+
start_time_observed: unixTimeStampSchema.nullable(),
|
|
57
|
+
start_time_scheduled: unixTimeStampSchema,
|
|
58
58
|
system_status: ProcessingStatusSchema.default('waiting'),
|
|
59
59
|
trip_id: z.string(),
|
|
60
60
|
vehicle_ids: z.array(z.number()),
|
|
61
61
|
}).strip();
|
|
62
62
|
export const CreateRideSchema = RideSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
|
|
63
|
-
export const UpdateRideSchema = CreateRideSchema.partial();
|
|
63
|
+
export const UpdateRideSchema = CreateRideSchema.omit({ created_by: true }).partial();
|
|
64
64
|
/* * */
|
|
65
65
|
export const RidePermissionSchema = z.object({
|
|
66
66
|
agency_ids: z.array(z.string()),
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { type UnixTimestamp } from '../_common/unix-timestamp.js';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
export declare const SamAnalysisSchema: z.ZodObject<{
|
|
4
3
|
apex_version: z.ZodNullable<z.ZodString>;
|
|
5
4
|
device_id: z.ZodNullable<z.ZodString>;
|
|
6
|
-
end_time: z.ZodNullable<z.
|
|
5
|
+
end_time: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
7
6
|
first_transaction_ase_counter_value: z.ZodNullable<z.ZodNumber>;
|
|
8
7
|
first_transaction_id: z.ZodNullable<z.ZodString>;
|
|
9
8
|
first_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
|
|
10
9
|
last_transaction_ase_counter_value: z.ZodNullable<z.ZodNumber>;
|
|
11
10
|
last_transaction_id: z.ZodNullable<z.ZodString>;
|
|
12
11
|
last_transaction_type: z.ZodNullable<z.ZodEnum<["location", "on_board_refund", "on_board_sale", "validation"]>>;
|
|
13
|
-
start_time: z.ZodNullable<z.
|
|
12
|
+
start_time: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
|
|
14
13
|
transactions_expected: z.ZodNullable<z.ZodNumber>;
|
|
15
14
|
transactions_found: z.ZodNullable<z.ZodNumber>;
|
|
16
15
|
transactions_missing: z.ZodNullable<z.ZodNumber>;
|
|
@@ -18,18 +17,14 @@ export declare const SamAnalysisSchema: z.ZodObject<{
|
|
|
18
17
|
}, "strict", z.ZodTypeAny, {
|
|
19
18
|
apex_version: string | null;
|
|
20
19
|
device_id: string | null;
|
|
21
|
-
end_time: (
|
|
22
|
-
__brand: "UnixTimestamp";
|
|
23
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
20
|
+
end_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
24
21
|
first_transaction_ase_counter_value: number | null;
|
|
25
22
|
first_transaction_id: string | null;
|
|
26
23
|
first_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
|
|
27
24
|
last_transaction_ase_counter_value: number | null;
|
|
28
25
|
last_transaction_id: string | null;
|
|
29
26
|
last_transaction_type: "validation" | "location" | "on_board_refund" | "on_board_sale" | null;
|
|
30
|
-
start_time: (
|
|
31
|
-
__brand: "UnixTimestamp";
|
|
32
|
-
} & z.BRAND<"UnixTimestamp">) | null;
|
|
27
|
+
start_time: import("../_common/unix-timestamp.js").UnixTimestamp | null;
|
|
33
28
|
transactions_expected: number | null;
|
|
34
29
|
transactions_found: number | null;
|
|
35
30
|
transactions_missing: number | null;
|
|
@@ -50,7 +45,4 @@ export declare const SamAnalysisSchema: z.ZodObject<{
|
|
|
50
45
|
transactions_missing: number | null;
|
|
51
46
|
vehicle_id: number | null;
|
|
52
47
|
}>;
|
|
53
|
-
export
|
|
54
|
-
end_time: null | UnixTimestamp;
|
|
55
|
-
start_time: null | UnixTimestamp;
|
|
56
|
-
}
|
|
48
|
+
export type SamAnalysis = z.infer<typeof SamAnalysisSchema>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/* * */
|
|
2
|
-
import {
|
|
2
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
3
3
|
import { SimplifiedApexTypeSchema } from '../simplified-apex/simplified-apex-type.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/* * */
|
|
6
6
|
export const SamAnalysisSchema = z.object({
|
|
7
7
|
apex_version: z.string().nullable(),
|
|
8
8
|
device_id: z.string().nullable(),
|
|
9
|
-
end_time:
|
|
9
|
+
end_time: unixTimeStampSchema.nullable(),
|
|
10
10
|
first_transaction_ase_counter_value: z.number().nullable(),
|
|
11
11
|
first_transaction_id: z.string().nullable(),
|
|
12
12
|
first_transaction_type: SimplifiedApexTypeSchema.nullable(),
|
|
13
13
|
last_transaction_ase_counter_value: z.number().nullable(),
|
|
14
14
|
last_transaction_id: z.string().nullable(),
|
|
15
15
|
last_transaction_type: SimplifiedApexTypeSchema.nullable(),
|
|
16
|
-
start_time:
|
|
16
|
+
start_time: unixTimeStampSchema.nullable(),
|
|
17
17
|
transactions_expected: z.number().nullable(),
|
|
18
18
|
transactions_found: z.number().nullable(),
|
|
19
19
|
transactions_missing: z.number().nullable(),
|