@tmlmobilidade/types 20250910.1344.34 → 20250910.1538.31

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,122 +1,227 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const RIDE_ACCEPTANCE_STATUS_OPTIONS: readonly ["justification_required", "under_review", "accepted", "rejected"];
4
3
  export declare const RideAcceptanceStatusSchema: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
5
4
  export type RideAcceptanceStatus = z.infer<typeof RideAcceptanceStatusSchema>;
6
- export declare const RideJustificationChangelogSchema: z.ZodObject<{
7
- acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
8
- analysis_result: z.ZodObject<{
9
- error_message: z.ZodOptional<z.ZodString>;
10
- grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
11
- reason: z.ZodString;
12
- }, "strict", z.ZodTypeAny, {
13
- grade: "error" | "pass" | "fail" | "skip";
14
- reason: string;
15
- error_message?: string | undefined;
16
- }, {
17
- grade: "error" | "pass" | "fail" | "skip";
18
- reason: string;
19
- error_message?: string | undefined;
20
- }>;
21
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
22
- created_by: z.ZodString;
23
- }, "strict", z.ZodTypeAny, {
24
- created_at: number & {
25
- __brand: "UnixTimestamp";
26
- } & z.BRAND<"UnixTimestamp">;
27
- created_by: string;
28
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
29
- analysis_result: {
30
- grade: "error" | "pass" | "fail" | "skip";
31
- reason: string;
32
- error_message?: string | undefined;
33
- };
34
- }, {
35
- created_at: number;
36
- created_by: string;
37
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
38
- analysis_result: {
39
- grade: "error" | "pass" | "fail" | "skip";
40
- reason: string;
41
- error_message?: string | undefined;
42
- };
43
- }>;
44
- export interface RideJustificationChangelog extends Omit<z.infer<typeof RideJustificationChangelogSchema>, 'created_at'> {
45
- created_at: UnixTimestamp;
46
- }
47
- export declare const RIDE_JUSTIFICATION_TYPE_OPTIONS: readonly ["traffic_accident", "traffic_delay", "accepted", "rejected"];
48
- export declare const RideJustificationTypeSchema: z.ZodEnum<["traffic_accident", "traffic_delay", "accepted", "rejected"]>;
49
- export type RideJustificationType = z.infer<typeof RideJustificationTypeSchema>;
50
5
  export declare const RideJustificationSchema: z.ZodObject<{
51
6
  _id: z.ZodString;
52
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
7
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
53
8
  created_by: z.ZodDefault<z.ZodString>;
54
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
9
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
55
10
  updated_by: z.ZodDefault<z.ZodString>;
56
11
  } & {
57
12
  acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
58
- changelog: z.ZodDefault<z.ZodArray<z.ZodObject<{
59
- acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
60
- analysis_result: z.ZodObject<{
61
- error_message: z.ZodOptional<z.ZodString>;
62
- grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
63
- reason: z.ZodString;
64
- }, "strict", z.ZodTypeAny, {
65
- grade: "error" | "pass" | "fail" | "skip";
66
- reason: string;
67
- error_message?: string | undefined;
68
- }, {
69
- grade: "error" | "pass" | "fail" | "skip";
70
- reason: string;
71
- error_message?: string | undefined;
72
- }>;
73
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
74
- created_by: z.ZodString;
75
- }, "strict", z.ZodTypeAny, {
76
- created_at: number & {
77
- __brand: "UnixTimestamp";
78
- } & z.BRAND<"UnixTimestamp">;
13
+ comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
14
+ _id: z.ZodString;
15
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
16
+ created_by: z.ZodDefault<z.ZodString>;
17
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
18
+ updated_by: z.ZodDefault<z.ZodString>;
19
+ } & {
20
+ message: z.ZodString;
21
+ type: z.ZodLiteral<"note">;
22
+ }, "strip", z.ZodTypeAny, {
23
+ _id: string;
24
+ created_at: number & {
25
+ __brand: "UnixTimestamp";
26
+ };
79
27
  created_by: string;
80
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
81
- analysis_result: {
82
- grade: "error" | "pass" | "fail" | "skip";
83
- reason: string;
84
- error_message?: string | undefined;
28
+ updated_at: number & {
29
+ __brand: "UnixTimestamp";
85
30
  };
31
+ updated_by: string;
32
+ message: string;
33
+ type: "note";
86
34
  }, {
35
+ _id: string;
87
36
  created_at: number;
88
- created_by: string;
89
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
90
- analysis_result: {
91
- grade: "error" | "pass" | "fail" | "skip";
92
- reason: string;
93
- error_message?: string | undefined;
37
+ updated_at: number;
38
+ message: string;
39
+ type: "note";
40
+ created_by?: string | undefined;
41
+ updated_by?: string | undefined;
42
+ }>, z.ZodObject<{
43
+ _id: z.ZodString;
44
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
45
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
46
+ } & {
47
+ created_by: z.ZodLiteral<"system">;
48
+ message: z.ZodString;
49
+ type: z.ZodLiteral<"system_info">;
50
+ updated_by: z.ZodLiteral<"system">;
51
+ }, "strip", z.ZodTypeAny, {
52
+ _id: string;
53
+ created_at: number & {
54
+ __brand: "UnixTimestamp";
94
55
  };
95
- }>, "many">>;
96
- comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
97
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
56
+ created_by: "system";
57
+ updated_at: number & {
58
+ __brand: "UnixTimestamp";
59
+ };
60
+ updated_by: "system";
61
+ message: string;
62
+ type: "system_info";
63
+ }, {
64
+ _id: string;
65
+ created_at: number;
66
+ created_by: "system";
67
+ updated_at: number;
68
+ updated_by: "system";
69
+ message: string;
70
+ type: "system_info";
71
+ }>, z.ZodObject<{
72
+ _id: z.ZodString;
73
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
98
74
  created_by: z.ZodDefault<z.ZodString>;
99
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
75
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
100
76
  updated_by: z.ZodDefault<z.ZodString>;
101
77
  } & {
102
- _id: z.ZodString;
103
- text: z.ZodString;
104
- }, "strict", z.ZodTypeAny, {
78
+ curr_status: z.ZodString;
79
+ prev_status: z.ZodString;
80
+ type: z.ZodLiteral<"statusChanged">;
81
+ }, "strip", z.ZodTypeAny, {
82
+ _id: string;
83
+ created_at: number & {
84
+ __brand: "UnixTimestamp";
85
+ };
86
+ created_by: string;
87
+ updated_at: number & {
88
+ __brand: "UnixTimestamp";
89
+ };
90
+ updated_by: string;
91
+ type: "statusChanged";
92
+ curr_status: string;
93
+ prev_status: string;
94
+ }, {
95
+ _id: string;
96
+ created_at: number;
97
+ updated_at: number;
98
+ type: "statusChanged";
99
+ curr_status: string;
100
+ prev_status: string;
101
+ created_by?: string | undefined;
102
+ updated_by?: string | undefined;
103
+ }>]>, {
105
104
  _id: string;
106
105
  created_at: number & {
107
106
  __brand: "UnixTimestamp";
108
- } & z.BRAND<"UnixTimestamp">;
107
+ };
109
108
  created_by: string;
110
109
  updated_at: number & {
111
110
  __brand: "UnixTimestamp";
112
- } & z.BRAND<"UnixTimestamp">;
111
+ };
113
112
  updated_by: string;
