@tmlmobilidade/types 20250909.1559.44 → 20250910.1344.34

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 (35) hide show
  1. package/dist/src/_common/comment.d.ts +20 -12
  2. package/dist/src/_common/comment.js +0 -1
  3. package/dist/src/_common/document.d.ts +14 -8
  4. package/dist/src/_common/document.js +4 -2
  5. package/dist/src/_common/proposed-change.d.ts +37 -19
  6. package/dist/src/agency.d.ts +30 -12
  7. package/dist/src/alert.d.ts +21 -12
  8. package/dist/src/auth/role.d.ts +30 -12
  9. package/dist/src/auth/session.d.ts +30 -12
  10. package/dist/src/auth/user.d.ts +30 -12
  11. package/dist/src/auth/verification-token.d.ts +30 -12
  12. package/dist/src/file.d.ts +23 -23
  13. package/dist/src/organization.d.ts +30 -12
  14. package/dist/src/plans/gtfs-validation.d.ts +30 -12
  15. package/dist/src/plans/plan.d.ts +30 -12
  16. package/dist/src/rides/index.d.ts +2 -1
  17. package/dist/src/rides/index.js +2 -1
  18. package/dist/src/rides/ride-audit.d.ts +219 -0
  19. package/dist/src/rides/ride-audit.js +12 -0
  20. package/dist/src/rides/ride-justification.d.ts +447 -0
  21. package/dist/src/rides/ride-justification.js +43 -0
  22. package/dist/src/rides/ride-overrides.d.ts +9 -0
  23. package/dist/src/rides/ride-overrides.js +6 -0
  24. package/dist/src/rides/ride.d.ts +38 -20
  25. package/dist/src/sams/sam.d.ts +30 -12
  26. package/dist/src/simplified-apex/simplified-apex-location.d.ts +32 -20
  27. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +32 -20
  28. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +32 -20
  29. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +32 -20
  30. package/dist/src/stop.d.ts +146 -101
  31. package/dist/src/vehicle-event.d.ts +18 -12
  32. package/dist/src/zone.d.ts +24 -6
  33. package/package.json +1 -1
  34. package/dist/src/rides/ride-annotation.d.ts +0 -579
  35. package/dist/src/rides/ride-annotation.js +0 -34
@@ -0,0 +1,43 @@
1
+ /* * */
2
+ import { CommentSchema } from '../_common/comment.js';
3
+ import { DocumentSchema } from '../_common/document.js';
4
+ import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
5
+ import { RideAnalysisSchema } from './ride-analysis.js';
6
+ import { z } from 'zod';
7
+ /* * */
8
+ export const RIDE_ACCEPTANCE_STATUS_OPTIONS = ['justification_required', 'under_review', 'accepted', 'rejected'];
9
+ export const RideAcceptanceStatusSchema = z.enum(RIDE_ACCEPTANCE_STATUS_OPTIONS);
10
+ /* * */
11
+ export const RideJustificationChangelogSchema = z.object({
12
+ acceptance_status: RideAcceptanceStatusSchema,
13
+ analysis_result: RideAnalysisSchema,
14
+ created_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
15
+ created_by: z.string().min(2).max(100),
16
+ }).strict();
17
+ /* * */
18
+ export const RIDE_JUSTIFICATION_TYPE_OPTIONS = ['traffic_accident', 'traffic_delay', 'accepted', 'rejected'];
19
+ export const RideJustificationTypeSchema = z.enum(RIDE_JUSTIFICATION_TYPE_OPTIONS);
20
+ /* * */
21
+ export const RideJustificationSchema = DocumentSchema.extend({
22
+ acceptance_status: RideAcceptanceStatusSchema,
23
+ changelog: z.array(RideJustificationChangelogSchema).default([]),
24
+ comments: z.array(CommentSchema).default([]),
25
+ pto_message: z.string().min(2).max(5000).default(''),
26
+ }).strict();
27
+ export const CreateRideJustificationSchema = RideJustificationSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
28
+ export const UpdateRideJustificationSchema = CreateRideJustificationSchema.partial();
29
+ // const example: RideJustification = {
30
+ // _id: '64b64f4f8f1d2c001f6e4b8a',
31
+ // acceptance_status: 'rejected',
32
+ // analysis_result: null,
33
+ // changelog: [
34
+ // {
35
+ // acceptance_status: 'justification_required',
36
+ // created_at: 1690400000 as UnixTimestamp,
37
+ // created_by: 'joao',
38
+ // },
39
+ // ],
40
+ // comments: [],
41
+ // created_by: 'joao',
42
+ // pto_message: '',
43
+ // };
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const RideOverridesSchema: z.ZodObject<{
3
+ trip_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4
+ }, "strict", z.ZodTypeAny, {
5
+ trip_id: string | null;
6
+ }, {
7
+ trip_id?: string | null | undefined;
8
+ }>;
9
+ export type RideOverrides = z.infer<typeof RideOverridesSchema>;
@@ -0,0 +1,6 @@
1
+ /* * */
2
+ import { z } from 'zod';
3
+ /* * */
4
+ export const RideOverridesSchema = z.object({
5
+ trip_id: z.string().nullable().default(null),
6
+ }).strict();
@@ -3,8 +3,10 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
3
3
  import { z } from 'zod';
