@tmlmobilidade/types 20250902.1546.20 → 20250903.1136.15

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.
@@ -2281,3 +2281,39 @@ 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 GetRidesBatchQuerySchema: z.ZodObject<{
2285
+ agency_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
2286
+ analysis_ended_at_last_stop_grade: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>>;
2287
+ analysis_expected_apex_validation_interval: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>>;
2288
+ analysis_simple_three_vehicle_events_grade: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>>;
2289
+ date_end: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
2290
+ date_start: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
2291
+ line_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
2292
+ search: z.ZodOptional<z.ZodString>;
2293
+ stop_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
2294
+ }, "strip", z.ZodTypeAny, {
2295
+ date_end: number & {
2296
+ __brand: "UnixTimestamp";
2297
+ } & z.BRAND<"UnixTimestamp">;
2298
+ date_start: number & {
2299
+ __brand: "UnixTimestamp";
2300
+ } & z.BRAND<"UnixTimestamp">;
2301
+ 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
+ search?: string | undefined;
2307
+ stop_ids?: string[] | undefined;
2308
+ }, {
2309
+ date_end: number;
2310
+ date_start: number;
2311
+ 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
+ search?: string | undefined;
2317
+ stop_ids?: unknown;
2318
+ }>;
2319
+ export type GetRidesBatchQuery = z.infer<typeof GetRidesBatchQuerySchema>;
@@ -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, simpleOneApexValidationSchema, simpleOneVehicleEventOrApexValidationSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
5
+ import { atLeastOneVehicleEventOnFirstStopSchema, endedAtLastStopSchema, expectedApexValidationIntervalSchema, expectedDriverIdQtySchema, expectedStartTimeSchema, expectedVehicleEventDelaySchema, expectedVehicleEventIntervalSchema, expectedVehicleEventQtySchema, expectedVehicleIdQtySchema, matchingApexLocationsSchema, matchingVehicleIdsSchema, RideAnalysisGradeSchema, 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,3 +65,16 @@ 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
+ 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(),
78
+ search: z.string().optional(),
79
+ stop_ids: z.preprocess((val) => val.split(',').map(id => id.trim()), z.array(z.string())).optional(),
80
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20250902.1546.20",
3
+ "version": "20250903.1136.15",
4
4
  "author": "João de Vasconcelos & Jusi Monteiro",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "homepage": "https://github.com/tmlmobilidade/services#readme",