@tmlmobilidade/types 20251029.1355.53 → 20251029.1408.3

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.
@@ -81,19 +81,15 @@ export declare const FlatRideSchema: z.ZodObject<{
81
81
  trip_id: z.ZodString;
82
82
  updated_at: z.ZodNumber;
83
83
  vehicle_ids: z.ZodString;
84
- acceptance_status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
85
- justification_cause: z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_PROBLEM", "UNKNOWN_CAUSE", "WEATHER", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "ROAD_INCIDENT", "SYSTEM_FAILURE", "TRAFFIC_JAM", "VEHICLE_ISSUE"]>;
86
- justification_source: z.ZodEnum<["MANUAL", "ALERT"]>;
87
- manual_trip_id: z.ZodOptional<z.ZodString>;
88
- pto_message: z.ZodDefault<z.ZodString>;
84
+ acceptance_status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>>>;
85
+ justification_cause: z.ZodOptional<z.ZodNullable<z.ZodEnum<["ACCIDENT", "CONSTRUCTION", "DEMONSTRATION", "HOLIDAY", "MAINTENANCE", "MEDICAL_EMERGENCY", "OTHER_CAUSE", "POLICE_ACTIVITY", "STRIKE", "TECHNICAL_PROBLEM", "UNKNOWN_CAUSE", "WEATHER", "DRIVER_ABSENCE", "DRIVER_ISSUE", "HIGH_PASSENGER_LOAD", "ROAD_INCIDENT", "SYSTEM_FAILURE", "TRAFFIC_JAM", "VEHICLE_ISSUE"]>>>;
86
+ justification_source: z.ZodOptional<z.ZodNullable<z.ZodEnum<["MANUAL", "ALERT"]>>>;
87
+ manual_trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ pto_message: z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>;
89
89
  }, "strip", z.ZodTypeAny, {
90
90
  _id: string;
91
91
  created_at: number;
92
92
  updated_at: number;
93
- acceptance_status: "rejected" | "justification_required" | "under_review" | "accepted";
94
- pto_message: string;
95
- justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE";
96
- justification_source: "MANUAL" | "ALERT";
97
93
  is_locked: boolean;
98
94
  agency_id: string;
99
95
  apex_locations_qty: number;
@@ -172,14 +168,15 @@ export declare const FlatRideSchema: z.ZodObject<{
172
168
  operational_status: string;
173
169
  seen_status: string;
174
170
  start_delay_status: string;
175
- manual_trip_id?: string | undefined;
171
+ acceptance_status?: "rejected" | "justification_required" | "under_review" | "accepted" | null | undefined;
172
+ pto_message?: string | null | undefined;
173
+ justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE" | null | undefined;
174
+ justification_source?: "MANUAL" | "ALERT" | null | undefined;
175
+ manual_trip_id?: string | null | undefined;
176
176
  }, {
177
177
  _id: string;
178
178
  created_at: number;
179
179
  updated_at: number;
180
- acceptance_status: "rejected" | "justification_required" | "under_review" | "accepted";
181
- justification_cause: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE";
182
- justification_source: "MANUAL" | "ALERT";
183
180
  is_locked: boolean;
184
181
  agency_id: string;
185
182
  apex_locations_qty: number;
@@ -258,8 +255,11 @@ export declare const FlatRideSchema: z.ZodObject<{
258
255
  operational_status: string;
259
256
  seen_status: string;
260
257
  start_delay_status: string;
261
- pto_message?: string | undefined;
262
- manual_trip_id?: string | undefined;
258
+ acceptance_status?: "rejected" | "justification_required" | "under_review" | "accepted" | null | undefined;
259
+ pto_message?: string | null | undefined;
260
+ justification_cause?: "ACCIDENT" | "CONSTRUCTION" | "DEMONSTRATION" | "HOLIDAY" | "MAINTENANCE" | "MEDICAL_EMERGENCY" | "OTHER_CAUSE" | "POLICE_ACTIVITY" | "STRIKE" | "TECHNICAL_PROBLEM" | "UNKNOWN_CAUSE" | "WEATHER" | "DRIVER_ABSENCE" | "DRIVER_ISSUE" | "HIGH_PASSENGER_LOAD" | "ROAD_INCIDENT" | "SYSTEM_FAILURE" | "TRAFFIC_JAM" | "VEHICLE_ISSUE" | null | undefined;
261
+ justification_source?: "MANUAL" | "ALERT" | null | undefined;
262
+ manual_trip_id?: string | null | undefined;
263
263
  }>;
264
264
  export declare const RideExportPropertiesSchema: z.ZodObject<{
265
265
  properties: z.ZodObject<{
@@ -1,6 +1,7 @@
1
1
  /* * */
2
2
  import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
- import { RideAcceptanceSchema, RideAcceptanceStatusSchema, RideJustificationSchema } from '../rides/ride-acceptance.js';
3
+ import { gtfsCauseSchema } from '../gtfs/cause-effetcs.js';
4
+ import { RideAcceptanceStatusSchema, RideJustificationSourceSchema } from '../rides/ride-acceptance.js';
4
5
  import { RideAnalysisGradeWithNoneSchema } from '../rides/ride-analysis.js';
5
6
  import { RideDelayStatusSchema, RideOperationalStatusSchema, RideSeenStatusSchema } from '../rides/ride.js';
6
7
  import { z } from 'zod';
@@ -91,11 +92,11 @@ export const FlatRideSchema = z.object({
91
92
  vehicle_ids: z.string(),
92
93
  /* ACCEPTANCE / JUSTIFICATION */
93
94
  /* * */
94
- acceptance_status: RideAcceptanceSchema.shape.acceptance_status,
95
- justification_cause: RideJustificationSchema.shape.justification_cause,
96
- justification_source: RideJustificationSchema.shape.justification_source,
97
- manual_trip_id: RideJustificationSchema.shape.manual_trip_id,
98
- pto_message: RideJustificationSchema.shape.pto_message,
95
+ acceptance_status: z.enum(RideAcceptanceStatusSchema.options).nullish(),
96
+ justification_cause: gtfsCauseSchema.nullish(),
97
+ justification_source: z.enum(RideJustificationSourceSchema.options).nullish(),
98
+ manual_trip_id: z.string().nullish(),
99
+ pto_message: z.string().min(2).max(5000).default('').nullish(),
99
100
  });
100
101
  /* PROPERTIES SCHEMA */
101
102
  /* * */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20251029.1355.53",
3
+ "version": "20251029.1408.3",
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",