@tmlmobilidade/types 20250911.1034.51 → 20250911.1325.18

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 (51) hide show
  1. package/dist/src/_common/operational-date.d.ts +1 -1
  2. package/dist/src/_common/operational-date.js +1 -2
  3. package/dist/src/_common/proposed-change.d.ts +9 -31
  4. package/dist/src/_common/proposed-change.js +5 -14
  5. package/dist/src/agency.d.ts +10 -21
  6. package/dist/src/agency.js +1 -1
  7. package/dist/src/alert.d.ts +32 -58
  8. package/dist/src/alert.js +8 -48
  9. package/dist/src/auth/login.js +2 -8
  10. package/dist/src/auth/role.d.ts +6 -13
  11. package/dist/src/auth/role.js +1 -1
  12. package/dist/src/auth/session.d.ts +13 -29
  13. package/dist/src/auth/session.js +3 -3
  14. package/dist/src/auth/user.d.ts +13 -32
  15. package/dist/src/auth/user.js +3 -3
  16. package/dist/src/auth/verification-token.d.ts +13 -25
  17. package/dist/src/auth/verification-token.js +3 -3
  18. package/dist/src/gtfs.d.ts +6 -17
  19. package/dist/src/organization.d.ts +1 -4
  20. package/dist/src/organization.js +1 -1
  21. package/dist/src/plans/gtfs-validation.d.ts +25 -63
  22. package/dist/src/plans/gtfs-validation.js +2 -6
  23. package/dist/src/plans/plan-controller.d.ts +3 -8
  24. package/dist/src/plans/plan-controller.js +2 -2
  25. package/dist/src/plans/plan.d.ts +34 -86
  26. package/dist/src/plans/plan.js +2 -6
  27. package/dist/src/rides/ride-audit.d.ts +0 -3
  28. package/dist/src/rides/ride-audit.js +1 -1
  29. package/dist/src/rides/ride-justification.d.ts +0 -3
  30. package/dist/src/rides/ride-justification.js +1 -1
  31. package/dist/src/rides/ride.d.ts +46 -97
  32. package/dist/src/rides/ride.js +8 -8
  33. package/dist/src/sams/sam-analysis.d.ts +5 -13
  34. package/dist/src/sams/sam-analysis.js +3 -3
  35. package/dist/src/sams/sam.d.ts +37 -88
  36. package/dist/src/sams/sam.js +4 -4
  37. package/dist/src/simplified-apex/simplified-apex-location.d.ts +12 -19
  38. package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
  39. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +12 -19
  40. package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
  41. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +23 -33
  42. package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
  43. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +12 -19
  44. package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
  45. package/dist/src/stop.d.ts +68 -86
  46. package/dist/src/stop.js +11 -74
  47. package/dist/src/vehicle-event.d.ts +5 -10
  48. package/dist/src/vehicle-event.js +2 -2
  49. package/dist/src/zone.d.ts +0 -3
  50. package/dist/src/zone.js +1 -1
  51. package/package.json +1 -1
@@ -1,11 +1,9 @@
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>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
5
  created_by: z.ZodDefault<z.ZodString>;
8
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
9
7
  updated_by: z.ZodDefault<z.ZodString>;