114
- text: string;
113
+ message: string;
114
+ type: "note";
115
+ } | {
116
+ _id: string;
117
+ created_at: number & {
118
+ __brand: "UnixTimestamp";
119
+ };
120
+ created_by: "system";
121
+ updated_at: number & {
122
+ __brand: "UnixTimestamp";
123
+ };
124
+ updated_by: "system";
125
+ message: string;
126
+ type: "system_info";
127
+ } | {
128
+ _id: string;
129
+ created_at: number & {
130
+ __brand: "UnixTimestamp";
131
+ };
132
+ created_by: string;
133
+ updated_at: number & {
134
+ __brand: "UnixTimestamp";
135
+ };
136
+ updated_by: string;
137
+ type: "statusChanged";
138
+ curr_status: string;
139
+ prev_status: string;
115
140
  }, {
116
141
  _id: string;
117
142
  created_at: number;
118
143
  updated_at: number;
119
- text: string;
144
+ message: string;
145
+ type: "note";
146
+ created_by?: string | undefined;
147
+ updated_by?: string | undefined;
148
+ } | {
149
+ _id: string;
150
+ created_at: number;
151
+ created_by: "system";
152
+ updated_at: number;
153
+ updated_by: "system";
154
+ message: string;
155
+ type: "system_info";
156
+ } | {
157
+ _id: string;
158
+ created_at: number;
159
+ updated_at: number;
160
+ type: "statusChanged";
161
+ curr_status: string;
162
+ prev_status: string;
163
+ created_by?: string | undefined;
164
+ updated_by?: string | undefined;
165
+ }>, {
166
+ _id: string;
167
+ created_at: number & {
168
+ __brand: "UnixTimestamp";
169
+ };
170
+ created_by: string;
171
+ updated_at: number & {
172
+ __brand: "UnixTimestamp";
173
+ };
174
+ updated_by: string;
175
+ message: string;
176
+ type: "note";
177
+ } | {
178
+ _id: string;
179
+ created_at: number & {
180
+ __brand: "UnixTimestamp";
181
+ };
182
+ created_by: "system";
183
+ updated_at: number & {
184
+ __brand: "UnixTimestamp";
185
+ };
186
+ updated_by: "system";
187
+ message: string;
188
+ type: "system_info";
189
+ } | {
190
+ _id: string;
191
+ created_at: number & {
192
+ __brand: "UnixTimestamp";
193
+ };
194
+ created_by: string;
195
+ updated_at: number & {
196
+ __brand: "UnixTimestamp";
197
+ };
198
+ updated_by: string;
199
+ type: "statusChanged";
200
+ curr_status: string;
201
+ prev_status: string;
202
+ }, {
203
+ _id: string;
204
+ created_at: number;
205
+ updated_at: number;
206
+ message: string;
207
+ type: "note";
208
+ created_by?: string | undefined;
209
+ updated_by?: string | undefined;
210
+ } | {
211
+ _id: string;
212
+ created_at: number;
213
+ created_by: "system";
214
+ updated_at: number;
215
+ updated_by: "system";
216
+ message: string;
217
+ type: "system_info";
218
+ } | {
219
+ _id: string;
220
+ created_at: number;
221
+ updated_at: number;
222
+ type: "statusChanged";
223
+ curr_status: string;
224
+ prev_status: string;
120
225
  created_by?: string | undefined;
121
226
  updated_by?: string | undefined;
122
227
  }>, "many">>;
