@tmlmobilidade/types 20251103.1255.55 → 20251202.1821.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.
- package/dist/{src/_common → _common}/index.d.ts +4 -2
- package/dist/{src/_common → _common}/index.js +4 -2
- package/dist/_common/mongo.d.ts +3 -0
- package/dist/_common/status.d.ts +13 -0
- package/dist/_common/status.js +20 -0
- package/dist/_common/utility.js +1 -0
- package/dist/{src/agency.d.ts → agency.d.ts} +4 -15
- package/dist/{src/agency.js → agency.js} +1 -6
- package/dist/{src/alert.d.ts → alert.d.ts} +20 -21
- package/dist/{src/alert.js → alert.js} +8 -14
- package/dist/{src/simplified-apex → apex}/simplified-apex-validation.d.ts +20 -20
- package/dist/{src/auth → auth}/index.d.ts +1 -1
- package/dist/{src/auth → auth}/index.js +1 -1
- package/dist/{src/auth → auth}/password-requirements.js +2 -1
- package/dist/auth/role.d.ts +958 -0
- package/dist/{src/auth → auth}/role.js +2 -2
- package/dist/{src/auth → auth}/session.d.ts +13 -9
- package/dist/{src/auth → auth}/session.js +1 -1
- package/dist/auth/user.d.ts +1281 -0
- package/dist/{src/auth → auth}/user.js +11 -14
- package/dist/{src/file-exports → file-exports}/common.d.ts +9 -8
- package/dist/{src/file-exports → file-exports}/common.js +1 -1
- package/dist/file-exports/index.d.ts +121 -0
- package/dist/file-exports/ride-export.d.ts +410 -0
- package/dist/file-exports/ride-export.js +131 -0
- package/dist/{src/file.d.ts → file.d.ts} +18 -18
- package/dist/gtfs/agency.d.ts +30 -0
- package/dist/gtfs/agency.js +13 -0
- package/dist/gtfs/feed-info.d.ts +33 -0
- package/dist/{src/gtfs.js → gtfs/feed-info.js} +1 -11
- package/dist/{src/gtfs → gtfs}/index.d.ts +3 -0
- package/dist/{src/gtfs → gtfs}/index.js +3 -0
- package/dist/gtfs/service-alert.d.ts +26 -0
- package/dist/index.d.ts +22 -22
- package/dist/index.js +22 -22
- package/dist/locations/census.d.ts +211 -0
- package/dist/locations/census.js +2 -0
- package/dist/locations/district.d.ts +24 -0
- package/dist/locations/district.js +2 -0
- package/dist/locations/index.d.ts +6 -0
- package/dist/locations/index.js +6 -0
- package/dist/locations/locality.d.ts +27 -0
- package/dist/locations/locality.js +2 -0
- package/dist/locations/municipality.d.ts +25 -0
- package/dist/locations/municipality.js +2 -0
- package/dist/locations/parish.d.ts +26 -0
- package/dist/locations/parish.js +2 -0
- package/dist/locations/queries.d.ts +117 -0
- package/dist/{src/locations.js → locations/queries.js} +5 -16
- package/dist/metrics/demand/demand_by_agency.d.ts +210 -0
- package/dist/metrics/demand/demand_by_agency.js +39 -0
- package/dist/metrics/demand/demand_by_category.d.ts +475 -0
- package/dist/metrics/demand/demand_by_category.js +114 -0
- package/dist/metrics/demand/demand_by_line.d.ts +246 -0
- package/dist/metrics/demand/demand_by_line.js +56 -0
- package/dist/metrics/demand/demand_by_pattern.d.ts +332 -0
- package/dist/metrics/demand/demand_by_pattern.js +56 -0
- package/dist/metrics/demand/demand_by_product.d.ts +475 -0
- package/dist/metrics/demand/demand_by_product.js +114 -0
- package/dist/metrics/demand/index.d.ts +6 -0
- package/dist/metrics/demand/index.js +8 -0
- package/dist/metrics/demand/records.d.ts +320 -0
- package/dist/metrics/demand/records.js +53 -0
- package/dist/metrics/index.d.ts +2647 -0
- package/dist/metrics/index.js +48 -0
- package/dist/metrics/realtime.d.ts +667 -0
- package/dist/metrics/realtime.js +41 -0
- package/dist/{src/notification.d.ts → notification.d.ts} +4 -4
- package/dist/{src/organization.d.ts → organization.d.ts} +32 -32
- package/dist/{src/organization.js → organization.js} +7 -7
- package/dist/permissions/agencies.d.ts +12 -0
- package/dist/permissions/agencies.js +13 -0
- package/dist/permissions/alerts.d.ts +36 -0
- package/dist/permissions/alerts.js +25 -0
- package/dist/permissions/controller.d.ts +36 -0
- package/dist/permissions/controller.js +30 -0
- package/dist/permissions/gtfs-validations.d.ts +25 -0
- package/dist/permissions/gtfs-validations.js +14 -0
- package/dist/permissions/home.d.ts +12 -0
- package/dist/permissions/home.js +10 -0
- package/dist/permissions/index.d.ts +268 -0
- package/dist/permissions/index.js +149 -0
- package/dist/permissions/organizations.d.ts +12 -0
- package/dist/permissions/organizations.js +12 -0
- package/dist/permissions/performance.d.ts +12 -0
- package/dist/permissions/performance.js +9 -0
- package/dist/permissions/plans.d.ts +25 -0
- package/dist/permissions/plans.js +22 -0
- package/dist/permissions/roles.d.ts +12 -0
- package/dist/permissions/roles.js +12 -0
- package/dist/permissions/stops.d.ts +30 -0
- package/dist/permissions/stops.js +17 -0
- package/dist/permissions/users.d.ts +12 -0
- package/dist/permissions/users.js +12 -0
- package/dist/{src/plans → plans}/gtfs-validation.d.ts +55 -63
- package/dist/{src/plans → plans}/gtfs-validation.js +3 -6
- package/dist/plans/plan-app-status.d.ts +15 -0
- package/dist/plans/plan-app-status.js +10 -0
- package/dist/{src/plans → plans}/plan.d.ts +240 -104
- package/dist/{src/plans → plans}/plan.js +8 -10
- package/dist/{src/_common/proposed-change.d.ts → proposed-change.d.ts} +21 -22
- package/dist/{src/_common/proposed-change.js → proposed-change.js} +5 -7
- package/dist/{src/rides → rides}/index.d.ts +1 -0
- package/dist/{src/rides → rides}/index.js +1 -0
- package/dist/{src/rides → rides}/ride-acceptance.d.ts +65 -65
- package/dist/{src/rides → rides}/ride-analysis.d.ts +34 -34
- package/dist/{src/rides → rides}/ride-audit.d.ts +10 -10
- package/dist/rides/ride-normalized.d.ts +29 -0
- package/dist/rides/ride-normalized.js +2 -0
- package/dist/{src/rides → rides}/ride.d.ts +523 -567
- package/dist/{src/rides → rides}/ride.js +2 -16
- package/dist/{src/sams → sams}/sam-analysis.d.ts +11 -11
- package/dist/{src/sams → sams}/sam-analysis.js +4 -4
- package/dist/{src/sams → sams}/sam.d.ts +76 -76
- package/dist/{src/sams → sams}/sam.js +1 -1
- package/dist/{src/stop.d.ts → stop.d.ts} +32 -43
- package/dist/{src/stop.js → stop.js} +3 -8
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.d.ts +77 -0
- package/dist/vehicle-events/gtfs-rt-vehicle-event-extended.js +21 -0
- package/dist/vehicle-events/index.d.ts +2 -0
- package/dist/vehicle-events/index.js +2 -0
- package/dist/{src/vehicle-event.d.ts → vehicle-events/simplified-vehicle-event.d.ts} +9 -9
- package/dist/{src/vehicle-event.js → vehicle-events/simplified-vehicle-event.js} +3 -3
- package/dist/wiki.js +2 -0
- package/dist/{src/zone.d.ts → zone.d.ts} +2 -16
- package/dist/{src/zone.js → zone.js} +0 -6
- package/package.json +18 -21
- package/README.md +0 -13
- package/dist/src/_common/email.d.ts +0 -4
- package/dist/src/_common/email.js +0 -7
- package/dist/src/auth/permission.d.ts +0 -19
- package/dist/src/auth/permission.js +0 -8
- package/dist/src/auth/role.d.ts +0 -127
- package/dist/src/auth/user.d.ts +0 -311
- package/dist/src/file-exports/index.d.ts +0 -121
- package/dist/src/file-exports/ride-export.d.ts +0 -407
- package/dist/src/file-exports/ride-export.js +0 -120
- package/dist/src/gtfs.d.ts +0 -88
- package/dist/src/locations.d.ts +0 -319
- package/dist/src/metrics/demand.d.ts +0 -803
- package/dist/src/metrics/demand.js +0 -153
- package/dist/src/metrics/index.d.ts +0 -806
- package/dist/src/metrics/index.js +0 -19
- package/dist/src/plans/plan-controller.d.ts +0 -15
- package/dist/src/plans/plan-controller.js +0 -10
- package/dist/src/system/index.d.ts +0 -2
- package/dist/src/system/index.js +0 -2
- package/dist/src/system/processing-status.d.ts +0 -9
- package/dist/src/system/processing-status.js +0 -5
- package/dist/{src/_common → _common}/comment.d.ts +8 -8
- package/dist/{src/_common → _common}/comment.js +0 -0
- package/dist/{src/_common → _common}/document.d.ts +0 -0
- package/dist/{src/_common → _common}/document.js +0 -0
- package/dist/{src/system → _common}/environment.d.ts +0 -0
- package/dist/{src/system → _common}/environment.js +0 -0
- package/dist/{src/_common → _common}/fastify.d.ts +0 -0
- package/dist/{src/_common → _common}/fastify.js +0 -0
- package/dist/{src/_common/utility.js → _common/mongo.js} +0 -0
- package/dist/{src/_common → _common}/operational-date.d.ts +0 -0
- package/dist/{src/_common → _common}/operational-date.js +0 -0
- package/dist/{src/_common → _common}/unix-timestamp.d.ts +0 -0
- package/dist/{src/_common → _common}/unix-timestamp.js +0 -0
- package/dist/{src/_common → _common}/utility.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/index.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/index.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection-decision.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-inspection.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-location.d.ts +16 -16
- package/dist/{src/simplified-apex → apex}/simplified-apex-location.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.d.ts +20 -20
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-refund.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.d.ts +25 -25
- package/dist/{src/simplified-apex → apex}/simplified-apex-on-board-sale.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-type.d.ts +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-type.js +0 -0
- package/dist/{src/simplified-apex → apex}/simplified-apex-validation.js +0 -0
- package/dist/{src/auth → auth}/login.d.ts +0 -0
- package/dist/{src/auth → auth}/login.js +0 -0
- package/dist/{src/auth → auth}/password-requirements.d.ts +0 -0
- package/dist/{src/auth → auth}/verification-token.d.ts +0 -0
- package/dist/{src/auth → auth}/verification-token.js +0 -0
- package/dist/{src/file-exports → file-exports}/index.js +0 -0
- package/dist/{src/file.js → file.js} +0 -0
- package/dist/{src/gtfs → gtfs}/calendar-dates.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/calendar-dates.js +0 -0
- package/dist/{src/gtfs → gtfs}/calendar.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/calendar.js +0 -0
- package/dist/{src/gtfs → gtfs}/cause-effetcs.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/cause-effetcs.js +0 -0
- package/dist/{src/gtfs → gtfs}/common.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/common.js +0 -0
- package/dist/{src/gtfs → gtfs}/routes.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/routes.js +0 -0
- package/dist/{src/pcgi/pcgi-apex-location.js → gtfs/service-alert.js} +0 -0
- package/dist/{src/gtfs → gtfs}/shapes.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/shapes.js +0 -0
- package/dist/{src/gtfs → gtfs}/stop-times.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/stop-times.js +0 -0
- package/dist/{src/gtfs → gtfs}/stops.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/stops.js +0 -0
- package/dist/{src/gtfs → gtfs}/trips.d.ts +0 -0
- package/dist/{src/gtfs → gtfs}/trips.js +0 -0
- package/dist/{src/metrics → metrics}/common.d.ts +0 -0
- package/dist/{src/metrics → metrics}/common.js +0 -0
- package/dist/{src/notification.js → notification.js} +0 -0
- package/dist/{src/pcgi → pcgi}/index.d.ts +0 -0
- package/dist/{src/pcgi → pcgi}/index.js +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-location.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-refund.js → pcgi/pcgi-apex-location.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-refund.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-sale.js → pcgi/pcgi-apex-refund.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-sale.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-apex-validation.js → pcgi/pcgi-apex-sale.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-apex-validation.d.ts +0 -0
- package/dist/{src/pcgi/pcgi-transaction-entity.js → pcgi/pcgi-apex-validation.js} +0 -0
- package/dist/{src/pcgi → pcgi}/pcgi-transaction-entity.d.ts +0 -0
- package/dist/{src/rides/hashed-shape.js → pcgi/pcgi-transaction-entity.js} +0 -0
- package/dist/{src/plans → plans}/index.d.ts +0 -0
- package/dist/{src/plans → plans}/index.js +0 -0
- package/dist/{src/plans → plans}/plan-pcgi-legacy.d.ts +0 -0
- package/dist/{src/plans → plans}/plan-pcgi-legacy.js +0 -0
- package/dist/{src/rides → rides}/hashed-shape.d.ts +0 -0
- package/dist/{src/rides/hashed-trip.js → rides/hashed-shape.js} +0 -0
- package/dist/{src/rides → rides}/hashed-trip.d.ts +0 -0
- package/dist/{src/wiki.js → rides/hashed-trip.js} +0 -0
- package/dist/{src/rides → rides}/ride-acceptance.js +1 -1
- /package/dist/{src/rides → rides}/ride-analysis.js +0 -0
- /package/dist/{src/rides → rides}/ride-audit.js +0 -0
- /package/dist/{src/rides → rides}/ride-overrides.d.ts +0 -0
- /package/dist/{src/rides → rides}/ride-overrides.js +0 -0
- /package/dist/{src/sams → sams}/index.d.ts +0 -0
- /package/dist/{src/sams → sams}/index.js +0 -0
- /package/dist/{src/wiki.d.ts → wiki.d.ts} +0 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FlatRideSchema: z.ZodObject<{
|
|
3
|
+
_id: z.ZodNullable<z.ZodString>;
|
|
4
|
+
agency_id: z.ZodNullable<z.ZodString>;
|
|
5
|
+
driver_ids: z.ZodNullable<z.ZodString>;
|
|
6
|
+
headsign: z.ZodNullable<z.ZodString>;
|
|
7
|
+
line_id: z.ZodNullable<z.ZodNumber>;
|
|
8
|
+
pattern_id: z.ZodNullable<z.ZodString>;
|
|
9
|
+
plan_id: z.ZodNullable<z.ZodString>;
|
|
10
|
+
route_id: z.ZodNullable<z.ZodString>;
|
|
11
|
+
trip_id: z.ZodNullable<z.ZodString>;
|
|
12
|
+
vehicle_ids: z.ZodNullable<z.ZodString>;
|
|
13
|
+
operational_date: z.ZodNullable<z.ZodString>;
|
|
14
|
+
operational_status: z.ZodNullable<z.ZodString>;
|
|
15
|
+
start_delay_status: z.ZodNullable<z.ZodString>;
|
|
16
|
+
start_time_observed: z.ZodNullable<z.ZodString>;
|
|
17
|
+
start_time_scheduled: z.ZodNullable<z.ZodString>;
|
|
18
|
+
end_delay_status: z.ZodNullable<z.ZodString>;
|
|
19
|
+
end_time_observed: z.ZodNullable<z.ZodString>;
|
|
20
|
+
end_time_scheduled: z.ZodNullable<z.ZodString>;
|
|
21
|
+
extension_observed: z.ZodNullable<z.ZodNumber>;
|
|
22
|
+
extension_scheduled: z.ZodNullable<z.ZodNumber>;
|
|
23
|
+
seen_first_at: z.ZodNullable<z.ZodString>;
|
|
24
|
+
seen_last_at: z.ZodNullable<z.ZodString>;
|
|
25
|
+
seen_status: z.ZodNullable<z.ZodString>;
|
|
26
|
+
passengers_estimated: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
passengers_observed: z.ZodNullable<z.ZodNumber>;
|
|
28
|
+
passengers_observed_on_board_sales_amount: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
passengers_observed_on_board_sales_qty: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
passengers_observed_prepaid_amount: z.ZodNullable<z.ZodNumber>;
|
|
31
|
+
passengers_observed_prepaid_qty: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
passengers_observed_subscription_qty: z.ZodNullable<z.ZodNumber>;
|
|
33
|
+
apex_locations_qty: z.ZodNullable<z.ZodNumber>;
|
|
34
|
+
apex_on_board_refunds_amount: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
apex_on_board_refunds_qty: z.ZodNullable<z.ZodNumber>;
|
|
36
|
+
apex_on_board_sales_amount: z.ZodNullable<z.ZodNumber>;
|
|
37
|
+
apex_on_board_sales_qty: z.ZodNullable<z.ZodNumber>;
|
|
38
|
+
apex_validations_qty: z.ZodNullable<z.ZodNumber>;
|
|
39
|
+
analysis_AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: z.ZodNullable<z.ZodString>;
|
|
40
|
+
analysis_ENDED_AT_LAST_STOP: z.ZodNullable<z.ZodString>;
|
|
41
|
+
analysis_EXPECTED_APEX_VALIDATION_INTERVAL: z.ZodNullable<z.ZodString>;
|
|
42
|
+
analysis_EXPECTED_DRIVER_ID_QTY: z.ZodNullable<z.ZodString>;
|
|
43
|
+
analysis_EXPECTED_START_TIME: z.ZodNullable<z.ZodString>;
|
|
44
|
+
analysis_EXPECTED_START_TIME_value: z.ZodNullable<z.ZodNumber>;
|
|
45
|
+
analysis_EXPECTED_VEHICLE_EVENT_DELAY: z.ZodNullable<z.ZodString>;
|
|
46
|
+
analysis_EXPECTED_VEHICLE_EVENT_INTERVAL: z.ZodNullable<z.ZodString>;
|
|
47
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY: z.ZodNullable<z.ZodString>;
|
|
48
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_expected_qty: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_found_qty: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
analysis_EXPECTED_VEHICLE_ID_QTY: z.ZodNullable<z.ZodString>;
|
|
51
|
+
analysis_MATCHING_APEX_LOCATIONS: z.ZodNullable<z.ZodString>;
|
|
52
|
+
analysis_MATCHING_VEHICLE_IDS: z.ZodNullable<z.ZodString>;
|
|
53
|
+
analysis_SIMPLE_ONE_APEX_VALIDATION: z.ZodNullable<z.ZodString>;
|
|
54
|
+
analysis_SIMPLE_ONE_VEHICLE_EVENT_OR_APEX_VALIDATION: z.ZodNullable<z.ZodString>;
|
|
55
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS: z.ZodNullable<z.ZodString>;
|
|
56
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_reason: z.ZodNullable<z.ZodString>;
|
|
57
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_first: z.ZodNullable<z.ZodString>;
|
|
58
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_last: z.ZodNullable<z.ZodString>;
|
|
59
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_middle: z.ZodNullable<z.ZodString>;
|
|
60
|
+
analysis_TRANSACTION_SEQUENTIALITY: z.ZodNullable<z.ZodString>;
|
|
61
|
+
analysis_TRANSACTION_SEQUENTIALITY_expected_qty: z.ZodNullable<z.ZodNumber>;
|
|
62
|
+
analysis_TRANSACTION_SEQUENTIALITY_found_qty: z.ZodNullable<z.ZodNumber>;
|
|
63
|
+
analysis_TRANSACTION_SEQUENTIALITY_missing_qty: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
acceptance_status: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>>>>;
|
|
65
|
+
justification_cause: z.ZodNullable<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"]>>>>;
|
|
66
|
+
justification_source: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodEnum<["MANUAL", "ALERT"]>>>>;
|
|
67
|
+
manual_trip_id: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
68
|
+
pto_message: z.ZodNullable<z.ZodOptional<z.ZodNullable<z.ZodDefault<z.ZodString>>>>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
_id: string | null;
|
|
71
|
+
agency_id: string | null;
|
|
72
|
+
line_id: number | null;
|
|
73
|
+
pattern_id: string | null;
|
|
74
|
+
trip_id: string | null;
|
|
75
|
+
driver_ids: string | null;
|
|
76
|
+
headsign: string | null;
|
|
77
|
+
plan_id: string | null;
|
|
78
|
+
route_id: string | null;
|
|
79
|
+
vehicle_ids: string | null;
|
|
80
|
+
operational_date: string | null;
|
|
81
|
+
operational_status: string | null;
|
|
82
|
+
start_delay_status: string | null;
|
|
83
|
+
start_time_observed: string | null;
|
|
84
|
+
start_time_scheduled: string | null;
|
|
85
|
+
end_delay_status: string | null;
|
|
86
|
+
end_time_observed: string | null;
|
|
87
|
+
end_time_scheduled: string | null;
|
|
88
|
+
extension_observed: number | null;
|
|
89
|
+
extension_scheduled: number | null;
|
|
90
|
+
seen_first_at: string | null;
|
|
91
|
+
seen_last_at: string | null;
|
|
92
|
+
seen_status: string | null;
|
|
93
|
+
passengers_estimated: number | null;
|
|
94
|
+
passengers_observed: number | null;
|
|
95
|
+
passengers_observed_on_board_sales_amount: number | null;
|
|
96
|
+
passengers_observed_on_board_sales_qty: number | null;
|
|
97
|
+
passengers_observed_prepaid_amount: number | null;
|
|
98
|
+
passengers_observed_prepaid_qty: number | null;
|
|
99
|
+
passengers_observed_subscription_qty: number | null;
|
|
100
|
+
apex_locations_qty: number | null;
|
|
101
|
+
apex_on_board_refunds_amount: number | null;
|
|
102
|
+
apex_on_board_refunds_qty: number | null;
|
|
103
|
+
apex_on_board_sales_amount: number | null;
|
|
104
|
+
apex_on_board_sales_qty: number | null;
|
|
105
|
+
apex_validations_qty: number | null;
|
|
106
|
+
analysis_AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: string | null;
|
|
107
|
+
analysis_ENDED_AT_LAST_STOP: string | null;
|
|
108
|
+
analysis_EXPECTED_APEX_VALIDATION_INTERVAL: string | null;
|
|
109
|
+
analysis_EXPECTED_DRIVER_ID_QTY: string | null;
|
|
110
|
+
analysis_EXPECTED_START_TIME: string | null;
|
|
111
|
+
analysis_EXPECTED_START_TIME_value: number | null;
|
|
112
|
+
analysis_EXPECTED_VEHICLE_EVENT_DELAY: string | null;
|
|
113
|
+
analysis_EXPECTED_VEHICLE_EVENT_INTERVAL: string | null;
|
|
114
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY: string | null;
|
|
115
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_expected_qty: number | null;
|
|
116
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_found_qty: number | null;
|
|
117
|
+
analysis_EXPECTED_VEHICLE_ID_QTY: string | null;
|
|
118
|
+
analysis_MATCHING_APEX_LOCATIONS: string | null;
|
|
119
|
+
analysis_MATCHING_VEHICLE_IDS: string | null;
|
|
120
|
+
analysis_SIMPLE_ONE_APEX_VALIDATION: string | null;
|
|
121
|
+
analysis_SIMPLE_ONE_VEHICLE_EVENT_OR_APEX_VALIDATION: string | null;
|
|
122
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS: string | null;
|
|
123
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_reason: string | null;
|
|
124
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_first: string | null;
|
|
125
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_last: string | null;
|
|
126
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_middle: string | null;
|
|
127
|
+
analysis_TRANSACTION_SEQUENTIALITY: string | null;
|
|
128
|
+
analysis_TRANSACTION_SEQUENTIALITY_expected_qty: number | null;
|
|
129
|
+
analysis_TRANSACTION_SEQUENTIALITY_found_qty: number | null;
|
|
130
|
+
analysis_TRANSACTION_SEQUENTIALITY_missing_qty: number | null;
|
|
131
|
+
acceptance_status?: "rejected" | "justification_required" | "under_review" | "accepted" | null | undefined;
|
|
132
|
+
pto_message?: string | null | undefined;
|
|
133
|
+
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;
|
|
134
|
+
justification_source?: "MANUAL" | "ALERT" | null | undefined;
|
|
135
|
+
manual_trip_id?: string | null | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
_id: string | null;
|
|
138
|
+
agency_id: string | null;
|
|
139
|
+
line_id: number | null;
|
|
140
|
+
pattern_id: string | null;
|
|
141
|
+
trip_id: string | null;
|
|
142
|
+
driver_ids: string | null;
|
|
143
|
+
headsign: string | null;
|
|
144
|
+
plan_id: string | null;
|
|
145
|
+
route_id: string | null;
|
|
146
|
+
vehicle_ids: string | null;
|
|
147
|
+
operational_date: string | null;
|
|
148
|
+
operational_status: string | null;
|
|
149
|
+
start_delay_status: string | null;
|
|
150
|
+
start_time_observed: string | null;
|
|
151
|
+
start_time_scheduled: string | null;
|
|
152
|
+
end_delay_status: string | null;
|
|
153
|
+
end_time_observed: string | null;
|
|
154
|
+
end_time_scheduled: string | null;
|
|
155
|
+
extension_observed: number | null;
|
|
156
|
+
extension_scheduled: number | null;
|
|
157
|
+
seen_first_at: string | null;
|
|
158
|
+
seen_last_at: string | null;
|
|
159
|
+
seen_status: string | null;
|
|
160
|
+
passengers_estimated: number | null;
|
|
161
|
+
passengers_observed: number | null;
|
|
162
|
+
passengers_observed_on_board_sales_amount: number | null;
|
|
163
|
+
passengers_observed_on_board_sales_qty: number | null;
|
|
164
|
+
passengers_observed_prepaid_amount: number | null;
|
|
165
|
+
passengers_observed_prepaid_qty: number | null;
|
|
166
|
+
passengers_observed_subscription_qty: number | null;
|
|
167
|
+
apex_locations_qty: number | null;
|
|
168
|
+
apex_on_board_refunds_amount: number | null;
|
|
169
|
+
apex_on_board_refunds_qty: number | null;
|
|
170
|
+
apex_on_board_sales_amount: number | null;
|
|
171
|
+
apex_on_board_sales_qty: number | null;
|
|
172
|
+
apex_validations_qty: number | null;
|
|
173
|
+
analysis_AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: string | null;
|
|
174
|
+
analysis_ENDED_AT_LAST_STOP: string | null;
|
|
175
|
+
analysis_EXPECTED_APEX_VALIDATION_INTERVAL: string | null;
|
|
176
|
+
analysis_EXPECTED_DRIVER_ID_QTY: string | null;
|
|
177
|
+
analysis_EXPECTED_START_TIME: string | null;
|
|
178
|
+
analysis_EXPECTED_START_TIME_value: number | null;
|
|
179
|
+
analysis_EXPECTED_VEHICLE_EVENT_DELAY: string | null;
|
|
180
|
+
analysis_EXPECTED_VEHICLE_EVENT_INTERVAL: string | null;
|
|
181
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY: string | null;
|
|
182
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_expected_qty: number | null;
|
|
183
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_found_qty: number | null;
|
|
184
|
+
analysis_EXPECTED_VEHICLE_ID_QTY: string | null;
|
|
185
|
+
analysis_MATCHING_APEX_LOCATIONS: string | null;
|
|
186
|
+
analysis_MATCHING_VEHICLE_IDS: string | null;
|
|
187
|
+
analysis_SIMPLE_ONE_APEX_VALIDATION: string | null;
|
|
188
|
+
analysis_SIMPLE_ONE_VEHICLE_EVENT_OR_APEX_VALIDATION: string | null;
|
|
189
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS: string | null;
|
|
190
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_reason: string | null;
|
|
191
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_first: string | null;
|
|
192
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_last: string | null;
|
|
193
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_middle: string | null;
|
|
194
|
+
analysis_TRANSACTION_SEQUENTIALITY: string | null;
|
|
195
|
+
analysis_TRANSACTION_SEQUENTIALITY_expected_qty: number | null;
|
|
196
|
+
analysis_TRANSACTION_SEQUENTIALITY_found_qty: number | null;
|
|
197
|
+
analysis_TRANSACTION_SEQUENTIALITY_missing_qty: number | null;
|
|
198
|
+
acceptance_status?: "rejected" | "justification_required" | "under_review" | "accepted" | null | undefined;
|
|
199
|
+
pto_message?: string | null | undefined;
|
|
200
|
+
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;
|
|
201
|
+
justification_source?: "MANUAL" | "ALERT" | null | undefined;
|
|
202
|
+
manual_trip_id?: string | null | undefined;
|
|
203
|
+
}>;
|
|
204
|
+
export declare const RideExportPropertiesSchema: z.ZodObject<{
|
|
205
|
+
properties: z.ZodObject<{
|
|
206
|
+
agency_ids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
207
|
+
analysis_ended_at_last_stop: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
208
|
+
analysis_expected_apex_validation_interval: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
209
|
+
analysis_simple_three_vehicle_events: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
210
|
+
analysis_transaction_sequentiality: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
211
|
+
date_end: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
212
|
+
date_start: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
213
|
+
delay_statuses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["delayed", "early", "ontime", "none"]>, "many">>>;
|
|
214
|
+
operational_statuses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["ended", "missed", "running", "scheduled"]>, "many">>>;
|
|
215
|
+
seen_statuses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["gone", "seen", "unseen"]>, "many">>>;
|
|
216
|
+
line_ids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
217
|
+
stop_ids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
218
|
+
acceptance_status: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected", "none"]>, "many">>>;
|
|
219
|
+
}, "strip", z.ZodTypeAny, {
|
|
220
|
+
date_end: number & {
|
|
221
|
+
__brand: "UnixTimestamp";
|
|
222
|
+
};
|
|
223
|
+
date_start: number & {
|
|
224
|
+
__brand: "UnixTimestamp";
|
|
225
|
+
};
|
|
226
|
+
agency_ids?: string[] | null | undefined;
|
|
227
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
228
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
229
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
230
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
231
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
232
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
233
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
234
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
235
|
+
line_ids?: string[] | null | undefined;
|
|
236
|
+
stop_ids?: string[] | null | undefined;
|
|
237
|
+
}, {
|
|
238
|
+
date_end: number;
|
|
239
|
+
date_start: number;
|
|
240
|
+
agency_ids?: string[] | null | undefined;
|
|
241
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
242
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
243
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
244
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
245
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
246
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
247
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
248
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
249
|
+
line_ids?: string[] | null | undefined;
|
|
250
|
+
stop_ids?: string[] | null | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
type: z.ZodLiteral<"ride">;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
type: "ride";
|
|
255
|
+
properties: {
|
|
256
|
+
date_end: number & {
|
|
257
|
+
__brand: "UnixTimestamp";
|
|
258
|
+
};
|
|
259
|
+
date_start: number & {
|
|
260
|
+
__brand: "UnixTimestamp";
|
|
261
|
+
};
|
|
262
|
+
agency_ids?: string[] | null | undefined;
|
|
263
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
264
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
265
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
266
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
267
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
268
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
269
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
270
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
271
|
+
line_ids?: string[] | null | undefined;
|
|
272
|
+
stop_ids?: string[] | null | undefined;
|
|
273
|
+
};
|
|
274
|
+
}, {
|
|
275
|
+
type: "ride";
|
|
276
|
+
properties: {
|
|
277
|
+
date_end: number;
|
|
278
|
+
date_start: number;
|
|
279
|
+
agency_ids?: string[] | null | undefined;
|
|
280
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
281
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
282
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
283
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
284
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
285
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
286
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
287
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
288
|
+
line_ids?: string[] | null | undefined;
|
|
289
|
+
stop_ids?: string[] | null | undefined;
|
|
290
|
+
};
|
|
291
|
+
}>;
|
|
292
|
+
export declare const RideExportSchema: z.ZodObject<{
|
|
293
|
+
_id: z.ZodString;
|
|
294
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
295
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
296
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
297
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
298
|
+
file_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
299
|
+
file_name: z.ZodString;
|
|
300
|
+
processing_status: z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>;
|
|
301
|
+
} & {
|
|
302
|
+
properties: z.ZodObject<{
|
|
303
|
+
agency_ids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
304
|
+
analysis_ended_at_last_stop: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
305
|
+
analysis_expected_apex_validation_interval: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
306
|
+
analysis_simple_three_vehicle_events: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
307
|
+
analysis_transaction_sequentiality: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">>>;
|
|
308
|
+
date_end: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
309
|
+
date_start: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
310
|
+
delay_statuses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["delayed", "early", "ontime", "none"]>, "many">>>;
|
|
311
|
+
operational_statuses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["ended", "missed", "running", "scheduled"]>, "many">>>;
|
|
312
|
+
seen_statuses: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["gone", "seen", "unseen"]>, "many">>>;
|
|
313
|
+
line_ids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
314
|
+
stop_ids: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
315
|
+
acceptance_status: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected", "none"]>, "many">>>;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
date_end: number & {
|
|
318
|
+
__brand: "UnixTimestamp";
|
|
319
|
+
};
|
|
320
|
+
date_start: number & {
|
|
321
|
+
__brand: "UnixTimestamp";
|
|
322
|
+
};
|
|
323
|
+
agency_ids?: string[] | null | undefined;
|
|
324
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
325
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
326
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
327
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
328
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
329
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
330
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
331
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
332
|
+
line_ids?: string[] | null | undefined;
|
|
333
|
+
stop_ids?: string[] | null | undefined;
|
|
334
|
+
}, {
|
|
335
|
+
date_end: number;
|
|
336
|
+
date_start: number;
|
|
337
|
+
agency_ids?: string[] | null | undefined;
|
|
338
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
339
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
340
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
341
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
342
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
343
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
344
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
345
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
346
|
+
line_ids?: string[] | null | undefined;
|
|
347
|
+
stop_ids?: string[] | null | undefined;
|
|
348
|
+
}>;
|
|
349
|
+
type: z.ZodLiteral<"ride">;
|
|
350
|
+
}, "strict", z.ZodTypeAny, {
|
|
351
|
+
_id: string;
|
|
352
|
+
created_at: number & {
|
|
353
|
+
__brand: "UnixTimestamp";
|
|
354
|
+
};
|
|
355
|
+
updated_at: number & {
|
|
356
|
+
__brand: "UnixTimestamp";
|
|
357
|
+
};
|
|
358
|
+
type: "ride";
|
|
359
|
+
file_name: string;
|
|
360
|
+
processing_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
361
|
+
properties: {
|
|
362
|
+
date_end: number & {
|
|
363
|
+
__brand: "UnixTimestamp";
|
|
364
|
+
};
|
|
365
|
+
date_start: number & {
|
|
366
|
+
__brand: "UnixTimestamp";
|
|
367
|
+
};
|
|
368
|
+
agency_ids?: string[] | null | undefined;
|
|
369
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
370
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
371
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
372
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
373
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
374
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
375
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
376
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
377
|
+
line_ids?: string[] | null | undefined;
|
|
378
|
+
stop_ids?: string[] | null | undefined;
|
|
379
|
+
};
|
|
380
|
+
created_by?: string | undefined;
|
|
381
|
+
updated_by?: string | undefined;
|
|
382
|
+
file_id?: string | null | undefined;
|
|
383
|
+
}, {
|
|
384
|
+
_id: string;
|
|
385
|
+
created_at: number;
|
|
386
|
+
updated_at: number;
|
|
387
|
+
type: "ride";
|
|
388
|
+
file_name: string;
|
|
389
|
+
processing_status: "waiting" | "processing" | "complete" | "error" | "skipped";
|
|
390
|
+
properties: {
|
|
391
|
+
date_end: number;
|
|
392
|
+
date_start: number;
|
|
393
|
+
agency_ids?: string[] | null | undefined;
|
|
394
|
+
acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | null | undefined;
|
|
395
|
+
analysis_ended_at_last_stop?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
396
|
+
analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
397
|
+
analysis_simple_three_vehicle_events?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
398
|
+
analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | null | undefined;
|
|
399
|
+
delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | null | undefined;
|
|
400
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | null | undefined;
|
|
401
|
+
seen_statuses?: ("gone" | "seen" | "unseen")[] | null | undefined;
|
|
402
|
+
line_ids?: string[] | null | undefined;
|
|
403
|
+
stop_ids?: string[] | null | undefined;
|
|
404
|
+
};
|
|
405
|
+
created_by?: string | undefined;
|
|
406
|
+
updated_by?: string | undefined;
|
|
407
|
+
file_id?: string | null | undefined;
|
|
408
|
+
}>;
|
|
409
|
+
export type RideExportProperties = z.infer<typeof RideExportPropertiesSchema>;
|
|
410
|
+
export type RideExportData = z.infer<typeof FlatRideSchema>;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { DelayStatusSchema, OperationalStatusSchema, SeenStatusSchema } from '../_common/status.js';
|
|
3
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
4
|
+
import { FileExportBaseSchema } from './common.js';
|
|
5
|
+
import { gtfsCauseSchema } from '../gtfs/cause-effetcs.js';
|
|
6
|
+
import { RideAcceptanceStatusSchema, RideJustificationSourceSchema } from '../rides/ride-acceptance.js';
|
|
7
|
+
import { RideAnalysisGradeWithNoneSchema } from '../rides/ride-analysis.js';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
/* * */
|
|
10
|
+
/* DATA SCHEMA */
|
|
11
|
+
export const FlatRideSchema = z.object({
|
|
12
|
+
/* META */
|
|
13
|
+
/* * */
|
|
14
|
+
_id: z.string().nullable(),
|
|
15
|
+
agency_id: z.string().nullable(),
|
|
16
|
+
driver_ids: z.string().nullable(),
|
|
17
|
+
headsign: z.string().nullable(),
|
|
18
|
+
line_id: z.number().nullable(),
|
|
19
|
+
pattern_id: z.string().nullable(),
|
|
20
|
+
plan_id: z.string().nullable(),
|
|
21
|
+
route_id: z.string().nullable(),
|
|
22
|
+
trip_id: z.string().nullable(),
|
|
23
|
+
vehicle_ids: z.string().nullable(),
|
|
24
|
+
/* TIME & STATUS */
|
|
25
|
+
/* * */
|
|
26
|
+
operational_date: z.string().nullable(),
|
|
27
|
+
operational_status: z.string().nullable(),
|
|
28
|
+
//
|
|
29
|
+
start_delay_status: z.string().nullable(),
|
|
30
|
+
start_time_observed: z.string().nullable(),
|
|
31
|
+
start_time_scheduled: z.string().nullable(),
|
|
32
|
+
//
|
|
33
|
+
end_delay_status: z.string().nullable(),
|
|
34
|
+
end_time_observed: z.string().nullable(),
|
|
35
|
+
end_time_scheduled: z.string().nullable(),
|
|
36
|
+
extension_observed: z.number().nullable(),
|
|
37
|
+
extension_scheduled: z.number().nullable(),
|
|
38
|
+
//
|
|
39
|
+
seen_first_at: z.string().nullable(),
|
|
40
|
+
seen_last_at: z.string().nullable(),
|
|
41
|
+
seen_status: z.string().nullable(),
|
|
42
|
+
/* PASSENGERS */
|
|
43
|
+
/* * */
|
|
44
|
+
passengers_estimated: z.number().nullable(),
|
|
45
|
+
passengers_observed: z.number().nullable(),
|
|
46
|
+
passengers_observed_on_board_sales_amount: z.number().nullable(),
|
|
47
|
+
passengers_observed_on_board_sales_qty: z.number().nullable(),
|
|
48
|
+
passengers_observed_prepaid_amount: z.number().nullable(),
|
|
49
|
+
passengers_observed_prepaid_qty: z.number().nullable(),
|
|
50
|
+
passengers_observed_subscription_qty: z.number().nullable(),
|
|
51
|
+
/* APEX */
|
|
52
|
+
/* * */
|
|
53
|
+
apex_locations_qty: z.number().nullable(),
|
|
54
|
+
apex_on_board_refunds_amount: z.number().nullable(),
|
|
55
|
+
apex_on_board_refunds_qty: z.number().nullable(),
|
|
56
|
+
apex_on_board_sales_amount: z.number().nullable(),
|
|
57
|
+
apex_on_board_sales_qty: z.number().nullable(),
|
|
58
|
+
apex_validations_qty: z.number().nullable(),
|
|
59
|
+
/* ANALYSIS */
|
|
60
|
+
/* * */
|
|
61
|
+
// At Least One Vehicle Event On First Stop
|
|
62
|
+
analysis_AT_LEAST_ONE_VEHICLE_EVENT_ON_FIRST_STOP: z.string().nullable(),
|
|
63
|
+
// Ended At Last Stop
|
|
64
|
+
analysis_ENDED_AT_LAST_STOP: z.string().nullable(),
|
|
65
|
+
// Expected Apex Validation Interval
|
|
66
|
+
analysis_EXPECTED_APEX_VALIDATION_INTERVAL: z.string().nullable(),
|
|
67
|
+
// Driver ID
|
|
68
|
+
analysis_EXPECTED_DRIVER_ID_QTY: z.string().nullable(),
|
|
69
|
+
// Start Time
|
|
70
|
+
analysis_EXPECTED_START_TIME: z.string().nullable(),
|
|
71
|
+
analysis_EXPECTED_START_TIME_value: z.number().nullable(),
|
|
72
|
+
// Vehicle Event
|
|
73
|
+
analysis_EXPECTED_VEHICLE_EVENT_DELAY: z.string().nullable(),
|
|
74
|
+
analysis_EXPECTED_VEHICLE_EVENT_INTERVAL: z.string().nullable(),
|
|
75
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY: z.string().nullable(),
|
|
76
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_expected_qty: z.number().nullable(),
|
|
77
|
+
analysis_EXPECTED_VEHICLE_EVENT_QTY_found_qty: z.number().nullable(),
|
|
78
|
+
analysis_EXPECTED_VEHICLE_ID_QTY: z.string().nullable(),
|
|
79
|
+
// Matching Apex Locations
|
|
80
|
+
analysis_MATCHING_APEX_LOCATIONS: z.string().nullable(),
|
|
81
|
+
analysis_MATCHING_VEHICLE_IDS: z.string().nullable(),
|
|
82
|
+
// Simple One Apex Validation
|
|
83
|
+
analysis_SIMPLE_ONE_APEX_VALIDATION: z.string().nullable(),
|
|
84
|
+
analysis_SIMPLE_ONE_VEHICLE_EVENT_OR_APEX_VALIDATION: z.string().nullable(),
|
|
85
|
+
// Simple Three Vehicle Events
|
|
86
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS: z.string().nullable(),
|
|
87
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_reason: z.string().nullable(),
|
|
88
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_first: z.string().nullable(),
|
|
89
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_last: z.string().nullable(),
|
|
90
|
+
analysis_SIMPLE_THREE_VEHICLE_EVENTS_stop_ids_middle: z.string().nullable(),
|
|
91
|
+
// Transaction Sequentiality
|
|
92
|
+
analysis_TRANSACTION_SEQUENTIALITY: z.string().nullable(),
|
|
93
|
+
analysis_TRANSACTION_SEQUENTIALITY_expected_qty: z.number().nullable(),
|
|
94
|
+
analysis_TRANSACTION_SEQUENTIALITY_found_qty: z.number().nullable(),
|
|
95
|
+
analysis_TRANSACTION_SEQUENTIALITY_missing_qty: z.number().nullable(),
|
|
96
|
+
/* ACCEPTANCE / JUSTIFICATION */
|
|
97
|
+
/* * */
|
|
98
|
+
acceptance_status: z.enum(RideAcceptanceStatusSchema.options).nullish().nullable(),
|
|
99
|
+
justification_cause: gtfsCauseSchema.nullish().nullable(),
|
|
100
|
+
justification_source: z.enum(RideJustificationSourceSchema.options).nullish().nullable(),
|
|
101
|
+
manual_trip_id: z.string().nullish().nullable(),
|
|
102
|
+
pto_message: z.string().min(2).max(5000).default('').nullish().nullable(),
|
|
103
|
+
});
|
|
104
|
+
/* PROPERTIES SCHEMA */
|
|
105
|
+
/* * */
|
|
106
|
+
export const RideExportPropertiesSchema = z.object({
|
|
107
|
+
properties: z.object({
|
|
108
|
+
agency_ids: z.array(z.string()).optional().nullable(),
|
|
109
|
+
/* * */
|
|
110
|
+
analysis_ended_at_last_stop: z.array(RideAnalysisGradeWithNoneSchema).optional().nullable(),
|
|
111
|
+
analysis_expected_apex_validation_interval: z.array(RideAnalysisGradeWithNoneSchema).optional().nullable(),
|
|
112
|
+
analysis_simple_three_vehicle_events: z.array(RideAnalysisGradeWithNoneSchema).optional().nullable(),
|
|
113
|
+
analysis_transaction_sequentiality: z.array(RideAnalysisGradeWithNoneSchema).optional().nullable(),
|
|
114
|
+
/* * */
|
|
115
|
+
date_end: unixTimeStampSchema,
|
|
116
|
+
date_start: unixTimeStampSchema,
|
|
117
|
+
/* * */
|
|
118
|
+
delay_statuses: z.array(DelayStatusSchema).optional().nullable(),
|
|
119
|
+
operational_statuses: z.array(OperationalStatusSchema).optional().nullable(),
|
|
120
|
+
seen_statuses: z.array(SeenStatusSchema).optional().nullable(),
|
|
121
|
+
/* * */
|
|
122
|
+
line_ids: z.array(z.string()).optional().nullable(),
|
|
123
|
+
stop_ids: z.array(z.string()).optional().nullable(),
|
|
124
|
+
/* * */
|
|
125
|
+
acceptance_status: z.array(z.enum([...RideAcceptanceStatusSchema.options, 'none'])).optional().nullable(),
|
|
126
|
+
}),
|
|
127
|
+
type: z.literal('ride'),
|
|
128
|
+
});
|
|
129
|
+
/* CREATE SCHEMA */
|
|
130
|
+
/* * */
|
|
131
|
+
export const RideExportSchema = FileExportBaseSchema.extend(RideExportPropertiesSchema.shape).strict();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const FileSchema: z.ZodObject<{
|
|
3
3
|
_id: z.ZodString;
|
|
4
|
-
created_at: z.ZodEffects<z.ZodNumber, import("./
|
|
5
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("./
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
5
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
6
6
|
} & {
|
|
7
7
|
created_by: z.ZodString;
|
|
8
8
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -25,12 +25,12 @@ export declare const FileSchema: z.ZodObject<{
|
|
|
25
25
|
};
|
|
26
26
|
updated_by: string;
|
|
27
27
|
type: string;
|
|
28
|
-
scope: string;
|
|
29
28
|
name: string;
|
|
30
29
|
resource_id: string;
|
|
30
|
+
scope: string;
|
|
31
31
|
size: number;
|
|
32
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
33
32
|
description?: string | null | undefined;
|
|
33
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
34
34
|
url?: string | null | undefined;
|
|
35
35
|
}, {
|
|
36
36
|
_id: string;
|
|
@@ -39,18 +39,18 @@ export declare const FileSchema: z.ZodObject<{
|
|
|
39
39
|
updated_at: number;
|
|
40
40
|
updated_by: string;
|
|
41
41
|
type: string;
|
|
42
|
-
scope: string;
|
|
43
42
|
name: string;
|
|
44
43
|
resource_id: string;
|
|
44
|
+
scope: string;
|
|
45
45
|
size: number;
|
|
46
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
47
46
|
description?: string | null | undefined;
|
|
47
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
48
48
|
url?: string | null | undefined;
|
|
49
49
|
}>;
|
|
50
50
|
export declare const CreateFileSchema: z.ZodObject<Omit<{
|
|
51
51
|
_id: z.ZodString;
|
|
52
|
-
created_at: z.ZodEffects<z.ZodNumber, import("./
|
|
53
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("./
|
|
52
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
53
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
54
54
|
} & {
|
|
55
55
|
created_by: z.ZodString;
|
|
56
56
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -66,53 +66,53 @@ export declare const CreateFileSchema: z.ZodObject<Omit<{
|
|
|
66
66
|
created_by: string;
|
|
67
67
|
updated_by: string;
|
|
68
68
|
type: string;
|
|
69
|
-
scope: string;
|
|
70
69
|
name: string;
|
|
71
70
|
resource_id: string;
|
|
71
|
+
scope: string;
|
|
72
72
|
size: number;
|
|
73
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
74
73
|
description?: string | null | undefined;
|
|
74
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
75
75
|
url?: string | null | undefined;
|
|
76
76
|
}, {
|
|
77
77
|
created_by: string;
|
|
78
78
|
updated_by: string;
|
|
79
79
|
type: string;
|
|
80
|
-
scope: string;
|
|
81
80
|
name: string;
|
|
82
81
|
resource_id: string;
|
|
82
|
+
scope: string;
|
|
83
83
|
size: number;
|
|
84
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
85
84
|
description?: string | null | undefined;
|
|
85
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
86
86
|
url?: string | null | undefined;
|
|
87
87
|
}>;
|
|
88
88
|
export declare const UpdateFileSchema: z.ZodObject<{
|
|
89
89
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
90
90
|
type: z.ZodOptional<z.ZodString>;
|
|
91
|
-
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
92
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
93
91
|
name: z.ZodOptional<z.ZodString>;
|
|
94
92
|
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
93
|
+
metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
|
|
95
94
|
resource_id: z.ZodOptional<z.ZodString>;
|
|
95
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
96
96
|
size: z.ZodOptional<z.ZodNumber>;
|
|
97
97
|
url: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
98
98
|
}, "strict", z.ZodTypeAny, {
|
|
99
99
|
updated_by?: string | undefined;
|
|
100
100
|
type?: string | undefined;
|
|
101
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
102
|
-
scope?: string | undefined;
|
|
103
101
|
name?: string | undefined;
|
|
104
102
|
description?: string | null | undefined;
|
|
103
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
105
104
|
resource_id?: string | undefined;
|
|
105
|
+
scope?: string | undefined;
|
|
106
106
|
size?: number | undefined;
|
|
107
107
|
url?: string | null | undefined;
|
|
108
108
|
}, {
|
|
109
109
|
updated_by?: string | undefined;
|
|
110
110
|
type?: string | undefined;
|
|
111
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
112
|
-
scope?: string | undefined;
|
|
113
111
|
name?: string | undefined;
|
|
114
112
|
description?: string | null | undefined;
|
|
113
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
115
114
|
resource_id?: string | undefined;
|
|
115
|
+
scope?: string | undefined;
|
|
116
116
|
size?: number | undefined;
|
|
117
117
|
url?: string | null | undefined;
|
|
118
118
|
}>;
|