@tmlmobilidade/types 20250910.1538.31 → 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.
|
@@ -243,6 +243,7 @@ export declare const RideAuditSchema: z.ZodObject<{
|
|
|
243
243
|
created_by?: string | undefined;
|
|
244
244
|
updated_by?: string | undefined;
|
|
245
245
|
}>, "many">>;
|
|
246
|
+
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
246
247
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
247
248
|
}, "strict", z.ZodTypeAny, {
|
|
248
249
|
_id: string;
|
|
@@ -293,12 +294,14 @@ export declare const RideAuditSchema: z.ZodObject<{
|
|
|
293
294
|
curr_status: string;
|
|
294
295
|
prev_status: string;
|
|
295
296
|
})[];
|
|
297
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
296
298
|
pto_message: string;
|
|
297
299
|
}, {
|
|
298
300
|
_id: string;
|
|
299
301
|
created_at: number;
|
|
300
302
|
updated_at: number;
|
|
301
303
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
304
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
302
305
|
created_by?: string | undefined;
|
|
303
306
|
updated_by?: string | undefined;
|
|
304
307
|
comments?: ({
|
|
@@ -395,6 +398,7 @@ export declare const RideAuditSchema: z.ZodObject<{
|
|
|
395
398
|
curr_status: string;
|
|
396
399
|
prev_status: string;
|
|
397
400
|
})[];
|
|
401
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
398
402
|
pto_message: string;
|
|
399
403
|
};
|
|
400
404
|
ride_id: string;
|
|
@@ -412,6 +416,7 @@ export declare const RideAuditSchema: z.ZodObject<{
|
|
|
412
416
|
created_at: number;
|
|
413
417
|
updated_at: number;
|
|
414
418
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
419
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
415
420
|
created_by?: string | undefined;
|
|
416
421
|
updated_by?: string | undefined;
|
|
417
422
|
comments?: ({
|
|
@@ -690,6 +695,7 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
|
|
|
690
695
|
created_by?: string | undefined;
|
|
691
696
|
updated_by?: string | undefined;
|
|
692
697
|
}>, "many">>;
|
|
698
|
+
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
693
699
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
694
700
|
}, "strict", z.ZodTypeAny, {
|
|
695
701
|
_id: string;
|
|
@@ -740,12 +746,14 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
|
|
|
740
746
|
curr_status: string;
|
|
741
747
|
prev_status: string;
|
|
742
748
|
})[];
|
|
749
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
743
750
|
pto_message: string;
|
|
744
751
|
}, {
|
|
745
752
|
_id: string;
|
|
746
753
|
created_at: number;
|
|
747
754
|
updated_at: number;
|
|
748
755
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
756
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
749
757
|
created_by?: string | undefined;
|
|
750
758
|
updated_by?: string | undefined;
|
|
751
759
|
comments?: ({
|
|
@@ -835,6 +843,7 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
|
|
|
835
843
|
curr_status: string;
|
|
836
844
|
prev_status: string;
|
|
837
845
|
})[];
|
|
846
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
838
847
|
pto_message: string;
|
|
839
848
|
};
|
|
840
849
|
ride_id: string;
|
|
@@ -850,6 +859,7 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
|
|
|
850
859
|
created_at: number;
|
|
851
860
|
updated_at: number;
|
|
852
861
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
862
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
853
863
|
created_by?: string | undefined;
|
|
854
864
|
updated_by?: string | undefined;
|
|
855
865
|
comments?: ({
|
|
@@ -1127,6 +1137,7 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
|
|
|
1127
1137
|
created_by?: string | undefined;
|
|
1128
1138
|
updated_by?: string | undefined;
|
|
1129
1139
|
}>, "many">>;
|
|
1140
|
+
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
1130
1141
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
1131
1142
|
}, "strict", z.ZodTypeAny, {
|
|
1132
1143
|
_id: string;
|
|
@@ -1177,12 +1188,14 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
|
|
|
1177
1188
|
curr_status: string;
|
|
1178
1189
|
prev_status: string;
|
|
1179
1190
|
})[];
|
|
1191
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
1180
1192
|
pto_message: string;
|
|
1181
1193
|
}, {
|
|
1182
1194
|
_id: string;
|
|
1183
1195
|
created_at: number;
|
|
1184
1196
|
updated_at: number;
|
|
1185
1197
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
1198
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
1186
1199
|
created_by?: string | undefined;
|
|
1187
1200
|
updated_by?: string | undefined;
|
|
1188
1201
|
comments?: ({
|
|
@@ -1273,6 +1286,7 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
|
|
|
1273
1286
|
curr_status: string;
|
|
1274
1287
|
prev_status: string;
|
|
1275
1288
|
})[];
|
|
1289
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
1276
1290
|
pto_message: string;
|
|
1277
1291
|
} | undefined;
|
|
1278
1292
|
ride_id?: string | undefined;
|
|
@@ -1291,6 +1305,7 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
|
|
|
1291
1305
|
created_at: number;
|
|
1292
1306
|
updated_at: number;
|
|
1293
1307
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
1308
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
1294
1309
|
created_by?: string | undefined;
|
|
1295
1310
|
updated_by?: string | undefined;
|
|
1296
1311
|
comments?: ({
|
|
@@ -2,6 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const RIDE_ACCEPTANCE_STATUS_OPTIONS: readonly ["justification_required", "under_review", "accepted", "rejected"];
|
|
3
3
|
export declare const RideAcceptanceStatusSchema: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
4
4
|
export type RideAcceptanceStatus = z.infer<typeof RideAcceptanceStatusSchema>;
|
|
5
|
+
export declare const RIDE_JUSTIFICATION_CAUSE_OPTIONS: readonly ["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"];
|
|
6
|
+
export declare const RideJustificationCauseSchema: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
7
|
+
export type RideJustificationCause = z.infer<typeof RideJustificationCauseSchema>;
|
|
5
8
|
export declare const RideJustificationSchema: z.ZodObject<{
|
|
6
9
|
_id: z.ZodString;
|
|
7
10
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -225,6 +228,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
225
228
|
created_by?: string | undefined;
|
|
226
229
|
updated_by?: string | undefined;
|
|
227
230
|
}>, "many">>;
|
|
231
|
+
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
228
232
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
229
233
|
}, "strict", z.ZodTypeAny, {
|
|
230
234
|
_id: string;
|
|
@@ -275,12 +279,14 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
275
279
|
curr_status: string;
|
|
276
280
|
prev_status: string;
|
|
277
281
|
})[];
|
|
282
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
278
283
|
pto_message: string;
|
|
279
284
|
}, {
|
|
280
285
|
_id: string;
|
|
281
286
|
created_at: number;
|
|
282
287
|
updated_at: number;
|
|
283
288
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
289
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
284
290
|
created_by?: string | undefined;
|
|
285
291
|
updated_by?: string | undefined;
|
|
286
292
|
comments?: ({
|
|
@@ -533,6 +539,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
533
539
|
created_by?: string | undefined;
|
|
534
540
|
updated_by?: string | undefined;
|
|
535
541
|
}>, "many">>;
|
|
542
|
+
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
536
543
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
537
544
|
}, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
538
545
|
created_by: string;
|
|
@@ -576,10 +583,12 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
576
583
|
curr_status: string;
|
|
577
584
|
prev_status: string;
|
|
578
585
|
})[];
|
|
586
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
579
587
|
pto_message: string;
|
|
580
588
|
_id?: string | undefined;
|
|
581
589
|
}, {
|
|
582
590
|
acceptance_status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
591
|
+
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
583
592
|
_id?: string | undefined;
|
|
584
593
|
created_by?: string | undefined;
|
|
585
594
|
updated_by?: string | undefined;
|
|
@@ -831,6 +840,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
831
840
|
created_by?: string | undefined;
|
|
832
841
|
updated_by?: string | undefined;
|
|
833
842
|
}>, "many">>>;
|
|
843
|
+
justification_cause: z.ZodOptional<z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>>;
|
|
834
844
|
pto_message: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
835
845
|
}, "strict", z.ZodTypeAny, {
|
|
836
846
|
_id?: string | undefined;
|
|
@@ -875,6 +885,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
875
885
|
curr_status: string;
|
|
876
886
|
prev_status: string;
|
|
877
887
|
})[] | undefined;
|
|
888
|
+
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
878
889
|
pto_message?: string | undefined;
|
|
879
890
|
}, {
|
|
880
891
|
_id?: string | undefined;
|
|
@@ -907,6 +918,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
907
918
|
created_by?: string | undefined;
|
|
908
919
|
updated_by?: string | undefined;
|
|
909
920
|
})[] | undefined;
|
|
921
|
+
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
910
922
|
pto_message?: string | undefined;
|
|
911
923
|
}>;
|
|
912
924
|
export type RideJustification = z.infer<typeof RideJustificationSchema>;
|
|
@@ -5,6 +5,8 @@ import { z } from 'zod';
|
|
|
5
5
|
/* * */
|
|
6
6
|
export const RIDE_ACCEPTANCE_STATUS_OPTIONS = ['justification_required', 'under_review', 'accepted', 'rejected'];
|
|
7
7
|
export const RideAcceptanceStatusSchema = z.enum(RIDE_ACCEPTANCE_STATUS_OPTIONS);
|
|
8
|
+
export const RIDE_JUSTIFICATION_CAUSE_OPTIONS = ['TECHNICAL_PROBLEM', 'DEMONSTRATION', 'ACCIDENT', 'WEATHER', 'CONSTRUCTION', 'POLICE_ACTIVITY', 'MEDICAL_EMERGENCY', 'OTHER_CAUSE'];
|
|
9
|
+
export const RideJustificationCauseSchema = z.enum(RIDE_JUSTIFICATION_CAUSE_OPTIONS);
|
|
8
10
|
/* * */
|
|
9
11
|
const CommentSchemaWithRideJustificationStatus = CommentSchema.superRefine((data, ctx) => {
|
|
10
12
|
if (data.type === CommentTypeSchema.enum.statusChanged) {
|
|
@@ -29,6 +31,7 @@ const CommentSchemaWithRideJustificationStatus = CommentSchema.superRefine((data
|
|
|
29
31
|
export const RideJustificationSchema = DocumentSchema.extend({
|
|
30
32
|
acceptance_status: RideAcceptanceStatusSchema,
|
|
31
33
|
comments: z.array(CommentSchemaWithRideJustificationStatus).default([]),
|
|
34
|
+
justification_cause: RideJustificationCauseSchema,
|
|
32
35
|
pto_message: z.string().min(2).max(5000).default(''),
|
|
33
36
|
}).strict();
|
|
34
37
|
export const CreateRideJustificationSchema = RideJustificationSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
|
package/package.json
CHANGED