@tmlmobilidade/types 20250325.1729.12

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.
@@ -0,0 +1,445 @@
1
+ import { type UnixTimestamp } from './common.js';
2
+ import { z } from 'zod';
3
+ export declare const HashedTripWaypointSchema: z.ZodObject<{
4
+ arrival_time: z.ZodString;
5
+ departure_time: z.ZodString;
6
+ drop_off_type: z.ZodString;
7
+ pickup_type: z.ZodString;
8
+ shape_dist_traveled: z.ZodNumber;
9
+ stop_id: z.ZodString;
10
+ stop_lat: z.ZodString;
11
+ stop_lon: z.ZodString;
12
+ stop_name: z.ZodString;
13
+ stop_sequence: z.ZodNumber;
14
+ timepoint: z.ZodString;
15
+ }, "strict", z.ZodTypeAny, {
16
+ stop_id: string;
17
+ shape_dist_traveled: number;
18
+ arrival_time: string;
19
+ departure_time: string;
20
+ drop_off_type: string;
21
+ pickup_type: string;
22
+ stop_lat: string;
23
+ stop_lon: string;
24
+ stop_name: string;
25
+ stop_sequence: number;
26
+ timepoint: string;
27
+ }, {
28
+ stop_id: string;
29
+ shape_dist_traveled: number;
30
+ arrival_time: string;
31
+ departure_time: string;
32
+ drop_off_type: string;
33
+ pickup_type: string;
34
+ stop_lat: string;
35
+ stop_lon: string;
36
+ stop_name: string;
37
+ stop_sequence: number;
38
+ timepoint: string;
39
+ }>;
40
+ export declare const CreateHashedTripWaypointSchema: z.ZodObject<{
41
+ arrival_time: z.ZodString;
42
+ departure_time: z.ZodString;
43
+ drop_off_type: z.ZodString;
44
+ pickup_type: z.ZodString;
45
+ shape_dist_traveled: z.ZodNumber;
46
+ stop_id: z.ZodString;
47
+ stop_lat: z.ZodString;
48
+ stop_lon: z.ZodString;
49
+ stop_name: z.ZodString;
50
+ stop_sequence: z.ZodNumber;
51
+ timepoint: z.ZodString;
52
+ }, "strict", z.ZodTypeAny, {
53
+ stop_id: string;
54
+ shape_dist_traveled: number;
55
+ arrival_time: string;
56
+ departure_time: string;
57
+ drop_off_type: string;
58
+ pickup_type: string;
59
+ stop_lat: string;
60
+ stop_lon: string;
61
+ stop_name: string;
62
+ stop_sequence: number;
63
+ timepoint: string;
64
+ }, {
65
+ stop_id: string;
66
+ shape_dist_traveled: number;
67
+ arrival_time: string;
68
+ departure_time: string;
69
+ drop_off_type: string;
70
+ pickup_type: string;
71
+ stop_lat: string;
72
+ stop_lon: string;
73
+ stop_name: string;
74
+ stop_sequence: number;
75
+ timepoint: string;
76
+ }>;
77
+ export declare const UpdateHashedTripWaypointSchema: z.ZodObject<{
78
+ arrival_time: z.ZodOptional<z.ZodString>;
79
+ departure_time: z.ZodOptional<z.ZodString>;
80
+ drop_off_type: z.ZodOptional<z.ZodString>;
81
+ pickup_type: z.ZodOptional<z.ZodString>;
82
+ shape_dist_traveled: z.ZodOptional<z.ZodNumber>;
83
+ stop_id: z.ZodOptional<z.ZodString>;
84
+ stop_lat: z.ZodOptional<z.ZodString>;
85
+ stop_lon: z.ZodOptional<z.ZodString>;
86
+ stop_name: z.ZodOptional<z.ZodString>;
87
+ stop_sequence: z.ZodOptional<z.ZodNumber>;
88
+ timepoint: z.ZodOptional<z.ZodString>;
89
+ }, "strict", z.ZodTypeAny, {
90
+ stop_id?: string | undefined;
91
+ shape_dist_traveled?: number | undefined;
92
+ arrival_time?: string | undefined;
93
+ departure_time?: string | undefined;
94
+ drop_off_type?: string | undefined;
95
+ pickup_type?: string | undefined;
96
+ stop_lat?: string | undefined;
97
+ stop_lon?: string | undefined;
98
+ stop_name?: string | undefined;
99
+ stop_sequence?: number | undefined;
100
+ timepoint?: string | undefined;
101
+ }, {
102
+ stop_id?: string | undefined;
103
+ shape_dist_traveled?: number | undefined;
104
+ arrival_time?: string | undefined;
105
+ departure_time?: string | undefined;
106
+ drop_off_type?: string | undefined;
107
+ pickup_type?: string | undefined;
108
+ stop_lat?: string | undefined;
109
+ stop_lon?: string | undefined;
110
+ stop_name?: string | undefined;
111
+ stop_sequence?: number | undefined;
112
+ timepoint?: string | undefined;
113
+ }>;
114
+ export type HashedTripWaypoint = z.infer<typeof HashedTripWaypointSchema>;
115
+ export type CreateHashedTripWaypointDto = z.infer<typeof CreateHashedTripWaypointSchema>;
116
+ export type UpdateHashedTripWaypointDto = Partial<CreateHashedTripWaypointDto>;
117
+ export declare const HashedTripSchema: z.ZodObject<z.objectUtil.extendShape<{
118
+ _id: z.ZodString;
119
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
120
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
121
+ }, {
122
+ agency_id: z.ZodString;
123
+ line_id: z.ZodString;
124
+ line_long_name: z.ZodString;
125
+ line_short_name: z.ZodString;
126
+ path: z.ZodArray<z.ZodObject<{
127
+ arrival_time: z.ZodString;
128
+ departure_time: z.ZodString;
129
+ drop_off_type: z.ZodString;
130
+ pickup_type: z.ZodString;
131
+ shape_dist_traveled: z.ZodNumber;
132
+ stop_id: z.ZodString;
133
+ stop_lat: z.ZodString;
134
+ stop_lon: z.ZodString;
135
+ stop_name: z.ZodString;
136
+ stop_sequence: z.ZodNumber;
137
+ timepoint: z.ZodString;
138
+ }, "strict", z.ZodTypeAny, {
139
+ stop_id: string;
140
+ shape_dist_traveled: number;
141
+ arrival_time: string;
142
+ departure_time: string;
143
+ drop_off_type: string;
144
+ pickup_type: string;
145
+ stop_lat: string;
146
+ stop_lon: string;
147
+ stop_name: string;
148
+ stop_sequence: number;
149
+ timepoint: string;
150
+ }, {
151
+ stop_id: string;
152
+ shape_dist_traveled: number;
153
+ arrival_time: string;
154
+ departure_time: string;
155
+ drop_off_type: string;
156
+ pickup_type: string;
157
+ stop_lat: string;
158
+ stop_lon: string;
159
+ stop_name: string;
160
+ stop_sequence: number;
161
+ timepoint: string;
162
+ }>, "many">;
163
+ pattern_id: z.ZodString;
164
+ route_color: z.ZodString;
165
+ route_id: z.ZodString;
166
+ route_long_name: z.ZodString;
167
+ route_short_name: z.ZodString;
168
+ route_text_color: z.ZodString;
169
+ trip_headsign: z.ZodString;
170
+ }>, "strict", z.ZodTypeAny, {
171
+ _id: string;
172
+ path: {
173
+ stop_id: string;
174
+ shape_dist_traveled: number;
175
+ arrival_time: string;
176
+ departure_time: string;
177
+ drop_off_type: string;
178
+ pickup_type: string;
179
+ stop_lat: string;
180
+ stop_lon: string;
181
+ stop_name: string;
182
+ stop_sequence: number;
183
+ timepoint: string;
184
+ }[];
185
+ agency_id: string;
186
+ line_id: string;
187
+ pattern_id: string;
188
+ line_long_name: string;
189
+ line_short_name: string;
190
+ route_color: string;
191
+ route_id: string;
192
+ route_long_name: string;
193
+ route_short_name: string;
194
+ route_text_color: string;
195
+ trip_headsign: string;
196
+ created_at?: (number & {
197
+ __brand: "UnixTimestamp";
198
+ } & z.BRAND<"UnixTimestamp">) | null | undefined;
199
+ updated_at?: (number & {
200
+ __brand: "UnixTimestamp";
201
+ } & z.BRAND<"UnixTimestamp">) | null | undefined;
202
+ }, {
203
+ _id: string;
204
+ path: {
205
+ stop_id: string;
206
+ shape_dist_traveled: number;
207
+ arrival_time: string;
208
+ departure_time: string;
209
+ drop_off_type: string;
210
+ pickup_type: string;
211
+ stop_lat: string;
212
+ stop_lon: string;
213
+ stop_name: string;
214
+ stop_sequence: number;
215
+ timepoint: string;
216
+ }[];
217
+ agency_id: string;
218
+ line_id: string;
219
+ pattern_id: string;
220
+ line_long_name: string;
221
+ line_short_name: string;
222
+ route_color: string;
223
+ route_id: string;
224
+ route_long_name: string;
225
+ route_short_name: string;
226
+ route_text_color: string;
227
+ trip_headsign: string;
228
+ created_at?: number | null | undefined;
229
+ updated_at?: number | null | undefined;
230
+ }>;
231
+ export declare const CreateHashedTripSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
232
+ _id: z.ZodString;
233
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
234
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>>;
235
+ }, {
236
+ agency_id: z.ZodString;
237
+ line_id: z.ZodString;
238
+ line_long_name: z.ZodString;
239
+ line_short_name: z.ZodString;
240
+ path: z.ZodArray<z.ZodObject<{
241
+ arrival_time: z.ZodString;
242
+ departure_time: z.ZodString;
243
+ drop_off_type: z.ZodString;
244
+ pickup_type: z.ZodString;
245
+ shape_dist_traveled: z.ZodNumber;
246
+ stop_id: z.ZodString;
247
+ stop_lat: z.ZodString;
248
+ stop_lon: z.ZodString;
249
+ stop_name: z.ZodString;
250
+ stop_sequence: z.ZodNumber;
251
+ timepoint: z.ZodString;
252
+ }, "strict", z.ZodTypeAny, {
253
+ stop_id: string;
254
+ shape_dist_traveled: number;
255
+ arrival_time: string;
256
+ departure_time: string;
257
+ drop_off_type: string;
258
+ pickup_type: string;
259
+ stop_lat: string;
260
+ stop_lon: string;
261
+ stop_name: string;
262
+ stop_sequence: number;
263
+ timepoint: string;
264
+ }, {
265
+ stop_id: string;
266
+ shape_dist_traveled: number;
267
+ arrival_time: string;
268
+ departure_time: string;
269
+ drop_off_type: string;
270
+ pickup_type: string;
271
+ stop_lat: string;
272
+ stop_lon: string;
273
+ stop_name: string;
274
+ stop_sequence: number;
275
+ timepoint: string;
276
+ }>, "many">;
277
+ pattern_id: z.ZodString;
278
+ route_color: z.ZodString;
279
+ route_id: z.ZodString;
280
+ route_long_name: z.ZodString;
281
+ route_short_name: z.ZodString;
282
+ route_text_color: z.ZodString;
283
+ trip_headsign: z.ZodString;
284
+ }>, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
285
+ _id: string;
286
+ path: {
287
+ stop_id: string;
288
+ shape_dist_traveled: number;
289
+ arrival_time: string;
290
+ departure_time: string;
291
+ drop_off_type: string;
292
+ pickup_type: string;
293
+ stop_lat: string;
294
+ stop_lon: string;
295
+ stop_name: string;
296
+ stop_sequence: number;
297
+ timepoint: string;
298
+ }[];
299
+ agency_id: string;
300
+ line_id: string;
301
+ pattern_id: string;
302
+ line_long_name: string;
303
+ line_short_name: string;
304
+ route_color: string;
305
+ route_id: string;
306
+ route_long_name: string;
307
+ route_short_name: string;
308
+ route_text_color: string;
309
+ trip_headsign: string;
310
+ }, {
311
+ _id: string;
312
+ path: {
313
+ stop_id: string;
314
+ shape_dist_traveled: number;
315
+ arrival_time: string;
316
+ departure_time: string;
317
+ drop_off_type: string;
318
+ pickup_type: string;
319
+ stop_lat: string;
320
+ stop_lon: string;
321
+ stop_name: string;
322
+ stop_sequence: number;
323
+ timepoint: string;
324
+ }[];
325
+ agency_id: string;
326
+ line_id: string;
327
+ pattern_id: string;
328
+ line_long_name: string;
329
+ line_short_name: string;
330
+ route_color: string;
331
+ route_id: string;
332
+ route_long_name: string;
333
+ route_short_name: string;
334
+ route_text_color: string;
335
+ trip_headsign: string;
336
+ }>;
337
+ export declare const UpdateHashedTripSchema: z.ZodObject<{
338
+ _id: z.ZodOptional<z.ZodString>;
339
+ path: z.ZodOptional<z.ZodArray<z.ZodObject<{
340
+ arrival_time: z.ZodString;
341
+ departure_time: z.ZodString;
342
+ drop_off_type: z.ZodString;
343
+ pickup_type: z.ZodString;
344
+ shape_dist_traveled: z.ZodNumber;
345
+ stop_id: z.ZodString;
346
+ stop_lat: z.ZodString;
347
+ stop_lon: z.ZodString;
348
+ stop_name: z.ZodString;
349
+ stop_sequence: z.ZodNumber;
350
+ timepoint: z.ZodString;
351
+ }, "strict", z.ZodTypeAny, {
352
+ stop_id: string;
353
+ shape_dist_traveled: number;
354
+ arrival_time: string;
355
+ departure_time: string;
356
+ drop_off_type: string;
357
+ pickup_type: string;
358
+ stop_lat: string;
359
+ stop_lon: string;
360
+ stop_name: string;
361
+ stop_sequence: number;
362
+ timepoint: string;
363
+ }, {
364
+ stop_id: string;
365
+ shape_dist_traveled: number;
366
+ arrival_time: string;
367
+ departure_time: string;
368
+ drop_off_type: string;
369
+ pickup_type: string;
370
+ stop_lat: string;
371
+ stop_lon: string;
372
+ stop_name: string;
373
+ stop_sequence: number;
374
+ timepoint: string;
375
+ }>, "many">>;
376
+ agency_id: z.ZodOptional<z.ZodString>;
377
+ line_id: z.ZodOptional<z.ZodString>;
378
+ pattern_id: z.ZodOptional<z.ZodString>;
379
+ line_long_name: z.ZodOptional<z.ZodString>;
380
+ line_short_name: z.ZodOptional<z.ZodString>;
381
+ route_color: z.ZodOptional<z.ZodString>;
382
+ route_id: z.ZodOptional<z.ZodString>;
383
+ route_long_name: z.ZodOptional<z.ZodString>;
384
+ route_short_name: z.ZodOptional<z.ZodString>;
385
+ route_text_color: z.ZodOptional<z.ZodString>;
386
+ trip_headsign: z.ZodOptional<z.ZodString>;
387
+ }, "strict", z.ZodTypeAny, {
388
+ _id?: string | undefined;
389
+ path?: {
390
+ stop_id: string;
391
+ shape_dist_traveled: number;
392
+ arrival_time: string;
393
+ departure_time: string;
394
+ drop_off_type: string;
395
+ pickup_type: string;
396
+ stop_lat: string;
397
+ stop_lon: string;
398
+ stop_name: string;
399
+ stop_sequence: number;
400
+ timepoint: string;
401
+ }[] | undefined;
402
+ agency_id?: string | undefined;
403
+ line_id?: string | undefined;
404
+ pattern_id?: string | undefined;
405
+ line_long_name?: string | undefined;
406
+ line_short_name?: string | undefined;
407
+ route_color?: string | undefined;
408
+ route_id?: string | undefined;
409
+ route_long_name?: string | undefined;
410
+ route_short_name?: string | undefined;
411
+ route_text_color?: string | undefined;
412
+ trip_headsign?: string | undefined;
413
+ }, {
414
+ _id?: string | undefined;
415
+ path?: {
416
+ stop_id: string;
417
+ shape_dist_traveled: number;
418
+ arrival_time: string;
419
+ departure_time: string;
420
+ drop_off_type: string;
421
+ pickup_type: string;
422
+ stop_lat: string;
423
+ stop_lon: string;
424
+ stop_name: string;
425
+ stop_sequence: number;
426
+ timepoint: string;
427
+ }[] | undefined;
428
+ agency_id?: string | undefined;
429
+ line_id?: string | undefined;
430
+ pattern_id?: string | undefined;
431
+ line_long_name?: string | undefined;
432
+ line_short_name?: string | undefined;
433
+ route_color?: string | undefined;
434
+ route_id?: string | undefined;
435
+ route_long_name?: string | undefined;
436
+ route_short_name?: string | undefined;
437
+ route_text_color?: string | undefined;
438
+ trip_headsign?: string | undefined;
439
+ }>;
440
+ export interface HashedTrip extends Omit<z.infer<typeof HashedTripSchema>, 'created_at' | 'updated_at'> {
441
+ created_at: UnixTimestamp;
442
+ updated_at: UnixTimestamp;
443
+ }
444
+ export type CreateHashedTripDto = z.infer<typeof CreateHashedTripSchema>;
445
+ export type UpdateHashedTripDto = Partial<CreateHashedTripDto>;
@@ -0,0 +1,37 @@
1
+ /* * */
2
+ import { DocumentSchema } from './common.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const HashedTripWaypointSchema = z.object({
6
+ arrival_time: z.string(),
7
+ departure_time: z.string(),
8
+ drop_off_type: z.string(),
9
+ pickup_type: z.string(),
10
+ shape_dist_traveled: z.number(),
11
+ stop_id: z.string(),
12
+ stop_lat: z.string(),
13
+ stop_lon: z.string(),
14
+ stop_name: z.string(),
15
+ stop_sequence: z.number(),
16
+ timepoint: z.string(),
17
+ }).strict();
18
+ export const CreateHashedTripWaypointSchema = HashedTripWaypointSchema;
19
+ export const UpdateHashedTripWaypointSchema = HashedTripWaypointSchema.partial();
20
+ ;
21
+ /* * */
22
+ export const HashedTripSchema = DocumentSchema.extend({
23
+ agency_id: z.string(),
24
+ line_id: z.string(),
25
+ line_long_name: z.string(),
26
+ line_short_name: z.string(),
27
+ path: z.array(HashedTripWaypointSchema),
28
+ pattern_id: z.string(),
29
+ route_color: z.string(),
30
+ route_id: z.string(),
31
+ route_long_name: z.string(),
32
+ route_short_name: z.string(),
33
+ route_text_color: z.string(),
34
+ trip_headsign: z.string(),
35
+ }).strict();
36
+ export const CreateHashedTripSchema = HashedTripSchema.omit({ created_at: true, updated_at: true });
37
+ export const UpdateHashedTripSchema = CreateHashedTripSchema.partial();
@@ -0,0 +1,145 @@
1
+ import { GeoJSON } from 'geojson';
2
+ import { z } from 'zod';
3
+ export declare const LocalitySchema: z.ZodObject<z.objectUtil.extendShape<{
4
+ _id: z.ZodString;
5
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./common.js").UnixTimestamp, number>, "UnixTimestamp">>>;
6
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./common.js").UnixTimestamp, number>, "UnixTimestamp">>>;
7
+ }, {
8
+ border_color: z.ZodString;
9
+ border_opacity: z.ZodNumber;
10
+ border_width: z.ZodNumber;
11
+ code: z.ZodString;
12
+ district: z.ZodString;
13
+ fill_color: z.ZodString;
14
+ fill_opacity: z.ZodNumber;
15
+ geojson: z.ZodRecord<z.ZodString, z.ZodAny>;
16
+ is_locked: z.ZodBoolean;
17
+ name: z.ZodString;
18
+ prefix: z.ZodString;
19
+ region: z.ZodString;
20
+ }>, "strict", z.ZodTypeAny, {
21
+ _id: string;
22
+ code: string;
23
+ is_locked: boolean;
24
+ name: string;
25
+ border_color: string;
26
+ border_opacity: number;
27
+ border_width: number;
28
+ district: string;
29
+ fill_color: string;
30
+ fill_opacity: number;
31
+ geojson: Record<string, any>;
32
+ prefix: string;
33
+ region: string;
34
+ created_at?: (number & {
35
+ __brand: "UnixTimestamp";
36
+ } & z.BRAND<"UnixTimestamp">) | null | undefined;
37
+ updated_at?: (number & {
38
+ __brand: "UnixTimestamp";
39
+ } & z.BRAND<"UnixTimestamp">) | null | undefined;
40
+ }, {
41
+ _id: string;
42
+ code: string;
43
+ is_locked: boolean;
44
+ name: string;
45
+ border_color: string;
46
+ border_opacity: number;
47
+ border_width: number;
48
+ district: string;
49
+ fill_color: string;
50
+ fill_opacity: number;
51
+ geojson: Record<string, any>;
52
+ prefix: string;
53
+ region: string;
54
+ created_at?: number | null | undefined;
55
+ updated_at?: number | null | undefined;
56
+ }>;
57
+ export declare const CreateLocalitySchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
58
+ _id: z.ZodString;
59
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./common.js").UnixTimestamp, number>, "UnixTimestamp">>>;
60
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("./common.js").UnixTimestamp, number>, "UnixTimestamp">>>;
61
+ }, {
62
+ border_color: z.ZodString;
63
+ border_opacity: z.ZodNumber;
64
+ border_width: z.ZodNumber;
65
+ code: z.ZodString;
66
+ district: z.ZodString;
67
+ fill_color: z.ZodString;
68
+ fill_opacity: z.ZodNumber;
69
+ geojson: z.ZodRecord<z.ZodString, z.ZodAny>;
70
+ is_locked: z.ZodBoolean;
71
+ name: z.ZodString;
72
+ prefix: z.ZodString;
73
+ region: z.ZodString;
74
+ }>, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
75
+ code: string;
76
+ is_locked: boolean;
77
+ name: string;
78
+ border_color: string;
79
+ border_opacity: number;
80
+ border_width: number;
81
+ district: string;
82
+ fill_color: string;
83
+ fill_opacity: number;
84
+ geojson: Record<string, any>;
85
+ prefix: string;
86
+ region: string;
87
+ }, {
88
+ code: string;
89
+ is_locked: boolean;
90
+ name: string;
91
+ border_color: string;
92
+ border_opacity: number;
93
+ border_width: number;
94
+ district: string;
95
+ fill_color: string;
96
+ fill_opacity: number;
97
+ geojson: Record<string, any>;
98
+ prefix: string;
99
+ region: string;
100
+ }>;
101
+ export declare const UpdateLocalitySchema: z.ZodObject<{
102
+ code: z.ZodOptional<z.ZodString>;
103
+ is_locked: z.ZodOptional<z.ZodBoolean>;
104
+ name: z.ZodOptional<z.ZodString>;
105
+ border_color: z.ZodOptional<z.ZodString>;
106
+ border_opacity: z.ZodOptional<z.ZodNumber>;
107
+ border_width: z.ZodOptional<z.ZodNumber>;
108
+ district: z.ZodOptional<z.ZodString>;
109
+ fill_color: z.ZodOptional<z.ZodString>;
110
+ fill_opacity: z.ZodOptional<z.ZodNumber>;
111
+ geojson: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
112
+ prefix: z.ZodOptional<z.ZodString>;
113
+ region: z.ZodOptional<z.ZodString>;
114
+ }, "strict", z.ZodTypeAny, {
115
+ code?: string | undefined;
116
+ is_locked?: boolean | undefined;
117
+ name?: string | undefined;
118
+ border_color?: string | undefined;
119
+ border_opacity?: number | undefined;
120
+ border_width?: number | undefined;
121
+ district?: string | undefined;
122
+ fill_color?: string | undefined;
123
+ fill_opacity?: number | undefined;
124
+ geojson?: Record<string, any> | undefined;
125
+ prefix?: string | undefined;
126
+ region?: string | undefined;
127
+ }, {
128
+ code?: string | undefined;
129
+ is_locked?: boolean | undefined;
130
+ name?: string | undefined;
131
+ border_color?: string | undefined;
132
+ border_opacity?: number | undefined;
133
+ border_width?: number | undefined;
134
+ district?: string | undefined;
135
+ fill_color?: string | undefined;
136
+ fill_opacity?: number | undefined;
137
+ geojson?: Record<string, any> | undefined;
138
+ prefix?: string | undefined;
139
+ region?: string | undefined;
140
+ }>;
141
+ export interface Locality extends z.infer<typeof LocalitySchema> {
142
+ geojson: GeoJSON;
143
+ }
144
+ export type CreateLocalityDto = z.infer<typeof CreateLocalitySchema>;
145
+ export type UpdateLocalityDto = Partial<CreateLocalityDto>;
@@ -0,0 +1,20 @@
1
+ /* * */
2
+ import { DocumentSchema } from './common.js';
3
+ import { z } from 'zod';
4
+ /* * */
5
+ export const LocalitySchema = DocumentSchema.extend({
6
+ border_color: z.string(),
7
+ border_opacity: z.number(),
8
+ border_width: z.number(),
9
+ code: z.string(),
10
+ district: z.string(),
11
+ fill_color: z.string(),
12
+ fill_opacity: z.number(),
13
+ geojson: z.record(z.any()), // TODO: Validate GeoJSON
14
+ is_locked: z.boolean(),
15
+ name: z.string(),
16
+ prefix: z.string(),
17
+ region: z.string(),
18
+ }).strict();
19
+ export const CreateLocalitySchema = LocalitySchema.omit({ _id: true, created_at: true, updated_at: true });
20
+ export const UpdateLocalitySchema = CreateLocalitySchema.partial();