10
8
  } & {
11
9
  agency_id: z.ZodString;
@@ -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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
459
- end_time_scheduled: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
478
- seen_last_at: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
479
- start_time_observed: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
480
- start_time_scheduled: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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">;
@@ -593,12 +591,10 @@ export declare const RideSchema: z.ZodObject<{
593
591
  apex_on_board_sales_qty: number | null;
594
592
  apex_validations_qty: number | null;
595
593
  driver_ids: string[];
596
- end_time_observed: (number & {
597
- __brand: "UnixTimestamp";
598
- } & z.BRAND<"UnixTimestamp">) | null;
594
+ end_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
599
595
  end_time_scheduled: number & {
600
596
  __brand: "UnixTimestamp";
601
- } & z.BRAND<"UnixTimestamp">;
597
+ };
602
598
  extension_observed: number | null;
603
599
  extension_scheduled: number;
604
600
  hashed_shape_id: string;
@@ -617,18 +613,12 @@ export declare const RideSchema: z.ZodObject<{
617
613
  pattern_id: string;
618
614
  plan_id: string;
619
615
  route_id: string;
620
- seen_first_at: (number & {
621
- __brand: "UnixTimestamp";
622
- } & z.BRAND<"UnixTimestamp">) | null;
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;
616
+ seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
617
+ seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
618
+ start_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
629
619
  start_time_scheduled: number & {
630
620
  __brand: "UnixTimestamp";
631
- } & z.BRAND<"UnixTimestamp">;
621
+ };
632
622
  system_status: "waiting" | "processing" | "complete" | "error";
633
623
  vehicle_ids: number[];
634
624
  }, {
@@ -766,9 +756,9 @@ 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>;
759
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
770
760
  created_by: z.ZodDefault<z.ZodString>;
771
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
761
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
772
762
  updated_by: z.ZodDefault<z.ZodString>;
773
763
  agency_id: z.ZodString;
774
764
  line_id: z.ZodNumber;
@@ -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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
1223
- end_time_scheduled: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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,10 +1227,10 @@ 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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
1241
- seen_last_at: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
1242
- start_time_observed: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
1243
- start_time_scheduled: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
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, {
@@ -1348,12 +1338,10 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1348
1338
  apex_on_board_sales_qty: number | null;
1349
1339
  apex_validations_qty: number | null;
1350
1340
  driver_ids: string[];
1351
- end_time_observed: (number & {
1352
- __brand: "UnixTimestamp";
1353
- } & z.BRAND<"UnixTimestamp">) | null;
1341
+ end_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
1354
1342
  end_time_scheduled: number & {
1355
1343
  __brand: "UnixTimestamp";
1356
- } & z.BRAND<"UnixTimestamp">;
1344
+ };
1357
1345
  extension_observed: number | null;
1358
1346
  extension_scheduled: number;
1359
1347
  hashed_shape_id: string;
@@ -1372,18 +1360,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1372
1360
  pattern_id: string;
1373
1361
  plan_id: string;
1374
1362
  route_id: string;
1375
- seen_first_at: (number & {
1376
- __brand: "UnixTimestamp";
1377
- } & z.BRAND<"UnixTimestamp">) | null;
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;
1363
+ seen_first_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
1364
+ seen_last_at: import("../_common/unix-timestamp.js").UnixTimestamp | null;
1365
+ start_time_observed: import("../_common/unix-timestamp.js").UnixTimestamp | null;
1384
1366
  start_time_scheduled: number & {
1385
1367
  __brand: "UnixTimestamp";
1386
- } & z.BRAND<"UnixTimestamp">;
1368
+ };
1387
1369
  system_status: "waiting" | "processing" | "complete" | "error";
1388
1370
  vehicle_ids: number[];
1389
1371
  _id?: string | undefined;
@@ -1520,7 +1502,6 @@ 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
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1524
1505
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1525
1506
  agency_id: z.ZodOptional<z.ZodString>;
1526
1507
  line_id: z.ZodOptional<z.ZodNumber>;
@@ -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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
1975
- end_time_scheduled: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
1993
- seen_last_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
1994
- start_time_observed: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
1995
- start_time_scheduled: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
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?: (number & {
2105
- __brand: "UnixTimestamp";
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?: (number & {
2129
- __brand: "UnixTimestamp";
2130
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
2131
- seen_last_at?: (number & {
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 interface Ride extends Omit<z.infer<typeof RideSchema>, 'created_at' | 'end_time_observed' | 'end_time_scheduled' | 'operational_date' | 'seen_first_at' | 'seen_last_at' | 'start_time_observed' | 'start_time_scheduled' | 'updated_at'> {
2274
- created_at: UnixTimestamp;
2275
- end_time_observed: null | UnixTimestamp;
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, {
@@ -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 { validateUnixTimestamp } from '../_common/unix-timestamp.js';
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: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
36
- end_time_scheduled: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
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: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
55
- seen_last_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
56
- start_time_observed: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
57
- start_time_scheduled: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
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.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
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: (number & {
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: (number & {
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 interface SamAnalysis extends Omit<z.infer<typeof SamAnalysisSchema>, 'end_time' | 'start_time'> {
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 { validateUnixTimestamp } from '../_common/unix-timestamp.js';
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: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
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: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
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(),