4
4
  export declare const RideSchema: z.ZodObject<{
5
5
  _id: z.ZodString;
6
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
7
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
7
+ created_by: z.ZodDefault<z.ZodString>;
8
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
9
+ updated_by: z.ZodDefault<z.ZodString>;
8
10
  } & {
9
11
  agency_id: z.ZodString;
10
12
  analysis: z.ZodNullable<z.ZodObject<{
@@ -481,9 +483,16 @@ export declare const RideSchema: z.ZodObject<{
481
483
  vehicle_ids: z.ZodArray<z.ZodNumber, "many">;
482
484
  }, "strip", z.ZodTypeAny, {
483
485
  _id: string;
486
+ created_at: number & {
487
+ __brand: "UnixTimestamp";
488
+ } & z.BRAND<"UnixTimestamp">;
489
+ created_by: string;
490
+ updated_at: number & {
491
+ __brand: "UnixTimestamp";
492
+ } & z.BRAND<"UnixTimestamp">;
493
+ updated_by: string;
484
494
  agency_id: string;
485
495
  line_id: number;
486
- trip_id: string;
487
496
  analysis: {
488
497
  EXPECTED_DRIVER_ID_QTY: {
489
498
  value: number | null;
@@ -620,18 +629,14 @@ export declare const RideSchema: z.ZodObject<{
620
629
  __brand: "UnixTimestamp";
621
630
  } & z.BRAND<"UnixTimestamp">;
622
631
  system_status: "waiting" | "processing" | "complete" | "error";
632
+ trip_id: string;
623
633
  vehicle_ids: number[];
624
- created_at?: (number & {
625
- __brand: "UnixTimestamp";
626
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
627
- updated_at?: (number & {
628
- __brand: "UnixTimestamp";
629
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
630
634
  }, {
631
635
  _id: string;
636
+ created_at: number;
637
+ updated_at: number;
632
638
  agency_id: string;
633
639
  line_id: number;
634
- trip_id: string;
635
640
  analysis: {
636
641
  EXPECTED_DRIVER_ID_QTY: {
637
642
  value: number | null;
@@ -753,18 +758,20 @@ export declare const RideSchema: z.ZodObject<{
753
758
  seen_last_at: number | null;
754
759
  start_time_observed: number | null;
755
760
  start_time_scheduled: number;
761
+ trip_id: string;
756
762
  vehicle_ids: number[];
757
- created_at?: number | null | undefined;
758
- updated_at?: number | null | undefined;
763
+ created_by?: string | undefined;
764
+ updated_by?: string | undefined;
759
765
  system_status?: "waiting" | "processing" | "complete" | "error" | undefined;
760
766
  }>;
761
767
  export declare const CreateRideSchema: z.ZodObject<Omit<{
762
768
  _id: z.ZodOptional<z.ZodString>;
763
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
764
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
769
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
770
+ created_by: z.ZodDefault<z.ZodString>;
771
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
772
+ updated_by: z.ZodDefault<z.ZodString>;
765
773
  agency_id: z.ZodString;
766
774
  line_id: z.ZodNumber;
767
- trip_id: z.ZodString;
768
775
  analysis: z.ZodNullable<z.ZodObject<{
769
776
  AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: z.ZodObject<{
770
777
  error_message: z.ZodOptional<z.ZodString>;
@@ -1234,11 +1241,13 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1234
1241
  start_time_observed: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
1235
1242
  start_time_scheduled: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
1236
1243
  system_status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
1244
+ trip_id: z.ZodString;
1237
1245
  vehicle_ids: z.ZodArray<z.ZodNumber, "many">;
1238
1246
  }, "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
1247
+ created_by: string;
1248
+ updated_by: string;
1239
1249
  agency_id: string;
1240
1250
  line_id: number;
1241
- trip_id: string;
1242
1251
  analysis: {
1243
1252
  EXPECTED_DRIVER_ID_QTY: {
1244
1253
  value: number | null;
@@ -1375,12 +1384,12 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1375
1384
  __brand: "UnixTimestamp";
1376
1385
  } & z.BRAND<"UnixTimestamp">;
1377
1386
  system_status: "waiting" | "processing" | "complete" | "error";
1387
+ trip_id: string;
1378
1388
  vehicle_ids: number[];
1379
1389
  _id?: string | undefined;
1380
1390
  }, {
1381
1391
  agency_id: string;
1382
1392
  line_id: number;
1383
- trip_id: string;
1384
1393
  analysis: {
1385
1394
  EXPECTED_DRIVER_ID_QTY: {
1386
1395
  value: number | null;
@@ -1502,15 +1511,19 @@ export declare const CreateRideSchema: z.ZodObject<Omit<{
1502
1511
  seen_last_at: number | null;
1503
1512
  start_time_observed: number | null;
1504
1513
  start_time_scheduled: number;
1514
+ trip_id: string;
1505
1515
  vehicle_ids: number[];
1506
1516
  _id?: string | undefined;
1517
+ created_by?: string | undefined;
1518
+ updated_by?: string | undefined;
1507
1519
  system_status?: "waiting" | "processing" | "complete" | "error" | undefined;
1508
1520
  }>;
1509
1521
  export declare const UpdateRideSchema: z.ZodObject<{
1510
1522
  _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
1523
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1524
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
1511
1525
  agency_id: z.ZodOptional<z.ZodString>;
1512
1526
  line_id: z.ZodOptional<z.ZodNumber>;
1513
- trip_id: z.ZodOptional<z.ZodString>;
1514
1527
  analysis: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1515
1528
  AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: z.ZodObject<{
1516
1529
  error_message: z.ZodOptional<z.ZodString>;
@@ -1980,12 +1993,14 @@ export declare const UpdateRideSchema: z.ZodObject<{
1980
1993
  start_time_observed: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
1981
1994
  start_time_scheduled: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
1982
1995
  system_status: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>>;
1996
+ trip_id: z.ZodOptional<z.ZodString>;
1983
1997
  vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
1984
1998
  }, "strip", z.ZodTypeAny, {
1985
1999
  _id?: string | undefined;
2000
+ created_by?: string | undefined;
2001
+ updated_by?: string | undefined;
1986
2002
  agency_id?: string | undefined;
1987
2003
  line_id?: number | undefined;
1988
- trip_id?: string | undefined;
1989
2004
  analysis?: {
1990
2005
  EXPECTED_DRIVER_ID_QTY: {
1991
2006
  value: number | null;
@@ -2122,12 +2137,14 @@ export declare const UpdateRideSchema: z.ZodObject<{
2122
2137
  __brand: "UnixTimestamp";
2123
2138
  } & z.BRAND<"UnixTimestamp">) | undefined;
2124
2139
  system_status?: "waiting" | "processing" | "complete" | "error" | undefined;
2140
+ trip_id?: string | undefined;
2125
2141
  vehicle_ids?: number[] | undefined;
2126
2142
  }, {
2127
2143
  _id?: string | undefined;
2144
+ created_by?: string | undefined;
2145
+ updated_by?: string | undefined;
2128
2146
  agency_id?: string | undefined;
2129
2147
  line_id?: number | undefined;
2130
- trip_id?: string | undefined;
2131
2148
  analysis?: {
2132
2149
  EXPECTED_DRIVER_ID_QTY: {
2133
2150
  value: number | null;
@@ -2250,6 +2267,7 @@ export declare const UpdateRideSchema: z.ZodObject<{
2250
2267
  start_time_observed?: number | null | undefined;
2251
2268
  start_time_scheduled?: number | undefined;
2252
2269
  system_status?: "waiting" | "processing" | "complete" | "error" | undefined;
2270
+ trip_id?: string | undefined;
2253
2271
  vehicle_ids?: number[] | undefined;
2254
2272
  }>;
2255
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'> {
@@ -2,8 +2,10 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
2
  import { type SamAnalysis } from './sam-analysis.js';
3
3
  import { z } from 'zod';
4
4
  export declare const SamSchema: z.ZodObject<{
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  _id: z.ZodNumber;
9
11
  agency_id: z.ZodString;
@@ -67,6 +69,14 @@ export declare const SamSchema: z.ZodObject<{
67
69
  transactions_missing: z.ZodNullable<z.ZodNumber>;
68
70
  }, "strict", z.ZodTypeAny, {
69
71
  _id: number;
72
+ created_at: number & {
73
+ __brand: "UnixTimestamp";
74
+ } & z.BRAND<"UnixTimestamp">;
75
+ created_by: string;
76
+ updated_at: number & {
77
+ __brand: "UnixTimestamp";
78
+ } & z.BRAND<"UnixTimestamp">;
79
+ updated_by: string;
70
80
  agency_id: string;
71
81
  analysis: {
72
82
  apex_version: string | null;
@@ -100,14 +110,10 @@ export declare const SamSchema: z.ZodObject<{
100
110
  transactions_missing: number | null;
101
111
  latest_apex_version: string | null;
102
112
  remarks: string | null;
103
- created_at?: (number & {
104
- __brand: "UnixTimestamp";
105
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
106
- updated_at?: (number & {
107
- __brand: "UnixTimestamp";
108
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
109
113
  }, {
110
114
  _id: number;
115
+ created_at: number;
116
+ updated_at: number;
111
117
  agency_id: string;
112
118
  seen_first_at: number | null;
113
119
  seen_last_at: number | null;
@@ -115,8 +121,8 @@ export declare const SamSchema: z.ZodObject<{
115
121
  transactions_found: number | null;
116
122
  transactions_missing: number | null;
117
123
  latest_apex_version: string | null;
118
- created_at?: number | null | undefined;
119
- updated_at?: number | null | undefined;
124
+ created_by?: string | undefined;
125
+ updated_by?: string | undefined;
120
126
  analysis?: {
121
127
  apex_version: string | null;
122
128
  device_id: string | null;
@@ -137,8 +143,10 @@ export declare const SamSchema: z.ZodObject<{
137
143
  remarks?: string | null | undefined;
138
144
  }>;
139
145
  export declare const CreateSamSchema: z.ZodObject<Omit<{
140
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
141
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
146
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
147
+ created_by: z.ZodDefault<z.ZodString>;
148
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
149
+ updated_by: z.ZodDefault<z.ZodString>;
142
150
  } & {
143
151
  _id: z.ZodNumber;
144
152
  agency_id: z.ZodString;
@@ -202,6 +210,8 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
202
210
  transactions_missing: z.ZodNullable<z.ZodNumber>;
203
211
  }, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
204
212
  _id: number;
213
+ created_by: string;
214
+ updated_by: string;
205
215
  agency_id: string;
206
216
  analysis: {
207
217
  apex_version: string | null;
@@ -244,6 +254,8 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
244
254
  transactions_found: number | null;
245
255
  transactions_missing: number | null;
246
256
  latest_apex_version: string | null;
257
+ created_by?: string | undefined;
258
+ updated_by?: string | undefined;
247
259
  analysis?: {
248
260
  apex_version: string | null;
249
261
  device_id: string | null;
@@ -265,6 +277,8 @@ export declare const CreateSamSchema: z.ZodObject<Omit<{
265
277
  }>;
266
278
  export declare const UpdateSamSchema: z.ZodObject<{
267
279
  _id: z.ZodOptional<z.ZodNumber>;
280
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
281
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
268
282
  agency_id: z.ZodOptional<z.ZodString>;
269
283
  analysis: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
270
284
  apex_version: z.ZodNullable<z.ZodString>;
@@ -326,6 +340,8 @@ export declare const UpdateSamSchema: z.ZodObject<{
326
340
  remarks: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodString>>>;
327
341
  }, "strict", z.ZodTypeAny, {
328
342
  _id?: number | undefined;
343
+ created_by?: string | undefined;
344
+ updated_by?: string | undefined;
329
345
  agency_id?: string | undefined;
330
346
  analysis?: {
331
347
  apex_version: string | null;
@@ -361,6 +377,8 @@ export declare const UpdateSamSchema: z.ZodObject<{
361
377
  remarks?: string | null | undefined;
362
378
  }, {
363
379
  _id?: number | undefined;
380
+ created_by?: string | undefined;
381
+ updated_by?: string | undefined;
364
382
  agency_id?: string | undefined;
365
383
  analysis?: {
366
384
  apex_version: string | null;
@@ -2,8 +2,10 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
2
  import { z } from 'zod';
3
3
  export declare const SimplifiedApexLocationSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  agency_id: z.ZodString;
9
11
  apex_version: z.ZodString;
@@ -18,10 +20,18 @@ export declare const SimplifiedApexLocationSchema: z.ZodObject<{
18
20
  vehicle_id: z.ZodNumber;
19
21
  }, "strict", z.ZodTypeAny, {
20
22
  _id: string;
23
+ created_at: number & {
24
+ __brand: "UnixTimestamp";
25
+ } & z.BRAND<"UnixTimestamp">;
26
+ created_by: string;
27
+ updated_at: number & {
28
+ __brand: "UnixTimestamp";
29
+ } & z.BRAND<"UnixTimestamp">;
30
+ updated_by: string;
21
31
  agency_id: string;
22
32
  line_id: string;
23
- trip_id: string;
24
33
  pattern_id: string;
34
+ trip_id: string;
25
35
  apex_version: string;
26
36
  device_id: string;
27
37
  vehicle_id: number;
@@ -31,18 +41,14 @@ export declare const SimplifiedApexLocationSchema: z.ZodObject<{
31
41
  __brand: "UnixTimestamp";
32
42
  } & z.BRAND<"UnixTimestamp">;
33
43
  stop_id: string;
34
- created_at?: (number & {
35
- __brand: "UnixTimestamp";
36
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
37
- updated_at?: (number & {
38
- __brand: "UnixTimestamp";
39
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
40
44
  }, {
41
45
  _id: string;
46
+ created_at: number;
47
+ updated_at: number;
42
48
  agency_id: string;
43
49
  line_id: string;
44
- trip_id: string;
45
50
  pattern_id: string;
51
+ trip_id: string;
46
52
  apex_version: string;
47
53
  device_id: string;
48
54
  vehicle_id: number;
@@ -50,13 +56,15 @@ export declare const SimplifiedApexLocationSchema: z.ZodObject<{
50
56
  mac_sam_serial_number: number;
51
57
  received_at: number;
52
58
  stop_id: string;
53
- created_at?: number | null | undefined;
54
- updated_at?: number | null | undefined;
59
+ created_by?: string | undefined;
60
+ updated_by?: string | undefined;
55
61
  }>;
56
62
  export declare const UpdateSimplifiedApexLocationSchema: z.ZodObject<{
57
63
  _id: z.ZodOptional<z.ZodString>;
58
- created_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
59
- updated_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
64
+ created_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
65
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
66
+ updated_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
67
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
60
68
  agency_id: z.ZodOptional<z.ZodString>;
61
69
  apex_version: z.ZodOptional<z.ZodString>;
62
70
  device_id: z.ZodOptional<z.ZodString>;
@@ -72,14 +80,16 @@ export declare const UpdateSimplifiedApexLocationSchema: z.ZodObject<{
72
80
  _id?: string | undefined;
73
81
  created_at?: (number & {
74
82
  __brand: "UnixTimestamp";
75
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
83
+ } & z.BRAND<"UnixTimestamp">) | undefined;
84
+ created_by?: string | undefined;
76
85
  updated_at?: (number & {
77
86
  __brand: "UnixTimestamp";
78
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
87
+ } & z.BRAND<"UnixTimestamp">) | undefined;
88
+ updated_by?: string | undefined;
79
89
  agency_id?: string | undefined;
80
90
  line_id?: string | undefined;
81
- trip_id?: string | undefined;
82
91
  pattern_id?: string | undefined;
92
+ trip_id?: string | undefined;
83
93
  apex_version?: string | undefined;
84
94
  device_id?: string | undefined;
85
95
  vehicle_id?: number | undefined;
@@ -91,12 +101,14 @@ export declare const UpdateSimplifiedApexLocationSchema: z.ZodObject<{
91
101
  stop_id?: string | undefined;
92
102
  }, {
93
103
  _id?: string | undefined;
94
- created_at?: number | null | undefined;
95
- updated_at?: number | null | undefined;
104
+ created_at?: number | undefined;
105
+ created_by?: string | undefined;
106
+ updated_at?: number | undefined;
107
+ updated_by?: string | undefined;
96
108
  agency_id?: string | undefined;
97
109
  line_id?: string | undefined;
98
- trip_id?: string | undefined;
99
110
  pattern_id?: string | undefined;
111
+ trip_id?: string | undefined;
100
112
  apex_version?: string | undefined;
101
113
  device_id?: string | undefined;
102
114
  vehicle_id?: number | undefined;
@@ -2,8 +2,10 @@ import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
2
  import { z } from 'zod';
3
3
  export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
4
4
  _id: z.ZodString;
5
- created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
6
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
5
+ created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
6
+ created_by: z.ZodDefault<z.ZodString>;
7
+ updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
8
+ updated_by: z.ZodDefault<z.ZodString>;
7
9
  } & {
8
10
  agency_id: z.ZodString;
9
11
  apex_version: z.ZodString;
@@ -28,11 +30,19 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
28
30
  vehicle_id: z.ZodNullable<z.ZodNumber>;
29
31
  }, "strict", z.ZodTypeAny, {
30
32
  _id: string;
33
+ created_at: number & {
34
+ __brand: "UnixTimestamp";
35
+ } & z.BRAND<"UnixTimestamp">;
36
+ created_by: string;
37
+ updated_at: number & {
38
+ __brand: "UnixTimestamp";
39
+ } & z.BRAND<"UnixTimestamp">;
40
+ updated_by: string;
31
41
  agency_id: string;
32
42
  line_id: string | null;
33
43
  validation_id: string | null;
34
- trip_id: string | null;
35
44
  pattern_id: string | null;
45
+ trip_id: string | null;
36
46
  apex_version: string;
37
47
  device_id: string;
38
48
  vehicle_id: number | null;
@@ -51,19 +61,15 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
51
61
  price: number;
52
62
  product_long_id: string;
53
63
  product_quantity: number;
54
- created_at?: (number & {
55
- __brand: "UnixTimestamp";
56
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
57
- updated_at?: (number & {
58
- __brand: "UnixTimestamp";
59
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
60
64
  }, {
61
65
  _id: string;
66
+ created_at: number;
67
+ updated_at: number;
62
68
  agency_id: string;
63
69
  line_id: string | null;
64
70
  validation_id: string | null;
65
- trip_id: string | null;
66
71
  pattern_id: string | null;
72
+ trip_id: string | null;
67
73
  apex_version: string;
68
74
  device_id: string;
69
75
  vehicle_id: number | null;
@@ -80,13 +86,15 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
80
86
  price: number;
81
87
  product_long_id: string;
82
88
  product_quantity: number;
83
- created_at?: number | null | undefined;
84
- updated_at?: number | null | undefined;
89
+ created_by?: string | undefined;
90
+ updated_by?: string | undefined;
85
91
  }>;
86
92
  export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
87
93
  _id: z.ZodOptional<z.ZodString>;
88
- created_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
89
- updated_at: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>>;
94
+ created_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
95
+ created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
96
+ updated_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
97
+ updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
90
98
  agency_id: z.ZodOptional<z.ZodString>;
91
99
  apex_version: z.ZodOptional<z.ZodString>;
92
100
  block_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -112,15 +120,17 @@ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
112
120
  _id?: string | undefined;
113
121
  created_at?: (number & {
114
122
  __brand: "UnixTimestamp";
115
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
123
+ } & z.BRAND<"UnixTimestamp">) | undefined;
124
+ created_by?: string | undefined;
116
125
  updated_at?: (number & {
117
126
  __brand: "UnixTimestamp";
118
- } & z.BRAND<"UnixTimestamp">) | null | undefined;
127
+ } & z.BRAND<"UnixTimestamp">) | undefined;
128
+ updated_by?: string | undefined;
119
129
  agency_id?: string | undefined;
120
130
  line_id?: string | null | undefined;
121
131
  validation_id?: string | null | undefined;
122
- trip_id?: string | null | undefined;
123
132
  pattern_id?: string | null | undefined;
133
+ trip_id?: string | null | undefined;
124
134
  apex_version?: string | undefined;
125
135
  device_id?: string | undefined;
126
136
  vehicle_id?: number | null | undefined;
@@ -141,13 +151,15 @@ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
141
151
  product_quantity?: number | undefined;
142
152
  }, {
143
153
  _id?: string | undefined;
144
- created_at?: number | null | undefined;
145
- updated_at?: number | null | undefined;
154
+ created_at?: number | undefined;
155
+ created_by?: string | undefined;
156
+ updated_at?: number | undefined;
157
+ updated_by?: string | undefined;
146
158
  agency_id?: string | undefined;
147
159
  line_id?: string | null | undefined;
148
160
  validation_id?: string | null | undefined;
149
- trip_id?: string | null | undefined;
150
161
  pattern_id?: string | null | undefined;
162
+ trip_id?: string | null | undefined;
151
163
  apex_version?: string | undefined;
152
164
  device_id?: string | undefined;
153
165
  vehicle_id?: number | null | undefined;