@tmlmobilidade/types 20250910.1526.7 → 20250910.1541.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.
@@ -1,103 +1,251 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const RideAuditSchema: 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
- comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
11
- _id: z.ZodString;
12
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
13
- created_by: z.ZodDefault<z.ZodString>;
14
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
15
- updated_by: z.ZodDefault<z.ZodString>;
16
- } & {
17
- message: z.ZodString;
18
- type: z.ZodLiteral<"note">;
19
- }, "strip", z.ZodTypeAny, {
20
- _id: string;
21
- created_at: number & {
22
- __brand: "UnixTimestamp";
23
- };
24
- created_by: string;
25
- updated_at: number & {
26
- __brand: "UnixTimestamp";
27
- };
28
- updated_by: string;
29
- message: string;
30
- type: "note";
9
+ analysis: z.ZodObject<{
10
+ error_message: z.ZodOptional<z.ZodString>;
11
+ grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
12
+ reason: z.ZodString;
13
+ }, "strict", z.ZodTypeAny, {
14
+ grade: "error" | "pass" | "fail" | "skip";
15
+ reason: string;
16
+ error_message?: string | undefined;
31
17
  }, {
32
- _id: string;
33
- created_at: number;
34
- updated_at: number;
35
- message: string;
36
- type: "note";
37
- created_by?: string | undefined;
38
- updated_by?: string | undefined;
39
- }>, z.ZodObject<{
40
- _id: z.ZodString;
41
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
42
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
43
- } & {
44
- created_by: z.ZodLiteral<"system">;
45
- message: z.ZodString;
46
- type: z.ZodLiteral<"system_info">;
47
- updated_by: z.ZodLiteral<"system">;
48
- }, "strip", z.ZodTypeAny, {
49
- _id: string;
50
- created_at: number & {
51
- __brand: "UnixTimestamp";
52
- };
53
- created_by: "system";
54
- updated_at: number & {
55
- __brand: "UnixTimestamp";
56
- };
57
- updated_by: "system";
58
- message: string;
59
- type: "system_info";
60
- }, {
61
- _id: string;
62
- created_at: number;
63
- created_by: "system";
64
- updated_at: number;
65
- updated_by: "system";
66
- message: string;
67
- type: "system_info";
68
- }>, z.ZodObject<{
18
+ grade: "error" | "pass" | "fail" | "skip";
19
+ reason: string;
20
+ error_message?: string | undefined;
21
+ }>;
22
+ is_locked: z.ZodDefault<z.ZodBoolean>;
23
+ justification: z.ZodObject<{
69
24
  _id: z.ZodString;
70
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
25
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
71
26
  created_by: z.ZodDefault<z.ZodString>;
72
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
27
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
73
28
  updated_by: z.ZodDefault<z.ZodString>;
74
29
  } & {
75
- curr_status: z.ZodString;
76
- prev_status: z.ZodString;
77
- type: z.ZodLiteral<"statusChanged">;
78
- }, "strip", z.ZodTypeAny, {
79
- _id: string;
80
- created_at: number & {
81
- __brand: "UnixTimestamp";
82
- };
83
- created_by: string;
84
- updated_at: number & {
85
- __brand: "UnixTimestamp";
86
- };
87
- updated_by: string;
88
- type: "statusChanged";
89
- curr_status: string;
90
- prev_status: string;
91
- }, {
92
- _id: string;
93
- created_at: number;
94
- updated_at: number;
95
- type: "statusChanged";
96
- curr_status: string;
97
- prev_status: string;
98
- created_by?: string | undefined;
99
- updated_by?: string | undefined;
100
- }>]>, {
30
+ acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
31
+ comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
32
+ _id: z.ZodString;
33
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
34
+ created_by: z.ZodDefault<z.ZodString>;
35
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
36
+ updated_by: z.ZodDefault<z.ZodString>;
37
+ } & {
38
+ message: z.ZodString;
39
+ type: z.ZodLiteral<"note">;
40
+ }, "strip", z.ZodTypeAny, {
41
+ _id: string;
42
+ created_at: number & {
43
+ __brand: "UnixTimestamp";
44
+ };
45
+ created_by: string;
46
+ updated_at: number & {
47
+ __brand: "UnixTimestamp";
48
+ };
49
+ updated_by: string;
50
+ message: string;
51
+ type: "note";
52
+ }, {
53
+ _id: string;
54
+ created_at: number;
55
+ updated_at: number;
56
+ message: string;
57
+ type: "note";
58
+ created_by?: string | undefined;
59
+ updated_by?: string | undefined;
60
+ }>, z.ZodObject<{
61
+ _id: z.ZodString;
62
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
63
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
64
+ } & {
65
+ created_by: z.ZodLiteral<"system">;
66
+ message: z.ZodString;
67
+ type: z.ZodLiteral<"system_info">;
68
+ updated_by: z.ZodLiteral<"system">;
69
+ }, "strip", z.ZodTypeAny, {
70
+ _id: string;
71
+ created_at: number & {
72
+ __brand: "UnixTimestamp";
73
+ };
74
+ created_by: "system";
75
+ updated_at: number & {
76
+ __brand: "UnixTimestamp";
77
+ };
78
+ updated_by: "system";
79
+ message: string;
80
+ type: "system_info";
81
+ }, {
82
+ _id: string;
83
+ created_at: number;
84
+ created_by: "system";
85
+ updated_at: number;
86
+ updated_by: "system";
87
+ message: string;
88
+ type: "system_info";
89
+ }>, z.ZodObject<{
90
+ _id: z.ZodString;
91
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
92
+ created_by: z.ZodDefault<z.ZodString>;
93
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
94
+ updated_by: z.ZodDefault<z.ZodString>;
95
+ } & {
96
+ curr_status: z.ZodString;
97
+ prev_status: z.ZodString;
98
+ type: z.ZodLiteral<"statusChanged">;
99
+ }, "strip", z.ZodTypeAny, {
100
+ _id: string;
101
+ created_at: number & {
102
+ __brand: "UnixTimestamp";
103
+ };
104
+ created_by: string;
105
+ updated_at: number & {
106
+ __brand: "UnixTimestamp";
107
+ };
108
+ updated_by: string;
109
+ type: "statusChanged";
110
+ curr_status: string;
111
+ prev_status: string;
112
+ }, {
113
+ _id: string;
114
+ created_at: number;
115
+ updated_at: number;
116
+ type: "statusChanged";
117
+ curr_status: string;
118
+ prev_status: string;
119
+ created_by?: string | undefined;
120
+ updated_by?: string | undefined;
121
+ }>]>, {
122
+ _id: string;
123
+ created_at: number & {
124
+ __brand: "UnixTimestamp";
125
+ };
126
+ created_by: string;
127
+ updated_at: number & {
128
+ __brand: "UnixTimestamp";
129
+ };
130
+ updated_by: string;
131
+ message: string;
132
+ type: "note";
133
+ } | {
134
+ _id: string;
135
+ created_at: number & {
136
+ __brand: "UnixTimestamp";
137
+ };
138
+ created_by: "system";
139
+ updated_at: number & {
140
+ __brand: "UnixTimestamp";
141
+ };
142
+ updated_by: "system";
143
+ message: string;
144
+ type: "system_info";
145
+ } | {
146
+ _id: string;
147
+ created_at: number & {
148
+ __brand: "UnixTimestamp";
149
+ };
150
+ created_by: string;
151
+ updated_at: number & {
152
+ __brand: "UnixTimestamp";
153
+ };
154
+ updated_by: string;
155
+ type: "statusChanged";
156
+ curr_status: string;
157
+ prev_status: string;
158
+ }, {
159
+ _id: string;
160
+ created_at: number;
161
+ updated_at: number;
162
+ message: string;
163
+ type: "note";
164
+ created_by?: string | undefined;
165
+ updated_by?: string | undefined;
166
+ } | {
167
+ _id: string;
168
+ created_at: number;
169
+ created_by: "system";
170
+ updated_at: number;
171
+ updated_by: "system";
172
+ message: string;
173
+ type: "system_info";
174
+ } | {
175
+ _id: string;
176
+ created_at: number;
177
+ updated_at: number;
178
+ type: "statusChanged";
179
+ curr_status: string;
180
+ prev_status: string;
181
+ created_by?: string | undefined;
182
+ updated_by?: string | undefined;
183
+ }>, {
184
+ _id: string;
185
+ created_at: number & {
186
+ __brand: "UnixTimestamp";
187
+ };
188
+ created_by: string;
189
+ updated_at: number & {
190
+ __brand: "UnixTimestamp";
191
+ };
192
+ updated_by: string;
193
+ message: string;
194
+ type: "note";
195
+ } | {
196
+ _id: string;
197
+ created_at: number & {
198
+ __brand: "UnixTimestamp";
199
+ };
200
+ created_by: "system";
201
+ updated_at: number & {
202
+ __brand: "UnixTimestamp";
203
+ };
204
+ updated_by: "system";
205
+ message: string;
206
+ type: "system_info";
207
+ } | {
208
+ _id: string;
209
+ created_at: number & {
210
+ __brand: "UnixTimestamp";
211
+ };
212
+ created_by: string;
213
+ updated_at: number & {
214
+ __brand: "UnixTimestamp";
215
+ };
216
+ updated_by: string;
217
+ type: "statusChanged";
218
+ curr_status: string;
219
+ prev_status: string;
220
+ }, {
221
+ _id: string;
222
+ created_at: number;
223
+ updated_at: number;
224
+ message: string;
225
+ type: "note";
226
+ created_by?: string | undefined;
227
+ updated_by?: string | undefined;
228
+ } | {
229
+ _id: string;
230
+ created_at: number;
231
+ created_by: "system";
232
+ updated_at: number;
233
+ updated_by: "system";
234
+ message: string;
235
+ type: "system_info";
236
+ } | {
237
+ _id: string;
238
+ created_at: number;
239
+ updated_at: number;
240
+ type: "statusChanged";
241
+ curr_status: string;
242
+ prev_status: string;
243
+ created_by?: string | undefined;
244
+ updated_by?: string | undefined;
245
+ }>, "many">>;
246
+ justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
247
+ pto_message: z.ZodDefault<z.ZodString>;
248
+ }, "strict", z.ZodTypeAny, {
101
249
  _id: string;
102
250
  created_at: number & {
103
251
  __brand: "UnixTimestamp";
@@ -107,60 +255,83 @@ export declare const RideAuditSchema: z.ZodObject<{
107
255
  __brand: "UnixTimestamp";
108
256
  };
109
257
  updated_by: string;
110
- message: string;
111
- type: "note";
112
- } | {
113
- _id: string;
114
- created_at: number & {
115
- __brand: "UnixTimestamp";
116
- };
117
- created_by: "system";
118
- updated_at: number & {
119
- __brand: "UnixTimestamp";
120
- };
121
- updated_by: "system";
122
- message: string;
123
- type: "system_info";
124
- } | {
125
- _id: string;
126
- created_at: number & {
127
- __brand: "UnixTimestamp";
128
- };
129
- created_by: string;
130
- updated_at: number & {
131
- __brand: "UnixTimestamp";
132
- };
133
- updated_by: string;
134
- type: "statusChanged";
135
- curr_status: string;
136
- prev_status: string;
258
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
259
+ comments: ({
260
+ _id: string;
261
+ created_at: number & {
262
+ __brand: "UnixTimestamp";
263
+ };
264
+ created_by: string;
265
+ updated_at: number & {
266
+ __brand: "UnixTimestamp";
267
+ };
268
+ updated_by: string;
269
+ message: string;
270
+ type: "note";
271
+ } | {
272
+ _id: string;
273
+ created_at: number & {
274
+ __brand: "UnixTimestamp";
275
+ };
276
+ created_by: "system";
277
+ updated_at: number & {
278
+ __brand: "UnixTimestamp";
279
+ };
280
+ updated_by: "system";
281
+ message: string;
282
+ type: "system_info";
283
+ } | {
284
+ _id: string;
285
+ created_at: number & {
286
+ __brand: "UnixTimestamp";
287
+ };
288
+ created_by: string;
289
+ updated_at: number & {
290
+ __brand: "UnixTimestamp";
291
+ };
292
+ updated_by: string;
293
+ type: "statusChanged";
294
+ curr_status: string;
295
+ prev_status: string;
296
+ })[];
297
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
298
+ pto_message: string;
137
299
  }, {
138
300
  _id: string;
139
301
  created_at: number;
140
302
  updated_at: number;
141
- message: string;
142
- type: "note";
303
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
304
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
143
305
  created_by?: string | undefined;
144
306
  updated_by?: string | undefined;
145
- } | {
146
- _id: string;
147
- created_at: number;
148
- created_by: "system";
149
- updated_at: number;
150
- updated_by: "system";
151
- message: string;
152
- type: "system_info";
153
- } | {
154
- _id: string;
155
- created_at: number;
156
- updated_at: number;
157
- type: "statusChanged";
158
- curr_status: string;
159
- prev_status: string;
160
- created_by?: string | undefined;
161
- updated_by?: string | undefined;
162
- }>, "many">>;
163
- is_locked: z.ZodDefault<z.ZodBoolean>;
307
+ comments?: ({
308
+ _id: string;
309
+ created_at: number;
310
+ updated_at: number;
311
+ message: string;
312
+ type: "note";
313
+ created_by?: string | undefined;
314
+ updated_by?: string | undefined;
315
+ } | {
316
+ _id: string;
317
+ created_at: number;
318
+ created_by: "system";
319
+ updated_at: number;
320
+ updated_by: "system";
321
+ message: string;
322
+ type: "system_info";
323
+ } | {
324
+ _id: string;
325
+ created_at: number;
326
+ updated_at: number;
327
+ type: "statusChanged";
328
+ curr_status: string;
329
+ prev_status: string;
330
+ created_by?: string | undefined;
331
+ updated_by?: string | undefined;
332
+ })[] | undefined;
333
+ pto_message?: string | undefined;
334
+ }>;
164
335
  ride_id: z.ZodString;
