@tmlmobilidade/types 20250910.1541.13 → 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 +52 -1168
  28. package/dist/src/rides/ride-audit.js +3 -5
  29. package/dist/src/rides/ride-justification.d.ts +84 -9
  30. package/dist/src/rides/ride-justification.js +4 -1
  31. package/dist/src/rides/ride.d.ts +54 -105
  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 +16 -23
  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 +16 -23
  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 +27 -37
  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 +16 -23
  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 +7 -12
  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,10 +1,9 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
4
3
  _id: z.ZodString;
5
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
6
5
  created_by: z.ZodDefault<z.ZodString>;
7
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
8
7
  updated_by: z.ZodDefault<z.ZodString>;
9
8
  } & {
10
9
  agency_id: z.ZodString;
@@ -23,7 +22,7 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
23
22
  price: z.ZodNumber;
24
23
  product_long_id: z.ZodString;
25
24
  product_quantity: z.ZodNumber;
26
- received_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
25
+ received_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
27
26
  stop_id: z.ZodNullable<z.ZodString>;
28
27
  trip_id: z.ZodNullable<z.ZodString>;
29
28
  validation_id: z.ZodNullable<z.ZodString>;
@@ -41,8 +40,8 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
41
40
  agency_id: string;
42
41
  line_id: string | null;
43
42
  validation_id: string | null;
44
- pattern_id: string | null;
45
43
  trip_id: string | null;
44
+ pattern_id: string | null;
46
45
  apex_version: string;
47
46
  device_id: string;
48
47
  vehicle_id: number | null;
@@ -50,7 +49,7 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
50
49
  mac_sam_serial_number: number;
51
50
  received_at: number & {
52
51
  __brand: "UnixTimestamp";
53
- } & z.BRAND<"UnixTimestamp">;
52
+ };
54
53
  stop_id: string | null;
55
54
  block_id: string | null;
56
55
  card_physical_type: number;
@@ -68,8 +67,8 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
68
67
  agency_id: string;
69
68
  line_id: string | null;
70
69
  validation_id: string | null;
71
- pattern_id: string | null;
72
70
  trip_id: string | null;
71
+ pattern_id: string | null;
73
72
  apex_version: string;
74
73
  device_id: string;
75
74
  vehicle_id: number | null;
@@ -91,9 +90,9 @@ export declare const SimplifiedApexOnBoardRefundSchema: z.ZodObject<{
91
90
  }>;
92
91
  export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
93
92
  _id: z.ZodOptional<z.ZodString>;
94
- created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
93
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
95
94
  created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
96
- updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
95
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
97
96
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
98
97
  agency_id: z.ZodOptional<z.ZodString>;
99
98
  apex_version: z.ZodOptional<z.ZodString>;
@@ -111,30 +110,28 @@ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
111
110
  price: z.ZodOptional<z.ZodNumber>;
112
111
  product_long_id: z.ZodOptional<z.ZodString>;
113
112
  product_quantity: z.ZodOptional<z.ZodNumber>;
114
- received_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
113
+ received_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
115
114
  stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
115
  trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
116
  validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
117
  vehicle_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