@@ -125,37 +230,51 @@ export declare const RideJustificationSchema: z.ZodObject<{
125
230
  _id: string;
126
231
  created_at: number & {
127
232
  __brand: "UnixTimestamp";
128
- } & z.BRAND<"UnixTimestamp">;
233
+ };
129
234
  created_by: string;
130
235
  updated_at: number & {
131
236
  __brand: "UnixTimestamp";
132
- } & z.BRAND<"UnixTimestamp">;
237
+ };
133
238
  updated_by: string;
134
- comments: {
239
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
240
+ comments: ({
135
241
  _id: string;
136
242
  created_at: number & {
137
243
  __brand: "UnixTimestamp";
138
- } & z.BRAND<"UnixTimestamp">;
244
+ };
139
245
  created_by: string;
140
246
  updated_at: number & {
141
247
  __brand: "UnixTimestamp";
142
- } & z.BRAND<"UnixTimestamp">;
248
+ };
143
249
  updated_by: string;
144
- text: string;
145
- }[];
146
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
147
- changelog: {
250
+ message: string;
251
+ type: "note";
252
+ } | {
253
+ _id: string;
148
254
  created_at: number & {
149
255
  __brand: "UnixTimestamp";
150
- } & z.BRAND<"UnixTimestamp">;
256
+ };
257
+ created_by: "system";
258
+ updated_at: number & {
259
+ __brand: "UnixTimestamp";
260
+ };
261
+ updated_by: "system";
262
+ message: string;
263
+ type: "system_info";
264
+ } | {
265
+ _id: string;
266
+ created_at: number & {
267
+ __brand: "UnixTimestamp";
268
+ };
151
269
  created_by: string;
152
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
153
- analysis_result: {
154
- grade: "error" | "pass" | "fail" | "skip";
155
- reason: string;
156
- error_message?: string | undefined;
270
+ updated_at: number & {
271
+ __brand: "UnixTimestamp";
157
272
  };
158
- }[];
273
+ updated_by: string;
274
+ type: "statusChanged";
275
+ curr_status: string;
276
+ prev_status: string;
277
+ })[];
159
278
  pto_message: string;