165
336
  }, "strict", z.ZodTypeAny, {
166
337
  _id: string;
@@ -173,31 +344,12 @@ export declare const RideAuditSchema: z.ZodObject<{
173
344
  };
174
345
  updated_by: string;
175
346
  is_locked: boolean;
176
- comments: ({
177
- _id: string;
178
- created_at: number & {
179
- __brand: "UnixTimestamp";
180
- };
181
- created_by: string;
182
- updated_at: number & {
183
- __brand: "UnixTimestamp";
184
- };
185
- updated_by: string;
186
- message: string;
187
- type: "note";
188
- } | {
189
- _id: string;
190
- created_at: number & {
191
- __brand: "UnixTimestamp";
192
- };
193
- created_by: "system";
194
- updated_at: number & {
195
- __brand: "UnixTimestamp";
196
- };
197
- updated_by: "system";
198
- message: string;
199
- type: "system_info";
200
- } | {
347
+ analysis: {
348
+ grade: "error" | "pass" | "fail" | "skip";
349
+ reason: string;
350
+ error_message?: string | undefined;
351
+ };
352
+ justification: {
201
353
  _id: string;
202
354
  created_at: number & {
203
355
  __brand: "UnixTimestamp";
@@ -207,168 +359,345 @@ export declare const RideAuditSchema: z.ZodObject<{
207
359
  __brand: "UnixTimestamp";
208
360
  };
209
361
  updated_by: string;
210
- type: "statusChanged";
211
- curr_status: string;
212
- prev_status: string;
213
- })[];
362
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
363
+ comments: ({
364
+ _id: string;
365
+ created_at: number & {
366
+ __brand: "UnixTimestamp";
367
+ };
368
+ created_by: string;
369
+ updated_at: number & {
370
+ __brand: "UnixTimestamp";
371
+ };
372
+ updated_by: string;
373
+ message: string;
374
+ type: "note";
375
+ } | {
376
+ _id: string;
377
+ created_at: number & {
378
+ __brand: "UnixTimestamp";
379
+ };
380
+ created_by: "system";
381
+ updated_at: number & {
382
+ __brand: "UnixTimestamp";
383
+ };
384
+ updated_by: "system";
385
+ message: string;
386
+ type: "system_info";
387
+ } | {
388
+ _id: string;
389
+ created_at: number & {
390
+ __brand: "UnixTimestamp";
391
+ };
392
+ created_by: string;
393
+ updated_at: number & {
394
+ __brand: "UnixTimestamp";
395
+ };
396
+ updated_by: string;
397
+ type: "statusChanged";
398
+ curr_status: string;
399
+ prev_status: string;
400
+ })[];
401
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
402
+ pto_message: string;
403
+ };
214
404
  ride_id: string;
215
405
  }, {
216
406
  _id: string;
217
407
  created_at: number;
218
408
  updated_at: number;
219
- ride_id: string;
220
- created_by?: string | undefined;
221
- updated_by?: string | undefined;
222
- is_locked?: boolean | undefined;
223
- comments?: ({
224
- _id: string;
225
- created_at: number;
226
- updated_at: number;
227
- message: string;
228
- type: "note";
229
- created_by?: string | undefined;
230
- updated_by?: string | undefined;
231
- } | {
232
- _id: string;
233
- created_at: number;
234
- created_by: "system";
235
- updated_at: number;
236
- updated_by: "system";
237
- message: string;
238
- type: "system_info";
239
- } | {
409
+ analysis: {
410
+ grade: "error" | "pass" | "fail" | "skip";
411
+ reason: string;
412
+ error_message?: string | undefined;
413
+ };
414
+ justification: {
240
415
  _id: string;
241
416
  created_at: number;
242
417
  updated_at: number;
243
- type: "statusChanged";
244
- curr_status: string;
245
- prev_status: string;
418
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
419
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
246
420
  created_by?: string | undefined;
247
421
  updated_by?: string | undefined;
248
- })[] | undefined;
422
+ comments?: ({
423
+ _id: string;
424
+ created_at: number;
425
+ updated_at: number;
426
+ message: string;
427
+ type: "note";
428
+ created_by?: string | undefined;
429
+ updated_by?: string | undefined;
430
+ } | {
431
+ _id: string;
432
+ created_at: number;
433
+ created_by: "system";
434
+ updated_at: number;
435
+ updated_by: "system";
436
+ message: string;
437
+ type: "system_info";
438
+ } | {
439
+ _id: string;
440
+ created_at: number;
441
+ updated_at: number;
442
+ type: "statusChanged";
443
+ curr_status: string;
444
+ prev_status: string;
445
+ created_by?: string | undefined;
446
+ updated_by?: string | undefined;
447
+ })[] | undefined;
448
+ pto_message?: string | undefined;
449
+ };
450
+ ride_id: string;
451
+ created_by?: string | undefined;
452
+ updated_by?: string | undefined;
453
+ is_locked?: boolean | undefined;
249
454
  }>;
250
455
  export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
251
456
  _id: z.ZodOptional<z.ZodString>;
252
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
457
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
253
458
  created_by: z.ZodDefault<z.ZodString>;
254
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
459
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
255
460
  updated_by: z.ZodDefault<z.ZodString>;
256
461
  is_locked: z.ZodDefault<z.ZodBoolean>;
257
- comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
258
- _id: z.ZodString;
259
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
260
- created_by: z.ZodDefault<z.ZodString>;
261
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
262
- updated_by: z.ZodDefault<z.ZodString>;
263
- } & {
264
- message: z.ZodString;
265
- type: z.ZodLiteral<"note">;
266
- }, "strip", z.ZodTypeAny, {
267
- _id: string;
268
- created_at: number & {
269
- __brand: "UnixTimestamp";
270
- };
271
- created_by: string;
272
- updated_at: number & {
273
- __brand: "UnixTimestamp";
274
- };
275
- updated_by: string;
276
- message: string;
277
- type: "note";
278
- }, {
279
- _id: string;
280
- created_at: number;
281
- updated_at: number;
282
- message: string;
283
- type: "note";
284
- created_by?: string | undefined;
285
- updated_by?: string | undefined;
286
- }>, z.ZodObject<{
287
- _id: z.ZodString;
288
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
289
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
290
- } & {
291
- created_by: z.ZodLiteral<"system">;
292
- message: z.ZodString;
293
- type: z.ZodLiteral<"system_info">;
294
- updated_by: z.ZodLiteral<"system">;
295
- }, "strip", z.ZodTypeAny, {
296
- _id: string;
297
- created_at: number & {
298
- __brand: "UnixTimestamp";
299
- };
300
- created_by: "system";
301
- updated_at: number & {
302
- __brand: "UnixTimestamp";
303
- };
304
- updated_by: "system";
305
- message: string;
306
- type: "system_info";
462
+ analysis: z.ZodObject<{
463
+ error_message: z.ZodOptional<z.ZodString>;
464
+ grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
465
+ reason: z.ZodString;
466
+ }, "strict", z.ZodTypeAny, {
467
+ grade: "error" | "pass" | "fail" | "skip";
468
+ reason: string;
469
+ error_message?: string | undefined;
307
470
  }, {
308
- _id: string;
309
- created_at: number;
310
- created_by: "system";
311
- updated_at: number;
312
- updated_by: "system";
313
- message: string;
314
- type: "system_info";
315
- }>, z.ZodObject<{
471
+ grade: "error" | "pass" | "fail" | "skip";
472
+ reason: string;
473
+ error_message?: string | undefined;
474
+ }>;
475
+ justification: z.ZodObject<{
316
476
  _id: z.ZodString;
317
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
477
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
318
478
  created_by: z.ZodDefault<z.ZodString>;
319
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
479
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
320
480
  updated_by: z.ZodDefault<z.ZodString>;
321
481
  } & {
322
- curr_status: z.ZodString;
323
- prev_status: z.ZodString;
324
- type: z.ZodLiteral<"statusChanged">;
325
- }, "strip", z.ZodTypeAny, {
326
- _id: string;
327
- created_at: number & {
328
- __brand: "UnixTimestamp";
329
- };
330
- created_by: string;
331
- updated_at: number & {
332
- __brand: "UnixTimestamp";
333
- };
334
- updated_by: string;
335
- type: "statusChanged";
336
- curr_status: string;
337
- prev_status: string;
338
- }, {
339
- _id: string;
340
- created_at: number;
341
- updated_at: number;
342
- type: "statusChanged";
343
- curr_status: string;
344
- prev_status: string;
345
- created_by?: string | undefined;
346
- updated_by?: string | undefined;
347
- }>]>, {
348
- _id: string;
349
- created_at: number & {
350
- __brand: "UnixTimestamp";
351
- };
352
- created_by: string;
353
- updated_at: number & {
354
- __brand: "UnixTimestamp";
355
- };
356
- updated_by: string;
357
- message: string;
358
- type: "note";
359
- } | {
360
- _id: string;
361
- created_at: number & {
362
- __brand: "UnixTimestamp";
363
- };
364
- created_by: "system";
365
- updated_at: number & {
366
- __brand: "UnixTimestamp";
367
- };
368
- updated_by: "system";
369
- message: string;
370
- type: "system_info";
371
- } | {
482
+ acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
483
+ comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
484
+ _id: z.ZodString;
485
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
486
+ created_by: z.ZodDefault<z.ZodString>;
487
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
488
+ updated_by: z.ZodDefault<z.ZodString>;
489
+ } & {
490
+ message: z.ZodString;
491
+ type: z.ZodLiteral<"note">;
492
+ }, "strip", z.ZodTypeAny, {
493
+ _id: string;
494
+ created_at: number & {
495
+ __brand: "UnixTimestamp";
496
+ };
497
+ created_by: string;
498
+ updated_at: number & {
499
+ __brand: "UnixTimestamp";
500
+ };
501
+ updated_by: string;
502
+ message: string;
503
+ type: "note";
504
+ }, {
505
+ _id: string;
506
+ created_at: number;
507
+ updated_at: number;
508
+ message: string;
509
+ type: "note";
510
+ created_by?: string | undefined;
511
+ updated_by?: string | undefined;
512
+ }>, z.ZodObject<{
513
+ _id: z.ZodString;
514
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
515
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
516
+ } & {
517
+ created_by: z.ZodLiteral<"system">;
518
+ message: z.ZodString;
519
+ type: z.ZodLiteral<"system_info">;
520
+ updated_by: z.ZodLiteral<"system">;
521
+ }, "strip", z.ZodTypeAny, {
522
+ _id: string;
523
+ created_at: number & {
524
+ __brand: "UnixTimestamp";
525
+ };
526
+ created_by: "system";
527
+ updated_at: number & {
528
+ __brand: "UnixTimestamp";
529
+ };
530
+ updated_by: "system";
531
+ message: string;
532
+ type: "system_info";
533
+ }, {
534
+ _id: string;
535
+ created_at: number;
536
+ created_by: "system";
537
+ updated_at: number;
538
+ updated_by: "system";
539
+ message: string;
540
+ type: "system_info";
541
+ }>, z.ZodObject<{
542
+ _id: z.ZodString;
543
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
544
+ created_by: z.ZodDefault<z.ZodString>;
545
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
546
+ updated_by: z.ZodDefault<z.ZodString>;
547
+ } & {
548
+ curr_status: z.ZodString;
549
+ prev_status: z.ZodString;
550
+ type: z.ZodLiteral<"statusChanged">;
551
+ }, "strip", z.ZodTypeAny, {
552
+ _id: string;
553
+ created_at: number & {
554
+ __brand: "UnixTimestamp";
555
+ };
556
+ created_by: string;
557
+ updated_at: number & {
558
+ __brand: "UnixTimestamp";
559
+ };
560
+ updated_by: string;
561
+ type: "statusChanged";
562
+ curr_status: string;
563
+ prev_status: string;
564
+ }, {
565
+ _id: string;
566
+ created_at: number;
567
+ updated_at: number;
568
+ type: "statusChanged";
569
+ curr_status: string;
570
+ prev_status: string;
571
+ created_by?: string | undefined;
572
+ updated_by?: string | undefined;
573
+ }>]>, {
574
+ _id: string;
575
+ created_at: number & {
576
+ __brand: "UnixTimestamp";
577
+ };
578
+ created_by: string;
579
+ updated_at: number & {
580
+ __brand: "UnixTimestamp";
581
+ };
582
+ updated_by: string;
583
+ message: string;
584
+ type: "note";
585
+ } | {
586
+ _id: string;
587
+ created_at: number & {
588
+ __brand: "UnixTimestamp";
589
+ };
590
+ created_by: "system";
591
+ updated_at: number & {
592
+ __brand: "UnixTimestamp";
593
+ };
594
+ updated_by: "system";
595
+ message: string;
596
+ type: "system_info";
597
+ } | {
598
+ _id: string;
599
+ created_at: number & {
600
+ __brand: "UnixTimestamp";
601
+ };
602
+ created_by: string;
603
+ updated_at: number & {
604
+ __brand: "UnixTimestamp";
605
+ };
606
+ updated_by: string;
607
+ type: "statusChanged";
608
+ curr_status: string;
609
+ prev_status: string;
610
+ }, {
611
+ _id: string;
612
+ created_at: number;
613
+ updated_at: number;
614
+ message: string;
615
+ type: "note";
616
+ created_by?: string | undefined;
617
+ updated_by?: string | undefined;
618
+ } | {
619
+ _id: string;
620
+ created_at: number;
621
+ created_by: "system";
622
+ updated_at: number;
623
+ updated_by: "system";
624
+ message: string;
625
+ type: "system_info";
626
+ } | {
627
+ _id: string;
628
+ created_at: number;
629
+ updated_at: number;
630
+ type: "statusChanged";
631
+ curr_status: string;
632
+ prev_status: string;
633
+ created_by?: string | undefined;
634
+ updated_by?: string | undefined;
635
+ }>, {
636
+ _id: string;
637
+ created_at: number & {
638
+ __brand: "UnixTimestamp";
639
+ };
640
+ created_by: string;
641
+ updated_at: number & {
642
+ __brand: "UnixTimestamp";
643
+ };
644
+ updated_by: string;
645
+ message: string;
646
+ type: "note";
647
+ } | {
648
+ _id: string;
649
+ created_at: number & {
650
+ __brand: "UnixTimestamp";
651
+ };
652
+ created_by: "system";
653
+ updated_at: number & {
654
+ __brand: "UnixTimestamp";
655
+ };
656
+ updated_by: "system";
657
+ message: string;
658
+ type: "system_info";
659
+ } | {
660
+ _id: string;
661
+ created_at: number & {
662
+ __brand: "UnixTimestamp";
663
+ };
664
+ created_by: string;
665
+ updated_at: number & {
666
+ __brand: "UnixTimestamp";
667
+ };
668
+ updated_by: string;
669
+ type: "statusChanged";
670
+ curr_status: string;
671
+ prev_status: string;
672
+ }, {
673
+ _id: string;
674
+ created_at: number;
675
+ updated_at: number;
676
+ message: string;
677
+ type: "note";
678
+ created_by?: string | undefined;
679
+ updated_by?: string | undefined;
680
+ } | {
681
+ _id: string;
682
+ created_at: number;
683
+ created_by: "system";
684
+ updated_at: number;
685
+ updated_by: "system";
686
+ message: string;
687
+ type: "system_info";
688
+ } | {
689
+ _id: string;
690
+ created_at: number;
691
+ updated_at: number;
692
+ type: "statusChanged";
693
+ curr_status: string;
694
+ prev_status: string;
695
+ created_by?: string | undefined;
696
+ updated_by?: string | undefined;
697
+ }>, "many">>;
698
+ justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
699
+ pto_message: z.ZodDefault<z.ZodString>;
700
+ }, "strict", z.ZodTypeAny, {
372
701
  _id: string;
373
702
  created_at: number & {
374
703
  __brand: "UnixTimestamp";
@@ -378,65 +707,94 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
378
707
  __brand: "UnixTimestamp";
379
708
  };
380
709
  updated_by: string;
381
- type: "statusChanged";
382
- curr_status: string;
383
- prev_status: string;
710
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
711
+ comments: ({
712
+ _id: string;
713
+ created_at: number & {
714
+ __brand: "UnixTimestamp";
715
+ };
716
+ created_by: string;
717
+ updated_at: number & {
718
+ __brand: "UnixTimestamp";
719
+ };
720
+ updated_by: string;
721
+ message: string;
722
+ type: "note";
723
+ } | {
724
+ _id: string;
725
+ created_at: number & {
726
+ __brand: "UnixTimestamp";
727
+ };
728
+ created_by: "system";
729
+ updated_at: number & {
730
+ __brand: "UnixTimestamp";
731
+ };
732
+ updated_by: "system";
733
+ message: string;
734
+ type: "system_info";
735
+ } | {
736
+ _id: string;
737
+ created_at: number & {
738
+ __brand: "UnixTimestamp";
739
+ };
740
+ created_by: string;
741
+ updated_at: number & {
742
+ __brand: "UnixTimestamp";
743
+ };
744
+ updated_by: string;
745
+ type: "statusChanged";
746
+ curr_status: string;
747
+ prev_status: string;
748
+ })[];
749
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
750
+ pto_message: string;
384
751
  }, {
385
752
  _id: string;
386
753
  created_at: number;
387
754
  updated_at: number;
388
- message: string;
389
- type: "note";
755
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
756
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
390
757
  created_by?: string | undefined;
391
758
  updated_by?: string | undefined;
392
- } | {
393
- _id: string;
394
- created_at: number;
395
- created_by: "system";
396
- updated_at: number;
397
- updated_by: "system";
398
- message: string;
399
- type: "system_info";
400
- } | {
401
- _id: string;
402
- created_at: number;
403
- updated_at: number;
404
- type: "statusChanged";
405
- curr_status: string;
406
- prev_status: string;
407
- created_by?: string | undefined;
408
- updated_by?: string | undefined;
409
- }>, "many">>;
759
+ comments?: ({
760
+ _id: string;
761
+ created_at: number;
762
+ updated_at: number;
763
+ message: string;
764
+ type: "note";
765
+ created_by?: string | undefined;
766
+ updated_by?: string | undefined;
767
+ } | {
768
+ _id: string;
769
+ created_at: number;
770
+ created_by: "system";
771
+ updated_at: number;
772
+ updated_by: "system";
773
+ message: string;
774
+ type: "system_info";
775
+ } | {
776
+ _id: string;
777
+ created_at: number;
778
+ updated_at: number;
779
+ type: "statusChanged";
780
+ curr_status: string;
781
+ prev_status: string;
782
+ created_by?: string | undefined;
783
+ updated_by?: string | undefined;
784
+ })[] | undefined;
785
+ pto_message?: string | undefined;
786
+ }>;
410
787
  ride_id: z.ZodString;
