@tmlmobilidade/types 20251103.1255.55 → 20251202.1817.5
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const jurisdictionSchema: z.ZodEnum<["ip", "municipality", "other", "unknown"]>;
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const stopLifecycleStatusSchema: z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>;
|
|
4
4
|
export declare const electricityStatusSchema: z.ZodEnum<["available", "unavailable", "unknown"]>;
|
|
5
5
|
export declare const roadTypeSchema: z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>;
|
|
6
6
|
export declare const infrastructureStatusSchema: z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>;
|
|
@@ -9,7 +9,7 @@ export declare const facilitiesSchema: z.ZodEnum<["fire_station", "health_clinic
|
|
|
9
9
|
export declare const hasAnySchema: z.ZodEnum<["yes", "no", "unknown"]>;
|
|
10
10
|
export declare const equipmentSchema: z.ZodEnum<["pip", "mupi", "mini_pip"]>;
|
|
11
11
|
export type Jurisdiction = z.infer<typeof jurisdictionSchema>;
|
|
12
|
-
export type
|
|
12
|
+
export type StopLifecycleStatus = z.infer<typeof stopLifecycleStatusSchema>;
|
|
13
13
|
export type ElectricityStatus = z.infer<typeof electricityStatusSchema>;
|
|
14
14
|
export type RoadType = z.infer<typeof roadTypeSchema>;
|
|
15
15
|
export type InfrastructureStatus = z.infer<typeof infrastructureStatusSchema>;
|
|
@@ -27,9 +27,9 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
27
27
|
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
28
28
|
jurisdiction: z.ZodEnum<["ip", "municipality", "other", "unknown"]>;
|
|
29
29
|
legacy_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
|
+
lifecycle_status: z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>;
|
|
30
31
|
name: z.ZodString;
|
|
31
32
|
new_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
32
|
-
operational_status: z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>;
|
|
33
33
|
short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
34
34
|
tts_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
35
|
district_id: z.ZodString;
|
|
@@ -99,9 +99,9 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
99
99
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
100
100
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
101
101
|
type: z.ZodLiteral<"field_changed">;
|
|
102
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
102
103
|
curr_value: z.ZodAny;
|
|
103
104
|
field: z.ZodString;
|
|
104
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
105
105
|
prev_value: z.ZodAny;
|
|
106
106
|
}, "strip", z.ZodTypeAny, {
|
|
107
107
|
created_at: number & {
|
|
@@ -115,8 +115,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
115
115
|
_id?: string | undefined;
|
|
116
116
|
created_by?: string | undefined;
|
|
117
117
|
updated_by?: string | undefined;
|
|
118
|
-
curr_value?: any;
|
|
119
118
|
metadata?: Record<string, unknown> | null | undefined;
|
|
119
|
+
curr_value?: any;
|
|
120
120
|
prev_value?: any;
|
|
121
121
|
}, {
|
|
122
122
|
created_at: number;
|
|
@@ -126,8 +126,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
126
126
|
_id?: string | undefined;
|
|
127
127
|
created_by?: string | undefined;
|
|
128
128
|
updated_by?: string | undefined;
|
|
129
|
-
curr_value?: any;
|
|
130
129
|
metadata?: Record<string, unknown> | null | undefined;
|
|
130
|
+
curr_value?: any;
|
|
131
131
|
prev_value?: any;
|
|
132
132
|
}>, z.ZodObject<{
|
|
133
133
|
_id: z.ZodOptional<z.ZodString>;
|
|
@@ -181,8 +181,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
181
181
|
_id?: string | undefined;
|
|
182
182
|
created_by?: string | undefined;
|
|
183
183
|
updated_by?: string | undefined;
|
|
184
|
-
curr_value?: any;
|
|
185
184
|
metadata?: Record<string, unknown> | null | undefined;
|
|
185
|
+
curr_value?: any;
|
|
186
186
|
prev_value?: any;
|
|
187
187
|
} | {
|
|
188
188
|
created_at: number & {
|
|
@@ -212,8 +212,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
212
212
|
_id?: string | undefined;
|
|
213
213
|
created_by?: string | undefined;
|
|
214
214
|
updated_by?: string | undefined;
|
|
215
|
-
curr_value?: any;
|
|
216
215
|
metadata?: Record<string, unknown> | null | undefined;
|
|
216
|
+
curr_value?: any;
|
|
217
217
|
prev_value?: any;
|
|
218
218
|
} | {
|
|
219
219
|
created_at: number;
|
|
@@ -258,8 +258,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
258
258
|
_id?: string | undefined;
|
|
259
259
|
created_by?: string | undefined;
|
|
260
260
|
updated_by?: string | undefined;
|
|
261
|
-
curr_value?: any;
|
|
262
261
|
metadata?: Record<string, unknown> | null | undefined;
|
|
262
|
+
curr_value?: any;
|
|
263
263
|
prev_value?: any;
|
|
264
264
|
} | {
|
|
265
265
|
created_at: number & {
|
|
@@ -275,7 +275,6 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
275
275
|
updated_by?: string | undefined;
|
|
276
276
|
})[];
|
|
277
277
|
is_locked: boolean;
|
|
278
|
-
operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
279
278
|
has_bench: "unknown" | "yes" | "no";
|
|
280
279
|
has_network_map: "unknown" | "yes" | "no";
|
|
281
280
|
has_schedules: "unknown" | "yes" | "no";
|
|
@@ -284,6 +283,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
284
283
|
municipality_id: string;
|
|
285
284
|
is_archived: boolean;
|
|
286
285
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
286
|
+
lifecycle_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
287
287
|
district_id: string;
|
|
288
288
|
latitude: number;
|
|
289
289
|
longitude: number;
|
|
@@ -338,8 +338,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
338
338
|
_id?: string | undefined;
|
|
339
339
|
created_by?: string | undefined;
|
|
340
340
|
updated_by?: string | undefined;
|
|
341
|
-
curr_value?: any;
|
|
342
341
|
metadata?: Record<string, unknown> | null | undefined;
|
|
342
|
+
curr_value?: any;
|
|
343
343
|
prev_value?: any;
|
|
344
344
|
} | {
|
|
345
345
|
created_at: number;
|
|
@@ -350,7 +350,6 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
350
350
|
created_by?: string | undefined;
|
|
351
351
|
updated_by?: string | undefined;
|
|
352
352
|
})[];
|
|
353
|
-
operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
354
353
|
has_bench: "unknown" | "yes" | "no";
|
|
355
354
|
has_network_map: "unknown" | "yes" | "no";
|
|
356
355
|
has_schedules: "unknown" | "yes" | "no";
|
|
@@ -358,6 +357,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
358
357
|
has_stop_sign: "unknown" | "yes" | "no";
|
|
359
358
|
municipality_id: string;
|
|
360
359
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
360
|
+
lifecycle_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
361
361
|
district_id: string;
|
|
362
362
|
latitude: number;
|
|
363
363
|
longitude: number;
|
|
@@ -462,9 +462,9 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
462
462
|
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
463
463
|
jurisdiction: z.ZodEnum<["ip", "municipality", "other", "unknown"]>;
|
|
464
464
|
legacy_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
465
|
+
lifecycle_status: z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>;
|
|
465
466
|
name: z.ZodString;
|
|
466
467
|
new_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
467
|
-
operational_status: z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>;
|
|
468
468
|
short_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
469
469
|
tts_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
470
470
|
district_id: z.ZodString;
|
|
@@ -534,9 +534,9 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
534
534
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
535
535
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
536
536
|
type: z.ZodLiteral<"field_changed">;
|
|
537
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
537
538
|
curr_value: z.ZodAny;
|
|
538
539
|
field: z.ZodString;
|
|
539
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
540
540
|
prev_value: z.ZodAny;
|
|
541
541
|
}, "strip", z.ZodTypeAny, {
|
|
542
542
|
created_at: number & {
|
|
@@ -550,8 +550,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
550
550
|
_id?: string | undefined;
|
|
551
551
|
created_by?: string | undefined;
|
|
552
552
|
updated_by?: string | undefined;
|
|
553
|
-
curr_value?: any;
|
|
554
553
|
metadata?: Record<string, unknown> | null | undefined;
|
|
554
|
+
curr_value?: any;
|
|
555
555
|
prev_value?: any;
|
|
556
556
|
}, {
|
|
557
557
|
created_at: number;
|
|
@@ -561,8 +561,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
561
561
|
_id?: string | undefined;
|
|
562
562
|
created_by?: string | undefined;
|
|
563
563
|
updated_by?: string | undefined;
|
|
564
|
-
curr_value?: any;
|
|
565
564
|
metadata?: Record<string, unknown> | null | undefined;
|
|
565
|
+
curr_value?: any;
|
|
566
566
|
prev_value?: any;
|
|
567
567
|
}>, z.ZodObject<{
|
|
568
568
|
_id: z.ZodOptional<z.ZodString>;
|
|
@@ -616,8 +616,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
616
616
|
_id?: string | undefined;
|
|
617
617
|
created_by?: string | undefined;
|
|
618
618
|
updated_by?: string | undefined;
|
|
619
|
-
curr_value?: any;
|
|
620
619
|
metadata?: Record<string, unknown> | null | undefined;
|
|
620
|
+
curr_value?: any;
|
|
621
621
|
prev_value?: any;
|
|
622
622
|
} | {
|
|
623
623
|
created_at: number & {
|
|
@@ -647,8 +647,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
647
647
|
_id?: string | undefined;
|
|
648
648
|
created_by?: string | undefined;
|
|
649
649
|
updated_by?: string | undefined;
|
|
650
|
-
curr_value?: any;
|
|
651
650
|
metadata?: Record<string, unknown> | null | undefined;
|
|
651
|
+
curr_value?: any;
|
|
652
652
|
prev_value?: any;
|
|
653
653
|
} | {
|
|
654
654
|
created_at: number;
|
|
@@ -686,8 +686,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
686
686
|
_id?: string | undefined;
|
|
687
687
|
created_by?: string | undefined;
|
|
688
688
|
updated_by?: string | undefined;
|
|
689
|
-
curr_value?: any;
|
|
690
689
|
metadata?: Record<string, unknown> | null | undefined;
|
|
690
|
+
curr_value?: any;
|
|
691
691
|
prev_value?: any;
|
|
692
692
|
} | {
|
|
693
693
|
created_at: number & {
|
|
@@ -703,7 +703,6 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
703
703
|
updated_by?: string | undefined;
|
|
704
704
|
})[];
|
|
705
705
|
is_locked: boolean;
|
|
706
|
-
operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
707
706
|
has_bench: "unknown" | "yes" | "no";
|
|
708
707
|
has_network_map: "unknown" | "yes" | "no";
|
|
709
708
|
has_schedules: "unknown" | "yes" | "no";
|
|
@@ -712,6 +711,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
712
711
|
municipality_id: string;
|
|
713
712
|
is_archived: boolean;
|
|
714
713
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
714
|
+
lifecycle_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
715
715
|
district_id: string;
|
|
716
716
|
latitude: number;
|
|
717
717
|
longitude: number;
|
|
@@ -763,8 +763,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
763
763
|
_id?: string | undefined;
|
|
764
764
|
created_by?: string | undefined;
|
|
765
765
|
updated_by?: string | undefined;
|
|
766
|
-
curr_value?: any;
|
|
767
766
|
metadata?: Record<string, unknown> | null | undefined;
|
|
767
|
+
curr_value?: any;
|
|
768
768
|
prev_value?: any;
|
|
769
769
|
} | {
|
|
770
770
|
created_at: number;
|
|
@@ -775,7 +775,6 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
775
775
|
created_by?: string | undefined;
|
|
776
776
|
updated_by?: string | undefined;
|
|
777
777
|
})[];
|
|
778
|
-
operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
779
778
|
has_bench: "unknown" | "yes" | "no";
|
|
780
779
|
has_network_map: "unknown" | "yes" | "no";
|
|
781
780
|
has_schedules: "unknown" | "yes" | "no";
|
|
@@ -783,6 +782,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
783
782
|
has_stop_sign: "unknown" | "yes" | "no";
|
|
784
783
|
municipality_id: string;
|
|
785
784
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
785
|
+
lifecycle_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
786
786
|
district_id: string;
|
|
787
787
|
latitude: number;
|
|
788
788
|
longitude: number;
|
|
@@ -858,9 +858,9 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
858
858
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
859
859
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
860
860
|
type: z.ZodLiteral<"field_changed">;
|
|
861
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
861
862
|
curr_value: z.ZodAny;
|
|
862
863
|
field: z.ZodString;
|
|
863
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
864
864
|
prev_value: z.ZodAny;
|
|
865
865
|
}, "strip", z.ZodTypeAny, {
|
|
866
866
|
created_at: number & {
|
|
@@ -874,8 +874,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
874
874
|
_id?: string | undefined;
|
|
875
875
|
created_by?: string | undefined;
|
|
876
876
|
updated_by?: string | undefined;
|
|
877
|
-
curr_value?: any;
|
|
878
877
|
metadata?: Record<string, unknown> | null | undefined;
|
|
878
|
+
curr_value?: any;
|
|
879
879
|
prev_value?: any;
|
|
880
880
|
}, {
|
|
881
881
|
created_at: number;
|
|
@@ -885,8 +885,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
885
885
|
_id?: string | undefined;
|
|
886
886
|
created_by?: string | undefined;
|
|
887
887
|
updated_by?: string | undefined;
|
|
888
|
-
curr_value?: any;
|
|
889
888
|
metadata?: Record<string, unknown> | null | undefined;
|
|
889
|
+
curr_value?: any;
|
|
890
890
|
prev_value?: any;
|
|
891
891
|
}>, z.ZodObject<{
|
|
892
892
|
_id: z.ZodOptional<z.ZodString>;
|
|
@@ -940,8 +940,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
940
940
|
_id?: string | undefined;
|
|
941
941
|
created_by?: string | undefined;
|
|
942
942
|
updated_by?: string | undefined;
|
|
943
|
-
curr_value?: any;
|
|
944
943
|
metadata?: Record<string, unknown> | null | undefined;
|
|
944
|
+
curr_value?: any;
|
|
945
945
|
prev_value?: any;
|
|
946
946
|
} | {
|
|
947
947
|
created_at: number & {
|
|
@@ -971,8 +971,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
971
971
|
_id?: string | undefined;
|
|
972
972
|
created_by?: string | undefined;
|
|
973
973
|
updated_by?: string | undefined;
|
|
974
|
-
curr_value?: any;
|
|
975
974
|
metadata?: Record<string, unknown> | null | undefined;
|
|
975
|
+
curr_value?: any;
|
|
976
976
|
prev_value?: any;
|
|
977
977
|
} | {
|
|
978
978
|
created_at: number;
|
|
@@ -984,7 +984,6 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
984
984
|
updated_by?: string | undefined;
|
|
985
985
|
}>, "many">>;
|
|
986
986
|
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
987
|
-
operational_status: z.ZodOptional<z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>>;
|
|
988
987
|
has_bench: z.ZodOptional<z.ZodEnum<["yes", "no", "unknown"]>>;
|
|
989
988
|
has_network_map: z.ZodOptional<z.ZodEnum<["yes", "no", "unknown"]>>;
|
|
990
989
|
has_schedules: z.ZodOptional<z.ZodEnum<["yes", "no", "unknown"]>>;
|
|
@@ -997,6 +996,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
997
996
|
is_archived: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
998
997
|
jurisdiction: z.ZodOptional<z.ZodEnum<["ip", "municipality", "other", "unknown"]>>;
|
|
999
998
|
legacy_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
999
|
+
lifecycle_status: z.ZodOptional<z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>>;
|
|
1000
1000
|
new_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1001
1001
|
tts_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1002
1002
|
district_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1051,8 +1051,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1051
1051
|
_id?: string | undefined;
|
|
1052
1052
|
created_by?: string | undefined;
|
|
1053
1053
|
updated_by?: string | undefined;
|
|
1054
|
-
curr_value?: any;
|
|
1055
1054
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1055
|
+
curr_value?: any;
|
|
1056
1056
|
prev_value?: any;
|
|
1057
1057
|
} | {
|
|
1058
1058
|
created_at: number & {
|
|
@@ -1068,7 +1068,6 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1068
1068
|
updated_by?: string | undefined;
|
|
1069
1069
|
})[] | undefined;
|
|
1070
1070
|
is_locked?: boolean | undefined;
|
|
1071
|
-
operational_status?: "active" | "inactive" | "provisional" | "seasonal" | "voided" | undefined;
|
|
1072
1071
|
has_bench?: "unknown" | "yes" | "no" | undefined;
|
|
1073
1072
|
has_network_map?: "unknown" | "yes" | "no" | undefined;
|
|
1074
1073
|
has_schedules?: "unknown" | "yes" | "no" | undefined;
|
|
@@ -1081,6 +1080,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1081
1080
|
is_archived?: boolean | undefined;
|
|
1082
1081
|
jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
|
|
1083
1082
|
legacy_id?: string | null | undefined;
|
|
1083
|
+
lifecycle_status?: "active" | "inactive" | "provisional" | "seasonal" | "voided" | undefined;
|
|
1084
1084
|
new_name?: string | null | undefined;
|
|
1085
1085
|
tts_name?: string | null | undefined;
|
|
1086
1086
|
district_id?: string | undefined;
|
|
@@ -1127,8 +1127,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1127
1127
|
_id?: string | undefined;
|
|
1128
1128
|
created_by?: string | undefined;
|
|
1129
1129
|
updated_by?: string | undefined;
|
|
1130
|
-
curr_value?: any;
|
|
1131
1130
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1131
|
+
curr_value?: any;
|
|
1132
1132
|
prev_value?: any;
|
|
1133
1133
|
} | {
|
|
1134
1134
|
created_at: number;
|
|
@@ -1140,7 +1140,6 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1140
1140
|
updated_by?: string | undefined;
|
|
1141
1141
|
})[] | undefined;
|
|
1142
1142
|
is_locked?: boolean | undefined;
|
|
1143
|
-
operational_status?: "active" | "inactive" | "provisional" | "seasonal" | "voided" | undefined;
|
|
1144
1143
|
has_bench?: "unknown" | "yes" | "no" | undefined;
|
|
1145
1144
|
has_network_map?: "unknown" | "yes" | "no" | undefined;
|
|
1146
1145
|
has_schedules?: "unknown" | "yes" | "no" | undefined;
|
|
@@ -1153,6 +1152,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1153
1152
|
is_archived?: boolean | undefined;
|
|
1154
1153
|
jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
|
|
1155
1154
|
legacy_id?: string | null | undefined;
|
|
1155
|
+
lifecycle_status?: "active" | "inactive" | "provisional" | "seasonal" | "voided" | undefined;
|
|
1156
1156
|
new_name?: string | null | undefined;
|
|
1157
1157
|
tts_name?: string | null | undefined;
|
|
1158
1158
|
district_id?: string | undefined;
|
|
@@ -1183,14 +1183,3 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1183
1183
|
export type Stop = z.infer<typeof StopSchema>;
|
|
1184
1184
|
export type CreateStopDto = z.infer<typeof CreateStopSchema>;
|
|
1185
1185
|
export type UpdateStopDto = z.infer<typeof UpdateStopSchema>;
|
|
1186
|
-
export declare const StopPermissionSchema: z.ZodObject<{
|
|
1187
|
-
agency_ids: z.ZodArray<z.ZodString, "many">;
|
|
1188
|
-
municipality_ids: z.ZodArray<z.ZodString, "many">;
|
|
1189
|
-
}, "strip", z.ZodTypeAny, {
|
|
1190
|
-
agency_ids: string[];
|
|
1191
|
-
municipality_ids: string[];
|
|
1192
|
-
}, {
|
|
1193
|
-
agency_ids: string[];
|
|
1194
|
-
municipality_ids: string[];
|
|
1195
|
-
}>;
|
|
1196
|
-
export type StopPermission = z.infer<typeof StopPermissionSchema>;
|
|
@@ -7,7 +7,7 @@ import { z } from 'zod';
|
|
|
7
7
|
//
|
|
8
8
|
// Define constants for enum values for better maintainability
|
|
9
9
|
const JURISDICTION_VALUES = ['ip', 'municipality', 'other', 'unknown'];
|
|
10
|
-
const
|
|
10
|
+
const STOP_LIFECYCLE_STATUS_VALUES = ['active', 'inactive', 'provisional', 'seasonal', 'voided'];
|
|
11
11
|
const ELECTRICITY_STATUS_VALUES = ['available', 'unavailable', 'unknown'];
|
|
12
12
|
const ROAD_TYPE_VALUES = ['complementary_itinerary', 'highway', 'main_itinerary', 'national_road', 'regional_road', 'secondary_road', 'unknown'];
|
|
13
13
|
const INFRASTRUCTURE_STATUS_VALUES = ['not_applicable', 'unknown', 'missing', 'damaged', 'ok'];
|
|
@@ -16,7 +16,7 @@ const FACILITIES_VALUES = ['fire_station', 'health_clinic', 'historic_building',
|
|
|
16
16
|
const HAS_ANY = ['yes', 'no', 'unknown'];
|
|
17
17
|
const EQUIPMENT_VALUES = ['pip', 'mupi', 'mini_pip'];
|
|
18
18
|
export const jurisdictionSchema = z.enum(JURISDICTION_VALUES);
|
|
19
|
-
export const
|
|
19
|
+
export const stopLifecycleStatusSchema = z.enum(STOP_LIFECYCLE_STATUS_VALUES);
|
|
20
20
|
export const electricityStatusSchema = z.enum(ELECTRICITY_STATUS_VALUES);
|
|
21
21
|
export const roadTypeSchema = z.enum(ROAD_TYPE_VALUES);
|
|
22
22
|
export const infrastructureStatusSchema = z.enum(INFRASTRUCTURE_STATUS_VALUES);
|
|
@@ -32,9 +32,9 @@ export const StopSchema = DocumentSchema.extend({
|
|
|
32
32
|
is_locked: z.boolean().default(false),
|
|
33
33
|
jurisdiction: jurisdictionSchema,
|
|
34
34
|
legacy_id: z.string().nullish(),
|
|
35
|
+
lifecycle_status: stopLifecycleStatusSchema,
|
|
35
36
|
name: z.string(),
|
|
36
37
|
new_name: z.string().nullish(),
|
|
37
|
-
operational_status: operationalStatusSchema,
|
|
38
38
|
short_name: z.string().nullish(),
|
|
39
39
|
tts_name: z.string().nullish(),
|
|
40
40
|
//
|
|
@@ -100,8 +100,3 @@ export const stopAreaSchema = DocumentSchema.extend({
|
|
|
100
100
|
}).strict();
|
|
101
101
|
export const CreateStopSchema = StopSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
102
102
|
export const UpdateStopSchema = CreateStopSchema.omit({ created_by: true }).partial();
|
|
103
|
-
/* * */
|
|
104
|
-
export const StopPermissionSchema = z.object({
|
|
105
|
-
agency_ids: z.array(z.string()),
|
|
106
|
-
municipality_ids: z.array(z.string()),
|
|
107
|
-
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GtfsRtVehicleEventExtendedSchema: z.ZodObject<{
|
|
3
|
+
_id: z.ZodString;
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
5
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
|
+
} & {
|
|
9
|
+
agency_id: z.ZodString;
|
|
10
|
+
driver_id: z.ZodString;
|
|
11
|
+
event_id: z.ZodString;
|
|
12
|
+
extra_trip_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
latitude: z.ZodNumber;
|
|
14
|
+
longitude: z.ZodNumber;
|
|
15
|
+
odometer: z.ZodNumber;
|
|
16
|
+
pattern_id: z.ZodString;
|
|
17
|
+
received_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
18
|
+
stop_id: z.ZodString;
|
|
19
|
+
trigger_activity: z.ZodString;
|
|
20
|
+
trigger_door: z.ZodString;
|
|
21
|
+
trip_id: z.ZodString;
|
|
22
|
+
vehicle_id: z.ZodString;
|
|
23
|
+
}, "strict", z.ZodTypeAny, {
|
|
24
|
+
_id: string;
|
|
25
|
+
created_at: number & {
|
|
26
|
+
__brand: "UnixTimestamp";
|
|
27
|
+
};
|
|
28
|
+
updated_at: number & {
|
|
29
|
+
__brand: "UnixTimestamp";
|
|
30
|
+
};
|
|
31
|
+
agency_id: string;
|
|
32
|
+
pattern_id: string;
|
|
33
|
+
received_at: number & {
|
|
34
|
+
__brand: "UnixTimestamp";
|
|
35
|
+
};
|
|
36
|
+
stop_id: string;
|
|
37
|
+
trip_id: string;
|
|
38
|
+
vehicle_id: string;
|
|
39
|
+
latitude: number;
|
|
40
|
+
longitude: number;
|
|
41
|
+
driver_id: string;
|
|
42
|
+
event_id: string;
|
|
43
|
+
odometer: number;
|
|
44
|
+
trigger_activity: string;
|
|
45
|
+
trigger_door: string;
|
|
46
|
+
created_by?: string | undefined;
|
|
47
|
+
updated_by?: string | undefined;
|
|
48
|
+
extra_trip_id?: string | null | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
_id: string;
|
|
51
|
+
created_at: number;
|
|
52
|
+
updated_at: number;
|
|
53
|
+
agency_id: string;
|
|
54
|
+
pattern_id: string;
|
|
55
|
+
received_at: number;
|
|
56
|
+
stop_id: string;
|
|
57
|
+
trip_id: string;
|
|
58
|
+
vehicle_id: string;
|
|
59
|
+
latitude: number;
|
|
60
|
+
longitude: number;
|
|
61
|
+
driver_id: string;
|
|
62
|
+
event_id: string;
|
|
63
|
+
odometer: number;
|
|
64
|
+
trigger_activity: string;
|
|
65
|
+
trigger_door: string;
|
|
66
|
+
created_by?: string | undefined;
|
|
67
|
+
updated_by?: string | undefined;
|
|
68
|
+
extra_trip_id?: string | null | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Vehicle Events are produced by the vehicle's on-board computer on a regular schedule
|
|
72
|
+
* or whenever a significant event occurs. These events are used to track the vehicle's
|
|
73
|
+
* location, speed, and status, as well as the current service being provided by the vehicle.
|
|
74
|
+
* These events are based on the GTFS-RT specification but extended with additional fields
|
|
75
|
+
* specific to TML's needs.
|
|
76
|
+
*/
|
|
77
|
+
export type GtfsRtVehicleEventExtended = z.infer<typeof GtfsRtVehicleEventExtendedSchema>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { DocumentSchema } from '../_common/document.js';
|
|
3
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
/* * */
|
|
6
|
+
export const GtfsRtVehicleEventExtendedSchema = DocumentSchema.extend({
|
|
7
|
+
agency_id: z.string(),
|
|
8
|
+
driver_id: z.string(),
|
|
9
|
+
event_id: z.string(),
|
|
10
|
+
extra_trip_id: z.string().nullish(),
|
|
11
|
+
latitude: z.number(),
|
|
12
|
+
longitude: z.number(),
|
|
13
|
+
odometer: z.number(),
|
|
14
|
+
pattern_id: z.string(),
|
|
15
|
+
received_at: unixTimeStampSchema,
|
|
16
|
+
stop_id: z.string(),
|
|
17
|
+
trigger_activity: z.string(),
|
|
18
|
+
trigger_door: z.string(),
|
|
19
|
+
trip_id: z.string(),
|
|
20
|
+
vehicle_id: z.string(),
|
|
21
|
+
}).strict();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const SimplifiedVehicleEventSchema: z.ZodObject<{
|
|
3
3
|
_id: z.ZodString;
|
|
4
|
-
created_at: z.ZodEffects<z.ZodNumber, import("
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
5
5
|
created_by: z.ZodOptional<z.ZodString>;
|
|
6
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
7
7
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
8
|
} & {
|
|
9
9
|
agency_id: z.ZodString;
|
|
@@ -14,7 +14,7 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
14
14
|
longitude: z.ZodNumber;
|
|
15
15
|
odometer: z.ZodNumber;
|
|
16
16
|
pattern_id: z.ZodString;
|
|
17
|
-
received_at: z.ZodEffects<z.ZodNumber, import("
|
|
17
|
+
received_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
18
18
|
stop_id: z.ZodString;
|
|
19
19
|
trigger_activity: z.ZodString;
|
|
20
20
|
trigger_door: z.ZodString;
|
|
@@ -30,12 +30,12 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
30
30
|
};
|
|
31
31
|
agency_id: string;
|
|
32
32
|
pattern_id: string;
|
|
33
|
-
trip_id: string;
|
|
34
|
-
vehicle_id: string;
|
|
35
33
|
received_at: number & {
|
|
36
34
|
__brand: "UnixTimestamp";
|
|
37
35
|
};
|
|
38
36
|
stop_id: string;
|
|
37
|
+
trip_id: string;
|
|
38
|
+
vehicle_id: string;
|
|
39
39
|
latitude: number;
|
|
40
40
|
longitude: number;
|
|
41
41
|
driver_id: string;
|
|
@@ -52,10 +52,10 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
52
52
|
updated_at: number;
|
|
53
53
|
agency_id: string;
|
|
54
54
|
pattern_id: string;
|
|
55
|
-
trip_id: string;
|
|
56
|
-
vehicle_id: string;
|
|
57
55
|
received_at: number;
|
|
58
56
|
stop_id: string;
|
|
57
|
+
trip_id: string;
|
|
58
|
+
vehicle_id: string;
|
|
59
59
|
latitude: number;
|
|
60
60
|
longitude: number;
|
|
61
61
|
driver_id: string;
|
|
@@ -74,4 +74,4 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
74
74
|
* These events are based on the GTFS-RT specification but extended with additional fields
|
|
75
75
|
* specific to TML's needs.
|
|
76
76
|
*/
|
|
77
|
-
export type
|
|
77
|
+
export type SimplifiedVehicleEvent = z.infer<typeof SimplifiedVehicleEventSchema>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* * */
|
|
2
|
-
import { DocumentSchema } from '
|
|
3
|
-
import { unixTimeStampSchema } from '
|
|
2
|
+
import { DocumentSchema } from '../_common/document.js';
|
|
3
|
+
import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/* * */
|
|
6
|
-
export const
|
|
6
|
+
export const SimplifiedVehicleEventSchema = DocumentSchema.extend({
|
|
7
7
|
agency_id: z.string(),
|
|
8
8
|
driver_id: z.string(),
|
|
9
9
|
event_id: z.string(),
|
package/dist/wiki.js
ADDED
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
export declare const ZoneSchema: z.ZodObject<{
|
|
4
4
|
_id: z.ZodString;
|
|
5
5
|
created_by: z.ZodOptional<z.ZodString>;
|
|
6
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("./
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
7
7
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
8
8
|
} & {
|
|
9
9
|
border_color: z.ZodString;
|
|
@@ -52,7 +52,7 @@ export declare const ZoneSchema: z.ZodObject<{
|
|
|
52
52
|
export declare const CreateZoneSchema: z.ZodObject<Omit<{
|
|
53
53
|
_id: z.ZodString;
|
|
54
54
|
created_by: z.ZodOptional<z.ZodString>;
|
|
55
|
-
updated_at: z.ZodEffects<z.ZodNumber, import("./
|
|
55
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./index.js").UnixTimestamp, number>;
|
|
56
56
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
57
57
|
} & {
|
|
58
58
|
border_color: z.ZodString;
|
|
@@ -131,17 +131,3 @@ export type CreateZoneDto = Omit<z.infer<typeof CreateZoneSchema>, 'geojson'> &
|
|
|
131
131
|
geojson: GeoJSON;
|
|
132
132
|
};
|
|
133
133
|
export type UpdateZoneDto = Partial<CreateZoneDto>;
|
|
134
|
-
export declare const ZonePermissionSchema: z.ZodObject<{
|
|
135
|
-
agency_ids: z.ZodArray<z.ZodString, "many">;
|
|
136
|
-
code_contains: z.ZodArray<z.ZodString, "many">;
|
|
137
|
-
municipality_ids: z.ZodArray<z.ZodString, "many">;
|
|
138
|
-
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
agency_ids: string[];
|
|
140
|
-
municipality_ids: string[];
|
|
141
|
-
code_contains: string[];
|
|
142
|
-
}, {
|
|
143
|
-
agency_ids: string[];
|
|
144
|
-
municipality_ids: string[];
|
|
145
|
-
code_contains: string[];
|
|
146
|
-
}>;
|
|
147
|
-
export type ZonePermission = z.infer<typeof ZonePermissionSchema>;
|
|
@@ -16,9 +16,3 @@ export const ZoneSchema = DocumentSchema.extend({
|
|
|
16
16
|
}).strict();
|
|
17
17
|
export const CreateZoneSchema = ZoneSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
18
18
|
export const UpdateZoneSchema = CreateZoneSchema.omit({ created_by: true }).partial();
|
|
19
|
-
/* * */
|
|
20
|
-
export const ZonePermissionSchema = z.object({
|
|
21
|
-
agency_ids: z.array(z.string()),
|
|
22
|
-
code_contains: z.array(z.string()),
|
|
23
|
-
municipality_ids: z.array(z.string()),
|
|
24
|
-
});
|