160
279
  }, {
161
280
  _id: string;
@@ -164,127 +283,299 @@ export declare const RideJustificationSchema: z.ZodObject<{
164
283
  acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
165
284
  created_by?: string | undefined;
166
285
  updated_by?: string | undefined;
167
- comments?: {
286
+ comments?: ({
168
287
  _id: string;
169
288
  created_at: number;
170
289
  updated_at: number;
171
- text: string;
290
+ message: string;
291
+ type: "note";
172
292
  created_by?: string | undefined;
173
293
  updated_by?: string | undefined;
174
- }[] | undefined;
175
- changelog?: {
294
+ } | {
295
+ _id: string;
176
296
  created_at: number;
177
- created_by: string;
178
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
179
- analysis_result: {
180
- grade: "error" | "pass" | "fail" | "skip";
181
- reason: string;
182
- error_message?: string | undefined;
183
- };
184
- }[] | undefined;
297
+ created_by: "system";
298
+ updated_at: number;
299
+ updated_by: "system";
300
+ message: string;
301
+ type: "system_info";
302
+ } | {
303
+ _id: string;
304
+ created_at: number;
305
+ updated_at: number;
306
+ type: "statusChanged";
307
+ curr_status: string;
308
+ prev_status: string;
309
+ created_by?: string | undefined;
310
+ updated_by?: string | undefined;
311
+ })[] | undefined;
185
312
  pto_message?: string | undefined;
186
313
  }>;
187
314
  export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
188
315
  _id: z.ZodOptional<z.ZodString>;
189
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
316
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
190
317
  created_by: z.ZodDefault<z.ZodString>;
191
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
318
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
192
319
  updated_by: z.ZodDefault<z.ZodString>;
193
- comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
194
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
320
+ acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
321
+ comments: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
322
+ _id: z.ZodString;
323
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
195
324
  created_by: z.ZodDefault<z.ZodString>;
196
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
325
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
197
326
  updated_by: z.ZodDefault<z.ZodString>;
198
327
  } & {
328
+ message: z.ZodString;
329
+ type: z.ZodLiteral<"note">;
330
+ }, "strip", z.ZodTypeAny, {
331
+ _id: string;
332
+ created_at: number & {
333
+ __brand: "UnixTimestamp";
334
+ };
335
+ created_by: string;
336
+ updated_at: number & {
337
+ __brand: "UnixTimestamp";
338
+ };
339
+ updated_by: string;
340
+ message: string;
341
+ type: "note";
342
+ }, {
343
+ _id: string;
344
+ created_at: number;
345
+ updated_at: number;
346
+ message: string;
347
+ type: "note";
348
+ created_by?: string | undefined;
349
+ updated_by?: string | undefined;
350
+ }>, z.ZodObject<{
351
+ _id: z.ZodString;
352
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
353
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
354
+ } & {
355
+ created_by: z.ZodLiteral<"system">;
356
+ message: z.ZodString;
357
+ type: z.ZodLiteral<"system_info">;
358
+ updated_by: z.ZodLiteral<"system">;
359
+ }, "strip", z.ZodTypeAny, {
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
+ }, {
372
+ _id: string;
373
+ created_at: number;
374
+ created_by: "system";
375
+ updated_at: number;
376
+ updated_by: "system";
377
+ message: string;
378
+ type: "system_info";
379
+ }>, z.ZodObject<{
199
380
  _id: z.ZodString;
200
- text: z.ZodString;
201
- }, "strict", z.ZodTypeAny, {
381
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
382
+ created_by: z.ZodDefault<z.ZodString>;
383
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
384
+ updated_by: z.ZodDefault<z.ZodString>;
385
+ } & {
386
+ curr_status: z.ZodString;
387
+ prev_status: z.ZodString;
388
+ type: z.ZodLiteral<"statusChanged">;
389
+ }, "strip", z.ZodTypeAny, {
202
390
  _id: string;
203
391
  created_at: number & {
204
392
  __brand: "UnixTimestamp";
205
- } & z.BRAND<"UnixTimestamp">;
393
+ };
206
394
  created_by: string;
207
395
  updated_at: number & {
208
396
  __brand: "UnixTimestamp";
209
- } & z.BRAND<"UnixTimestamp">;
397
+ };
210
398
  updated_by: string;