411
788
  }, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
412
789
  created_by: string;
413
790
  updated_by: string;
414
791
  is_locked: boolean;
415
- comments: ({
416
- _id: string;
417
- created_at: number & {
418
- __brand: "UnixTimestamp";
419
- };
420
- created_by: string;
421
- updated_at: number & {
422
- __brand: "UnixTimestamp";
423
- };
424
- updated_by: string;
425
- message: string;
426
- type: "note";
427
- } | {
428
- _id: string;
429
- created_at: number & {
430
- __brand: "UnixTimestamp";
431
- };
432
- created_by: "system";
433
- updated_at: number & {
434
- __brand: "UnixTimestamp";
435
- };
436
- updated_by: "system";
437
- message: string;
438
- type: "system_info";
439
- } | {
792
+ analysis: {
793
+ grade: "error" | "pass" | "fail" | "skip";
794
+ reason: string;
795
+ error_message?: string | undefined;
796
+ };
797
+ justification: {
440
798
  _id: string;
441
799
  created_at: number & {
442
800
  __brand: "UnixTimestamp";
@@ -446,119 +804,342 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
446
804
  __brand: "UnixTimestamp";
447
805
  };
448
806
  updated_by: string;
449
- type: "statusChanged";
450
- curr_status: string;
451
- prev_status: string;
452
- })[];
807
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
808
+ comments: ({
809
+ _id: string;
810
+ created_at: number & {
811
+ __brand: "UnixTimestamp";
812
+ };
813
+ created_by: string;
814
+ updated_at: number & {
815
+ __brand: "UnixTimestamp";
816
+ };
817
+ updated_by: string;
818
+ message: string;
819
+ type: "note";
820
+ } | {
821
+ _id: string;
822
+ created_at: number & {
823
+ __brand: "UnixTimestamp";
824
+ };
825
+ created_by: "system";
826
+ updated_at: number & {
827
+ __brand: "UnixTimestamp";
828
+ };
829
+ updated_by: "system";
830
+ message: string;
831
+ type: "system_info";
832
+ } | {
833
+ _id: string;
834
+ created_at: number & {
835
+ __brand: "UnixTimestamp";
836
+ };
837
+ created_by: string;
838
+ updated_at: number & {
839
+ __brand: "UnixTimestamp";
840
+ };
841
+ updated_by: string;
842
+ type: "statusChanged";
843
+ curr_status: string;
844
+ prev_status: string;
845
+ })[];
846
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
847
+ pto_message: string;
848
+ };
453
849
  ride_id: string;
