@tmlmobilidade/types 20250903.1445.25 → 20250903.1543.8
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 +0 -48
- package/dist/src/rides/ride.js +1 -29
- package/package.json +1 -1
package/dist/src/rides/ride.d.ts
CHANGED
|
@@ -2281,51 +2281,3 @@ 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")[];
|
|
2287
|
-
export declare const GetRidesBatchQuerySchema: z.ZodObject<{
|
|
2288
|
-
agency_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
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>>;
|
|
2293
|
-
date_end: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
|
|
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>>;
|
|
2298
|
-
line_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
2299
|
-
stop_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
|
|
2300
|
-
}, "strip", z.ZodTypeAny, {
|
|
2301
|
-
date_end: number & {
|
|
2302
|
-
__brand: "UnixTimestamp";
|
|
2303
|
-
} & z.BRAND<"UnixTimestamp">;
|
|
2304
|
-
date_start: number & {
|
|
2305
|
-
__brand: "UnixTimestamp";
|
|
2306
|
-
} & z.BRAND<"UnixTimestamp">;
|
|
2307
|
-
agency_ids?: string[] | undefined;
|
|
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;
|
|
2316
|
-
stop_ids?: string[] | undefined;
|
|
2317
|
-
}, {
|
|
2318
|
-
date_end: number;
|
|
2319
|
-
date_start: number;
|
|
2320
|
-
agency_ids?: unknown;
|
|
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;
|
|
2329
|
-
stop_ids?: unknown;
|
|
2330
|
-
}>;
|
|
2331
|
-
export type GetRidesBatchQuery = z.infer<typeof GetRidesBatchQuerySchema>;
|
package/dist/src/rides/ride.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { DocumentSchema } from '../_common/document.js';
|
|
3
3
|
import { validateOperationalDate } from '../_common/operational-date.js';
|
|
4
4
|
import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
|
|
5
|
-
import { atLeastOneVehicleEventOnFirstStopSchema, endedAtLastStopSchema, expectedApexValidationIntervalSchema, expectedDriverIdQtySchema, expectedStartTimeSchema, expectedVehicleEventDelaySchema, expectedVehicleEventIntervalSchema, expectedVehicleEventQtySchema, expectedVehicleIdQtySchema, matchingApexLocationsSchema, matchingVehicleIdsSchema,
|
|
5
|
+
import { atLeastOneVehicleEventOnFirstStopSchema, endedAtLastStopSchema, expectedApexValidationIntervalSchema, expectedDriverIdQtySchema, expectedStartTimeSchema, expectedVehicleEventDelaySchema, expectedVehicleEventIntervalSchema, expectedVehicleEventQtySchema, expectedVehicleIdQtySchema, matchingApexLocationsSchema, matchingVehicleIdsSchema, simpleOneApexValidationSchema, simpleOneVehicleEventOrApexValidationSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
|
|
6
6
|
import { ProcessingStatusSchema } from '../system/processing-status.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
/* * */
|
|
@@ -65,31 +65,3 @@ export const UpdateRideSchema = CreateRideSchema.partial();
|
|
|
65
65
|
export const RidePermissionSchema = z.object({
|
|
66
66
|
agency_ids: z.array(z.string()),
|
|
67
67
|
});
|
|
68
|
-
/* * */
|
|
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];
|
|
78
|
-
export const GetRidesBatchQuerySchema = z.object({
|
|
79
|
-
agency_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
|
|
80
|
-
search: z.string().optional(),
|
|
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(),
|
|
95
|
-
});
|
package/package.json
CHANGED