211
- text: string;
399
+ type: "statusChanged";
400
+ curr_status: string;
401
+ prev_status: string;
212
402
  }, {
213
403
  _id: string;
214
404
  created_at: number;
215
405
  updated_at: number;
216
- text: string;
406
+ type: "statusChanged";
407
+ curr_status: string;
408
+ prev_status: string;
217
409
  created_by?: string | undefined;
218
410
  updated_by?: string | undefined;
219
- }>, "many">>;
220
- acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
221
- changelog: z.ZodDefault<z.ZodArray<z.ZodObject<{
222
- acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
223
- analysis_result: z.ZodObject<{
224
- error_message: z.ZodOptional<z.ZodString>;
225
- grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
226
- reason: z.ZodString;
227
- }, "strict", z.ZodTypeAny, {
228
- grade: "error" | "pass" | "fail" | "skip";
229
- reason: string;
230
- error_message?: string | undefined;
231
- }, {
232
- grade: "error" | "pass" | "fail" | "skip";
233
- reason: string;
234
- error_message?: string | undefined;
235
- }>;
236
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
237
- created_by: z.ZodString;
238
- }, "strict", z.ZodTypeAny, {
239
- created_at: number & {
240
- __brand: "UnixTimestamp";
241
- } & z.BRAND<"UnixTimestamp">;
411
+ }>]>, {
412
+ _id: string;
413
+ created_at: number & {
414
+ __brand: "UnixTimestamp";
415
+ };
416
+ created_by: string;
417
+ updated_at: number & {
418
+ __brand: "UnixTimestamp";
419
+ };
420
+ updated_by: string;
421
+ message: string;
422
+ type: "note";
423
+ } | {
424
+ _id: string;
425
+ created_at: number & {
426
+ __brand: "UnixTimestamp";
427
+ };
428
+ created_by: "system";
429
+ updated_at: number & {
430
+ __brand: "UnixTimestamp";
431
+ };
432
+ updated_by: "system";
433
+ message: string;
434
+ type: "system_info";
435
+ } | {
436
+ _id: string;
437
+ created_at: number & {
438
+ __brand: "UnixTimestamp";
439
+ };
242
440
  created_by: string;
243
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
244
- analysis_result: {
245
- grade: "error" | "pass" | "fail" | "skip";
246
- reason: string;
247
- error_message?: string | undefined;
441
+ updated_at: number & {
442
+ __brand: "UnixTimestamp";
248
443
  };
444
+ updated_by: string;
445
+ type: "statusChanged";
446
+ curr_status: string;
447
+ prev_status: string;
249
448
  }, {
449
+ _id: string;
450
+ created_at: number;
451
+ updated_at: number;
452
+ message: string;
453
+ type: "note";
454
+ created_by?: string | undefined;
455
+ updated_by?: string | undefined;
456
+ } | {
457
+ _id: string;
250
458
  created_at: number;
459
+ created_by: "system";
460
+ updated_at: number;
461
+ updated_by: "system";
462
+ message: string;
463
+ type: "system_info";
464
+ } | {
465
+ _id: string;
466
+ created_at: number;
467
+ updated_at: number;
468
+ type: "statusChanged";
469
+ curr_status: string;
470
+ prev_status: string;
471
+ created_by?: string | undefined;
472
+ updated_by?: string | undefined;
473
+ }>, {
474
+ _id: string;
475
+ created_at: number & {
476
+ __brand: "UnixTimestamp";
477
+ };
251
478
  created_by: string;
252
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
253
- analysis_result: {
254
- grade: "error" | "pass" | "fail" | "skip";
255
- reason: string;
256
- error_message?: string | undefined;
479
+ updated_at: number & {
480
+ __brand: "UnixTimestamp";
481
+ };
482
+ updated_by: string;
483
+ message: string;
484
+ type: "note";
485
+ } | {
486
+ _id: string;
487
+ created_at: number & {
488
+ __brand: "UnixTimestamp";
489
+ };
490
+ created_by: "system";
491
+ updated_at: number & {
492
+ __brand: "UnixTimestamp";
257
493
  };
494
+ updated_by: "system";
495
+ message: string;
496
+ type: "system_info";
497
+ } | {
498
+ _id: string;
499
+ created_at: number & {
500
+ __brand: "UnixTimestamp";
501
+ };
502
+ created_by: string;
503
+ updated_at: number & {
504
+ __brand: "UnixTimestamp";
505
+ };
506
+ updated_by: string;
507
+ type: "statusChanged";
508
+ curr_status: string;
509
+ prev_status: string;
510
+ }, {
511
+ _id: string;
512
+ created_at: number;
513
+ updated_at: number;
514
+ message: string;
515
+ type: "note";
516
+ created_by?: string | undefined;
517
+ updated_by?: string | undefined;
518
+ } | {
519
+ _id: string;
520
+ created_at: number;
521
+ created_by: "system";
522
+ updated_at: number;
523
+ updated_by: "system";
524
+ message: string;
525
+ type: "system_info";
526
+ } | {
527
+ _id: string;
528
+ created_at: number;
529
+ updated_at: number;
530
+ type: "statusChanged";
531
+ curr_status: string;
532
+ prev_status: string;
533
+ created_by?: string | undefined;
534
+ updated_by?: string | undefined;
258
535
  }>, "many">>;
259
536
  pto_message: z.ZodDefault<z.ZodString>;
260
537
  }, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
261
538
  created_by: string;
262
539
  updated_by: string;
263
- comments: {
540
+ acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
541
+ comments: ({
264
542
  _id: string;
265
543
  created_at: number & {
266
544
  __brand: "UnixTimestamp";
267
- } & z.BRAND<"UnixTimestamp">;
545
+ };
268
546
  created_by: string;
269
547
  updated_at: number & {
270
548
  __brand: "UnixTimestamp";
271
- } & z.BRAND<"UnixTimestamp">;
549
+ };
272
550
  updated_by: string;
273
- text: string;
274
- }[];
275
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
276
- changelog: {
551
+ message: string;
552
+ type: "note";
553
+ } | {
554
+ _id: string;
555
+ created_at: number & {
556
+ __brand: "UnixTimestamp";
557
+ };
558
+ created_by: "system";
559
+ updated_at: number & {
560
+ __brand: "UnixTimestamp";
561
+ };
562
+ updated_by: "system";
563
+ message: string;
564
+ type: "system_info";
565
+ } | {
566
+ _id: string;
277
567
  created_at: number & {
278
568
  __brand: "UnixTimestamp";
279
- } & z.BRAND<"UnixTimestamp">;
569
+ };
280
570
  created_by: string;
281
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
282
- analysis_result: {
283
- grade: "error" | "pass" | "fail" | "skip";
284
- reason: string;
285
- error_message?: string | undefined;
571
+ updated_at: number & {
572
+ __brand: "UnixTimestamp";
286
573
  };
287
- }[];
574
+ updated_by: string;
575
+ type: "statusChanged";
576
+ curr_status: string;
577
+ prev_status: string;
578
+ })[];
288
579
  pto_message: string;