454
850
  _id?: string | undefined;
455
851
  }, {
456
- ride_id: string;
457
- _id?: string | undefined;
458
- created_by?: string | undefined;
459
- updated_by?: string | undefined;
460
- is_locked?: boolean | undefined;
461
- comments?: ({
462
- _id: string;
463
- created_at: number;
464
- updated_at: number;
465
- message: string;
466
- type: "note";
467
- created_by?: string | undefined;
468
- updated_by?: string | undefined;
469
- } | {
470
- _id: string;
471
- created_at: number;
472
- created_by: "system";
473
- updated_at: number;
474
- updated_by: "system";
475
- message: string;
476
- type: "system_info";
477
- } | {
852
+ analysis: {
853
+ grade: "error" | "pass" | "fail" | "skip";
854
+ reason: string;
855
+ error_message?: string | undefined;
856
+ };
857
+ justification: {
478
858
  _id: string;
479
859
  created_at: number;
480
860
  updated_at: number;
481
- type: "statusChanged";
482
- curr_status: string;
483
- prev_status: string;
861
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
862
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
484
863
  created_by?: string | undefined;
485
864
  updated_by?: string | undefined;
486
- })[] | undefined;
865
+ comments?: ({
866
+ _id: string;
867
+ created_at: number;
868
+ updated_at: number;
869
+ message: string;
870
+ type: "note";
871
+ created_by?: string | undefined;
872
+ updated_by?: string | undefined;
873
+ } | {
874
+ _id: string;
875
+ created_at: number;
876
+ created_by: "system";
877
+ updated_at: number;
878
+ updated_by: "system";
879
+ message: string;
880
+ type: "system_info";
881
+ } | {
882
+ _id: string;
883
+ created_at: number;
884
+ updated_at: number;
885
+ type: "statusChanged";
886
+ curr_status: string;
887
+ prev_status: string;
888
+ created_by?: string | undefined;
889
+ updated_by?: string | undefined;
890
+ })[] | undefined;
891
+ pto_message?: string | undefined;
892
+ };
893
+ ride_id: string;
894
+ _id?: string | undefined;
895
+ created_by?: string | undefined;
896
+ updated_by?: string | undefined;
897
+ is_locked?: boolean | undefined;
487
898
  }>;
