@tmlmobilidade/types 20250903.1136.15 → 20250903.1445.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/rides/ride.d.ts +24 -12
- package/dist/src/rides/ride.js +23 -8
- package/package.json +1 -1
package/dist/src/rides/ride.d.ts
CHANGED
|
@@ -2281,15 +2281,21 @@ export declare const RidePermissionSchema: z.ZodObject<{
|
|
|
2281
2281
|
agency_ids: string[];
|
|
2282
2282
|
}>;
|
|
2283
2283
|
export type RidePermission = z.infer<typeof RidePermissionSchema>;
|
|
2284
|
+
export declare const operationalStatusValues: ("ended" | "missed" | "running" | "scheduled")[];
|
|
2285
|
+
export declare const delayStatusValues: ("none" | "delayed" | "early" | "ontime")[];
|
|
2286
|
+
export declare const seenStatusValues: ("gone" | "seen" | "unseen")[];
|
|
2284
2287
|
export declare const GetRidesBatchQuerySchema: z.ZodObject<{
|
|
2285
2288
|
agency_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
+
search: z.ZodOptional<z.ZodString>;
|
|
2290
|
+
analysis_ended_at_last_stop_grade: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "pass" | "fail" | "skip" | "none")[], unknown>>;
|
|
2291
|
+
analysis_expected_apex_validation_interval: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "pass" | "fail" | "skip" | "none")[], unknown>>;
|
|
2292
|
+
analysis_simple_three_vehicle_events_grade: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "pass" | "fail" | "skip" | "none")[], unknown>>;
|
|
2289
2293
|
date_end: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
|
|
2290
2294
|
date_start: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
|
|
2295
|
+
delay_statuses: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["delayed", "early", "ontime", "none"]>, "many">, ("none" | "delayed" | "early" | "ontime")[], unknown>>;
|
|
2296
|
+
operational_statuses: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["ended", "missed", "running", "scheduled"]>, "many">, ("ended" | "missed" | "running" | "scheduled")[], unknown>>;
|
|
2297
|
+
seen_statuses: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["gone", "seen", "unseen"]>, "many">, ("gone" | "seen" | "unseen")[], unknown>>;
|
|
2291
2298
|
line_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
2292
|
-
search: z.ZodOptional<z.ZodString>;
|
|
2293
2299
|
stop_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
2294
2300
|
}, "strip", z.ZodTypeAny, {
|
|
2295
2301
|
date_end: number & {
|
|
@@ -2299,21 +2305,27 @@ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
|
|
|
2299
2305
|
__brand: "UnixTimestamp";
|
|
2300
2306
|
} & z.BRAND<"UnixTimestamp">;
|
|
2301
2307
|
agency_ids?: string[] | undefined;
|
|
2302
|
-
analysis_ended_at_last_stop_grade?: "error" | "pass" | "fail" | "skip" | "none" | undefined;
|
|
2303
|
-
analysis_expected_apex_validation_interval?: "error" | "pass" | "fail" | "skip" | "none" | undefined;
|
|
2304
|
-
analysis_simple_three_vehicle_events_grade?: "error" | "pass" | "fail" | "skip" | "none" | undefined;
|
|
2305
|
-
line_ids?: string[] | undefined;
|
|
2306
2308
|
search?: string | undefined;
|
|
2309
|
+
analysis_ended_at_last_stop_grade?: ("error" | "pass" | "fail" | "skip" | "none")[] | undefined;
|
|
2310
|
+
analysis_expected_apex_validation_interval?: ("error" | "pass" | "fail" | "skip" | "none")[] | undefined;
|
|
2311
|
+
analysis_simple_three_vehicle_events_grade?: ("error" | "pass" | "fail" | "skip" | "none")[] | undefined;
|
|
2312
|
+
delay_statuses?: ("none" | "delayed" | "early" | "ontime")[] | undefined;
|
|
2313
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
2314
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | undefined;
|
|
2315
|
+
line_ids?: string[] | undefined;
|
|
2307
2316
|
stop_ids?: string[] | undefined;
|
|
2308
2317
|
}, {
|
|
2309
2318
|
date_end: number;
|
|
2310
2319
|
date_start: number;
|
|
2311
2320
|
agency_ids?: unknown;
|
|
2312
|
-
analysis_ended_at_last_stop_grade?: "error" | "pass" | "fail" | "skip" | "none" | undefined;
|
|
2313
|
-
analysis_expected_apex_validation_interval?: "error" | "pass" | "fail" | "skip" | "none" | undefined;
|
|
2314
|
-
analysis_simple_three_vehicle_events_grade?: "error" | "pass" | "fail" | "skip" | "none" | undefined;
|
|
2315
|
-
line_ids?: unknown;
|
|
2316
2321
|
search?: string | undefined;
|
|
2322
|
+
analysis_ended_at_last_stop_grade?: unknown;
|
|
2323
|
+
analysis_expected_apex_validation_interval?: unknown;
|
|
2324
|
+
analysis_simple_three_vehicle_events_grade?: unknown;
|
|
2325
|
+
delay_statuses?: unknown;
|
|
2326
|
+
operational_statuses?: unknown;
|
|
2327
|
+
seen_statuses?: unknown;
|
|
2328
|
+
line_ids?: unknown;
|
|
2317
2329
|
stop_ids?: unknown;
|
|
2318
2330
|
}>;
|
|
2319
2331
|
export type GetRidesBatchQuery = z.infer<typeof GetRidesBatchQuerySchema>;
|
package/dist/src/rides/ride.js
CHANGED
|
@@ -67,14 +67,29 @@ export const RidePermissionSchema = z.object({
|
|
|
67
67
|
});
|
|
68
68
|
/* * */
|
|
69
69
|
const RideAnalysisGradeWithNoneSchema = RideAnalysisGradeSchema.or(z.literal('none'));
|
|
70
|
+
const operationalStatusOptions = ['ended', 'missed', 'running', 'scheduled'];
|
|
71
|
+
export const operationalStatusValues = [...operationalStatusOptions];
|
|
72
|
+
/* * */
|
|
73
|
+
const delayStatusOptions = ['delayed', 'early', 'ontime', 'none'];
|
|
74
|
+
export const delayStatusValues = [...delayStatusOptions];
|
|
75
|
+
/* * */
|
|
76
|
+
const seenStatusOptions = ['gone', 'seen', 'unseen'];
|
|
77
|
+
export const seenStatusValues = [...seenStatusOptions];
|
|
70
78
|
export const GetRidesBatchQuerySchema = z.object({
|
|
71
|
-
agency_ids: z.preprocess((val) => val.split(',').map(id => id.trim()), z.array(z.string())).optional(),
|
|
72
|
-
analysis_ended_at_last_stop_grade: RideAnalysisGradeWithNoneSchema.optional(),
|
|
73
|
-
analysis_expected_apex_validation_interval: RideAnalysisGradeWithNoneSchema.optional(),
|
|
74
|
-
analysis_simple_three_vehicle_events_grade: RideAnalysisGradeWithNoneSchema.optional(),
|
|
75
|
-
date_end: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
|
|
76
|
-
date_start: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
|
|
77
|
-
line_ids: z.preprocess((val) => val.split(',').map(id => id.trim()), z.array(z.string())).optional(),
|
|
79
|
+
agency_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
|
|
78
80
|
search: z.string().optional(),
|
|
79
|
-
|
|
81
|
+
/* * */
|
|
82
|
+
analysis_ended_at_last_stop_grade: z.preprocess((val) => val ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema)).optional(),
|
|
83
|
+
analysis_expected_apex_validation_interval: z.preprocess((val) => val ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema)).optional(),
|
|
84
|
+
analysis_simple_three_vehicle_events_grade: z.preprocess((val) => val ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema)).optional(),
|
|
85
|
+
/* * */
|
|
86
|
+
date_end: z.coerce.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
|
|
87
|
+
date_start: z.coerce.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
|
|
88
|
+
/* * */
|
|
89
|
+
delay_statuses: z.preprocess((val) => val ? val.split(',').map(status => status.trim()) : [], z.array(z.enum(delayStatusOptions))).optional(),
|
|
90
|
+
operational_statuses: z.preprocess((val) => val ? val.split(',').map(status => status.trim()) : [], z.array(z.enum(operationalStatusOptions))).optional(),
|
|
91
|
+
seen_statuses: z.preprocess((val) => val ? val.split(',').map(status => status.trim()) : [], z.array(z.enum(seenStatusOptions))).optional(),
|
|
92
|
+
/* * */
|
|
93
|
+
line_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
|
|
94
|
+
stop_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
|
|
80
95
|
});
|
package/package.json
CHANGED