289
580
  _id?: string | undefined;
290
581
  }, {
@@ -292,156 +583,332 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
292
583
  _id?: string | undefined;
293
584
  created_by?: string | undefined;
294
585
  updated_by?: string | undefined;
295
- comments?: {
586
+ comments?: ({
296
587
  _id: string;
297
588
  created_at: number;
298
589
  updated_at: number;
299
- text: string;
590
+ message: string;
591
+ type: "note";
300
592
  created_by?: string | undefined;
301
593
  updated_by?: string | undefined;
302
- }[] | undefined;
303
- changelog?: {
594
+ } | {
595
+ _id: string;
304
596
  created_at: number;
305
- created_by: string;
306
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
307
- analysis_result: {
308
- grade: "error" | "pass" | "fail" | "skip";
309
- reason: string;
310
- error_message?: string | undefined;
311
- };
312
- }[] | undefined;
597
+ created_by: "system";
598
+ updated_at: number;
599
+ updated_by: "system";
600
+ message: string;
601
+ type: "system_info";
602
+ } | {
603
+ _id: string;
604
+ created_at: number;
605
+ updated_at: number;
606
+ type: "statusChanged";
607
+ curr_status: string;
608
+ prev_status: string;
609
+ created_by?: string | undefined;
610
+ updated_by?: string | undefined;
611
+ })[] | undefined;
313
612
  pto_message?: string | undefined;
314
613
  }>;
315
614
  export declare const UpdateRideJustificationSchema: z.ZodObject<{
316
615
  _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
317
616
  created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
318
617
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
319
- comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
320
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
618
+ acceptance_status: z.ZodOptional<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>>;
619
+ comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
620
+ _id: z.ZodString;
621
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
321
622
  created_by: z.ZodDefault<z.ZodString>;
322
- updated_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
623
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
323
624
  updated_by: z.ZodDefault<z.ZodString>;
324
625
  } & {
626
+ message: z.ZodString;
627
+ type: z.ZodLiteral<"note">;
628
+ }, "strip", z.ZodTypeAny, {
629
+ _id: string;
630
+ created_at: number & {
631
+ __brand: "UnixTimestamp";
632
+ };
633
+ created_by: string;
634
+ updated_at: number & {
635
+ __brand: "UnixTimestamp";
636
+ };
637
+ updated_by: string;
638
+ message: string;
639
+ type: "note";
640
+ }, {
641
+ _id: string;
642
+ created_at: number;
643
+ updated_at: number;
644
+ message: string;
645
+ type: "note";
646
+ created_by?: string | undefined;
647
+ updated_by?: string | undefined;
648
+ }>, z.ZodObject<{
325
649
  _id: z.ZodString;
326
- text: z.ZodString;
327
- }, "strict", z.ZodTypeAny, {
650
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
651
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
652
+ } & {
653
+ created_by: z.ZodLiteral<"system">;
654
+ message: z.ZodString;
655
+ type: z.ZodLiteral<"system_info">;
656
+ updated_by: z.ZodLiteral<"system">;
657
+ }, "strip", z.ZodTypeAny, {
328
658
  _id: string;
329
659
  created_at: number & {
330
660
  __brand: "UnixTimestamp";
331
- } & z.BRAND<"UnixTimestamp">;
661
+ };
662
+ created_by: "system";
663
+ updated_at: number & {
664
+ __brand: "UnixTimestamp";
665
+ };
666
+ updated_by: "system";
667
+ message: string;
668
+ type: "system_info";
669
+ }, {
670
+ _id: string;
671
+ created_at: number;
672
+ created_by: "system";
673
+ updated_at: number;
674
+ updated_by: "system";
675
+ message: string;
676
+ type: "system_info";
677
+ }>, z.ZodObject<{
678
+ _id: z.ZodString;
679
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
680
+ created_by: z.ZodDefault<z.ZodString>;
681
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
682
+ updated_by: z.ZodDefault<z.ZodString>;
683
+ } & {
684
+ curr_status: z.ZodString;
685
+ prev_status: z.ZodString;
686
+ type: z.ZodLiteral<"statusChanged">;
687
+ }, "strip", z.ZodTypeAny, {
688
+ _id: string;
689
+ created_at: number & {
690
+ __brand: "UnixTimestamp";
691
+ };
332
692
  created_by: string;
333
693
  updated_at: number & {
334
694
  __brand: "UnixTimestamp";
335
- } & z.BRAND<"UnixTimestamp">;
695
+ };
336
696
  updated_by: string;
