@tmlmobilidade/types 20260519.1152.59 → 20260519.1741.30
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/operation/hashed-lines/hashed-line.d.ts +56 -0
- package/dist/operation/hashed-lines/hashed-line.js +19 -0
- package/dist/operation/hashed-lines/index.d.ts +1 -0
- package/dist/operation/hashed-lines/index.js +1 -0
- package/dist/operation/index.d.ts +1 -0
- package/dist/operation/index.js +1 -0
- package/dist/operation/lines/operational-line.d.ts +3 -17
- package/dist/operation/lines/operational-line.js +2 -2
- package/dist/operation/stops/operational-stop.d.ts +3 -17
- package/dist/operation/stops/operational-stop.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HashedLineSchema: z.ZodObject<Omit<{
|
|
3
|
+
_id: z.ZodString;
|
|
4
|
+
created_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
|
|
5
|
+
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
updated_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
|
|
8
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "created_by" | "is_locked" | "updated_by"> & {
|
|
10
|
+
agency_id: z.ZodString;
|
|
11
|
+
line_id: z.ZodNumber;
|
|
12
|
+
line_long_name: z.ZodString;
|
|
13
|
+
line_short_name: z.ZodString;
|
|
14
|
+
pattern_id: z.ZodString;
|
|
15
|
+
route_color: z.ZodString;
|
|
16
|
+
route_id: z.ZodString;
|
|
17
|
+
route_long_name: z.ZodString;
|
|
18
|
+
route_short_name: z.ZodString;
|
|
19
|
+
route_text_color: z.ZodString;
|
|
20
|
+
trip_headsign: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
_id: string;
|
|
23
|
+
created_at: number & {
|
|
24
|
+
__brand: "UnixTimestamp";
|
|
25
|
+
};
|
|
26
|
+
updated_at: number & {
|
|
27
|
+
__brand: "UnixTimestamp";
|
|
28
|
+
};
|
|
29
|
+
agency_id: string;
|
|
30
|
+
line_id: number;
|
|
31
|
+
pattern_id: string;
|
|
32
|
+
route_id: string;
|
|
33
|
+
route_color: string;
|
|
34
|
+
route_long_name: string;
|
|
35
|
+
route_short_name: string;
|
|
36
|
+
route_text_color: string;
|
|
37
|
+
trip_headsign: string;
|
|
38
|
+
line_long_name: string;
|
|
39
|
+
line_short_name: string;
|
|
40
|
+
}, {
|
|
41
|
+
_id: string;
|
|
42
|
+
created_at: number;
|
|
43
|
+
updated_at: number;
|
|
44
|
+
agency_id: string;
|
|
45
|
+
line_id: number;
|
|
46
|
+
pattern_id: string;
|
|
47
|
+
route_id: string;
|
|
48
|
+
route_color: string;
|
|
49
|
+
route_long_name: string;
|
|
50
|
+
route_short_name: string;
|
|
51
|
+
route_text_color: string;
|
|
52
|
+
trip_headsign: string;
|
|
53
|
+
line_long_name: string;
|
|
54
|
+
line_short_name: string;
|
|
55
|
+
}>;
|
|
56
|
+
export type HashedLine = z.infer<typeof HashedLineSchema>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { DocumentSchema } from '../../_common/document.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/* * */
|
|
5
|
+
export const HashedLineSchema = DocumentSchema
|
|
6
|
+
.omit({ created_by: true, is_locked: true, updated_by: true })
|
|
7
|
+
.extend({
|
|
8
|
+
agency_id: z.string(),
|
|
9
|
+
line_id: z.number(),
|
|
10
|
+
line_long_name: z.string(),
|
|
11
|
+
line_short_name: z.string(),
|
|
12
|
+
pattern_id: z.string(),
|
|
13
|
+
route_color: z.string(),
|
|
14
|
+
route_id: z.string(),
|
|
15
|
+
route_long_name: z.string(),
|
|
16
|
+
route_short_name: z.string(),
|
|
17
|
+
route_text_color: z.string(),
|
|
18
|
+
trip_headsign: z.string(),
|
|
19
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hashed-line.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './hashed-line.js';
|
package/dist/operation/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const OperationalLineSchema: z.ZodObject<{
|
|
3
3
|
agency_id: z.ZodString;
|
|
4
|
-
|
|
4
|
+
hashed_patterns: z.ZodDefault<z.ZodArray<z.ZodObject<Omit<{
|
|
5
5
|
_id: z.ZodString;
|
|
6
6
|
created_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
|
|
7
7
|
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -14,8 +14,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
14
14
|
line_long_name: z.ZodString;
|
|
15
15
|
line_short_name: z.ZodString;
|
|
16
16
|
path: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
17
|
-
arrival_time: z.ZodString;
|
|
18
|
-
departure_time: z.ZodString;
|
|
19
17
|
drop_off_type: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
20
18
|
pickup_type: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
21
19
|
shape_dist_traveled: z.ZodNumber;
|
|
@@ -27,8 +25,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
27
25
|
timepoint: z.ZodNumber;
|
|
28
26
|
}, "strip", z.ZodTypeAny, {
|
|
29
27
|
stop_id: string;
|
|
30
|
-
arrival_time: string;
|
|
31
|
-
departure_time: string;
|
|
32
28
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
33
29
|
pickup_type: 0 | 1 | 2 | 3;
|
|
34
30
|
shape_dist_traveled: number;
|
|
@@ -39,8 +35,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
39
35
|
stop_name: string;
|
|
40
36
|
}, {
|
|
41
37
|
stop_id: string;
|
|
42
|
-
arrival_time: string;
|
|
43
|
-
departure_time: string;
|
|
44
38
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
45
39
|
pickup_type: 0 | 1 | 2 | 3;
|
|
46
40
|
shape_dist_traveled: number;
|
|
@@ -67,8 +61,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
67
61
|
};
|
|
68
62
|
path: {
|
|
69
63
|
stop_id: string;
|
|
70
|
-
arrival_time: string;
|
|
71
|
-
departure_time: string;
|
|
72
64
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
73
65
|
pickup_type: 0 | 1 | 2 | 3;
|
|
74
66
|
shape_dist_traveled: number;
|
|
@@ -106,8 +98,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
106
98
|
line_short_name: string;
|
|
107
99
|
path?: {
|
|
108
100
|
stop_id: string;
|
|
109
|
-
arrival_time: string;
|
|
110
|
-
departure_time: string;
|
|
111
101
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
112
102
|
pickup_type: 0 | 1 | 2 | 3;
|
|
113
103
|
shape_dist_traveled: number;
|
|
@@ -134,7 +124,7 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
134
124
|
route_color: string;
|
|
135
125
|
line_long_name: string;
|
|
136
126
|
line_short_name: string;
|
|
137
|
-
|
|
127
|
+
hashed_patterns: {
|
|
138
128
|
_id: string;
|
|
139
129
|
created_at: number & {
|
|
140
130
|
__brand: "UnixTimestamp";
|
|
@@ -144,8 +134,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
144
134
|
};
|
|
145
135
|
path: {
|
|
146
136
|
stop_id: string;
|
|
147
|
-
arrival_time: string;
|
|
148
|
-
departure_time: string;
|
|
149
137
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
150
138
|
pickup_type: 0 | 1 | 2 | 3;
|
|
151
139
|
shape_dist_traveled: number;
|
|
@@ -182,7 +170,7 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
182
170
|
last_operational_date: string;
|
|
183
171
|
last_plan_id: string;
|
|
184
172
|
stop_ids?: string[] | undefined;
|
|
185
|
-
|
|
173
|
+
hashed_patterns?: {
|
|
186
174
|
_id: string;
|
|
187
175
|
created_at: number;
|
|
188
176
|
updated_at: number;
|
|
@@ -199,8 +187,6 @@ export declare const OperationalLineSchema: z.ZodObject<{
|
|
|
199
187
|
line_short_name: string;
|
|
200
188
|
path?: {
|
|
201
189
|
stop_id: string;
|
|
202
|
-
arrival_time: string;
|
|
203
|
-
departure_time: string;
|
|
204
190
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
205
191
|
pickup_type: 0 | 1 | 2 | 3;
|
|
206
192
|
shape_dist_traveled: number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { OperationalDateSchema } from '../../_common/operational-date.js';
|
|
3
|
-
import {
|
|
3
|
+
import { HashedPatternSchema } from '../hashed-patterns/hashed-pattern.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/* * */
|
|
6
6
|
export const OperationalLineSchema = z.object({
|
|
7
7
|
agency_id: z.string(),
|
|
8
|
-
|
|
8
|
+
hashed_patterns: z.array(HashedPatternSchema).default([]),
|
|
9
9
|
last_operational_date: OperationalDateSchema,
|
|
10
10
|
last_plan_id: z.string(),
|
|
11
11
|
line_id: z.number(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const OperationalStopSchema: z.ZodObject<{
|
|
3
3
|
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
4
|
-
|
|
4
|
+
hashed_patterns: z.ZodDefault<z.ZodArray<z.ZodObject<Omit<{
|
|
5
5
|
_id: z.ZodString;
|
|
6
6
|
created_at: z.ZodEffects<z.ZodNumber, import("../../index.js").UnixTimestamp, number>;
|
|
7
7
|
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
@@ -14,8 +14,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
14
14
|
line_long_name: z.ZodString;
|
|
15
15
|
line_short_name: z.ZodString;
|
|
16
16
|
path: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
17
|
-
arrival_time: z.ZodString;
|
|
18
|
-
departure_time: z.ZodString;
|
|
19
17
|
drop_off_type: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
20
18
|
pickup_type: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
|
|
21
19
|
shape_dist_traveled: z.ZodNumber;
|
|
@@ -27,8 +25,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
27
25
|
timepoint: z.ZodNumber;
|
|
28
26
|
}, "strip", z.ZodTypeAny, {
|
|
29
27
|
stop_id: string;
|
|
30
|
-
arrival_time: string;
|
|
31
|
-
departure_time: string;
|
|
32
28
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
33
29
|
pickup_type: 0 | 1 | 2 | 3;
|
|
34
30
|
shape_dist_traveled: number;
|
|
@@ -39,8 +35,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
39
35
|
stop_name: string;
|
|
40
36
|
}, {
|
|
41
37
|
stop_id: string;
|
|
42
|
-
arrival_time: string;
|
|
43
|
-
departure_time: string;
|
|
44
38
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
45
39
|
pickup_type: 0 | 1 | 2 | 3;
|
|
46
40
|
shape_dist_traveled: number;
|
|
@@ -67,8 +61,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
67
61
|
};
|
|
68
62
|
path: {
|
|
69
63
|
stop_id: string;
|
|
70
|
-
arrival_time: string;
|
|
71
|
-
departure_time: string;
|
|
72
64
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
73
65
|
pickup_type: 0 | 1 | 2 | 3;
|
|
74
66
|
shape_dist_traveled: number;
|
|
@@ -106,8 +98,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
106
98
|
line_short_name: string;
|
|
107
99
|
path?: {
|
|
108
100
|
stop_id: string;
|
|
109
|
-
arrival_time: string;
|
|
110
|
-
departure_time: string;
|
|
111
101
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
112
102
|
pickup_type: 0 | 1 | 2 | 3;
|
|
113
103
|
shape_dist_traveled: number;
|
|
@@ -130,7 +120,7 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
130
120
|
agency_ids: string[];
|
|
131
121
|
line_ids: number[];
|
|
132
122
|
stop_name: string;
|
|
133
|
-
|
|
123
|
+
hashed_patterns: {
|
|
134
124
|
_id: string;
|
|
135
125
|
created_at: number & {
|
|
136
126
|
__brand: "UnixTimestamp";
|
|
@@ -140,8 +130,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
140
130
|
};
|
|
141
131
|
path: {
|
|
142
132
|
stop_id: string;
|
|
143
|
-
arrival_time: string;
|
|
144
|
-
departure_time: string;
|
|
145
133
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
146
134
|
pickup_type: 0 | 1 | 2 | 3;
|
|
147
135
|
shape_dist_traveled: number;
|
|
@@ -176,7 +164,7 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
176
164
|
last_plan_id: string;
|
|
177
165
|
agency_ids?: string[] | undefined;
|
|
178
166
|
line_ids?: number[] | undefined;
|
|
179
|
-
|
|
167
|
+
hashed_patterns?: {
|
|
180
168
|
_id: string;
|
|
181
169
|
created_at: number;
|
|
182
170
|
updated_at: number;
|
|
@@ -193,8 +181,6 @@ export declare const OperationalStopSchema: z.ZodObject<{
|
|
|
193
181
|
line_short_name: string;
|
|
194
182
|
path?: {
|
|
195
183
|
stop_id: string;
|
|
196
|
-
arrival_time: string;
|
|
197
|
-
departure_time: string;
|
|
198
184
|
drop_off_type: 0 | 1 | 2 | 3;
|
|
199
185
|
pickup_type: 0 | 1 | 2 | 3;
|
|
200
186
|
shape_dist_traveled: number;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* * */
|
|
2
2
|
import { OperationalDateSchema } from '../../_common/operational-date.js';
|
|
3
|
-
import {
|
|
3
|
+
import { HashedPatternSchema } from '../hashed-patterns/hashed-pattern.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/* * */
|
|
6
6
|
export const OperationalStopSchema = z.object({
|
|
7
7
|
agency_ids: z.array(z.string()).default([]),
|
|
8
|
-
|
|
8
|
+
hashed_patterns: z.array(HashedPatternSchema).default([]),
|
|
9
9
|
last_operational_date: OperationalDateSchema,
|
|
10
10
|
last_plan_id: z.string(),
|
|
11
11
|
line_ids: z.array(z.number()).default([]),
|