@tmlmobilidade/types 20250915.936.53 → 20250915.948.54
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.
|
@@ -5,6 +5,9 @@ export type RideAcceptanceStatus = z.infer<typeof RideAcceptanceStatusSchema>;
|
|
|
5
5
|
export declare const RIDE_JUSTIFICATION_CAUSE_OPTIONS: readonly ["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"];
|
|
6
6
|
export declare const RideJustificationCauseSchema: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
7
7
|
export type RideJustificationCause = z.infer<typeof RideJustificationCauseSchema>;
|
|
8
|
+
export declare const RIDE_JUSTIFICATION_SOURCE_OPTIONS: readonly ["MANUAL", "REALTIME_ALERT"];
|
|
9
|
+
export declare const RideJustificationSourceSchema: z.ZodEnum<["MANUAL", "REALTIME_ALERT"]>;
|
|
10
|
+
export type RideJustificationSource = z.infer<typeof RideJustificationSourceSchema>;
|
|
8
11
|
export declare const RideJustificationSchema: z.ZodObject<{
|
|
9
12
|
_id: z.ZodString;
|
|
10
13
|
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -242,6 +245,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
242
245
|
updated_by?: string | undefined;
|
|
243
246
|
}>, "many">>;
|
|
244
247
|
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
248
|
+
justification_source: z.ZodEnum<["MANUAL", "REALTIME_ALERT"]>;
|
|
245
249
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
246
250
|
trip_id: z.ZodString;
|
|
247
251
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -297,6 +301,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
297
301
|
error_message?: string | undefined;
|
|
298
302
|
};
|
|
299
303
|
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
304
|
+
justification_source: "MANUAL" | "REALTIME_ALERT";
|
|
300
305
|
pto_message: string;
|
|
301
306
|
trip_id: string;
|
|
302
307
|
created_by?: string | undefined;
|
|
@@ -312,6 +317,7 @@ export declare const RideJustificationSchema: z.ZodObject<{
|
|
|
312
317
|
error_message?: string | undefined;
|
|
313
318
|
};
|
|
314
319
|
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
320
|
+
justification_source: "MANUAL" | "REALTIME_ALERT";
|
|
315
321
|
trip_id: string;
|
|
316
322
|
created_by?: string | undefined;
|
|
317
323
|
updated_by?: string | undefined;
|
|
@@ -579,6 +585,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
579
585
|
error_message?: string | undefined;
|
|
580
586
|
}>;
|
|
581
587
|
justification_cause: z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>;
|
|
588
|
+
justification_source: z.ZodEnum<["MANUAL", "REALTIME_ALERT"]>;
|
|
582
589
|
pto_message: z.ZodDefault<z.ZodString>;
|
|
583
590
|
trip_id: z.ZodString;
|
|
584
591
|
}, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
@@ -627,6 +634,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
627
634
|
error_message?: string | undefined;
|
|
628
635
|
};
|
|
629
636
|
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
637
|
+
justification_source: "MANUAL" | "REALTIME_ALERT";
|
|
630
638
|
pto_message: string;
|
|
631
639
|
trip_id: string;
|
|
632
640
|
_id?: string | undefined;
|
|
@@ -640,6 +648,7 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
|
|
|
640
648
|
error_message?: string | undefined;
|
|
641
649
|
};
|
|
642
650
|
justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER";
|
|
651
|
+
justification_source: "MANUAL" | "REALTIME_ALERT";
|
|
643
652
|
trip_id: string;
|
|
644
653
|
_id?: string | undefined;
|
|
645
654
|
created_by?: string | undefined;
|
|
@@ -905,6 +914,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
905
914
|
error_message?: string | undefined;
|
|
906
915
|
}>>;
|
|
907
916
|
justification_cause: z.ZodOptional<z.ZodEnum<["TECHNICAL_PROBLEM", "DEMONSTRATION", "ACCIDENT", "WEATHER", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY", "OTHER_CAUSE"]>>;
|
|
917
|
+
justification_source: z.ZodOptional<z.ZodEnum<["MANUAL", "REALTIME_ALERT"]>>;
|
|
908
918
|
pto_message: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
909
919
|
trip_id: z.ZodOptional<z.ZodString>;
|
|
910
920
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -955,6 +965,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
955
965
|
error_message?: string | undefined;
|
|
956
966
|
} | undefined;
|
|
957
967
|
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
968
|
+
justification_source?: "MANUAL" | "REALTIME_ALERT" | undefined;
|
|
958
969
|
pto_message?: string | undefined;
|
|
959
970
|
trip_id?: string | undefined;
|
|
960
971
|
}, {
|
|
@@ -993,6 +1004,7 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
|
|
|
993
1004
|
error_message?: string | undefined;
|
|
994
1005
|
} | undefined;
|
|
995
1006
|
justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "TECHNICAL_PROBLEM" | "WEATHER" | undefined;
|
|
1007
|
+
justification_source?: "MANUAL" | "REALTIME_ALERT" | undefined;
|
|
996
1008
|
pto_message?: string | undefined;
|
|
997
1009
|
trip_id?: string | undefined;
|
|
998
1010
|
}>;
|
|
@@ -8,6 +8,8 @@ export const RIDE_ACCEPTANCE_STATUS_OPTIONS = ['justification_required', 'under_
|
|
|
8
8
|
export const RideAcceptanceStatusSchema = z.enum(RIDE_ACCEPTANCE_STATUS_OPTIONS);
|
|
9
9
|
export const RIDE_JUSTIFICATION_CAUSE_OPTIONS = ['TECHNICAL_PROBLEM', 'DEMONSTRATION', 'ACCIDENT', 'WEATHER', 'CONSTRUCTION', 'POLICE_ACTIVITY', 'MEDICAL_EMERGENCY', 'OTHER_CAUSE'];
|
|
10
10
|
export const RideJustificationCauseSchema = z.enum(RIDE_JUSTIFICATION_CAUSE_OPTIONS);
|
|
11
|
+
export const RIDE_JUSTIFICATION_SOURCE_OPTIONS = ['MANUAL', 'REALTIME_ALERT'];
|
|
12
|
+
export const RideJustificationSourceSchema = z.enum(RIDE_JUSTIFICATION_SOURCE_OPTIONS);
|
|
11
13
|
/* * */
|
|
12
14
|
const CommentSchemaWithRideJustificationStatus = CommentSchema.superRefine((data, ctx) => {
|
|
13
15
|
if (data.type === CommentTypeSchema.enum.statusChanged) {
|
|
@@ -34,6 +36,7 @@ export const RideJustificationSchema = DocumentSchema.extend({
|
|
|
34
36
|
analysis: RideAnalysisSchema,
|
|
35
37
|
comments: z.array(CommentSchemaWithRideJustificationStatus).default([]),
|
|
36
38
|
justification_cause: RideJustificationCauseSchema,
|
|
39
|
+
justification_source: RideJustificationSourceSchema,
|
|
37
40
|
pto_message: z.string().min(2).max(5000).default(''),
|
|
38
41
|
trip_id: z.string(),
|
|
39
42
|
}).strict();
|
package/package.json
CHANGED