337
- text: string;
697
+ type: "statusChanged";
698
+ curr_status: string;
699
+ prev_status: string;
338
700
  }, {
339
701
  _id: string;
340
702
  created_at: number;
341
703
  updated_at: number;
342
- text: string;
704
+ type: "statusChanged";
705
+ curr_status: string;
706
+ prev_status: string;
343
707
  created_by?: string | undefined;
344
708
  updated_by?: string | undefined;
345
- }>, "many">>>;
346
- acceptance_status: z.ZodOptional<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>>;
347
- changelog: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
348
- acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
349
- analysis_result: z.ZodObject<{
350
- error_message: z.ZodOptional<z.ZodString>;
351
- grade: z.ZodEnum<["pass", "fail", "skip", "error"]>;
352
- reason: z.ZodString;
353
- }, "strict", z.ZodTypeAny, {
354
- grade: "error" | "pass" | "fail" | "skip";
355
- reason: string;
356
- error_message?: string | undefined;
357
- }, {
358
- grade: "error" | "pass" | "fail" | "skip";
359
- reason: string;
360
- error_message?: string | undefined;
361
- }>;
362
- created_at: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
363
- created_by: z.ZodString;
364
- }, "strict", z.ZodTypeAny, {
365
- created_at: number & {
366
- __brand: "UnixTimestamp";
367
- } & z.BRAND<"UnixTimestamp">;
709
+ }>]>, {
710
+ _id: string;
711
+ created_at: number & {
712
+ __brand: "UnixTimestamp";
713
+ };
368
714
  created_by: string;
369
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
370
- analysis_result: {
371
- grade: "error" | "pass" | "fail" | "skip";
372
- reason: string;
373
- error_message?: string | undefined;
715
+ updated_at: number & {
716
+ __brand: "UnixTimestamp";
374
717
  };
718
+ updated_by: string;
719
+ message: string;
720
+ type: "note";
721
+ } | {
722
+ _id: string;
723
+ created_at: number & {
724
+ __brand: "UnixTimestamp";
725
+ };
726
+ created_by: "system";
727
+ updated_at: number & {
728
+ __brand: "UnixTimestamp";
729
+ };
730
+ updated_by: "system";
731
+ message: string;
732
+ type: "system_info";
733
+ } | {
734
+ _id: string;
735
+ created_at: number & {
736
+ __brand: "UnixTimestamp";
737
+ };
738
+ created_by: string;
739
+ updated_at: number & {
740
+ __brand: "UnixTimestamp";
741
+ };
742
+ updated_by: string;
743
+ type: "statusChanged";
744
+ curr_status: string;
745
+ prev_status: string;
375
746
  }, {
747
+ _id: string;
376
748
  created_at: number;
749
+ updated_at: number;
750
+ message: string;
751
+ type: "note";
752
+ created_by?: string | undefined;
753
+ updated_by?: string | undefined;
754
+ } | {
755
+ _id: string;
756
+ created_at: number;
757
+ created_by: "system";
758
+ updated_at: number;
759
+ updated_by: "system";
760
+ message: string;
761
+ type: "system_info";
762
+ } | {
763
+ _id: string;
764
+ created_at: number;
765
+ updated_at: number;
766
+ type: "statusChanged";
767
+ curr_status: string;
768
+ prev_status: string;
769
+ created_by?: string | undefined;
770
+ updated_by?: string | undefined;
771
+ }>, {
772
+ _id: string;
773
+ created_at: number & {
774
+ __brand: "UnixTimestamp";
775
+ };
377
776
  created_by: string;
378
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
379
- analysis_result: {
380
- grade: "error" | "pass" | "fail" | "skip";
381
- reason: string;
382
- error_message?: string | undefined;
777
+ updated_at: number & {
778
+ __brand: "UnixTimestamp";
383
779
  };
780
+ updated_by: string;
781
+ message: string;
782
+ type: "note";
783
+ } | {
784
+ _id: string;
785
+ created_at: number & {
786
+ __brand: "UnixTimestamp";
787
+ };
788
+ created_by: "system";
789
+ updated_at: number & {
790
+ __brand: "UnixTimestamp";
791
+ };
792
+ updated_by: "system";
793
+ message: string;
794
+ type: "system_info";
795
+ } | {
796
+ _id: string;
797
+ created_at: number & {
798
+ __brand: "UnixTimestamp";
799
+ };
800
+ created_by: string;
801
+ updated_at: number & {
802
+ __brand: "UnixTimestamp";
803
+ };
804
+ updated_by: string;
805
+ type: "statusChanged";
806
+ curr_status: string;
807
+ prev_status: string;
808
+ }, {
809
+ _id: string;
810
+ created_at: number;
811
+ updated_at: number;
812
+ message: string;
813
+ type: "note";
814
+ created_by?: string | undefined;
815
+ updated_by?: string | undefined;
816
+ } | {
817
+ _id: string;
818
+ created_at: number;
819
+ created_by: "system";
820
+ updated_at: number;
821
+ updated_by: "system";
822
+ message: string;
823
+ type: "system_info";
824
+ } | {
825
+ _id: string;
826
+ created_at: number;
827
+ updated_at: number;
828
+ type: "statusChanged";
829
+ curr_status: string;
830
+ prev_status: string;
831
+ created_by?: string | undefined;
832
+ updated_by?: string | undefined;
384
833
  }>, "many">>>;
385
834
  pto_message: z.ZodOptional<z.ZodDefault<z.ZodString>>;
386
835
  }, "strict", z.ZodTypeAny, {
387
836
  _id?: string | undefined;
388
837
  created_by?: string | undefined;
389
838
  updated_by?: string | undefined;
390
- comments?: {
839
+ acceptance_status?: "accepted" | "justification_required" | "under_review" | "rejected" | undefined;
840
+ comments?: ({
391
841
  _id: string;
392
842
  created_at: number & {
393
843
  __brand: "UnixTimestamp";
394
- } & z.BRAND<"UnixTimestamp">;
844
+ };
395
845
  created_by: string;
396
846
  updated_at: number & {
397
847
  __brand: "UnixTimestamp";
398
- } & z.BRAND<"UnixTimestamp">;
848
+ };
399
849
  updated_by: string;
400
- text: string;
401
- }[] | undefined;
402
- acceptance_status?: "accepted" | "justification_required" | "under_review" | "rejected" | undefined;
403
- changelog?: {
850
+ message: string;
851
+ type: "note";
852
+ } | {
853
+ _id: string;
404
854
  created_at: number & {
405
855
  __brand: "UnixTimestamp";
406
- } & z.BRAND<"UnixTimestamp">;
856
+ };
857
+ created_by: "system";
858
+ updated_at: number & {
859
+ __brand: "UnixTimestamp";
860
+ };
861
+ updated_by: "system";
862
+ message: string;
863
+ type: "system_info";
864
+ } | {
865
+ _id: string;
866
+ created_at: number & {
867
+ __brand: "UnixTimestamp";
868
+ };
407
869
  created_by: string;
408
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
409
- analysis_result: {
410
- grade: "error" | "pass" | "fail" | "skip";
411
- reason: string;
412
- error_message?: string | undefined;
870
+ updated_at: number & {
871
+ __brand: "UnixTimestamp";
413
872
  };
414
- }[] | undefined;
873
+ updated_by: string;
874
+ type: "statusChanged";
875
+ curr_status: string;
876
+ prev_status: string;
877
+ })[] | undefined;
415
878
  pto_message?: string | undefined;
