@tmlmobilidade/types 20250910.1541.13 → 20250911.1325.18
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/operational-date.d.ts +1 -1
- package/dist/src/_common/operational-date.js +1 -2
- package/dist/src/_common/proposed-change.d.ts +9 -31
- package/dist/src/_common/proposed-change.js +5 -14
- package/dist/src/agency.d.ts +10 -21
- package/dist/src/agency.js +1 -1
- package/dist/src/alert.d.ts +32 -58
- package/dist/src/alert.js +8 -48
- package/dist/src/auth/login.js +2 -8
- package/dist/src/auth/role.d.ts +6 -13
- package/dist/src/auth/role.js +1 -1
- package/dist/src/auth/session.d.ts +13 -29
- package/dist/src/auth/session.js +3 -3
- package/dist/src/auth/user.d.ts +13 -32
- package/dist/src/auth/user.js +3 -3
- package/dist/src/auth/verification-token.d.ts +13 -25
- package/dist/src/auth/verification-token.js +3 -3
- package/dist/src/gtfs.d.ts +6 -17
- package/dist/src/organization.d.ts +1 -4
- package/dist/src/organization.js +1 -1
- package/dist/src/plans/gtfs-validation.d.ts +25 -63
- package/dist/src/plans/gtfs-validation.js +2 -6
- package/dist/src/plans/plan-controller.d.ts +3 -8
- package/dist/src/plans/plan-controller.js +2 -2
- package/dist/src/plans/plan.d.ts +34 -86
- package/dist/src/plans/plan.js +2 -6
- package/dist/src/rides/ride-audit.d.ts +52 -1168
- package/dist/src/rides/ride-audit.js +3 -5
- package/dist/src/rides/ride-justification.d.ts +84 -9
- package/dist/src/rides/ride-justification.js +4 -1
- package/dist/src/rides/ride.d.ts +54 -105
- package/dist/src/rides/ride.js +8 -8
- package/dist/src/sams/sam-analysis.d.ts +5 -13
- package/dist/src/sams/sam-analysis.js +3 -3
- package/dist/src/sams/sam.d.ts +37 -88
- package/dist/src/sams/sam.js +4 -4
- package/dist/src/simplified-apex/simplified-apex-location.d.ts +16 -23
- package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +16 -23
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +27 -37
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
- package/dist/src/simplified-apex/simplified-apex-validation.d.ts +16 -23
- package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
- package/dist/src/stop.d.ts +68 -86
- package/dist/src/stop.js +11 -74
- package/dist/src/vehicle-event.d.ts +7 -12
- package/dist/src/vehicle-event.js +2 -2
- package/dist/src/zone.d.ts +0 -3
- package/dist/src/zone.js +1 -1
- package/package.json +1 -1
package/dist/src/stop.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type UnixTimestamp } from './_common/unix-timestamp.js';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
export declare const jurisdictionSchema: z.ZodEnum<["ip", "municipality", "other", "unknown"]>;
|
|
4
3
|
export declare const operationalStatusSchema: z.ZodEnum<["active", "inactive", "provisional", "seasonal", "voided"]>;
|
|
@@ -9,10 +8,18 @@ export declare const connectionsSchema: z.ZodEnum<["ferry", "light_rail", "subwa
|
|
|
9
8
|
export declare const facilitiesSchema: z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>;
|
|
10
9
|
export declare const hasAnySchema: z.ZodEnum<["yes", "no", "unknown"]>;
|
|
11
10
|
export declare const equipmentSchema: z.ZodEnum<["pip", "mupi", "mini_pip"]>;
|
|
11
|
+
export type Jurisdiction = z.infer<typeof jurisdictionSchema>;
|
|
12
|
+
export type OperationalStatus = z.infer<typeof operationalStatusSchema>;
|
|
13
|
+
export type ElectricityStatus = z.infer<typeof electricityStatusSchema>;
|
|
14
|
+
export type RoadType = z.infer<typeof roadTypeSchema>;
|
|
15
|
+
export type InfrastructureStatus = z.infer<typeof infrastructureStatusSchema>;
|
|
16
|
+
export type Connections = z.infer<typeof connectionsSchema>;
|
|
17
|
+
export type Facilities = z.infer<typeof facilitiesSchema>;
|
|
18
|
+
export type Equipment = z.infer<typeof equipmentSchema>;
|
|
12
19
|
export declare const StopSchema: z.ZodObject<{
|
|
13
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
20
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
14
21
|
created_by: z.ZodDefault<z.ZodString>;
|
|
15
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
22
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
16
23
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
17
24
|
} & {
|
|
18
25
|
_id: z.ZodString;
|
|
@@ -37,15 +44,15 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
37
44
|
road_type: z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>;
|
|
38
45
|
shelter_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
46
|
shelter_frame_size: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
40
|
-
shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
47
|
+
shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
41
48
|
shelter_maintainer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
49
|
shelter_make: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
50
|
shelter_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
44
51
|
shelter_status: z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>;
|
|
45
|
-
last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
46
|
-
last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
47
|
-
last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
48
|
-
last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
52
|
+
last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
53
|
+
last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
54
|
+
last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
55
|
+
last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
49
56
|
connections: z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">;
|
|
50
57
|
facilities: z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">;
|
|
51
58
|
equipment: z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">;
|
|
@@ -59,9 +66,9 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
59
66
|
image_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
60
67
|
comments: z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
61
68
|
_id: z.ZodString;
|
|
62
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
69
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
63
70
|
created_by: z.ZodDefault<z.ZodString>;
|
|
64
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
71
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
65
72
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
66
73
|
} & {
|
|
67
74
|
message: z.ZodString;
|
|
@@ -88,8 +95,8 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
88
95
|
updated_by?: string | undefined;
|
|
89
96
|
}>, z.ZodObject<{
|
|
90
97
|
_id: z.ZodString;
|
|
91
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
92
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
98
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
99
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
93
100
|
} & {
|
|
94
101
|
created_by: z.ZodLiteral<"system">;
|
|
95
102
|
message: z.ZodString;
|
|
@@ -117,9 +124,9 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
117
124
|
type: "system_info";
|
|
118
125
|
}>, z.ZodObject<{
|
|
119
126
|
_id: z.ZodString;
|
|
120
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
127
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
121
128
|
created_by: z.ZodDefault<z.ZodString>;
|
|
122
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
129
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
123
130
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
124
131
|
} & {
|
|
125
132
|
curr_status: z.ZodString;
|
|
@@ -293,13 +300,13 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
293
300
|
tts_name?: string | null | undefined;
|
|
294
301
|
locality_id?: string | null | undefined;
|
|
295
302
|
shelter_frame_size?: [number, number] | null | undefined;
|
|
296
|
-
shelter_installation_date?: UnixTimestamp | null | undefined;
|
|
303
|
+
shelter_installation_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
297
304
|
shelter_make?: string | null | undefined;
|
|
298
305
|
shelter_model?: string | null | undefined;
|
|
299
|
-
last_infrastructure_check?: UnixTimestamp | null | undefined;
|
|
300
|
-
last_infrastructure_maintenance?: UnixTimestamp | null | undefined;
|
|
301
|
-
last_schedules_check?: UnixTimestamp | null | undefined;
|
|
302
|
-
last_schedules_maintenance?: UnixTimestamp | null | undefined;
|
|
306
|
+
last_infrastructure_check?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
307
|
+
last_infrastructure_maintenance?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
308
|
+
last_schedules_check?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
309
|
+
last_schedules_maintenance?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
303
310
|
observations?: string | null | undefined;
|
|
304
311
|
}, {
|
|
305
312
|
_id: string;
|
|
@@ -377,9 +384,9 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
377
384
|
observations?: string | null | undefined;
|
|
378
385
|
}>;
|
|
379
386
|
export declare const parentStationSchema: z.ZodObject<{
|
|
380
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
387
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
381
388
|
created_by: z.ZodDefault<z.ZodString>;
|
|
382
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
389
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
383
390
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
384
391
|
} & {
|
|
385
392
|
_id: z.ZodString;
|
|
@@ -407,9 +414,9 @@ export declare const parentStationSchema: z.ZodObject<{
|
|
|
407
414
|
updated_by?: string | undefined;
|
|
408
415
|
}>;
|
|
409
416
|
export declare const stopAreaSchema: z.ZodObject<{
|
|
410
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
417
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
411
418
|
created_by: z.ZodDefault<z.ZodString>;
|
|
412
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
419
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
413
420
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
414
421
|
} & {
|
|
415
422
|
_id: z.ZodString;
|
|
@@ -433,18 +440,10 @@ export declare const stopAreaSchema: z.ZodObject<{
|
|
|
433
440
|
created_by?: string | undefined;
|
|
434
441
|
updated_by?: string | undefined;
|
|
435
442
|
}>;
|
|
436
|
-
export type Jurisdiction = z.infer<typeof jurisdictionSchema>;
|
|
437
|
-
export type OperationalStatus = z.infer<typeof operationalStatusSchema>;
|
|
438
|
-
export type ElectricityStatus = z.infer<typeof electricityStatusSchema>;
|
|
439
|
-
export type RoadType = z.infer<typeof roadTypeSchema>;
|
|
440
|
-
export type InfrastructureStatus = z.infer<typeof infrastructureStatusSchema>;
|
|
441
|
-
export type Connections = z.infer<typeof connectionsSchema>;
|
|
442
|
-
export type Facilities = z.infer<typeof facilitiesSchema>;
|
|
443
|
-
export type Equipment = z.infer<typeof equipmentSchema>;
|
|
444
443
|
export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
445
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
444
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
446
445
|
created_by: z.ZodDefault<z.ZodString>;
|
|
447
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
446
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
448
447
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
449
448
|
} & {
|
|
450
449
|
_id: z.ZodString;
|
|
@@ -469,15 +468,15 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
469
468
|
road_type: z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>;
|
|
470
469
|
shelter_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
470
|
shelter_frame_size: z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
472
|
-
shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
471
|
+
shelter_installation_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
473
472
|
shelter_maintainer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
474
473
|
shelter_make: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
475
474
|
shelter_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
476
475
|
shelter_status: z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>;
|
|
477
|
-
last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
478
|
-
last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
479
|
-
last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
480
|
-
last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>;
|
|
476
|
+
last_infrastructure_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
477
|
+
last_infrastructure_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
478
|
+
last_schedules_check: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
479
|
+
last_schedules_maintenance: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>;
|
|
481
480
|
connections: z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">;
|
|
482
481
|
facilities: z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">;
|
|
483
482
|
equipment: z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">;
|
|
@@ -491,9 +490,9 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
491
490
|
image_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
492
491
|
comments: z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
493
492
|
_id: z.ZodString;
|
|
494
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
493
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
495
494
|
created_by: z.ZodDefault<z.ZodString>;
|
|
496
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
495
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
497
496
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
498
497
|
} & {
|
|
499
498
|
message: z.ZodString;
|
|
@@ -520,8 +519,8 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
520
519
|
updated_by?: string | undefined;
|
|
521
520
|
}>, z.ZodObject<{
|
|
522
521
|
_id: z.ZodString;
|
|
523
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
524
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
522
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
523
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
525
524
|
} & {
|
|
526
525
|
created_by: z.ZodLiteral<"system">;
|
|
527
526
|
message: z.ZodString;
|
|
@@ -549,9 +548,9 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
549
548
|
type: "system_info";
|
|
550
549
|
}>, z.ZodObject<{
|
|
551
550
|
_id: z.ZodString;
|
|
552
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
551
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
553
552
|
created_by: z.ZodDefault<z.ZodString>;
|
|
554
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
553
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
555
554
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
556
555
|
} & {
|
|
557
556
|
curr_status: z.ZodString;
|
|
@@ -643,8 +642,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
643
642
|
updated_by?: string | undefined;
|
|
644
643
|
}>, "many">;
|
|
645
644
|
observations: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
646
|
-
}, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
647
|
-
_id: string;
|
|
645
|
+
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
648
646
|
created_by: string;
|
|
649
647
|
updated_by: string;
|
|
650
648
|
name: string;
|
|
@@ -719,16 +717,15 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
719
717
|
tts_name?: string | null | undefined;
|
|
720
718
|
locality_id?: string | null | undefined;
|
|
721
719
|
shelter_frame_size?: [number, number] | null | undefined;
|
|
722
|
-
shelter_installation_date?: UnixTimestamp | null | undefined;
|
|
720
|
+
shelter_installation_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
723
721
|
shelter_make?: string | null | undefined;
|
|
724
722
|
shelter_model?: string | null | undefined;
|
|
725
|
-
last_infrastructure_check?: UnixTimestamp | null | undefined;
|
|
726
|
-
last_infrastructure_maintenance?: UnixTimestamp | null | undefined;
|
|
727
|
-
last_schedules_check?: UnixTimestamp | null | undefined;
|
|
728
|
-
last_schedules_maintenance?: UnixTimestamp | null | undefined;
|
|
723
|
+
last_infrastructure_check?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
724
|
+
last_infrastructure_maintenance?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
725
|
+
last_schedules_check?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
726
|
+
last_schedules_maintenance?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
729
727
|
observations?: string | null | undefined;
|
|
730
728
|
}, {
|
|
731
|
-
_id: string;
|
|
732
729
|
name: string;
|
|
733
730
|
has_bench: "unknown" | "yes" | "no";
|
|
734
731
|
has_network_map: "unknown" | "yes" | "no";
|
|
@@ -801,7 +798,6 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
801
798
|
observations?: string | null | undefined;
|
|
802
799
|
}>;
|
|
803
800
|
export declare const UpdateStopSchema: z.ZodObject<{
|
|
804
|
-
created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
805
801
|
updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
806
802
|
name: z.ZodOptional<z.ZodString>;
|
|
807
803
|
short_name: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -817,9 +813,9 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
817
813
|
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
818
814
|
comments: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
819
815
|
_id: z.ZodString;
|
|
820
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
816
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
821
817
|
created_by: z.ZodDefault<z.ZodString>;
|
|
822
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
818
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
823
819
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
824
820
|
} & {
|
|
825
821
|
message: z.ZodString;
|
|
@@ -846,8 +842,8 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
846
842
|
updated_by?: string | undefined;
|
|
847
843
|
}>, z.ZodObject<{
|
|
848
844
|
_id: z.ZodString;
|
|
849
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
850
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
845
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
846
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
851
847
|
} & {
|
|
852
848
|
created_by: z.ZodLiteral<"system">;
|
|
853
849
|
message: z.ZodString;
|
|
@@ -875,9 +871,9 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
875
871
|
type: "system_info";
|
|
876
872
|
}>, z.ZodObject<{
|
|
877
873
|
_id: z.ZodString;
|
|
878
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
874
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
879
875
|
created_by: z.ZodDefault<z.ZodString>;
|
|
880
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
876
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
881
877
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
882
878
|
} & {
|
|
883
879
|
curr_status: z.ZodString;
|
|
@@ -983,14 +979,14 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
983
979
|
pole_status: z.ZodOptional<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
|
|
984
980
|
road_type: z.ZodOptional<z.ZodEnum<["complementary_itinerary", "highway", "main_itinerary", "national_road", "regional_road", "secondary_road", "unknown"]>>;
|
|
985
981
|
shelter_frame_size: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
|
|
986
|
-
shelter_installation_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
|
|
982
|
+
shelter_installation_date: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
987
983
|
shelter_make: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
988
984
|
shelter_model: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
989
985
|
shelter_status: z.ZodOptional<z.ZodEnum<["not_applicable", "unknown", "missing", "damaged", "ok"]>>;
|
|
990
|
-
last_infrastructure_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
|
|
991
|
-
last_infrastructure_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
|
|
992
|
-
last_schedules_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
|
|
993
|
-
last_schedules_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>>>>;
|
|
986
|
+
last_infrastructure_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
987
|
+
last_infrastructure_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
988
|
+
last_schedules_check: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
989
|
+
last_schedules_maintenance: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>>>>;
|
|
994
990
|
connections: z.ZodOptional<z.ZodArray<z.ZodEnum<["ferry", "light_rail", "subway", "train", "boat", "airport", "bike_sharing", "bike_parking", "car_parking"]>, "many">>;
|
|
995
991
|
facilities: z.ZodOptional<z.ZodArray<z.ZodEnum<["fire_station", "health_clinic", "historic_building", "hospital", "police_station", "school", "shopping", "transit_office", "university", "beach"]>, "many">>;
|
|
996
992
|
equipment: z.ZodOptional<z.ZodArray<z.ZodEnum<["pip", "mupi", "mini_pip"]>, "many">>;
|
|
@@ -999,7 +995,6 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
999
995
|
image_ids: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
1000
996
|
observations: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
1001
997
|
}, "strict", z.ZodTypeAny, {
|
|
1002
|
-
created_by?: string | undefined;
|
|
1003
998
|
updated_by?: string | undefined;
|
|
1004
999
|
name?: string | undefined;
|
|
1005
1000
|
short_name?: string | null | undefined;
|
|
@@ -1066,14 +1061,14 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1066
1061
|
pole_status?: "unknown" | "not_applicable" | "missing" | "damaged" | "ok" | undefined;
|
|
1067
1062
|
road_type?: "unknown" | "complementary_itinerary" | "highway" | "main_itinerary" | "national_road" | "regional_road" | "secondary_road" | undefined;
|
|
1068
1063
|
shelter_frame_size?: [number, number] | null | undefined;
|
|
1069
|
-
shelter_installation_date?: UnixTimestamp | null | undefined;
|
|
1064
|
+
shelter_installation_date?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
1070
1065
|
shelter_make?: string | null | undefined;
|
|
1071
1066
|
shelter_model?: string | null | undefined;
|
|
1072
1067
|
shelter_status?: "unknown" | "not_applicable" | "missing" | "damaged" | "ok" | undefined;
|
|
1073
|
-
last_infrastructure_check?: UnixTimestamp | null | undefined;
|
|
1074
|
-
last_infrastructure_maintenance?: UnixTimestamp | null | undefined;
|
|
1075
|
-
last_schedules_check?: UnixTimestamp | null | undefined;
|
|
1076
|
-
last_schedules_maintenance?: UnixTimestamp | null | undefined;
|
|
1068
|
+
last_infrastructure_check?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
1069
|
+
last_infrastructure_maintenance?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
1070
|
+
last_schedules_check?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
1071
|
+
last_schedules_maintenance?: import("./_common/unix-timestamp.js").UnixTimestamp | null | undefined;
|
|
1077
1072
|
connections?: ("ferry" | "light_rail" | "subway" | "train" | "boat" | "airport" | "bike_sharing" | "bike_parking" | "car_parking")[] | undefined;
|
|
1078
1073
|
facilities?: ("school" | "fire_station" | "health_clinic" | "historic_building" | "hospital" | "police_station" | "shopping" | "transit_office" | "university" | "beach")[] | undefined;
|
|
1079
1074
|
equipment?: ("pip" | "mupi" | "mini_pip")[] | undefined;
|
|
@@ -1082,7 +1077,6 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1082
1077
|
image_ids?: string[] | undefined;
|
|
1083
1078
|
observations?: string | null | undefined;
|
|
1084
1079
|
}, {
|
|
1085
|
-
created_by?: string | undefined;
|
|
1086
1080
|
updated_by?: string | undefined;
|
|
1087
1081
|
name?: string | undefined;
|
|
1088
1082
|
short_name?: string | null | undefined;
|
|
@@ -1153,21 +1147,9 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1153
1147
|
image_ids?: string[] | undefined;
|
|
1154
1148
|
observations?: string | null | undefined;
|
|
1155
1149
|
}>;
|
|
1156
|
-
export
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
last_schedules_check?: UnixTimestamp;
|
|
1160
|
-
last_schedules_maintenance?: UnixTimestamp;
|
|
1161
|
-
last_shelter_installation?: UnixTimestamp;
|
|
1162
|
-
}
|
|
1163
|
-
export interface CreateStopDto extends Omit<z.infer<typeof CreateStopSchema>, 'last_infrastructure_check' | 'last_infrastructure_maintenance' | 'last_schedules_check' | 'last_schedules_maintenance' | 'last_shelter_installation'> {
|
|
1164
|
-
last_infrastructure_check?: UnixTimestamp;
|
|
1165
|
-
last_infrastructure_maintenance?: UnixTimestamp;
|
|
1166
|
-
last_schedules_check?: UnixTimestamp;
|
|
1167
|
-
last_schedules_maintenance?: UnixTimestamp;
|
|
1168
|
-
last_shelter_installation?: UnixTimestamp;
|
|
1169
|
-
}
|
|
1170
|
-
export type UpdateStopDto = Partial<Omit<CreateStopDto, 'created_by'>>;
|
|
1150
|
+
export type Stop = z.infer<typeof StopSchema>;
|
|
1151
|
+
export type CreateStopDto = z.infer<typeof CreateStopSchema>;
|
|
1152
|
+
export type UpdateStopDto = z.infer<typeof UpdateStopSchema>;
|
|
1171
1153
|
export declare const StopPermissionSchema: z.ZodObject<{
|
|
1172
1154
|
agency_ids: z.ZodArray<z.ZodString, "many">;
|
|
1173
1155
|
municipality_ids: z.ZodArray<z.ZodString, "many">;
|
package/dist/src/stop.js
CHANGED
|
@@ -6,75 +6,15 @@ import { z } from 'zod';
|
|
|
6
6
|
/* * */
|
|
7
7
|
//
|
|
8
8
|
// Define constants for enum values for better maintainability
|
|
9
|
-
const JURISDICTION_VALUES = [
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
];
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
'provisional',
|
|
19
|
-
'seasonal',
|
|
20
|
-
'voided',
|
|
21
|
-
];
|
|
22
|
-
const ELECTRICITY_STATUS_VALUES = [
|
|
23
|
-
'available',
|
|
24
|
-
'unavailable',
|
|
25
|
-
'unknown',
|
|
26
|
-
];
|
|
27
|
-
const ROAD_TYPE_VALUES = [
|
|
28
|
-
'complementary_itinerary',
|
|
29
|
-
'highway',
|
|
30
|
-
'main_itinerary',
|
|
31
|
-
'national_road',
|
|
32
|
-
'regional_road',
|
|
33
|
-
'secondary_road',
|
|
34
|
-
'unknown',
|
|
35
|
-
];
|
|
36
|
-
const INFRASTRUCTURE_STATUS_VALUES = [
|
|
37
|
-
'not_applicable',
|
|
38
|
-
'unknown',
|
|
39
|
-
'missing',
|
|
40
|
-
'damaged',
|
|
41
|
-
'ok',
|
|
42
|
-
];
|
|
43
|
-
const CONNECTIONS_VALUES = [
|
|
44
|
-
'ferry',
|
|
45
|
-
'light_rail',
|
|
46
|
-
'subway',
|
|
47
|
-
'train',
|
|
48
|
-
'boat',
|
|
49
|
-
'airport',
|
|
50
|
-
'bike_sharing',
|
|
51
|
-
'bike_parking',
|
|
52
|
-
'car_parking',
|
|
53
|
-
];
|
|
54
|
-
const FACILITIES_VALUES = [
|
|
55
|
-
'fire_station',
|
|
56
|
-
'health_clinic',
|
|
57
|
-
'historic_building',
|
|
58
|
-
'hospital',
|
|
59
|
-
'police_station',
|
|
60
|
-
'school',
|
|
61
|
-
'shopping',
|
|
62
|
-
'transit_office',
|
|
63
|
-
'university',
|
|
64
|
-
'beach',
|
|
65
|
-
];
|
|
66
|
-
const HAS_ANY = [
|
|
67
|
-
'yes',
|
|
68
|
-
'no',
|
|
69
|
-
'unknown',
|
|
70
|
-
];
|
|
71
|
-
const EQUIPMENT_VALUES = [
|
|
72
|
-
'pip',
|
|
73
|
-
'mupi',
|
|
74
|
-
'mini_pip',
|
|
75
|
-
];
|
|
76
|
-
//
|
|
77
|
-
// Define schemas using constants
|
|
9
|
+
const JURISDICTION_VALUES = ['ip', 'municipality', 'other', 'unknown'];
|
|
10
|
+
const OPERATIONAL_STATUS_VALUES = ['active', 'inactive', 'provisional', 'seasonal', 'voided'];
|
|
11
|
+
const ELECTRICITY_STATUS_VALUES = ['available', 'unavailable', 'unknown'];
|
|
12
|
+
const ROAD_TYPE_VALUES = ['complementary_itinerary', 'highway', 'main_itinerary', 'national_road', 'regional_road', 'secondary_road', 'unknown'];
|
|
13
|
+
const INFRASTRUCTURE_STATUS_VALUES = ['not_applicable', 'unknown', 'missing', 'damaged', 'ok'];
|
|
14
|
+
const CONNECTIONS_VALUES = ['ferry', 'light_rail', 'subway', 'train', 'boat', 'airport', 'bike_sharing', 'bike_parking', 'car_parking'];
|
|
15
|
+
const FACILITIES_VALUES = ['fire_station', 'health_clinic', 'historic_building', 'hospital', 'police_station', 'school', 'shopping', 'transit_office', 'university', 'beach'];
|
|
16
|
+
const HAS_ANY = ['yes', 'no', 'unknown'];
|
|
17
|
+
const EQUIPMENT_VALUES = ['pip', 'mupi', 'mini_pip'];
|
|
78
18
|
export const jurisdictionSchema = z.enum(JURISDICTION_VALUES);
|
|
79
19
|
export const operationalStatusSchema = z.enum(OPERATIONAL_STATUS_VALUES);
|
|
80
20
|
export const electricityStatusSchema = z.enum(ELECTRICITY_STATUS_VALUES);
|
|
@@ -158,11 +98,8 @@ export const stopAreaSchema = DocumentSchema.extend({
|
|
|
158
98
|
_id: z.string(),
|
|
159
99
|
parent_station_ids: z.array(z.string()),
|
|
160
100
|
}).strict();
|
|
161
|
-
export const CreateStopSchema = StopSchema
|
|
162
|
-
|
|
163
|
-
export const UpdateStopSchema = StopSchema
|
|
164
|
-
.omit({ _id: true, created_at: true, updated_at: true })
|
|
165
|
-
.partial();
|
|
101
|
+
export const CreateStopSchema = StopSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
102
|
+
export const UpdateStopSchema = CreateStopSchema.omit({ created_by: true }).partial();
|
|
166
103
|
/* * */
|
|
167
104
|
export const StopPermissionSchema = z.object({
|
|
168
105
|
agency_ids: z.array(z.string()),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type UnixTimestamp } from './_common/unix-timestamp.js';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
export declare const VehicleEventSchema: z.ZodObject<{
|
|
4
3
|
_id: z.ZodString;
|
|
5
|
-
created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
6
5
|
created_by: z.ZodDefault<z.ZodString>;
|
|
7
|
-
updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
|
|
6
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
8
7
|
updated_by: z.ZodDefault<z.ZodString>;
|
|
9
8
|
} & {
|
|
10
9
|
agency_id: z.ZodString;
|
|
@@ -15,7 +14,7 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
15
14
|
longitude: z.ZodNumber;
|
|
16
15
|
odometer: z.ZodNumber;
|
|
17
16
|
pattern_id: z.ZodString;
|
|
18
|
-
received_at: z.
|
|
17
|
+
received_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
19
18
|
stop_id: z.ZodString;
|
|
20
19
|
trigger_activity: z.ZodString;
|
|
21
20
|
trigger_door: z.ZodString;
|
|
@@ -32,12 +31,12 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
32
31
|
};
|
|
33
32
|
updated_by: string;
|
|
34
33
|
agency_id: string;
|
|
35
|
-
pattern_id: string;
|
|
36
34
|
trip_id: string;
|
|
35
|
+
pattern_id: string;
|
|
37
36
|
vehicle_id: string;
|
|
38
37
|
received_at: number & {
|
|
39
38
|
__brand: "UnixTimestamp";
|
|
40
|
-
}
|
|
39
|
+
};
|
|
41
40
|
stop_id: string;
|
|
42
41
|
latitude: number;
|
|
43
42
|
longitude: number;
|
|
@@ -52,8 +51,8 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
52
51
|
created_at: number;
|
|
53
52
|
updated_at: number;
|
|
54
53
|
agency_id: string;
|
|
55
|
-
pattern_id: string;
|
|
56
54
|
trip_id: string;
|
|
55
|
+
pattern_id: string;
|
|
57
56
|
vehicle_id: string;
|
|
58
57
|
received_at: number;
|
|
59
58
|
stop_id: string;
|
|
@@ -75,8 +74,4 @@ export declare const VehicleEventSchema: z.ZodObject<{
|
|
|
75
74
|
* These events are based on the GTFS-RT specification but extended with additional fields
|
|
76
75
|
* specific to TML's needs.
|
|
77
76
|
*/
|
|
78
|
-
export
|
|
79
|
-
created_at: UnixTimestamp;
|
|
80
|
-
received_at: UnixTimestamp;
|
|
81
|
-
updated_at: UnixTimestamp;
|
|
82
|
-
}
|
|
77
|
+
export type VehicleEvent = z.infer<typeof VehicleEventSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { DocumentSchema } from './_common/document.js';
|
|
3
|
-
import {
|
|
3
|
+
import { unixTimeStampSchema } from './_common/unix-timestamp.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/* * */
|
|
6
6
|
export const VehicleEventSchema = DocumentSchema.extend({
|
|
@@ -12,7 +12,7 @@ export const VehicleEventSchema = DocumentSchema.extend({
|
|
|
12
12
|
longitude: z.number(),
|
|
13
13
|
odometer: z.number(),
|
|
14
14
|
pattern_id: z.string(),
|
|
15
|
-
received_at:
|
|
15
|
+
received_at: unixTimeStampSchema,
|
|
16
16
|
stop_id: z.string(),
|
|
17
17
|
trigger_activity: z.string(),
|
|
18
18
|
trigger_door: z.string(),
|
package/dist/src/zone.d.ts
CHANGED
|
@@ -91,7 +91,6 @@ export declare const CreateZoneSchema: z.ZodObject<Omit<{
|
|
|
91
91
|
updated_by?: string | undefined;
|
|
92
92
|
}>;
|
|
93
93
|
export declare const UpdateZoneSchema: z.ZodObject<{
|
|
94
|
-
created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
95
94
|
updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
|
96
95
|
code: z.ZodOptional<z.ZodString>;
|
|
97
96
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -103,7 +102,6 @@ export declare const UpdateZoneSchema: z.ZodObject<{
|
|
|
103
102
|
fill_color: z.ZodOptional<z.ZodString>;
|
|
104
103
|
fill_opacity: z.ZodOptional<z.ZodNumber>;
|
|
105
104
|
}, "strict", z.ZodTypeAny, {
|
|
106
|
-
created_by?: string | undefined;
|
|
107
105
|
updated_by?: string | undefined;
|
|
108
106
|
code?: string | undefined;
|
|
109
107
|
name?: string | undefined;
|
|
@@ -115,7 +113,6 @@ export declare const UpdateZoneSchema: z.ZodObject<{
|
|
|
115
113
|
fill_color?: string | undefined;
|
|
116
114
|
fill_opacity?: number | undefined;
|
|
117
115
|
}, {
|
|
118
|
-
created_by?: string | undefined;
|
|
119
116
|
updated_by?: string | undefined;
|
|
120
117
|
code?: string | undefined;
|
|
121
118
|
name?: string | undefined;
|
package/dist/src/zone.js
CHANGED
|
@@ -15,7 +15,7 @@ export const ZoneSchema = DocumentSchema.extend({
|
|
|
15
15
|
name: z.string(),
|
|
16
16
|
}).strict();
|
|
17
17
|
export const CreateZoneSchema = ZoneSchema.omit({ _id: true, created_at: true, updated_at: true });
|
|
18
|
-
export const UpdateZoneSchema = CreateZoneSchema.partial();
|
|
18
|
+
export const UpdateZoneSchema = CreateZoneSchema.omit({ created_by: true }).partial();
|
|
19
19
|
/* * */
|
|
20
20
|
export const ZonePermissionSchema = z.object({
|
|
21
21
|
agency_ids: z.array(z.string()),
|
package/package.json
CHANGED