488
899
  export declare const UpdateRideAuditSchema: z.ZodObject<{
489
900
  _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
490
901
  created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
491
902
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
492
903
  is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
493
- comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
494
- _id: z.ZodString;
495
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
496
- created_by: z.ZodDefault<z.ZodString>;
497
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
498
- updated_by: z.ZodDefault<z.ZodString>;
499
- } & {
500
- message: z.ZodString;
501
- type: z.ZodLiteral<"note">;
502
- }, "strip", z.ZodTypeAny, {
503
- _id: string;
504
- created_at: number & {
505
- __brand: "UnixTimestamp";
506
- };
507
- created_by: string;
508
- updated_at: number & {
509
- __brand: "UnixTimestamp";
510
- };
511
- updated_by: string;
512
- message: string;
513
- type: "note";
904
+ analysis: z.ZodOptional<z.ZodObject<{
905
+ error_message: z.ZodOptional<z.ZodString>;
906
+ grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
907
+ reason: z.ZodString;
908
+ }, "strict", z.ZodTypeAny, {
909
+ grade: "error" | "pass" | "fail" | "skip";
910
+ reason: string;
911
+ error_message?: string | undefined;
514
912
  }, {
515
- _id: string;
516
- created_at: number;
517
- updated_at: number;
518
- message: string;
519
- type: "note";
520
- created_by?: string | undefined;
521
- updated_by?: string | undefined;
522
- }>, z.ZodObject<{
523
- _id: z.ZodString;
524
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
525
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
526
- } & {
527
- created_by: z.ZodLiteral<"system">;
528
- message: z.ZodString;
529
- type: z.ZodLiteral<"system_info">;
530
- updated_by: z.ZodLiteral<"system">;
531
- }, "strip", z.ZodTypeAny, {
532
- _id: string;
533
- created_at: number & {
534
- __brand: "UnixTimestamp";
535
- };
536
- created_by: "system";
537
- updated_at: number & {
538
- __brand: "UnixTimestamp";
539
- };
540
- updated_by: "system";
541
- message: string;
542
- type: "system_info";
543
- }, {
544
- _id: string;
545
- created_at: number;
546
- created_by: "system";
547
- updated_at: number;
548
- updated_by: "system";
549
- message: string;
550
- type: "system_info";
551
- }>, z.ZodObject<{
913
+ grade: "error" | "pass" | "fail" | "skip";
914
+ reason: string;
915
+ error_message?: string | undefined;
916
+ }>>;
917
+ justification: z.ZodOptional<z.ZodObject<{
552
918
  _id: z.ZodString;
553
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
919
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
554
920
  created_by: z.ZodDefault<z.ZodString>;
555
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
921
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
556
922
  updated_by: z.ZodDefault<z.ZodString>;
557
923
  } & {
558
- curr_status: z.ZodString;
559
- prev_status: z.ZodString;
560
- type: z.ZodLiteral<"statusChanged">;
561
- }, "strip", z.ZodTypeAny, {
924
+ acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
925
+ comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
926
+ _id: z.ZodString;
927
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
928
+ created_by: z.ZodDefault<z.ZodString>;
929
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
930
+ updated_by: z.ZodDefault<z.ZodString>;
931
+ } & {
932
+ message: z.ZodString;
933
+ type: z.ZodLiteral<"note">;
934
+ }, "strip", z.ZodTypeAny, {
935
+ _id: string;
936
+ created_at: number & {
937
+ __brand: "UnixTimestamp";
938
+ };
939
+ created_by: string;
940
+ updated_at: number & {
941
+ __brand: "UnixTimestamp";
942
+ };
943
+ updated_by: string;
944
+ message: string;
945
+ type: "note";
946
+ }, {
947
+ _id: string;
948
+ created_at: number;
949
+ updated_at: number;
950
+ message: string;
951
+ type: "note";
952
+ created_by?: string | undefined;
953
+ updated_by?: string | undefined;
954
+ }>, z.ZodObject<{
955
+ _id: z.ZodString;
956
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
957
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
958
+ } & {
959
+ created_by: z.ZodLiteral<"system">;
960
+ message: z.ZodString;
961
+ type: z.ZodLiteral<"system_info">;
962
+ updated_by: z.ZodLiteral<"system">;
963
+ }, "strip", z.ZodTypeAny, {
964
+ _id: string;
965
+ created_at: number & {
966
+ __brand: "UnixTimestamp";
967
+ };
968
+ created_by: "system";
969
+ updated_at: number & {
970
+ __brand: "UnixTimestamp";
971
+ };
972
+ updated_by: "system";
973
+ message: string;
974
+ type: "system_info";
975
+ }, {
976
+ _id: string;
977
+ created_at: number;
978
+ created_by: "system";
979
+ updated_at: number;
980
+ updated_by: "system";
981
+ message: string;
982
+ type: "system_info";
983
+ }>, z.ZodObject<{
984
+ _id: z.ZodString;
985
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
986
+ created_by: z.ZodDefault<z.ZodString>;
987
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
988
+ updated_by: z.ZodDefault<z.ZodString>;
989
+ } & {
990
+ curr_status: z.ZodString;
991
+ prev_status: z.ZodString;
992
+ type: z.ZodLiteral<"statusChanged">;
993
+ }, "strip", z.ZodTypeAny, {
994
+ _id: string;
995
+ created_at: number & {
996
+ __brand: "UnixTimestamp";
997
+ };
998
+ created_by: string;
999
+ updated_at: number & {
1000
+ __brand: "UnixTimestamp";
1001
+ };
1002
+ updated_by: string;
1003
+ type: "statusChanged";
1004
+ curr_status: string;
1005
+ prev_status: string;
1006
+ }, {
1007
+ _id: string;
1008
+ created_at: number;
1009
+ updated_at: number;
1010
+ type: "statusChanged";
1011
+ curr_status: string;
1012
+ prev_status: string;
1013
+ created_by?: string | undefined;
1014
+ updated_by?: string | undefined;
1015
+ }>]>, {
1016
+ _id: string;
1017
+ created_at: number & {
1018
+ __brand: "UnixTimestamp";
1019
+ };
1020
+ created_by: string;
1021
+ updated_at: number & {
1022
+ __brand: "UnixTimestamp";
1023
+ };
1024
+ updated_by: string;
1025
+ message: string;
1026
+ type: "note";
1027
+ } | {
1028
+ _id: string;
1029
+ created_at: number & {
1030
+ __brand: "UnixTimestamp";
1031
+ };
1032
+ created_by: "system";
1033
+ updated_at: number & {
1034
+ __brand: "UnixTimestamp";
1035
+ };
1036
+ updated_by: "system";
1037
+ message: string;
1038
+ type: "system_info";
1039
+ } | {
1040
+ _id: string;
1041
+ created_at: number & {
1042
+ __brand: "UnixTimestamp";
1043
+ };
1044
+ created_by: string;
1045
+ updated_at: number & {
1046
+ __brand: "UnixTimestamp";
1047
+ };
1048
+ updated_by: string;
1049
+ type: "statusChanged";
1050
+ curr_status: string;
1051
+ prev_status: string;
1052
+ }, {
1053
+ _id: string;
1054
+ created_at: number;
1055
+ updated_at: number;
1056
+ message: string;
1057
+ type: "note";
1058
+ created_by?: string | undefined;
1059
+ updated_by?: string | undefined;
1060
+ } | {
1061
+ _id: string;
1062
+ created_at: number;
1063
+ created_by: "system";
1064
+ updated_at: number;
1065
+ updated_by: "system";
1066
+ message: string;
1067
+ type: "system_info";
1068
+ } | {
1069
+ _id: string;
1070
+ created_at: number;
1071
+ updated_at: number;
1072
+ type: "statusChanged";
1073
+ curr_status: string;
1074
+ prev_status: string;
1075
+ created_by?: string | undefined;
1076
+ updated_by?: string | undefined;
1077
+ }>, {
1078
+ _id: string;
1079
+ created_at: number & {
1080
+ __brand: "UnixTimestamp";
1081
+ };
1082
+ created_by: string;
1083
+ updated_at: number & {
1084
+ __brand: "UnixTimestamp";
1085
+ };
1086
+ updated_by: string;
1087
+ message: string;
1088
+ type: "note";
1089
+ } | {
1090
+ _id: string;
1091
+ created_at: number & {
1092
+ __brand: "UnixTimestamp";
1093
+ };
1094
+ created_by: "system";
1095
+ updated_at: number & {
1096
+ __brand: "UnixTimestamp";
1097
+ };
1098
+ updated_by: "system";
1099
+ message: string;
1100
+ type: "system_info";
1101
+ } | {
1102
+ _id: string;
1103
+ created_at: number & {
1104
+ __brand: "UnixTimestamp";
1105
+ };
1106
+ created_by: string;
1107
+ updated_at: number & {
1108
+ __brand: "UnixTimestamp";
1109
+ };
1110
+ updated_by: string;
1111
+ type: "statusChanged";
1112
+ curr_status: string;
1113
+ prev_status: string;
1114
+ }, {
1115
+ _id: string;
1116
+ created_at: number;
1117
+ updated_at: number;
1118
+ message: string;
1119
+ type: "note";
1120
+ created_by?: string | undefined;
1121
+ updated_by?: string | undefined;
1122
+ } | {
1123
+ _id: string;
1124
+ created_at: number;
1125
+ created_by: "system";
1126
+ updated_at: number;
1127
+ updated_by: "system";
1128
+ message: string;
1129
+ type: "system_info";
1130
+ } | {
1131
+ _id: string;
1132
+ created_at: number;
1133
+ updated_at: number;
1134
+ type: "statusChanged";
1135
+ curr_status: string;
1136
+ prev_status: string;
1137
+ created_by?: string | undefined;
1138
+ updated_by?: string | undefined;
1139
+ }>, "many">>;
1140
+ justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
1141
+ pto_message: z.ZodDefault<z.ZodString>;
1142
+ }, "strict", z.ZodTypeAny, {
562
1143
  _id: string;
563
1144
  created_at: number & {
564
1145
  __brand: "UnixTimestamp";
@@ -568,112 +1149,95 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
568
1149
  __brand: "UnixTimestamp";
569
1150
  };
570
1151
  updated_by: string;
571
- type: "statusChanged";
572
- curr_status: string;
573
- prev_status: string;
1152
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
1153
+ comments: ({
1154
+ _id: string;
1155
+ created_at: number & {
1156
+ __brand: "UnixTimestamp";
1157
+ };
1158
+ created_by: string;
1159
+ updated_at: number & {
1160
+ __brand: "UnixTimestamp";
1161
+ };
1162
+ updated_by: string;
1163
+ message: string;
1164
+ type: "note";
1165
+ } | {
1166
+ _id: string;
1167
+ created_at: number & {
1168
+ __brand: "UnixTimestamp";
1169
+ };
1170
+ created_by: "system";
1171
+ updated_at: number & {
1172
+ __brand: "UnixTimestamp";
1173
+ };
1174
+ updated_by: "system";
1175
+ message: string;
1176
+ type: "system_info";
1177
+ } | {
1178
+ _id: string;
1179
+ created_at: number & {
1180
+ __brand: "UnixTimestamp";
1181
+ };
1182
+ created_by: string;
1183
+ updated_at: number & {
1184
+ __brand: "UnixTimestamp";
1185
+ };
1186
+ updated_by: string;
1187
+ type: "statusChanged";
1188
+ curr_status: string;
1189
+ prev_status: string;
1190
+ })[];
1191
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
1192
+ pto_message: string;
574
1193
  }, {
575
1194
  _id: string;
576
1195
  created_at: number;
577
1196
  updated_at: number;
578
- type: "statusChanged";
579
- curr_status: string;
580
- prev_status: string;
1197
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
1198
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
581
1199
  created_by?: string | undefined;
582
1200
  updated_by?: string | undefined;
583
- }>]>, {
584
- _id: string;
585
- created_at: number & {
586
- __brand: "UnixTimestamp";
587
- };
588
- created_by: string;
589
- updated_at: number & {
590
- __brand: "UnixTimestamp";
591
- };
592
- updated_by: string;
593
- message: string;
594
- type: "note";
595
- } | {
596
- _id: string;
597
- created_at: number & {
598
- __brand: "UnixTimestamp";
599
- };
600
- created_by: "system";
601
- updated_at: number & {
602
- __brand: "UnixTimestamp";
603
- };
604
- updated_by: "system";
605
- message: string;
606
- type: "system_info";
607
- } | {
608
- _id: string;
609
- created_at: number & {
610
- __brand: "UnixTimestamp";
611
- };
612
- created_by: string;
613
- updated_at: number & {
614
- __brand: "UnixTimestamp";
615
- };
616
- updated_by: string;
617
- type: "statusChanged";
618
- curr_status: string;
619
- prev_status: string;
620
- }, {
621
- _id: string;
622
- created_at: number;
623
- updated_at: number;
624
- message: string;
625
- type: "note";
626
- created_by?: string | undefined;
627
- updated_by?: string | undefined;
628
- } | {
629
- _id: string;
630
- created_at: number;
631
- created_by: "system";
632
- updated_at: number;
633
- updated_by: "system";
634
- message: string;
635
- type: "system_info";
636
- } | {
637
- _id: string;
638
- created_at: number;
639
- updated_at: number;
640
- type: "statusChanged";
641
- curr_status: string;
642
- prev_status: string;
643
- created_by?: string | undefined;
644
- updated_by?: string | undefined;
645
- }>, "many">>>;
1201
+ comments?: ({
1202
+ _id: string;
1203
+ created_at: number;
1204
+ updated_at: number;
1205
+ message: string;
1206
+ type: "note";
1207
+ created_by?: string | undefined;
1208
+ updated_by?: string | undefined;
1209
+ } | {
1210
+ _id: string;
1211
+ created_at: number;
1212
+ created_by: "system";
1213
+ updated_at: number;
1214
+ updated_by: "system";
1215
+ message: string;
1216
+ type: "system_info";
1217
+ } | {
1218
+ _id: string;
1219
+ created_at: number;
1220
+ updated_at: number;
1221
+ type: "statusChanged";
1222
+ curr_status: string;
1223
+ prev_status: string;
1224
+ created_by?: string | undefined;
1225
+ updated_by?: string | undefined;
1226
+ })[] | undefined;
1227
+ pto_message?: string | undefined;
1228
+ }>>;
646
1229
  ride_id: z.ZodOptional<z.ZodString>;
