@tmlmobilidade/types 20250903.1136.15 → 20250903.1337.41

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.
@@ -2283,9 +2283,9 @@ export declare const RidePermissionSchema: z.ZodObject<{
2283
2283
  export type RidePermission = z.infer<typeof RidePermissionSchema>;
2284
2284
  export declare const GetRidesBatchQuerySchema: z.ZodObject<{
2285
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">]>>;
2286
+ 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>>;
2287
+ 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>>;
2288
+ 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
2289
  date_end: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
2290
2290
  date_start: z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">;
2291
2291
  line_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
@@ -2299,9 +2299,9 @@ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
2299
2299
  __brand: "UnixTimestamp";
2300
2300
  } & z.BRAND<"UnixTimestamp">;
2301
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;
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
2305
  line_ids?: string[] | undefined;
2306
2306
  search?: string | undefined;
2307
2307
  stop_ids?: string[] | undefined;
@@ -2309,9 +2309,9 @@ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
2309
2309
  date_end: number;
2310
2310
  date_start: number;
2311
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;
2312
+ analysis_ended_at_last_stop_grade?: unknown;
2313
+ analysis_expected_apex_validation_interval?: unknown;
2314
+ analysis_simple_three_vehicle_events_grade?: unknown;
2315
2315
  line_ids?: unknown;
2316
2316
  search?: string | undefined;
2317
2317
  stop_ids?: unknown;
@@ -68,13 +68,13 @@ export const RidePermissionSchema = z.object({
68
68
  /* * */
69
69
  const RideAnalysisGradeWithNoneSchema = RideAnalysisGradeSchema.or(z.literal('none'));
70
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(),
71
+ agency_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
72
+ analysis_ended_at_last_stop_grade: z.preprocess((val) => val ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema)).optional(),
73
+ analysis_expected_apex_validation_interval: z.preprocess((val) => val ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema)).optional(),
74
+ analysis_simple_three_vehicle_events_grade: z.preprocess((val) => val ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema)).optional(),
75
+ date_end: z.coerce.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
76
+ date_start: z.coerce.number().transform(validateUnixTimestamp).brand('UnixTimestamp'),
77
+ line_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
78
78
  search: z.string().optional(),
79
- stop_ids: z.preprocess((val) => val.split(',').map(id => id.trim()), z.array(z.string())).optional(),
79
+ stop_ids: z.preprocess((val) => val ? val.split(',').map(id => id.trim()) : [], z.array(z.string())).optional(),
80
80
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20250903.1136.15",
3
+ "version": "20250903.1337.41",
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",