119
118
  }, "strict", z.ZodTypeAny, {
120
119
  _id?: string | undefined;
121
- created_at?: UnixTimestamp | undefined;
120
+ created_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
122
121
  created_by?: string | undefined;
123
- updated_at?: UnixTimestamp | undefined;
122
+ updated_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
124
123
  updated_by?: string | undefined;
125
124
  agency_id?: string | undefined;
126
125
  line_id?: string | null | undefined;
127
126
  validation_id?: string | null | undefined;
128
- pattern_id?: string | null | undefined;
129
127
  trip_id?: string | null | undefined;
128
+ pattern_id?: string | null | undefined;
130
129
  apex_version?: string | undefined;
131
130
  device_id?: string | undefined;
132
131
  vehicle_id?: number | null | undefined;
133
132
  mac_ase_counter_value?: number | undefined;
134
133
  mac_sam_serial_number?: number | undefined;
135
- received_at?: (number & {
136
- __brand: "UnixTimestamp";
137
- } & z.BRAND<"UnixTimestamp">) | undefined;
134
+ received_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
138
135
  stop_id?: string | null | undefined;
139
136
  block_id?: string | null | undefined;
140
137
  card_physical_type?: number | undefined;
@@ -154,8 +151,8 @@ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
154
151
  agency_id?: string | undefined;
155
152
  line_id?: string | null | undefined;
156
153
  validation_id?: string | null | undefined;
157
- pattern_id?: string | null | undefined;
158
154
  trip_id?: string | null | undefined;
155
+ pattern_id?: string | null | undefined;
159
156
  apex_version?: string | undefined;
160
157
  device_id?: string | undefined;
161
158
  vehicle_id?: number | null | undefined;
@@ -180,9 +177,5 @@ export declare const UpdateSimplifiedApexOnBoardRefundSchema: z.ZodObject<{
180
177
  * for on-board ticket sales inside vehicles only. Refunds of tickets when inside vehicles also generate a validation transaction.
181
178
  * Refunds can be refunded, and refunds are also APEX transactions of type 3.
182
179
  */
183
- export interface SimplifiedApexOnBoardRefund extends Omit<z.infer<typeof SimplifiedApexOnBoardRefundSchema>, 'created_at' | 'received_at' | 'updated_at'> {
184
- created_at: UnixTimestamp;
185
- received_at: UnixTimestamp;
186
- updated_at: UnixTimestamp;
187
- }
188
- export type UpdateSimplifiedApexOnBoardRefundDto = Partial<SimplifiedApexOnBoardRefund>;
180
+ export type SimplifiedApexOnBoardRefund = z.infer<typeof SimplifiedApexOnBoardRefundSchema>;
181
+ export type UpdateSimplifiedApexOnBoardRefundDto = z.infer<typeof UpdateSimplifiedApexOnBoardRefundSchema>;
@@ -1,6 +1,6 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
3
+ import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const SimplifiedApexOnBoardRefundSchema = DocumentSchema.extend({
@@ -20,7 +20,7 @@ export const SimplifiedApexOnBoardRefundSchema = DocumentSchema.extend({
20
20
  price: z.number(),
21
21
  product_long_id: z.string(),
22
22
  product_quantity: z.number(),
23
- received_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
23
+ received_at: unixTimeStampSchema,
24
24
  stop_id: z.string().nullable(),
25
25
  trip_id: z.string().nullable(),
26
26
  validation_id: z.string().nullable(),
@@ -1,10 +1,9 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
4
3
  _id: z.ZodString;
5
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
6
5
  created_by: z.ZodDefault<z.ZodString>;
7
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
8
7
  updated_by: z.ZodDefault<z.ZodString>;
9
8
  } & {
10
9
  agency_id: z.ZodString;
@@ -24,7 +23,7 @@ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
24
23
  price: z.ZodNumber;
25
24
  product_long_id: z.ZodString;
26
25
  product_quantity: z.ZodNumber;
27
- received_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
26
+ received_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
28
27
  stop_id: z.ZodNullable<z.ZodString>;
29
28
  trip_id: z.ZodNullable<z.ZodString>;
30
29
  validation_id: z.ZodNullable<z.ZodString>;
@@ -42,8 +41,8 @@ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
42
41
  agency_id: string;
43
42
  line_id: string | null;
44
43
  validation_id: string | null;
45
- pattern_id: string | null;
46
44
  trip_id: string | null;
45
+ pattern_id: string | null;
47
46
  apex_version: string;
48
47
  device_id: string;
49
48
  vehicle_id: number | null;
@@ -51,7 +50,7 @@ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
51
50
  mac_sam_serial_number: number;
52
51
  received_at: number & {
53
52
  __brand: "UnixTimestamp";
54
- } & z.BRAND<"UnixTimestamp">;
53
+ };
55
54
  stop_id: string | null;
56
55
  block_id: string | null;
57
56
  card_physical_type: number;
@@ -70,8 +69,8 @@ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
70
69
  agency_id: string;
71
70
  line_id: string | null;
72
71
  validation_id: string | null;
73
- pattern_id: string | null;
74
72
  trip_id: string | null;
73
+ pattern_id: string | null;
75
74
  apex_version: string;
76
75
  device_id: string;
77
76
  vehicle_id: number | null;
@@ -94,51 +93,47 @@ export declare const SimplifiedApexOnBoardSaleSchema: z.ZodObject<{
94
93
  }>;
95
94
  export declare const UpdateSimplifiedApexOnBoardSaleSchema: z.ZodObject<{
96
95
  _id: z.ZodOptional<z.ZodString>;
97
- created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
98
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
99
- updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
96
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
97
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
100
98
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
101
99
  agency_id: z.ZodOptional<z.ZodString>;
100
+ line_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
+ validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ pattern_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
104
  apex_version: z.ZodOptional<z.ZodString>;
105
+ device_id: z.ZodOptional<z.ZodString>;
106
+ vehicle_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
107
+ mac_ase_counter_value: z.ZodOptional<z.ZodNumber>;
108
+ mac_sam_serial_number: z.ZodOptional<z.ZodNumber>;
109
+ received_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
110
+ stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
111
  block_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
112
  card_physical_type: z.ZodOptional<z.ZodNumber>;
105
113
  card_serial_number: z.ZodOptional<z.ZodString>;
106
- device_id: z.ZodOptional<z.ZodString>;
107
114
  duty_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
- is_passenger: z.ZodOptional<z.ZodBoolean>;
109
- line_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
110
- mac_ase_counter_value: z.ZodOptional<z.ZodNumber>;
111
- mac_sam_serial_number: z.ZodOptional<z.ZodNumber>;
112
- on_board_refund_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
- pattern_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
115
  payment_method: z.ZodOptional<z.ZodNumber>;
115
116
  price: z.ZodOptional<z.ZodNumber>;
116
117
  product_long_id: z.ZodOptional<z.ZodString>;
117
118
  product_quantity: z.ZodOptional<z.ZodNumber>;
118
- received_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
119
- stop_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
- trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
- validation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
- vehicle_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
119
+ is_passenger: z.ZodOptional<z.ZodBoolean>;
120
+ on_board_refund_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
121
  }, "strict", z.ZodTypeAny, {
124
122
  _id?: string | undefined;
125
- created_at?: UnixTimestamp | undefined;
126
- created_by?: string | undefined;
127
- updated_at?: UnixTimestamp | undefined;
123
+ created_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
124
+ updated_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
128
125
  updated_by?: string | undefined;
129
126
  agency_id?: string | undefined;
130
127
  line_id?: string | null | undefined;
131
128
  validation_id?: string | null | undefined;
132
- pattern_id?: string | null | undefined;
133
129
  trip_id?: string | null | undefined;
130
+ pattern_id?: string | null | undefined;
134
131
  apex_version?: string | undefined;
135
132
  device_id?: string | undefined;
136
133
  vehicle_id?: number | null | undefined;
137
134
  mac_ase_counter_value?: number | undefined;
138
135
  mac_sam_serial_number?: number | undefined;
139
- received_at?: (number & {
140
- __brand: "UnixTimestamp";
141
- } & z.BRAND<"UnixTimestamp">) | undefined;
136
+ received_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
142
137
  stop_id?: string | null | undefined;
143
138
  block_id?: string | null | undefined;
144
139
  card_physical_type?: number | undefined;
@@ -153,14 +148,13 @@ export declare const UpdateSimplifiedApexOnBoardSaleSchema: z.ZodObject<{
153
148
  }, {
154
149
  _id?: string | undefined;
155
150
  created_at?: number | undefined;
156
- created_by?: string | undefined;
157
151
  updated_at?: number | undefined;
158
152
  updated_by?: string | undefined;
159
153
  agency_id?: string | undefined;
160
154
  line_id?: string | null | undefined;
161
155
  validation_id?: string | null | undefined;
162
- pattern_id?: string | null | undefined;
163
156
  trip_id?: string | null | undefined;
157
+ pattern_id?: string | null | undefined;
164
158
  apex_version?: string | undefined;
165
159
  device_id?: string | undefined;
166
160
  vehicle_id?: number | null | undefined;
@@ -186,9 +180,5 @@ export declare const UpdateSimplifiedApexOnBoardSaleSchema: z.ZodObject<{
186
180
  * for on-board ticket sales inside vehicles only. Sales of tickets when inside vehicles also generate a validation transaction.
187
181
  * Sales can be refunded, and refunds are also APEX transactions of type 3.
188
182
  */
189
- export interface SimplifiedApexOnBoardSale extends Omit<z.infer<typeof SimplifiedApexOnBoardSaleSchema>, 'created_at' | 'received_at' | 'updated_at'> {
190
- created_at: UnixTimestamp;
191
- received_at: UnixTimestamp;
192
- updated_at: UnixTimestamp;
193
- }
194
- export type UpdateSimplifiedApexOnBoardSaleDto = Partial<SimplifiedApexOnBoardSale>;
183
+ export type SimplifiedApexOnBoardSale = z.infer<typeof SimplifiedApexOnBoardSaleSchema>;
184
+ export type UpdateSimplifiedApexOnBoardSaleDto = z.infer<typeof UpdateSimplifiedApexOnBoardSaleSchema>;
@@ -1,6 +1,6 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
3
+ import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const SimplifiedApexOnBoardSaleSchema = DocumentSchema.extend({
@@ -21,10 +21,10 @@ export const SimplifiedApexOnBoardSaleSchema = DocumentSchema.extend({
21
21
  price: z.number(),
22
22
  product_long_id: z.string(),
23
23
  product_quantity: z.number(),
24
- received_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
24
+ received_at: unixTimeStampSchema,
25
25
  stop_id: z.string().nullable(),
26
26
  trip_id: z.string().nullable(),
27
27
  validation_id: z.string().nullable(),
28
28
  vehicle_id: z.number().nullable(),
29
29
  }).strict();
30
- export const UpdateSimplifiedApexOnBoardSaleSchema = SimplifiedApexOnBoardSaleSchema.partial();
30
+ export const UpdateSimplifiedApexOnBoardSaleSchema = SimplifiedApexOnBoardSaleSchema.omit({ created_by: true }).partial();
@@ -1,4 +1,3 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const ApexValidationStatus: {
4
3
  /**
@@ -146,9 +145,9 @@ export declare const ApexValidationStatusSchema: z.ZodNativeEnum<{
146
145
  }>;
147
146
  export declare const SimplifiedApexValidationSchema: z.ZodObject<{
148
147
  _id: z.ZodString;
149
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
148
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
150
149
  created_by: z.ZodDefault<z.ZodString>;
151
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
150
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
152
151
  updated_by: z.ZodDefault<z.ZodString>;
153
152
  } & {
154
153
  agency_id: z.ZodString;
@@ -165,7 +164,7 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
165
164
  on_board_sale_id: z.ZodNullable<z.ZodString>;
166
165
  pattern_id: z.ZodString;
167
166
  product_id: z.ZodString;
168
- received_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
167
+ received_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
169
168
  stop_id: z.ZodString;
170
169
  trip_id: z.ZodString;
171
170
  units_qty: z.ZodNullable<z.ZodNumber>;
@@ -254,8 +253,8 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
254
253
  updated_by: string;
255
254
  agency_id: string;
256
255
  line_id: string;
257
- pattern_id: string;
258
256
  trip_id: string;
257
+ pattern_id: string;
259
258
  apex_version: string;
260
259
  device_id: string;
261
260
  vehicle_id: number;
@@ -263,7 +262,7 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
263
262
  mac_sam_serial_number: number;
264
263
  received_at: number & {
265
264
  __brand: "UnixTimestamp";
266
- } & z.BRAND<"UnixTimestamp">;
265
+ };
267
266
  stop_id: string;
268
267
  card_serial_number: string;
269
268
  on_board_sale_id: string | null;
@@ -280,8 +279,8 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
280
279
  updated_at: number;
281
280
  agency_id: string;
282
281
  line_id: string;
283
- pattern_id: string;
284
282
  trip_id: string;
283
+ pattern_id: string;
285
284
  apex_version: string;
286
285
  device_id: string;
287
286
  vehicle_id: number;
@@ -303,9 +302,9 @@ export declare const SimplifiedApexValidationSchema: z.ZodObject<{
303
302
  }>;
304
303
  export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
305
304
  _id: z.ZodOptional<z.ZodString>;
306
- created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
305
+ created_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
307
306
  created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
308
- updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>;
307
+ updated_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
309
308
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
310
309
  agency_id: z.ZodOptional<z.ZodString>;
311
310
  apex_version: z.ZodOptional<z.ZodString>;
@@ -321,7 +320,7 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
321
320
  on_board_sale_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
322
321
  pattern_id: z.ZodOptional<z.ZodString>;
323
322
  product_id: z.ZodOptional<z.ZodString>;
324
- received_at: z.ZodOptional<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
323
+ received_at: z.ZodOptional<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
325
324
  stop_id: z.ZodOptional<z.ZodString>;
326
325
  trip_id: z.ZodOptional<z.ZodString>;
327
326
  units_qty: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -400,22 +399,20 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
400
399
  vehicle_id: z.ZodOptional<z.ZodNumber>;
401
400
  }, "strict", z.ZodTypeAny, {
402
401
  _id?: string | undefined;
403
- created_at?: UnixTimestamp | undefined;
402
+ created_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
404
403
  created_by?: string | undefined;
405
- updated_at?: UnixTimestamp | undefined;
404
+ updated_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
406
405
  updated_by?: string | undefined;
407
406
  agency_id?: string | undefined;
408
407
  line_id?: string | undefined;
409
- pattern_id?: string | undefined;
410
408
  trip_id?: string | undefined;
409
+ pattern_id?: string | undefined;
411
410
  apex_version?: string | undefined;
412
411
  device_id?: string | undefined;
413
412
  vehicle_id?: number | undefined;
414
413
  mac_ase_counter_value?: number | undefined;
415
414
  mac_sam_serial_number?: number | undefined;
416
- received_at?: (number & {
417
- __brand: "UnixTimestamp";
418
- } & z.BRAND<"UnixTimestamp">) | undefined;
415
+ received_at?: import("../_common/unix-timestamp.js").UnixTimestamp | undefined;
419
416
  stop_id?: string | undefined;
420
417
  card_serial_number?: string | undefined;
421
418
  on_board_sale_id?: string | null | undefined;
@@ -434,8 +431,8 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
434
431
  updated_by?: string | undefined;
435
432
  agency_id?: string | undefined;
436
433
  line_id?: string | undefined;
437
- pattern_id?: string | undefined;
438
434
  trip_id?: string | undefined;
435
+ pattern_id?: string | undefined;
439
436
  apex_version?: string | undefined;
440
437
  device_id?: string | undefined;
441
438
  vehicle_id?: number | undefined;
@@ -460,12 +457,8 @@ export declare const UpdateSimplifiedApexValidationSchema: z.ZodObject<{
460
457
  * or not, and with which conditions. A validation also contains information about the card holder's card, the vehicle,
461
458
  * the validator machine, the route, and the time and location of the validation.
462
459
  */
463
- export interface SimplifiedApexValidation extends Omit<z.infer<typeof SimplifiedApexValidationSchema>, 'created_at' | 'received_at' | 'updated_at'> {
464
- created_at: UnixTimestamp;
465
- received_at: UnixTimestamp;
466
- updated_at: UnixTimestamp;
467
- }
468
- export type UpdateSimplifiedApexValidationDto = Partial<SimplifiedApexValidation>;
460
+ export type SimplifiedApexValidation = z.infer<typeof SimplifiedApexValidationSchema>;
461
+ export type UpdateSimplifiedApexValidationDto = z.infer<typeof UpdateSimplifiedApexValidationSchema>;
469
462
  /**
470
463
  * Validation statuses that are considered valid for the card holder to travel.
471
464
  */
@@ -1,6 +1,6 @@
1
1
  /* * */
2
2
  import { DocumentSchema } from '../_common/document.js';
3
- import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
3
+ import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const ApexValidationStatus = {
@@ -92,7 +92,7 @@ export const SimplifiedApexValidationSchema = DocumentSchema.extend({
92
92
  on_board_sale_id: z.string().nullable(),
93
93
  pattern_id: z.string(),
94
94
  product_id: z.string(),
95
- received_at: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
95
+ received_at: unixTimeStampSchema,
96
96
  stop_id: z.string(),
97
97
  trip_id: z.string(),
98
98
  units_qty: z.number().nullable(),