@tmlmobilidade/types 20250916.1040.35 → 20250916.1050.43

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.
@@ -1,7 +1,7 @@
1
1
  /* * */
2
2
  import { CommentSchema } from '../_common/comment.js';
3
3
  import { DocumentSchema } from '../_common/document.js';
4
- import { RideAnalysisSchema } from './ride-analysis.js';
4
+ import { atLeastOneVehicleEventOnFirstStopSchema, endedAtLastStopSchema, expectedApexValidationIntervalSchema, expectedDriverIdQtySchema, expectedStartTimeSchema, expectedVehicleEventDelaySchema, expectedVehicleEventIntervalSchema, expectedVehicleEventQtySchema, expectedVehicleIdQtySchema, matchingApexLocationsSchema, matchingVehicleIdsSchema, RideAnalysisSchema, simpleOneApexValidationSchema, simpleOneVehicleEventOrApexValidationSchema, simpleThreeVehicleEventsSchema, transactionSequentialitySchema } from './ride-analysis.js';
5
5
  import { z } from 'zod';
6
6
  /* * */
7
7
  export const RIDE_ACCEPTANCE_STATUS_OPTIONS = ['justification_required', 'under_review', 'accepted', 'rejected'];
@@ -15,7 +15,24 @@ export const RideJustificationStatusTypeSchema = z.enum(RIDE_JUSTIFICATION_STATU
15
15
  /* * */
16
16
  export const RideJustificationSchema = DocumentSchema.extend({
17
17
  acceptance_status: RideAcceptanceStatusSchema,
18
- analysis: RideAnalysisSchema,
18
+ analysis: z.object({
19
+ AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: atLeastOneVehicleEventOnFirstStopSchema,
20
+ ENDED_AT_LAST_STOP: endedAtLastStopSchema,
21
+ EXPECTED_APEX_VALIDATION_INTERVAL: expectedApexValidationIntervalSchema,
22
+ EXPECTED_DRIVER_ID_QTY: expectedDriverIdQtySchema,
23
+ EXPECTED_START_TIME: expectedStartTimeSchema,
24
+ EXPECTED_VEHICLE_EVENT_DELAY: expectedVehicleEventDelaySchema,
25
+ EXPECTED_VEHICLE_EVENT_INTERVAL: expectedVehicleEventIntervalSchema,
26
+ EXPECTED_VEHICLE_EVENT_QTY: expectedVehicleEventQtySchema,
27
+ EXPECTED_VEHICLE_ID_QTY: expectedVehicleIdQtySchema,
28
+ MATCHING_APEX_LOCATIONS: matchingApexLocationsSchema,
29
+ MATCHING_VEHICLE_IDS: matchingVehicleIdsSchema,
30
+ SIMPLE_ONE_APEX_VALIDATION: simpleOneApexValidationSchema,
31
+ SIMPLE_ONE_VEHICLE_EVENT_OR_APEX_VALIDATION: simpleOneVehicleEventOrApexValidationSchema,
32
+ SIMPLE_THREE_VEHICLE_EVENTS: simpleThreeVehicleEventsSchema,
33
+ TRANSACTION_SEQUENTIALITY: transactionSequentialitySchema,
34
+ }).nullable(),
35
+ analysisSummary: RideAnalysisSchema,
19
36
  comments: z.array(CommentSchema).default([]),
20
37
  is_locked: z.boolean().default(false),
21
38
  justification_cause: RideJustificationCauseSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tmlmobilidade/types",
3
- "version": "20250916.1040.35",
3
+ "version": "20250916.1050.43",
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",