@tmlmobilidade/types 20250915.1329.1 → 20250915.1518.13
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 +168 -27
- package/dist/src/_common/comment.js +26 -5
- package/dist/src/file.d.ts +7 -7
- package/dist/src/rides/ride-audit.d.ts +15 -0
- package/dist/src/rides/ride-justification.d.ts +138 -475
- package/dist/src/rides/ride-justification.js +4 -22
- package/dist/src/stop.d.ts +126 -63
- package/package.json +1 -1
|
@@ -8,222 +8,9 @@ export type RideJustificationCause = z.infer<typeof RideJustificationCauseSchema
|
|
|
8
8
|
export declare const RIDE_JUSTIFICATION_SOURCE_OPTIONS: readonly ["MANUAL", "REALTIME_ALERT"];
|
|
9
9
|
export declare const RideJustificationSourceSchema: z.ZodEnum<["MANUAL", "REALTIME_ALERT"]>;
|
|
10
10
|
export type RideJustificationSource = z.infer<typeof RideJustificationSourceSchema>;
|
|
11
|
-
declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
created_by: z.ZodOptional<z.ZodString>;
|
|
15
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
16
|
-
updated_by: z.ZodOptional<z.ZodString>;
|
|
17
|
-
} & {
|
|
18
|
-
message: z.ZodString;
|
|
19
|
-
type: z.ZodLiteral<"note">;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
_id: string;
|
|
22
|
-
created_at: number & {
|
|
23
|
-
__brand: "UnixTimestamp";
|
|
24
|
-
};
|
|
25
|
-
updated_at: number & {
|
|
26
|
-
__brand: "UnixTimestamp";
|
|
27
|
-
};
|
|
28
|
-
message: string;
|
|
29
|
-
type: "note";
|
|
30
|
-
created_by?: string | undefined;
|
|
31
|
-
updated_by?: string | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
_id: string;
|
|
34
|
-
created_at: number;
|
|
35
|
-
updated_at: number;
|
|
36
|
-
message: string;
|
|
37
|
-
type: "note";
|
|
38
|
-
created_by?: string | undefined;
|
|
39
|
-
updated_by?: string | undefined;
|
|
40
|
-
}>, z.ZodObject<{
|
|
41
|
-
_id: z.ZodString;
|
|
42
|
-
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
43
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
44
|
-
} & {
|
|
45
|
-
created_by: z.ZodLiteral<"system">;
|
|
46
|
-
message: z.ZodString;
|
|
47
|
-
type: z.ZodLiteral<"system_info">;
|
|
48
|
-
updated_by: z.ZodLiteral<"system">;
|
|
49
|
-
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
_id: string;
|
|
51
|
-
created_at: number & {
|
|
52
|
-
__brand: "UnixTimestamp";
|
|
53
|
-
};
|
|
54
|
-
created_by: "system";
|
|
55
|
-
updated_at: number & {
|
|
56
|
-
__brand: "UnixTimestamp";
|
|
57
|
-
};
|
|
58
|
-
updated_by: "system";
|
|
59
|
-
message: string;
|
|
60
|
-
type: "system_info";
|
|
61
|
-
}, {
|
|
62
|
-
_id: string;
|
|
63
|
-
created_at: number;
|
|
64
|
-
created_by: "system";
|
|
65
|
-
updated_at: number;
|
|
66
|
-
updated_by: "system";
|
|
67
|
-
message: string;
|
|
68
|
-
type: "system_info";
|
|
69
|
-
}>, z.ZodObject<{
|
|
70
|
-
_id: z.ZodString;
|
|
71
|
-
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
72
|
-
created_by: z.ZodOptional<z.ZodString>;
|
|
73
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
74
|
-
updated_by: z.ZodOptional<z.ZodString>;
|
|
75
|
-
} & {
|
|
76
|
-
curr_status: z.ZodString;
|
|
77
|
-
prev_status: z.ZodString;
|
|
78
|
-
type: z.ZodLiteral<"statusChanged">;
|
|
79
|
-
}, "strip", z.ZodTypeAny, {
|
|
80
|
-
_id: string;
|
|
81
|
-
created_at: number & {
|
|
82
|
-
__brand: "UnixTimestamp";
|
|
83
|
-
};
|
|
84
|
-
updated_at: number & {
|
|
85
|
-
__brand: "UnixTimestamp";
|
|
86
|
-
};
|
|
87
|
-
type: "statusChanged";
|
|
88
|
-
curr_status: string;
|
|
89
|
-
prev_status: string;
|
|
90
|
-
created_by?: string | undefined;
|
|
91
|
-
updated_by?: string | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
_id: string;
|
|
94
|
-
created_at: number;
|
|
95
|
-
updated_at: number;
|
|
96
|
-
type: "statusChanged";
|
|
97
|
-
curr_status: string;
|
|
98
|
-
prev_status: string;
|
|
99
|
-
created_by?: string | undefined;
|
|
100
|
-
updated_by?: string | undefined;
|
|
101
|
-
}>]>, {
|
|
102
|
-
_id: string;
|
|
103
|
-
created_at: number & {
|
|
104
|
-
__brand: "UnixTimestamp";
|
|
105
|
-
};
|
|
106
|
-
updated_at: number & {
|
|
107
|
-
__brand: "UnixTimestamp";
|
|
108
|
-
};
|
|
109
|
-
message: string;
|
|
110
|
-
type: "note";
|
|
111
|
-
created_by?: string | undefined;
|
|
112
|
-
updated_by?: string | undefined;
|
|
113
|
-
} | {
|
|
114
|
-
_id: string;
|
|
115
|
-
created_at: number & {
|
|
116
|
-
__brand: "UnixTimestamp";
|
|
117
|
-
};
|
|
118
|
-
created_by: "system";
|
|
119
|
-
updated_at: number & {
|
|
120
|
-
__brand: "UnixTimestamp";
|
|
121
|
-
};
|
|
122
|
-
updated_by: "system";
|
|
123
|
-
message: string;
|
|
124
|
-
type: "system_info";
|
|
125
|
-
} | {
|
|
126
|
-
_id: string;
|
|
127
|
-
created_at: number & {
|
|
128
|
-
__brand: "UnixTimestamp";
|
|
129
|
-
};
|
|
130
|
-
updated_at: number & {
|
|
131
|
-
__brand: "UnixTimestamp";
|
|
132
|
-
};
|
|
133
|
-
type: "statusChanged";
|
|
134
|
-
curr_status: string;
|
|
135
|
-
prev_status: string;
|
|
136
|
-
created_by?: string | undefined;
|
|
137
|
-
updated_by?: string | undefined;
|
|
138
|
-
}, {
|
|
139
|
-
_id: string;
|
|
140
|
-
created_at: number;
|
|
141
|
-
updated_at: number;
|
|
142
|
-
message: string;
|
|
143
|
-
type: "note";
|
|
144
|
-
created_by?: string | undefined;
|
|
145
|
-
updated_by?: string | undefined;
|
|
146
|
-
} | {
|
|
147
|
-
_id: string;
|
|
148
|
-
created_at: number;
|
|
149
|
-
created_by: "system";
|
|
150
|
-
updated_at: number;
|
|
151
|
-
updated_by: "system";
|
|
152
|
-
message: string;
|
|
153
|
-
type: "system_info";
|
|
154
|
-
} | {
|
|
155
|
-
_id: string;
|
|
156
|
-
created_at: number;
|
|
157
|
-
updated_at: number;
|
|
158
|
-
type: "statusChanged";
|
|
159
|
-
curr_status: string;
|
|
160
|
-
prev_status: string;
|
|
161
|
-
created_by?: string | undefined;
|
|
162
|
-
updated_by?: string | undefined;
|
|
163
|
-
}>, {
|
|
164
|
-
_id: string;
|
|
165
|
-
created_at: number & {
|
|
166
|
-
__brand: "UnixTimestamp";
|
|
167
|
-
};
|
|
168
|
-
updated_at: number & {
|
|
169
|
-
__brand: "UnixTimestamp";
|
|
170
|
-
};
|
|
171
|
-
message: string;
|
|
172
|
-
type: "note";
|
|
173
|
-
created_by?: string | undefined;
|
|
174
|
-
updated_by?: string | undefined;
|
|
175
|
-
} | {
|
|
176
|
-
_id: string;
|
|
177
|
-
created_at: number & {
|
|
178
|
-
__brand: "UnixTimestamp";
|
|
179
|
-
};
|
|
180
|
-
created_by: "system";
|
|
181
|
-
updated_at: number & {
|
|
182
|
-
__brand: "UnixTimestamp";
|
|
183
|
-
};
|
|
184
|
-
updated_by: "system";
|
|
185
|
-
message: string;
|
|
186
|
-
type: "system_info";
|
|
187
|
-
} | {
|
|
188
|
-
_id: string;
|
|
189
|
-
created_at: number & {
|
|
190
|
-
__brand: "UnixTimestamp";
|
|
191
|
-
};
|
|
192
|
-
updated_at: number & {
|
|
193
|
-
__brand: "UnixTimestamp";
|
|
194
|
-
};
|
|
195
|
-
type: "statusChanged";
|
|
196
|
-
curr_status: string;
|
|
197
|
-
prev_status: string;
|
|
198
|
-
created_by?: string | undefined;
|
|
199
|
-
updated_by?: string | undefined;
|
|
200
|
-
}, {
|
|
201
|
-
_id: string;
|
|
202
|
-
created_at: number;
|
|
203
|
-
updated_at: number;
|
|
204
|
-
message: string;
|
|
205
|
-
type: "note";
|
|
206
|
-
created_by?: string | undefined;
|
|
207
|
-
updated_by?: string | undefined;
|
|
208
|
-
} | {
|
|
209
|
-
_id: string;
|
|
210
|
-
created_at: number;
|
|
211
|
-
created_by: "system";
|
|
212
|
-
updated_at: number;
|
|
213
|
-
updated_by: "system";
|
|
214
|
-
message: string;
|
|
215
|
-
type: "system_info";
|
|
216
|
-
} | {
|
|
217
|
-
_id: string;
|
|
218
|
-
created_at: number;
|
|
219
|
-
updated_at: number;
|
|
220
|
-
type: "statusChanged";
|
|
221
|
-
curr_status: string;
|
|
222
|
-
prev_status: string;
|
|
223
|
-
created_by?: string | undefined;
|
|
224
|
-
updated_by?: string | undefined;
|
|
225
|
-
}>;
|
|
226
|
-
export type RideJustificationComment = z.infer<typeof CommentSchemaWithRideJustificationStatus>;
|
|
11
|
+
export declare const RIDE_JUSTIFICATION_STATUS_TYPE_OPTIONS: readonly ["locked_status", "acceptance_status", "pto_message"];
|
|
12
|
+
export declare const RideJustificationStatusTypeSchema: z.ZodEnum<["locked_status", "acceptance_status", "pto_message"]>;
|
|
13
|
+
export type RideJustificationStatusType = z.infer<typeof RideJustificationStatusTypeSchema>;
|
|
227
14
|
export declare const RideJustificationSchema: z.ZodObject<{
|
|
228
15
|
_id: z.ZodString;
|
|
229
16
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -245,7 +32,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
245
32
|
reason: string;
|
|
246
33
|
error_message?: string | undefined;
|
|
247
34
|
}>;
|
|
248
|
-
comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.
|
|
35
|
+
comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
249
36
|
_id: z.ZodString;
|
|
250
37
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
251
38
|
created_by: z.ZodOptional<z.ZodString>;
|
|
@@ -253,6 +40,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
253
40
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
254
41
|
} & {
|
|
255
42
|
message: z.ZodString;
|
|
43
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
256
44
|
type: z.ZodLiteral<"note">;
|
|
257
45
|
}, "strip", z.ZodTypeAny, {
|
|
258
46
|
_id: string;
|
|
@@ -266,6 +54,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
266
54
|
type: "note";
|
|
267
55
|
created_by?: string | undefined;
|
|
268
56
|
updated_by?: string | undefined;
|
|
57
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
269
58
|
}, {
|
|
270
59
|
_id: string;
|
|
271
60
|
created_at: number;
|
|
@@ -274,6 +63,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
274
63
|
type: "note";
|
|
275
64
|
created_by?: string | undefined;
|
|
276
65
|
updated_by?: string | undefined;
|
|
66
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
277
67
|
}>, z.ZodObject<{
|
|
278
68
|
_id: z.ZodString;
|
|
279
69
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -281,6 +71,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
281
71
|
} & {
|
|
282
72
|
created_by: z.ZodLiteral<"system">;
|
|
283
73
|
message: z.ZodString;
|
|
74
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
284
75
|
type: z.ZodLiteral<"system_info">;
|
|
285
76
|
updated_by: z.ZodLiteral<"system">;
|
|
286
77
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -295,6 +86,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
295
86
|
updated_by: "system";
|
|
296
87
|
message: string;
|
|
297
88
|
type: "system_info";
|
|
89
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
298
90
|
}, {
|
|
299
91
|
_id: string;
|
|
300
92
|
created_at: number;
|
|
@@ -303,6 +95,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
303
95
|
updated_by: "system";
|
|
304
96
|
message: string;
|
|
305
97
|
type: "system_info";
|
|
98
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
306
99
|
}>, z.ZodObject<{
|
|
307
100
|
_id: z.ZodString;
|
|
308
101
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -310,9 +103,10 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
310
103
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
311
104
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
312
105
|
} & {
|
|
313
|
-
curr_status: z.ZodString
|
|
314
|
-
|
|
315
|
-
|
|
106
|
+
curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
107
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
108
|
+
prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
109
|
+
type: z.ZodLiteral<"status_changed">;
|
|
316
110
|
}, "strip", z.ZodTypeAny, {
|
|
317
111
|
_id: string;
|
|
318
112
|
created_at: number & {
|
|
@@ -321,20 +115,22 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
321
115
|
updated_at: number & {
|
|
322
116
|
__brand: "UnixTimestamp";
|
|
323
117
|
};
|
|
324
|
-
type: "
|
|
325
|
-
curr_status: string;
|
|
326
|
-
prev_status: string;
|
|
118
|
+
type: "status_changed";
|
|
119
|
+
curr_status: string | boolean;
|
|
120
|
+
prev_status: string | boolean;
|
|
327
121
|
created_by?: string | undefined;
|
|
328
122
|
updated_by?: string | undefined;
|
|
123
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
329
124
|
}, {
|
|
330
125
|
_id: string;
|
|
331
126
|
created_at: number;
|
|
332
127
|
updated_at: number;
|
|
333
|
-
type: "
|
|
334
|
-
curr_status: string;
|
|
335
|
-
prev_status: string;
|
|
128
|
+
type: "status_changed";
|
|
129
|
+
curr_status: string | boolean;
|
|
130
|
+
prev_status: string | boolean;
|
|
336
131
|
created_by?: string | undefined;
|
|
337
132
|
updated_by?: string | undefined;
|
|
133
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
338
134
|
}>]>, {
|
|
339
135
|
_id: string;
|
|
340
136
|
created_at: number & {
|
|
@@ -347,6 +143,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
347
143
|
type: "note";
|
|
348
144
|
created_by?: string | undefined;
|
|
349
145
|
updated_by?: string | undefined;
|
|
146
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
350
147
|
} | {
|
|
351
148
|
_id: string;
|
|
352
149
|
created_at: number & {
|
|
@@ -359,6 +156,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
359
156
|
updated_by: "system";
|
|
360
157
|
message: string;
|
|
361
158
|
type: "system_info";
|
|
159
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
362
160
|
} | {
|
|
363
161
|
_id: string;
|
|
364
162
|
created_at: number & {
|
|
@@ -367,11 +165,12 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
367
165
|
updated_at: number & {
|
|
368
166
|
__brand: "UnixTimestamp";
|
|
369
167
|
};
|
|
370
|
-
type: "
|
|
371
|
-
curr_status: string;
|
|
372
|
-
prev_status: string;
|
|
168
|
+
type: "status_changed";
|
|
169
|
+
curr_status: string | boolean;
|
|
170
|
+
prev_status: string | boolean;
|
|
373
171
|
created_by?: string | undefined;
|
|
374
172
|
updated_by?: string | undefined;
|
|
173
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
375
174
|
}, {
|
|
376
175
|
_id: string;
|
|
377
176
|
created_at: number;
|
|
@@ -380,6 +179,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
380
179
|
type: "note";
|
|
381
180
|
created_by?: string | undefined;
|
|
382
181
|
updated_by?: string | undefined;
|
|
182
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
383
183
|
} | {
|
|
384
184
|
_id: string;
|
|
385
185
|
created_at: number;
|
|
@@ -388,77 +188,17 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
388
188
|
updated_by: "system";
|
|
389
189
|
message: string;
|
|
390
190
|
type: "system_info";
|
|
191
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
391
192
|
} | {
|
|
392
193
|
_id: string;
|
|
393
194
|
created_at: number;
|
|
394
195
|
updated_at: number;
|
|
395
|
-
type: "
|
|
396
|
-
curr_status: string;
|
|
397
|
-
prev_status: string;
|
|
398
|
-
created_by?: string | undefined;
|
|
399
|
-
updated_by?: string | undefined;
|
|
400
|
-
}>, {
|
|
401
|
-
_id: string;
|
|
402
|
-
created_at: number & {
|
|
403
|
-
__brand: "UnixTimestamp";
|
|
404
|
-
};
|
|
405
|
-
updated_at: number & {
|
|
406
|
-
__brand: "UnixTimestamp";
|
|
407
|
-
};
|
|
408
|
-
message: string;
|
|
409
|
-
type: "note";
|
|
410
|
-
created_by?: string | undefined;
|
|
411
|
-
updated_by?: string | undefined;
|
|
412
|
-
} | {
|
|
413
|
-
_id: string;
|
|
414
|
-
created_at: number & {
|
|
415
|
-
__brand: "UnixTimestamp";
|
|
416
|
-
};
|
|
417
|
-
created_by: "system";
|
|
418
|
-
updated_at: number & {
|
|
419
|
-
__brand: "UnixTimestamp";
|
|
420
|
-
};
|
|
421
|
-
updated_by: "system";
|
|
422
|
-
message: string;
|
|
423
|
-
type: "system_info";
|
|
424
|
-
} | {
|
|
425
|
-
_id: string;
|
|
426
|
-
created_at: number & {
|
|
427
|
-
__brand: "UnixTimestamp";
|
|
428
|
-
};
|
|
429
|
-
updated_at: number & {
|
|
430
|
-
__brand: "UnixTimestamp";
|
|
431
|
-
};
|
|
432
|
-
type: "statusChanged";
|
|
433
|
-
curr_status: string;
|
|
434
|
-
prev_status: string;
|
|
435
|
-
created_by?: string | undefined;
|
|
436
|
-
updated_by?: string | undefined;
|
|
437
|
-
}, {
|
|
438
|
-
_id: string;
|
|
439
|
-
created_at: number;
|
|
440
|
-
updated_at: number;
|
|
441
|
-
message: string;
|
|
442
|
-
type: "note";
|
|
443
|
-
created_by?: string | undefined;
|
|
444
|
-
updated_by?: string | undefined;
|
|
445
|
-
} | {
|
|
446
|
-
_id: string;
|
|
447
|
-
created_at: number;
|
|
448
|
-
created_by: "system";
|
|
449
|
-
updated_at: number;
|
|
450
|
-
updated_by: "system";
|
|
451
|
-
message: string;
|
|
452
|
-
type: "system_info";
|
|
453
|
-
} | {
|
|
454
|
-
_id: string;
|
|
455
|
-
created_at: number;
|
|
456
|
-
updated_at: number;
|
|
457
|
-
type: "statusChanged";
|
|
458
|
-
curr_status: string;
|
|
459
|
-
prev_status: string;
|
|
196
|
+
type: "status_changed";
|
|
197
|
+
curr_status: string | boolean;
|
|
198
|
+
prev_status: string | boolean;
|
|
460
199
|
created_by?: string | undefined;
|
|
461
200
|
updated_by?: string | undefined;
|
|
201
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
462
202
|
}>, "many">>;
|
|
463
203
|
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
464
204
|
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
@@ -486,6 +226,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
486
226
|
type: "note";
|
|
487
227
|
created_by?: string | undefined;
|
|
488
228
|
updated_by?: string | undefined;
|
|
229
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
489
230
|
} | {
|
|
490
231
|
_id: string;
|
|
491
232
|
created_at: number & {
|
|
@@ -498,6 +239,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
498
239
|
updated_by: "system";
|
|
499
240
|
message: string;
|
|
500
241
|
type: "system_info";
|
|
242
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
501
243
|
} | {
|
|
502
244
|
_id: string;
|
|
503
245
|
created_at: number & {
|
|
@@ -506,13 +248,15 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
506
248
|
updated_at: number & {
|
|
507
249
|
__brand: "UnixTimestamp";
|
|
508
250
|
};
|
|
509
|
-
type: "
|
|
510
|
-
curr_status: string;
|
|
511
|
-
prev_status: string;
|
|
251
|
+
type: "status_changed";
|
|
252
|
+
curr_status: string | boolean;
|
|
253
|
+
prev_status: string | boolean;
|
|
512
254
|
created_by?: string | undefined;
|
|
513
255
|
updated_by?: string | undefined;
|
|
256
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
514
257
|
})[];
|
|
515
258
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
259
|
+
pto_message: string;
|
|
516
260
|
analysis: {
|
|
517
261
|
grade: "error" | "pass" | "fail" | "skip";
|
|
518
262
|
reason: string;
|
|
@@ -520,7 +264,6 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
520
264
|
};
|
|
521
265
|
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
522
266
|
justification_source: "MANUAL" | "REALTIME_ALERT";
|
|
523
|
-
pto_message: string;
|
|
524
267
|
trip_id: string;
|
|
525
268
|
created_by?: string | undefined;
|
|
526
269
|
updated_by?: string | undefined;
|
|
@@ -548,6 +291,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
548
291
|
type: "note";
|
|
549
292
|
created_by?: string | undefined;
|
|
550
293
|
updated_by?: string | undefined;
|
|
294
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
551
295
|
} | {
|
|
552
296
|
_id: string;
|
|
553
297
|
created_at: number;
|
|
@@ -556,15 +300,17 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
556
300
|
updated_by: "system";
|
|
557
301
|
message: string;
|
|
558
302
|
type: "system_info";
|
|
303
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
559
304
|
} | {
|
|
560
305
|
_id: string;
|
|
561
306
|
created_at: number;
|
|
562
307
|
updated_at: number;
|
|
563
|
-
type: "
|
|
564
|
-
curr_status: string;
|
|
565
|
-
prev_status: string;
|
|
308
|
+
type: "status_changed";
|
|
309
|
+
curr_status: string | boolean;
|
|
310
|
+
prev_status: string | boolean;
|
|
566
311
|
created_by?: string | undefined;
|
|
567
312
|
updated_by?: string | undefined;
|
|
313
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
568
314
|
})[] | undefined;
|
|
569
315
|
pto_message?: string | undefined;
|
|
570
316
|
}>;
|
|
@@ -575,7 +321,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
575
321
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
576
322
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
577
323
|
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
578
|
-
comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.
|
|
324
|
+
comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
579
325
|
_id: z.ZodString;
|
|
580
326
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
581
327
|
created_by: z.ZodOptional<z.ZodString>;
|
|
@@ -583,6 +329,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
583
329
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
584
330
|
} & {
|
|
585
331
|
message: z.ZodString;
|
|
332
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
586
333
|
type: z.ZodLiteral<"note">;
|
|
587
334
|
}, "strip", z.ZodTypeAny, {
|
|
588
335
|
_id: string;
|
|
@@ -596,6 +343,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
596
343
|
type: "note";
|
|
597
344
|
created_by?: string | undefined;
|
|
598
345
|
updated_by?: string | undefined;
|
|
346
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
599
347
|
}, {
|
|
600
348
|
_id: string;
|
|
601
349
|
created_at: number;
|
|
@@ -604,6 +352,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
604
352
|
type: "note";
|
|
605
353
|
created_by?: string | undefined;
|
|
606
354
|
updated_by?: string | undefined;
|
|
355
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
607
356
|
}>, z.ZodObject<{
|
|
608
357
|
_id: z.ZodString;
|
|
609
358
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -611,6 +360,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
611
360
|
} & {
|
|
612
361
|
created_by: z.ZodLiteral<"system">;
|
|
613
362
|
message: z.ZodString;
|
|
363
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
614
364
|
type: z.ZodLiteral<"system_info">;
|
|
615
365
|
updated_by: z.ZodLiteral<"system">;
|
|
616
366
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -625,6 +375,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
625
375
|
updated_by: "system";
|
|
626
376
|
message: string;
|
|
627
377
|
type: "system_info";
|
|
378
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
628
379
|
}, {
|
|
629
380
|
_id: string;
|
|
630
381
|
created_at: number;
|
|
@@ -633,6 +384,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
633
384
|
updated_by: "system";
|
|
634
385
|
message: string;
|
|
635
386
|
type: "system_info";
|
|
387
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
636
388
|
}>, z.ZodObject<{
|
|
637
389
|
_id: z.ZodString;
|
|
638
390
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -640,9 +392,10 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
640
392
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
641
393
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
642
394
|
} & {
|
|
643
|
-
curr_status: z.ZodString
|
|
644
|
-
|
|
645
|
-
|
|
395
|
+
curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
396
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
397
|
+
prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
398
|
+
type: z.ZodLiteral<"status_changed">;
|
|
646
399
|
}, "strip", z.ZodTypeAny, {
|
|
647
400
|
_id: string;
|
|
648
401
|
created_at: number & {
|
|
@@ -651,20 +404,22 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
651
404
|
updated_at: number & {
|
|
652
405
|
__brand: "UnixTimestamp";
|
|
653
406
|
};
|
|
654
|
-
type: "
|
|
655
|
-
curr_status: string;
|
|
656
|
-
prev_status: string;
|
|
407
|
+
type: "status_changed";
|
|
408
|
+
curr_status: string | boolean;
|
|
409
|
+
prev_status: string | boolean;
|
|
657
410
|
created_by?: string | undefined;
|
|
658
411
|
updated_by?: string | undefined;
|
|
412
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
659
413
|
}, {
|
|
660
414
|
_id: string;
|
|
661
415
|
created_at: number;
|
|
662
416
|
updated_at: number;
|
|
663
|
-
type: "
|
|
664
|
-
curr_status: string;
|
|
665
|
-
prev_status: string;
|
|
417
|
+
type: "status_changed";
|
|
418
|
+
curr_status: string | boolean;
|
|
419
|
+
prev_status: string | boolean;
|
|
666
420
|
created_by?: string | undefined;
|
|
667
421
|
updated_by?: string | undefined;
|
|
422
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
668
423
|
}>]>, {
|
|
669
424
|
_id: string;
|
|
670
425
|
created_at: number & {
|
|
@@ -677,6 +432,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
677
432
|
type: "note";
|
|
678
433
|
created_by?: string | undefined;
|
|
679
434
|
updated_by?: string | undefined;
|
|
435
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
680
436
|
} | {
|
|
681
437
|
_id: string;
|
|
682
438
|
created_at: number & {
|
|
@@ -689,6 +445,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
689
445
|
updated_by: "system";
|
|
690
446
|
message: string;
|
|
691
447
|
type: "system_info";
|
|
448
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
692
449
|
} | {
|
|
693
450
|
_id: string;
|
|
694
451
|
created_at: number & {
|
|
@@ -697,73 +454,12 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
697
454
|
updated_at: number & {
|
|
698
455
|
__brand: "UnixTimestamp";
|
|
699
456
|
};
|
|
700
|
-
type: "
|
|
701
|
-
curr_status: string;
|
|
702
|
-
prev_status: string;
|
|
703
|
-
created_by?: string | undefined;
|
|
704
|
-
updated_by?: string | undefined;
|
|
705
|
-
}, {
|
|
706
|
-
_id: string;
|
|
707
|
-
created_at: number;
|
|
708
|
-
updated_at: number;
|
|
709
|
-
message: string;
|
|
710
|
-
type: "note";
|
|
711
|
-
created_by?: string | undefined;
|
|
712
|
-
updated_by?: string | undefined;
|
|
713
|
-
} | {
|
|
714
|
-
_id: string;
|
|
715
|
-
created_at: number;
|
|
716
|
-
created_by: "system";
|
|
717
|
-
updated_at: number;
|
|
718
|
-
updated_by: "system";
|
|
719
|
-
message: string;
|
|
720
|
-
type: "system_info";
|
|
721
|
-
} | {
|
|
722
|
-
_id: string;
|
|
723
|
-
created_at: number;
|
|
724
|
-
updated_at: number;
|
|
725
|
-
type: "statusChanged";
|
|
726
|
-
curr_status: string;
|
|
727
|
-
prev_status: string;
|
|
728
|
-
created_by?: string | undefined;
|
|
729
|
-
updated_by?: string | undefined;
|
|
730
|
-
}>, {
|
|
731
|
-
_id: string;
|
|
732
|
-
created_at: number & {
|
|
733
|
-
__brand: "UnixTimestamp";
|
|
734
|
-
};
|
|
735
|
-
updated_at: number & {
|
|
736
|
-
__brand: "UnixTimestamp";
|
|
737
|
-
};
|
|
738
|
-
message: string;
|
|
739
|
-
type: "note";
|
|
740
|
-
created_by?: string | undefined;
|
|
741
|
-
updated_by?: string | undefined;
|
|
742
|
-
} | {
|
|
743
|
-
_id: string;
|
|
744
|
-
created_at: number & {
|
|
745
|
-
__brand: "UnixTimestamp";
|
|
746
|
-
};
|
|
747
|
-
created_by: "system";
|
|
748
|
-
updated_at: number & {
|
|
749
|
-
__brand: "UnixTimestamp";
|
|
750
|
-
};
|
|
751
|
-
updated_by: "system";
|
|
752
|
-
message: string;
|
|
753
|
-
type: "system_info";
|
|
754
|
-
} | {
|
|
755
|
-
_id: string;
|
|
756
|
-
created_at: number & {
|
|
757
|
-
__brand: "UnixTimestamp";
|
|
758
|
-
};
|
|
759
|
-
updated_at: number & {
|
|
760
|
-
__brand: "UnixTimestamp";
|
|
761
|
-
};
|
|
762
|
-
type: "statusChanged";
|
|
763
|
-
curr_status: string;
|
|
764
|
-
prev_status: string;
|
|
457
|
+
type: "status_changed";
|
|
458
|
+
curr_status: string | boolean;
|
|
459
|
+
prev_status: string | boolean;
|
|
765
460
|
created_by?: string | undefined;
|
|
766
461
|
updated_by?: string | undefined;
|
|
462
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
767
463
|
}, {
|
|
768
464
|
_id: string;
|
|
769
465
|
created_at: number;
|
|
@@ -772,6 +468,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
772
468
|
type: "note";
|
|
773
469
|
created_by?: string | undefined;
|
|
774
470
|
updated_by?: string | undefined;
|
|
471
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
775
472
|
} | {
|
|
776
473
|
_id: string;
|
|
777
474
|
created_at: number;
|
|
@@ -780,17 +477,20 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
780
477
|
updated_by: "system";
|
|
781
478
|
message: string;
|
|
782
479
|
type: "system_info";
|
|
480
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
783
481
|
} | {
|
|
784
482
|
_id: string;
|
|
785
483
|
created_at: number;
|
|
786
484
|
updated_at: number;
|
|
787
|
-
type: "
|
|
788
|
-
curr_status: string;
|
|
789
|
-
prev_status: string;
|
|
485
|
+
type: "status_changed";
|
|
486
|
+
curr_status: string | boolean;
|
|
487
|
+
prev_status: string | boolean;
|
|
790
488
|
created_by?: string | undefined;
|
|
791
489
|
updated_by?: string | undefined;
|
|
490
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
792
491
|
}>, "many">>;
|
|
793
492
|
acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
493
|
+
pto_message: z.ZodDefault<z.ZodString>;
|
|
794
494
|
analysis: z.ZodObject<{
|
|
795
495
|
error_message: z.ZodOptional<z.ZodString>;
|
|
796
496
|
grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
|
|
@@ -806,7 +506,6 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
806
506
|
}>;
|
|
807
507
|
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
808
508
|
justification_source: z.ZodEnum<["MANUAL", "REALTIME_ALERT"]>;
|
|
809
|
-
pto_message: z.ZodDefault<z.ZodString>;
|
|
810
509
|
trip_id: z.ZodString;
|
|
811
510
|
}, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
812
511
|
is_locked: boolean;
|
|
@@ -822,6 +521,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
822
521
|
type: "note";
|
|
823
522
|
created_by?: string | undefined;
|
|
824
523
|
updated_by?: string | undefined;
|
|
524
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
825
525
|
} | {
|
|
826
526
|
_id: string;
|
|
827
527
|
created_at: number & {
|
|
@@ -834,6 +534,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
834
534
|
updated_by: "system";
|
|
835
535
|
message: string;
|
|
836
536
|
type: "system_info";
|
|
537
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
837
538
|
} | {
|
|
838
539
|
_id: string;
|
|
839
540
|
created_at: number & {
|
|
@@ -842,13 +543,15 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
842
543
|
updated_at: number & {
|
|
843
544
|
__brand: "UnixTimestamp";
|
|
844
545
|
};
|
|
845
|
-
type: "
|
|
846
|
-
curr_status: string;
|
|
847
|
-
prev_status: string;
|
|
546
|
+
type: "status_changed";
|
|
547
|
+
curr_status: string | boolean;
|
|
548
|
+
prev_status: string | boolean;
|
|
848
549
|
created_by?: string | undefined;
|
|
849
550
|
updated_by?: string | undefined;
|
|
551
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
850
552
|
})[];
|
|
851
553
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
554
|
+
pto_message: string;
|
|
852
555
|
analysis: {
|
|
853
556
|
grade: "error" | "pass" | "fail" | "skip";
|
|
854
557
|
reason: string;
|
|
@@ -856,7 +559,6 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
856
559
|
};
|
|
857
560
|
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
858
561
|
justification_source: "MANUAL" | "REALTIME_ALERT";
|
|
859
|
-
pto_message: string;
|
|
860
562
|
trip_id: string;
|
|
861
563
|
_id?: string | undefined;
|
|
862
564
|
created_by?: string | undefined;
|
|
@@ -883,6 +585,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
883
585
|
type: "note";
|
|
884
586
|
created_by?: string | undefined;
|
|
885
587
|
updated_by?: string | undefined;
|
|
588
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
886
589
|
} | {
|
|
887
590
|
_id: string;
|
|
888
591
|
created_at: number;
|
|
@@ -891,15 +594,17 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
891
594
|
updated_by: "system";
|
|
892
595
|
message: string;
|
|
893
596
|
type: "system_info";
|
|
597
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
894
598
|
} | {
|
|
895
599
|
_id: string;
|
|
896
600
|
created_at: number;
|
|
897
601
|
updated_at: number;
|
|
898
|
-
type: "
|
|
899
|
-
curr_status: string;
|
|
900
|
-
prev_status: string;
|
|
602
|
+
type: "status_changed";
|
|
603
|
+
curr_status: string | boolean;
|
|
604
|
+
prev_status: string | boolean;
|
|
901
605
|
created_by?: string | undefined;
|
|
902
606
|
updated_by?: string | undefined;
|
|
607
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
903
608
|
})[] | undefined;
|
|
904
609
|
pto_message?: string | undefined;
|
|
905
610
|
}>;
|
|
@@ -907,7 +612,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
907
612
|
_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
908
613
|
updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
909
614
|
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
910
|
-
comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.
|
|
615
|
+
comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
911
616
|
_id: z.ZodString;
|
|
912
617
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
913
618
|
created_by: z.ZodOptional<z.ZodString>;
|
|
@@ -915,6 +620,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
915
620
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
916
621
|
} & {
|
|
917
622
|
message: z.ZodString;
|
|
623
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
918
624
|
type: z.ZodLiteral<"note">;
|
|
919
625
|
}, "strip", z.ZodTypeAny, {
|
|
920
626
|
_id: string;
|
|
@@ -928,6 +634,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
928
634
|
type: "note";
|
|
929
635
|
created_by?: string | undefined;
|
|
930
636
|
updated_by?: string | undefined;
|
|
637
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
931
638
|
}, {
|
|
932
639
|
_id: string;
|
|
933
640
|
created_at: number;
|
|
@@ -936,6 +643,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
936
643
|
type: "note";
|
|
937
644
|
created_by?: string | undefined;
|
|
938
645
|
updated_by?: string | undefined;
|
|
646
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
939
647
|
}>, z.ZodObject<{
|
|
940
648
|
_id: z.ZodString;
|
|
941
649
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -943,6 +651,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
943
651
|
} & {
|
|
944
652
|
created_by: z.ZodLiteral<"system">;
|
|
945
653
|
message: z.ZodString;
|
|
654
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
946
655
|
type: z.ZodLiteral<"system_info">;
|
|
947
656
|
updated_by: z.ZodLiteral<"system">;
|
|
948
657
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -957,6 +666,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
957
666
|
updated_by: "system";
|
|
958
667
|
message: string;
|
|
959
668
|
type: "system_info";
|
|
669
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
960
670
|
}, {
|
|
961
671
|
_id: string;
|
|
962
672
|
created_at: number;
|
|
@@ -965,6 +675,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
965
675
|
updated_by: "system";
|
|
966
676
|
message: string;
|
|
967
677
|
type: "system_info";
|
|
678
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
968
679
|
}>, z.ZodObject<{
|
|
969
680
|
_id: z.ZodString;
|
|
970
681
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -972,9 +683,10 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
972
683
|
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
973
684
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
974
685
|
} & {
|
|
975
|
-
curr_status: z.ZodString
|
|
976
|
-
|
|
977
|
-
|
|
686
|
+
curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
687
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
688
|
+
prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
689
|
+
type: z.ZodLiteral<"status_changed">;
|
|
978
690
|
}, "strip", z.ZodTypeAny, {
|
|
979
691
|
_id: string;
|
|
980
692
|
created_at: number & {
|
|
@@ -983,20 +695,22 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
983
695
|
updated_at: number & {
|
|
984
696
|
__brand: "UnixTimestamp";
|
|
985
697
|
};
|
|
986
|
-
type: "
|
|
987
|
-
curr_status: string;
|
|
988
|
-
prev_status: string;
|
|
698
|
+
type: "status_changed";
|
|
699
|
+
curr_status: string | boolean;
|
|
700
|
+
prev_status: string | boolean;
|
|
989
701
|
created_by?: string | undefined;
|
|
990
702
|
updated_by?: string | undefined;
|
|
703
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
991
704
|
}, {
|
|
992
705
|
_id: string;
|
|
993
706
|
created_at: number;
|
|
994
707
|
updated_at: number;
|
|
995
|
-
type: "
|
|
996
|
-
curr_status: string;
|
|
997
|
-
prev_status: string;
|
|
708
|
+
type: "status_changed";
|
|
709
|
+
curr_status: string | boolean;
|
|
710
|
+
prev_status: string | boolean;
|
|
998
711
|
created_by?: string | undefined;
|
|
999
712
|
updated_by?: string | undefined;
|
|
713
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1000
714
|
}>]>, {
|
|
1001
715
|
_id: string;
|
|
1002
716
|
created_at: number & {
|
|
@@ -1009,6 +723,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1009
723
|
type: "note";
|
|
1010
724
|
created_by?: string | undefined;
|
|
1011
725
|
updated_by?: string | undefined;
|
|
726
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1012
727
|
} | {
|
|
1013
728
|
_id: string;
|
|
1014
729
|
created_at: number & {
|
|
@@ -1021,6 +736,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1021
736
|
updated_by: "system";
|
|
1022
737
|
message: string;
|
|
1023
738
|
type: "system_info";
|
|
739
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1024
740
|
} | {
|
|
1025
741
|
_id: string;
|
|
1026
742
|
created_at: number & {
|
|
@@ -1029,73 +745,12 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1029
745
|
updated_at: number & {
|
|
1030
746
|
__brand: "UnixTimestamp";
|
|
1031
747
|
};
|
|
1032
|
-
type: "
|
|
1033
|
-
curr_status: string;
|
|
1034
|
-
prev_status: string;
|
|
1035
|
-
created_by?: string | undefined;
|
|
1036
|
-
updated_by?: string | undefined;
|
|
1037
|
-
}, {
|
|
1038
|
-
_id: string;
|
|
1039
|
-
created_at: number;
|
|
1040
|
-
updated_at: number;
|
|
1041
|
-
message: string;
|
|
1042
|
-
type: "note";
|
|
1043
|
-
created_by?: string | undefined;
|
|
1044
|
-
updated_by?: string | undefined;
|
|
1045
|
-
} | {
|
|
1046
|
-
_id: string;
|
|
1047
|
-
created_at: number;
|
|
1048
|
-
created_by: "system";
|
|
1049
|
-
updated_at: number;
|
|
1050
|
-
updated_by: "system";
|
|
1051
|
-
message: string;
|
|
1052
|
-
type: "system_info";
|
|
1053
|
-
} | {
|
|
1054
|
-
_id: string;
|
|
1055
|
-
created_at: number;
|
|
1056
|
-
updated_at: number;
|
|
1057
|
-
type: "statusChanged";
|
|
1058
|
-
curr_status: string;
|
|
1059
|
-
prev_status: string;
|
|
1060
|
-
created_by?: string | undefined;
|
|
1061
|
-
updated_by?: string | undefined;
|
|
1062
|
-
}>, {
|
|
1063
|
-
_id: string;
|
|
1064
|
-
created_at: number & {
|
|
1065
|
-
__brand: "UnixTimestamp";
|
|
1066
|
-
};
|
|
1067
|
-
updated_at: number & {
|
|
1068
|
-
__brand: "UnixTimestamp";
|
|
1069
|
-
};
|
|
1070
|
-
message: string;
|
|
1071
|
-
type: "note";
|
|
1072
|
-
created_by?: string | undefined;
|
|
1073
|
-
updated_by?: string | undefined;
|
|
1074
|
-
} | {
|
|
1075
|
-
_id: string;
|
|
1076
|
-
created_at: number & {
|
|
1077
|
-
__brand: "UnixTimestamp";
|
|
1078
|
-
};
|
|
1079
|
-
created_by: "system";
|
|
1080
|
-
updated_at: number & {
|
|
1081
|
-
__brand: "UnixTimestamp";
|
|
1082
|
-
};
|
|
1083
|
-
updated_by: "system";
|
|
1084
|
-
message: string;
|
|
1085
|
-
type: "system_info";
|
|
1086
|
-
} | {
|
|
1087
|
-
_id: string;
|
|
1088
|
-
created_at: number & {
|
|
1089
|
-
__brand: "UnixTimestamp";
|
|
1090
|
-
};
|
|
1091
|
-
updated_at: number & {
|
|
1092
|
-
__brand: "UnixTimestamp";
|
|
1093
|
-
};
|
|
1094
|
-
type: "statusChanged";
|
|
1095
|
-
curr_status: string;
|
|
1096
|
-
prev_status: string;
|
|
748
|
+
type: "status_changed";
|
|
749
|
+
curr_status: string | boolean;
|
|
750
|
+
prev_status: string | boolean;
|
|
1097
751
|
created_by?: string | undefined;
|
|
1098
752
|
updated_by?: string | undefined;
|
|
753
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1099
754
|
}, {
|
|
1100
755
|
_id: string;
|
|
1101
756
|
created_at: number;
|
|
@@ -1104,6 +759,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1104
759
|
type: "note";
|
|
1105
760
|
created_by?: string | undefined;
|
|
1106
761
|
updated_by?: string | undefined;
|
|
762
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1107
763
|
} | {
|
|
1108
764
|
_id: string;
|
|
1109
765
|
created_at: number;
|
|
@@ -1112,19 +768,21 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1112
768
|
updated_by: "system";
|
|
1113
769
|
message: string;
|
|
1114
770
|
type: "system_info";
|
|
771
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1115
772
|
} | {
|
|
1116
773
|
_id: string;
|
|
1117
774
|
created_at: number;
|
|
1118
775
|
updated_at: number;
|
|
1119
|
-
type: "
|
|
1120
|
-
curr_status: string;
|
|
1121
|
-
prev_status: string;
|
|
776
|
+
type: "status_changed";
|
|
777
|
+
curr_status: string | boolean;
|
|
778
|
+
prev_status: string | boolean;
|
|
1122
779
|
created_by?: string | undefined;
|
|
1123
780
|
updated_by?: string | undefined;
|
|
781
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1124
782
|
}>, "many">>>;
|
|
1125
783
|
acceptance_status: z.ZodOptional<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>>;
|
|
1126
|
-
justification_cause: z.ZodOptional<z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>>;
|
|
1127
784
|
pto_message: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
785
|
+
justification_cause: z.ZodOptional<z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>>;
|
|
1128
786
|
trip_id: z.ZodOptional<z.ZodString>;
|
|
1129
787
|
}, "strict", z.ZodTypeAny, {
|
|
1130
788
|
_id?: string | undefined;
|
|
@@ -1142,6 +800,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1142
800
|
type: "note";
|
|
1143
801
|
created_by?: string | undefined;
|
|
1144
802
|
updated_by?: string | undefined;
|
|
803
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1145
804
|
} | {
|
|
1146
805
|
_id: string;
|
|
1147
806
|
created_at: number & {
|
|
@@ -1154,6 +813,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1154
813
|
updated_by: "system";
|
|
1155
814
|
message: string;
|
|
1156
815
|
type: "system_info";
|
|
816
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1157
817
|
} | {
|
|
1158
818
|
_id: string;
|
|
1159
819
|
created_at: number & {
|
|
@@ -1162,15 +822,16 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1162
822
|
updated_at: number & {
|
|
1163
823
|
__brand: "UnixTimestamp";
|
|
1164
824
|
};
|
|
1165
|
-
type: "
|
|
1166
|
-
curr_status: string;
|
|
1167
|
-
prev_status: string;
|
|
825
|
+
type: "status_changed";
|
|
826
|
+
curr_status: string | boolean;
|
|
827
|
+
prev_status: string | boolean;
|
|
1168
828
|
created_by?: string | undefined;
|
|
1169
829
|
updated_by?: string | undefined;
|
|
830
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1170
831
|
})[] | undefined;
|
|
1171
832
|
acceptance_status?: "accepted" | "justification_required" | "under_review" | "rejected" | undefined;
|
|
1172
|
-
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
1173
833
|
pto_message?: string | undefined;
|
|
834
|
+
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
1174
835
|
trip_id?: string | undefined;
|
|
1175
836
|
}, {
|
|
1176
837
|
_id?: string | undefined;
|
|
@@ -1184,6 +845,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1184
845
|
type: "note";
|
|
1185
846
|
created_by?: string | undefined;
|
|
1186
847
|
updated_by?: string | undefined;
|
|
848
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1187
849
|
} | {
|
|
1188
850
|
_id: string;
|
|
1189
851
|
created_at: number;
|
|
@@ -1192,22 +854,23 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
1192
854
|
updated_by: "system";
|
|
1193
855
|
message: string;
|
|
1194
856
|
type: "system_info";
|
|
857
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1195
858
|
} | {
|
|
1196
859
|
_id: string;
|
|
1197
860
|
created_at: number;
|
|
1198
861
|
updated_at: number;
|
|
1199
|
-
type: "
|
|
1200
|
-
curr_status: string;
|
|
1201
|
-
prev_status: string;
|
|
862
|
+
type: "status_changed";
|
|
863
|
+
curr_status: string | boolean;
|
|
864
|
+
prev_status: string | boolean;
|
|
1202
865
|
created_by?: string | undefined;
|
|
1203
866
|
updated_by?: string | undefined;
|
|
867
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1204
868
|
})[] | undefined;
|
|
1205
869
|
acceptance_status?: "accepted" | "justification_required" | "under_review" | "rejected" | undefined;
|
|
1206
|
-
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
1207
870
|
pto_message?: string | undefined;
|
|
871
|
+
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
1208
872
|
trip_id?: string | undefined;
|
|
1209
873
|
}>;
|
|
1210
874
|
export type RideJustification = z.infer<typeof RideJustificationSchema>;
|
|
1211
875
|
export type CreateRideJustificationDto = z.infer<typeof CreateRideJustificationSchema>;
|
|
1212
876
|
export type UpdateRideJustificationDto = z.infer<typeof UpdateRideJustificationSchema>;
|
|
1213
|
-
export {};
|