647
1230
  }, "strict", z.ZodTypeAny, {
648
1231
  _id?: string | undefined;
649
1232
  created_by?: string | undefined;
650
1233
  updated_by?: string | undefined;
651
1234
  is_locked?: boolean | undefined;
652
- comments?: ({
653
- _id: string;
654
- created_at: number & {
655
- __brand: "UnixTimestamp";
656
- };
657
- created_by: string;
658
- updated_at: number & {
659
- __brand: "UnixTimestamp";
660
- };
661
- updated_by: string;
662
- message: string;
663
- type: "note";
664
- } | {
665
- _id: string;
666
- created_at: number & {
667
- __brand: "UnixTimestamp";
668
- };
669
- created_by: "system";
670
- updated_at: number & {
671
- __brand: "UnixTimestamp";
672
- };
673
- updated_by: "system";
674
- message: string;
675
- type: "system_info";
676
- } | {
1235
+ analysis?: {
1236
+ grade: "error" | "pass" | "fail" | "skip";
1237
+ reason: string;
1238
+ error_message?: string | undefined;
1239
+ } | undefined;
1240
+ justification?: {
677
1241
  _id: string;
678
1242
  created_at: number & {
679
1243
  __brand: "UnixTimestamp";
@@ -683,47 +1247,97 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
683
1247
  __brand: "UnixTimestamp";
684
1248
  };
685
1249
  updated_by: string;
686
- type: "statusChanged";
687
- curr_status: string;
688
- prev_status: string;
689
- })[] | undefined;
1250
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
1251
+ comments: ({
1252
+ _id: string;
1253
+ created_at: number & {
1254
+ __brand: "UnixTimestamp";
1255
+ };
1256
+ created_by: string;
1257
+ updated_at: number & {
1258
+ __brand: "UnixTimestamp";
1259
+ };
1260
+ updated_by: string;
1261
+ message: string;
1262
+ type: "note";
1263
+ } | {
1264
+ _id: string;
1265
+ created_at: number & {
1266
+ __brand: "UnixTimestamp";
1267
+ };
1268
+ created_by: "system";
1269
+ updated_at: number & {
1270
+ __brand: "UnixTimestamp";
1271
+ };
1272
+ updated_by: "system";
1273
+ message: string;
1274
+ type: "system_info";
1275
+ } | {
1276
+ _id: string;
1277
+ created_at: number & {
1278
+ __brand: "UnixTimestamp";
1279
+ };
1280
+ created_by: string;
1281
+ updated_at: number & {
1282
+ __brand: "UnixTimestamp";
1283
+ };
1284
+ updated_by: string;
1285
+ type: "statusChanged";
1286
+ curr_status: string;
1287
+ prev_status: string;
1288
+ })[];
1289
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
1290
+ pto_message: string;
1291
+ } | undefined;
690
1292
  ride_id?: string | undefined;
691
1293
  }, {
692
1294
  _id?: string | undefined;
693
1295
  created_by?: string | undefined;
694
1296
  updated_by?: string | undefined;
695
1297
  is_locked?: boolean | undefined;
696
- comments?: ({
697
- _id: string;
698
- created_at: number;
699
- updated_at: number;
700
- message: string;
701
- type: "note";
702
- created_by?: string | undefined;
703
- updated_by?: string | undefined;
704
- } | {
705
- _id: string;
706
- created_at: number;
707
- created_by: "system";
708
- updated_at: number;
709
- updated_by: "system";
710
- message: string;
711
- type: "system_info";
712
- } | {
1298
+ analysis?: {
1299
+ grade: "error" | "pass" | "fail" | "skip";
1300
+ reason: string;
1301
+ error_message?: string | undefined;
1302
+ } | undefined;
1303
+ justification?: {
713
1304
  _id: string;
714
1305
  created_at: number;
715
1306
  updated_at: number;
716
- type: "statusChanged";
717
- curr_status: string;
718
- prev_status: string;
1307
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
1308
+ justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
719
1309
  created_by?: string | undefined;
720
1310
  updated_by?: string | undefined;
721
- })[] | undefined;
1311
+ comments?: ({
1312
+ _id: string;
1313
+ created_at: number;
1314
+ updated_at: number;
1315
+ message: string;
1316
+ type: "note";
1317
+ created_by?: string | undefined;
1318
+ updated_by?: string | undefined;
1319
+ } | {
1320
+ _id: string;
1321
+ created_at: number;
1322
+ created_by: "system";
1323
+ updated_at: number;
1324
+ updated_by: "system";
1325
+ message: string;
1326
+ type: "system_info";
1327
+ } | {
1328
+ _id: string;
1329
+ created_at: number;
1330
+ updated_at: number;
1331
+ type: "statusChanged";
1332
+ curr_status: string;
1333
+ prev_status: string;
1334
+ created_by?: string | undefined;
1335
+ updated_by?: string | undefined;
1336
+ })[] | undefined;
1337
+ pto_message?: string | undefined;
1338
+ } | undefined;
722
1339
  ride_id?: string | undefined;
723
1340
  }>;
724
- export interface RideAudit extends Omit<z.infer<typeof RideAuditSchema>, 'created_at' | 'updated_at'> {
725
- created_at: UnixTimestamp;
726
- updated_at: UnixTimestamp;
727
- }
1341
+ export type RideAudit = z.infer<typeof RideAuditSchema>;
728
1342
  export type CreateRideAuditDto = z.infer<typeof CreateRideAuditSchema>;
729
- export type UpdateRideAuditDto = Partial<CreateRideAuditDto>;
1343
+ export type UpdateRideAuditDto = z.infer<typeof UpdateRideAuditSchema>;