@tmlmobilidade/types 20251028.1802.11 → 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,6 +81,11 @@ 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.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>>>;
84
89
  }, "strip", z.ZodTypeAny, {
85
90
  _id: string;
86
91
  created_at: number;
@@ -163,6 +168,11 @@ export declare const FlatRideSchema: z.ZodObject<{
163
168
  operational_status: string;
164
169
  seen_status: string;
165
170
  start_delay_status: string;
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;
166
176
  }, {
167
177
  _id: string;
168
178
  created_at: number;
@@ -245,6 +255,11 @@ export declare const FlatRideSchema: z.ZodObject<{
245
255
  operational_status: string;
246
256
  seen_status: string;
247
257
  start_delay_status: string;
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;
248
263
  }>;
249
264
  export declare const RideExportPropertiesSchema: z.ZodObject<{
250
265
  properties: z.ZodObject<{
@@ -1,6 +1,7 @@
1
1
  /* * */
2
2
  import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
- import { RideAcceptanceStatusSchema } 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';
@@ -89,6 +90,13 @@ export const FlatRideSchema = z.object({
89
90
  trip_id: z.string(),
90
91
  updated_at: z.number(),
91
92
  vehicle_ids: z.string(),
93
+ /* ACCEPTANCE / JUSTIFICATION */
94
+ /* * */
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(),
92
100
  });
93
101
  /* PROPERTIES SCHEMA */
94
102
  /* * */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20251028.1802.11",
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",