416
879
  }, {
417
880
  _id?: string | undefined;
418
881
  created_by?: string | undefined;
419
882
  updated_by?: string | undefined;
420
- comments?: {
883
+ acceptance_status?: "accepted" | "justification_required" | "under_review" | "rejected" | undefined;
884
+ comments?: ({
421
885
  _id: string;
422
886
  created_at: number;
423
887
  updated_at: number;
424
- text: string;
888
+ message: string;
889
+ type: "note";
425
890
  created_by?: string | undefined;
426
891
  updated_by?: string | undefined;
427
- }[] | undefined;
428
- acceptance_status?: "accepted" | "justification_required" | "under_review" | "rejected" | undefined;
429
- changelog?: {
892
+ } | {
893
+ _id: string;
430
894
  created_at: number;
431
- created_by: string;
432
- acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
433
- analysis_result: {
434
- grade: "error" | "pass" | "fail" | "skip";
435
- reason: string;
436
- error_message?: string | undefined;
437
- };
438
- }[] | undefined;
895
+ created_by: "system";
896
+ updated_at: number;
897
+ updated_by: "system";
898
+ message: string;
899
+ type: "system_info";
900
+ } | {
901
+ _id: string;
902
+ created_at: number;
903
+ updated_at: number;
904
+ type: "statusChanged";
905
+ curr_status: string;
906
+ prev_status: string;
907
+ created_by?: string | undefined;
908
+ updated_by?: string | undefined;
909
+ })[] | undefined;
439
910
  pto_message?: string | undefined;
440
911
  }>;
441
- export interface RideJustification extends Omit<z.infer<typeof RideJustificationSchema>, 'changelog' | 'created_at' | 'updated_at'> {
442
- changelog: RideJustificationChangelog[];
443
- created_at: UnixTimestamp;
444
- updated_at: UnixTimestamp;
445
- }
912
+ export type RideJustification = z.infer<typeof RideJustificationSchema>;
446
913
  export type CreateRideJustificationDto = z.infer<typeof CreateRideJustificationSchema>;
447
- export type UpdateRideJustificationDto = Partial<CreateRideJustificationDto>;
914
+ export type UpdateRideJustificationDto = z.infer<typeof UpdateRideJustificationSchema>;