@tmlmobilidade/types 20251021.1707.39 → 20251021.1725.54
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/metrics/common.d.ts +0 -20
- package/dist/src/metrics/common.js +0 -4
- package/dist/src/metrics/demand.d.ts +20 -111
- package/dist/src/metrics/demand.js +14 -15
- package/dist/src/metrics/index.d.ts +20 -112
- package/dist/src/metrics/index.js +0 -2
- package/package.json +1 -1
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const MetricBasePropertiesSchema: z.ZodObject<{
|
|
3
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
interval: number;
|
|
6
|
-
}, {
|
|
7
|
-
interval?: number | undefined;
|
|
8
|
-
}>;
|
|
9
2
|
export declare const MetricBaseSchema: z.ZodObject<{
|
|
10
3
|
description: z.ZodOptional<z.ZodString>;
|
|
11
4
|
generated_at: z.ZodDate;
|
|
12
5
|
metric: z.ZodString;
|
|
13
|
-
properties: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
14
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
15
|
-
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
interval: number;
|
|
17
|
-
}, {
|
|
18
|
-
interval?: number | undefined;
|
|
19
|
-
}>>>;
|
|
20
6
|
}, "strip", z.ZodTypeAny, {
|
|
21
7
|
generated_at: Date;
|
|
22
8
|
metric: string;
|
|
23
9
|
description?: string | undefined;
|
|
24
|
-
properties?: {
|
|
25
|
-
interval: number;
|
|
26
|
-
} | undefined;
|
|
27
10
|
}, {
|
|
28
11
|
generated_at: Date;
|
|
29
12
|
metric: string;
|
|
30
13
|
description?: string | undefined;
|
|
31
|
-
properties?: {
|
|
32
|
-
interval?: number | undefined;
|
|
33
|
-
} | undefined;
|
|
34
14
|
}>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/* * */
|
|
3
|
-
export const MetricBasePropertiesSchema = z.object({
|
|
4
|
-
interval: z.number().default(3_600_000), // Run every hour
|
|
5
|
-
});
|
|
6
3
|
export const MetricBaseSchema = z.object({
|
|
7
4
|
description: z.string().optional(),
|
|
8
5
|
generated_at: z.date(),
|
|
9
6
|
metric: z.string(),
|
|
10
|
-
properties: MetricBasePropertiesSchema.default({}).optional(),
|
|
11
7
|
});
|
|
@@ -10,22 +10,17 @@ export declare const DemandByLineByYearSchema: z.ZodObject<{
|
|
|
10
10
|
qty: number;
|
|
11
11
|
}>>;
|
|
12
12
|
properties: z.ZodObject<{
|
|
13
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
14
|
-
} & {
|
|
15
13
|
line_id: z.ZodString;
|
|
16
14
|
}, "strip", z.ZodTypeAny, {
|
|
17
15
|
line_id: string;
|
|
18
|
-
interval: number;
|
|
19
16
|
}, {
|
|
20
17
|
line_id: string;
|
|
21
|
-
interval?: number | undefined;
|
|
22
18
|
}>;
|
|
23
19
|
} & {
|
|
24
20
|
metric: z.ZodLiteral<"demand_by_line_by_year">;
|
|
25
21
|
}, "strip", z.ZodTypeAny, {
|
|
26
22
|
properties: {
|
|
27
23
|
line_id: string;
|
|
28
|
-
interval: number;
|
|
29
24
|
};
|
|
30
25
|
generated_at: Date;
|
|
31
26
|
metric: "demand_by_line_by_year";
|
|
@@ -36,7 +31,6 @@ export declare const DemandByLineByYearSchema: z.ZodObject<{
|
|
|
36
31
|
}, {
|
|
37
32
|
properties: {
|
|
38
33
|
line_id: string;
|
|
39
|
-
interval?: number | undefined;
|
|
40
34
|
};
|
|
41
35
|
generated_at: Date;
|
|
42
36
|
metric: "demand_by_line_by_year";
|
|
@@ -56,22 +50,17 @@ export declare const DemandByLineByMonthSchema: z.ZodObject<{
|
|
|
56
50
|
qty: number;
|
|
57
51
|
}>>;
|
|
58
52
|
properties: z.ZodObject<{
|
|
59
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
60
|
-
} & {
|
|
61
53
|
line_id: z.ZodString;
|
|
62
54
|
}, "strip", z.ZodTypeAny, {
|
|
63
55
|
line_id: string;
|
|
64
|
-
interval: number;
|
|
65
56
|
}, {
|
|
66
57
|
line_id: string;
|
|
67
|
-
interval?: number | undefined;
|
|
68
58
|
}>;
|
|
69
59
|
} & {
|
|
70
60
|
metric: z.ZodLiteral<"demand_by_line_by_month">;
|
|
71
61
|
}, "strip", z.ZodTypeAny, {
|
|
72
62
|
properties: {
|
|
73
63
|
line_id: string;
|
|
74
|
-
interval: number;
|
|
75
64
|
};
|
|
76
65
|
generated_at: Date;
|
|
77
66
|
metric: "demand_by_line_by_month";
|
|
@@ -82,7 +71,6 @@ export declare const DemandByLineByMonthSchema: z.ZodObject<{
|
|
|
82
71
|
}, {
|
|
83
72
|
properties: {
|
|
84
73
|
line_id: string;
|
|
85
|
-
interval?: number | undefined;
|
|
86
74
|
};
|
|
87
75
|
generated_at: Date;
|
|
88
76
|
metric: "demand_by_line_by_month";
|
|
@@ -95,15 +83,11 @@ export declare const DemandByLineByDaySchema: z.ZodObject<{
|
|
|
95
83
|
description: z.ZodOptional<z.ZodString>;
|
|
96
84
|
generated_at: z.ZodDate;
|
|
97
85
|
properties: z.ZodObject<{
|
|
98
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
99
|
-
} & {
|
|
100
86
|
line_id: z.ZodString;
|
|
101
87
|
}, "strip", z.ZodTypeAny, {
|
|
102
88
|
line_id: string;
|
|
103
|
-
interval: number;
|
|
104
89
|
}, {
|
|
105
90
|
line_id: string;
|
|
106
|
-
interval?: number | undefined;
|
|
107
91
|
}>;
|
|
108
92
|
} & {
|
|
109
93
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -129,7 +113,6 @@ export declare const DemandByLineByDaySchema: z.ZodObject<{
|
|
|
129
113
|
}, "strip", z.ZodTypeAny, {
|
|
130
114
|
properties: {
|
|
131
115
|
line_id: string;
|
|
132
|
-
interval: number;
|
|
133
116
|
};
|
|
134
117
|
generated_at: Date;
|
|
135
118
|
metric: "demand_by_line_by_day";
|
|
@@ -144,7 +127,6 @@ export declare const DemandByLineByDaySchema: z.ZodObject<{
|
|
|
144
127
|
}, {
|
|
145
128
|
properties: {
|
|
146
129
|
line_id: string;
|
|
147
|
-
interval?: number | undefined;
|
|
148
130
|
};
|
|
149
131
|
generated_at: Date;
|
|
150
132
|
metric: "demand_by_line_by_day";
|
|
@@ -161,15 +143,11 @@ export declare const MeanDemandByLineByMonthSchema: z.ZodObject<{
|
|
|
161
143
|
description: z.ZodOptional<z.ZodString>;
|
|
162
144
|
generated_at: z.ZodDate;
|
|
163
145
|
properties: z.ZodObject<{
|
|
164
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
165
|
-
} & {
|
|
166
146
|
line_id: z.ZodString;
|
|
167
147
|
}, "strip", z.ZodTypeAny, {
|
|
168
148
|
line_id: string;
|
|
169
|
-
interval: number;
|
|
170
149
|
}, {
|
|
171
150
|
line_id: string;
|
|
172
|
-
interval?: number | undefined;
|
|
173
151
|
}>;
|
|
174
152
|
} & {
|
|
175
153
|
data: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -189,7 +167,6 @@ export declare const MeanDemandByLineByMonthSchema: z.ZodObject<{
|
|
|
189
167
|
}, "strip", z.ZodTypeAny, {
|
|
190
168
|
properties: {
|
|
191
169
|
line_id: string;
|
|
192
|
-
interval: number;
|
|
193
170
|
};
|
|
194
171
|
generated_at: Date;
|
|
195
172
|
metric: "mean_demand_by_line_by_month";
|
|
@@ -202,7 +179,6 @@ export declare const MeanDemandByLineByMonthSchema: z.ZodObject<{
|
|
|
202
179
|
}, {
|
|
203
180
|
properties: {
|
|
204
181
|
line_id: string;
|
|
205
|
-
interval?: number | undefined;
|
|
206
182
|
};
|
|
207
183
|
generated_at: Date;
|
|
208
184
|
metric: "mean_demand_by_line_by_month";
|
|
@@ -232,19 +208,14 @@ export declare const TopMeanDemandByLineByMonthSchema: z.ZodObject<{
|
|
|
232
208
|
}>>;
|
|
233
209
|
metric: z.ZodLiteral<"top_mean_demand_by_line_by_month">;
|
|
234
210
|
properties: z.ZodObject<{
|
|
235
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
236
|
-
} & {
|
|
237
211
|
year_month: z.ZodString;
|
|
238
212
|
}, "strip", z.ZodTypeAny, {
|
|
239
|
-
interval: number;
|
|
240
213
|
year_month: string;
|
|
241
214
|
}, {
|
|
242
215
|
year_month: string;
|
|
243
|
-
interval?: number | undefined;
|
|
244
216
|
}>;
|
|
245
217
|
}, "strip", z.ZodTypeAny, {
|
|
246
218
|
properties: {
|
|
247
|
-
interval: number;
|
|
248
219
|
year_month: string;
|
|
249
220
|
};
|
|
250
221
|
generated_at: Date;
|
|
@@ -258,7 +229,6 @@ export declare const TopMeanDemandByLineByMonthSchema: z.ZodObject<{
|
|
|
258
229
|
}, {
|
|
259
230
|
properties: {
|
|
260
231
|
year_month: string;
|
|
261
|
-
interval?: number | undefined;
|
|
262
232
|
};
|
|
263
233
|
generated_at: Date;
|
|
264
234
|
metric: "top_mean_demand_by_line_by_month";
|
|
@@ -280,22 +250,17 @@ export declare const DemandByAgencyByYearSchema: z.ZodObject<{
|
|
|
280
250
|
qty: number;
|
|
281
251
|
}>>;
|
|
282
252
|
properties: z.ZodObject<{
|
|
283
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
284
|
-
} & {
|
|
285
253
|
agency_id: z.ZodString;
|
|
286
254
|
}, "strip", z.ZodTypeAny, {
|
|
287
255
|
agency_id: string;
|
|
288
|
-
interval: number;
|
|
289
256
|
}, {
|
|
290
257
|
agency_id: string;
|
|
291
|
-
interval?: number | undefined;
|
|
292
258
|
}>;
|
|
293
259
|
} & {
|
|
294
260
|
metric: z.ZodLiteral<"demand_by_agency_by_year">;
|
|
295
261
|
}, "strip", z.ZodTypeAny, {
|
|
296
262
|
properties: {
|
|
297
263
|
agency_id: string;
|
|
298
|
-
interval: number;
|
|
299
264
|
};
|
|
300
265
|
generated_at: Date;
|
|
301
266
|
metric: "demand_by_agency_by_year";
|
|
@@ -306,7 +271,6 @@ export declare const DemandByAgencyByYearSchema: z.ZodObject<{
|
|
|
306
271
|
}, {
|
|
307
272
|
properties: {
|
|
308
273
|
agency_id: string;
|
|
309
|
-
interval?: number | undefined;
|
|
310
274
|
};
|
|
311
275
|
generated_at: Date;
|
|
312
276
|
metric: "demand_by_agency_by_year";
|
|
@@ -326,22 +290,17 @@ export declare const DemandByAgencyByMonthSchema: z.ZodObject<{
|
|
|
326
290
|
qty: number;
|
|
327
291
|
}>>;
|
|
328
292
|
properties: z.ZodObject<{
|
|
329
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
330
|
-
} & {
|
|
331
293
|
agency_id: z.ZodString;
|
|
332
294
|
}, "strip", z.ZodTypeAny, {
|
|
333
295
|
agency_id: string;
|
|
334
|
-
interval: number;
|
|
335
296
|
}, {
|
|
336
297
|
agency_id: string;
|
|
337
|
-
interval?: number | undefined;
|
|
338
298
|
}>;
|
|
339
299
|
} & {
|
|
340
300
|
metric: z.ZodLiteral<"demand_by_agency_by_month">;
|
|
341
301
|
}, "strip", z.ZodTypeAny, {
|
|
342
302
|
properties: {
|
|
343
303
|
agency_id: string;
|
|
344
|
-
interval: number;
|
|
345
304
|
};
|
|
346
305
|
generated_at: Date;
|
|
347
306
|
metric: "demand_by_agency_by_month";
|
|
@@ -352,7 +311,6 @@ export declare const DemandByAgencyByMonthSchema: z.ZodObject<{
|
|
|
352
311
|
}, {
|
|
353
312
|
properties: {
|
|
354
313
|
agency_id: string;
|
|
355
|
-
interval?: number | undefined;
|
|
356
314
|
};
|
|
357
315
|
generated_at: Date;
|
|
358
316
|
metric: "demand_by_agency_by_month";
|
|
@@ -365,65 +323,59 @@ export declare const DemandByAgencyByDaySchema: z.ZodObject<{
|
|
|
365
323
|
description: z.ZodOptional<z.ZodString>;
|
|
366
324
|
generated_at: z.ZodDate;
|
|
367
325
|
properties: z.ZodObject<{
|
|
368
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
369
|
-
} & {
|
|
370
326
|
agency_id: z.ZodString;
|
|
371
327
|
}, "strip", z.ZodTypeAny, {
|
|
372
328
|
agency_id: string;
|
|
373
|
-
interval: number;
|
|
374
329
|
}, {
|
|
375
330
|
agency_id: string;
|
|
376
|
-
interval?: number | undefined;
|
|
377
331
|
}>;
|
|
378
332
|
} & {
|
|
379
333
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
380
334
|
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
381
|
-
holiday: z.
|
|
335
|
+
holiday: z.ZodEnum<["0", "1"]>;
|
|
382
336
|
notes: z.ZodNullable<z.ZodString>;
|
|
383
|
-
period: z.
|
|
337
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
384
338
|
qty: z.ZodNumber;
|
|
385
339
|
}, "strip", z.ZodTypeAny, {
|
|
386
340
|
qty: number;
|
|
387
341
|
day_type: "1" | "2" | "3";
|
|
388
|
-
holiday:
|
|
342
|
+
holiday: "0" | "1";
|
|
389
343
|
notes: string | null;
|
|
390
|
-
period:
|
|
344
|
+
period: "1" | "2" | "3";
|
|
391
345
|
}, {
|
|
392
346
|
qty: number;
|
|
393
347
|
day_type: "1" | "2" | "3";
|
|
394
|
-
holiday:
|
|
348
|
+
holiday: "0" | "1";
|
|
395
349
|
notes: string | null;
|
|
396
|
-
period:
|
|
350
|
+
period: "1" | "2" | "3";
|
|
397
351
|
}>>;
|
|
398
352
|
metric: z.ZodLiteral<"demand_by_agency_by_day">;
|
|
399
353
|
}, "strip", z.ZodTypeAny, {
|
|
400
354
|
properties: {
|
|
401
355
|
agency_id: string;
|
|
402
|
-
interval: number;
|
|
403
356
|
};
|
|
404
357
|
generated_at: Date;
|
|
405
358
|
metric: "demand_by_agency_by_day";
|
|
406
359
|
data: Record<string, {
|
|
407
360
|
qty: number;
|
|
408
361
|
day_type: "1" | "2" | "3";
|
|
409
|
-
holiday:
|
|
362
|
+
holiday: "0" | "1";
|
|
410
363
|
notes: string | null;
|
|
411
|
-
period:
|
|
364
|
+
period: "1" | "2" | "3";
|
|
412
365
|
}>;
|
|
413
366
|
description?: string | undefined;
|
|
414
367
|
}, {
|
|
415
368
|
properties: {
|
|
416
369
|
agency_id: string;
|
|
417
|
-
interval?: number | undefined;
|
|
418
370
|
};
|
|
419
371
|
generated_at: Date;
|
|
420
372
|
metric: "demand_by_agency_by_day";
|
|
421
373
|
data: Record<string, {
|
|
422
374
|
qty: number;
|
|
423
375
|
day_type: "1" | "2" | "3";
|
|
424
|
-
holiday:
|
|
376
|
+
holiday: "0" | "1";
|
|
425
377
|
notes: string | null;
|
|
426
|
-
period:
|
|
378
|
+
period: "1" | "2" | "3";
|
|
427
379
|
}>;
|
|
428
380
|
description?: string | undefined;
|
|
429
381
|
}>;
|
|
@@ -440,19 +392,14 @@ export declare const DemandByPatternByYearSchema: z.ZodObject<{
|
|
|
440
392
|
} & {
|
|
441
393
|
metric: z.ZodLiteral<"demand_by_pattern_by_year">;
|
|
442
394
|
properties: z.ZodObject<{
|
|
443
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
444
|
-
} & {
|
|
445
395
|
pattern_id: z.ZodString;
|
|
446
396
|
}, "strip", z.ZodTypeAny, {
|
|
447
|
-
interval: number;
|
|
448
397
|
pattern_id: string;
|
|
449
398
|
}, {
|
|
450
399
|
pattern_id: string;
|
|
451
|
-
interval?: number | undefined;
|
|
452
400
|
}>;
|
|
453
401
|
}, "strip", z.ZodTypeAny, {
|
|
454
402
|
properties: {
|
|
455
|
-
interval: number;
|
|
456
403
|
pattern_id: string;
|
|
457
404
|
};
|
|
458
405
|
generated_at: Date;
|
|
@@ -464,7 +411,6 @@ export declare const DemandByPatternByYearSchema: z.ZodObject<{
|
|
|
464
411
|
}, {
|
|
465
412
|
properties: {
|
|
466
413
|
pattern_id: string;
|
|
467
|
-
interval?: number | undefined;
|
|
468
414
|
};
|
|
469
415
|
generated_at: Date;
|
|
470
416
|
metric: "demand_by_pattern_by_year";
|
|
@@ -484,21 +430,16 @@ export declare const DemandByPatternByMonthSchema: z.ZodObject<{
|
|
|
484
430
|
qty: number;
|
|
485
431
|
}>>;
|
|
486
432
|
properties: z.ZodObject<{
|
|
487
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
488
|
-
} & {
|
|
489
433
|
pattern_id: z.ZodString;
|
|
490
434
|
}, "strip", z.ZodTypeAny, {
|
|
491
|
-
interval: number;
|
|
492
435
|
pattern_id: string;
|
|
493
436
|
}, {
|
|
494
437
|
pattern_id: string;
|
|
495
|
-
interval?: number | undefined;
|
|
496
438
|
}>;
|
|
497
439
|
} & {
|
|
498
440
|
metric: z.ZodLiteral<"demand_by_pattern_by_month">;
|
|
499
441
|
}, "strip", z.ZodTypeAny, {
|
|
500
442
|
properties: {
|
|
501
|
-
interval: number;
|
|
502
443
|
pattern_id: string;
|
|
503
444
|
};
|
|
504
445
|
generated_at: Date;
|
|
@@ -510,7 +451,6 @@ export declare const DemandByPatternByMonthSchema: z.ZodObject<{
|
|
|
510
451
|
}, {
|
|
511
452
|
properties: {
|
|
512
453
|
pattern_id: string;
|
|
513
|
-
interval?: number | undefined;
|
|
514
454
|
};
|
|
515
455
|
generated_at: Date;
|
|
516
456
|
metric: "demand_by_pattern_by_month";
|
|
@@ -523,40 +463,35 @@ export declare const DemandByPatternByDaySchema: z.ZodObject<{
|
|
|
523
463
|
description: z.ZodOptional<z.ZodString>;
|
|
524
464
|
generated_at: z.ZodDate;
|
|
525
465
|
properties: z.ZodObject<{
|
|
526
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
527
|
-
} & {
|
|
528
466
|
pattern_id: z.ZodString;
|
|
529
467
|
}, "strip", z.ZodTypeAny, {
|
|
530
|
-
interval: number;
|
|
531
468
|
pattern_id: string;
|
|
532
469
|
}, {
|
|
533
470
|
pattern_id: string;
|
|
534
|
-
interval?: number | undefined;
|
|
535
471
|
}>;
|
|
536
472
|
} & {
|
|
537
473
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
538
474
|
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
539
|
-
holiday: z.
|
|
475
|
+
holiday: z.ZodEnum<["0", "1"]>;
|
|
540
476
|
notes: z.ZodNullable<z.ZodString>;
|
|
541
|
-
period: z.
|
|
477
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
542
478
|
qty: z.ZodNumber;
|
|
543
479
|
}, "strip", z.ZodTypeAny, {
|
|
544
480
|
qty: number;
|
|
545
481
|
day_type: "1" | "2" | "3";
|
|
546
|
-
holiday:
|
|
482
|
+
holiday: "0" | "1";
|
|
547
483
|
notes: string | null;
|
|
548
|
-
period:
|
|
484
|
+
period: "1" | "2" | "3";
|
|
549
485
|
}, {
|
|
550
486
|
qty: number;
|
|
551
487
|
day_type: "1" | "2" | "3";
|
|
552
|
-
holiday:
|
|
488
|
+
holiday: "0" | "1";
|
|
553
489
|
notes: string | null;
|
|
554
|
-
period:
|
|
490
|
+
period: "1" | "2" | "3";
|
|
555
491
|
}>>;
|
|
556
492
|
metric: z.ZodLiteral<"demand_by_pattern_by_day">;
|
|
557
493
|
}, "strip", z.ZodTypeAny, {
|
|
558
494
|
properties: {
|
|
559
|
-
interval: number;
|
|
560
495
|
pattern_id: string;
|
|
561
496
|
};
|
|
562
497
|
generated_at: Date;
|
|
@@ -564,24 +499,23 @@ export declare const DemandByPatternByDaySchema: z.ZodObject<{
|
|
|
564
499
|
data: Record<string, {
|
|
565
500
|
qty: number;
|
|
566
501
|
day_type: "1" | "2" | "3";
|
|
567
|
-
holiday:
|
|
502
|
+
holiday: "0" | "1";
|
|
568
503
|
notes: string | null;
|
|
569
|
-
period:
|
|
504
|
+
period: "1" | "2" | "3";
|
|
570
505
|
}>;
|
|
571
506
|
description?: string | undefined;
|
|
572
507
|
}, {
|
|
573
508
|
properties: {
|
|
574
509
|
pattern_id: string;
|
|
575
|
-
interval?: number | undefined;
|
|
576
510
|
};
|
|
577
511
|
generated_at: Date;
|
|
578
512
|
metric: "demand_by_pattern_by_day";
|
|
579
513
|
data: Record<string, {
|
|
580
514
|
qty: number;
|
|
581
515
|
day_type: "1" | "2" | "3";
|
|
582
|
-
holiday:
|
|
516
|
+
holiday: "0" | "1";
|
|
583
517
|
notes: string | null;
|
|
584
|
-
period:
|
|
518
|
+
period: "1" | "2" | "3";
|
|
585
519
|
}>;
|
|
586
520
|
description?: string | undefined;
|
|
587
521
|
}>;
|
|
@@ -598,13 +532,10 @@ export declare const DemandByPatternHourByYearSchema: z.ZodObject<{
|
|
|
598
532
|
} & {
|
|
599
533
|
metric: z.ZodLiteral<"demand_by_pattern_hour_by_year">;
|
|
600
534
|
properties: z.ZodObject<{
|
|
601
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
602
|
-
} & {
|
|
603
535
|
hour: z.ZodNumber;
|
|
604
536
|
minute: z.ZodNumber;
|
|
605
537
|
pattern_id: z.ZodString;
|
|
606
538
|
}, "strip", z.ZodTypeAny, {
|
|
607
|
-
interval: number;
|
|
608
539
|
pattern_id: string;
|
|
609
540
|
hour: number;
|
|
610
541
|
minute: number;
|
|
@@ -612,11 +543,9 @@ export declare const DemandByPatternHourByYearSchema: z.ZodObject<{
|
|
|
612
543
|
pattern_id: string;
|
|
613
544
|
hour: number;
|
|
614
545
|
minute: number;
|
|
615
|
-
interval?: number | undefined;
|
|
616
546
|
}>;
|
|
617
547
|
}, "strip", z.ZodTypeAny, {
|
|
618
548
|
properties: {
|
|
619
|
-
interval: number;
|
|
620
549
|
pattern_id: string;
|
|
621
550
|
hour: number;
|
|
622
551
|
minute: number;
|
|
@@ -632,7 +561,6 @@ export declare const DemandByPatternHourByYearSchema: z.ZodObject<{
|
|
|
632
561
|
pattern_id: string;
|
|
633
562
|
hour: number;
|
|
634
563
|
minute: number;
|
|
635
|
-
interval?: number | undefined;
|
|
636
564
|
};
|
|
637
565
|
generated_at: Date;
|
|
638
566
|
metric: "demand_by_pattern_hour_by_year";
|
|
@@ -654,13 +582,10 @@ export declare const DemandByPatternHourByMonthSchema: z.ZodObject<{
|
|
|
654
582
|
} & {
|
|
655
583
|
metric: z.ZodLiteral<"demand_by_pattern_hour_by_month">;
|
|
656
584
|
properties: z.ZodObject<{
|
|
657
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
658
|
-
} & {
|
|
659
585
|
hour: z.ZodNumber;
|
|
660
586
|
minute: z.ZodNumber;
|
|
661
587
|
pattern_id: z.ZodString;
|
|
662
588
|
}, "strip", z.ZodTypeAny, {
|
|
663
|
-
interval: number;
|
|
664
589
|
pattern_id: string;
|
|
665
590
|
hour: number;
|
|
666
591
|
minute: number;
|
|
@@ -668,11 +593,9 @@ export declare const DemandByPatternHourByMonthSchema: z.ZodObject<{
|
|
|
668
593
|
pattern_id: string;
|
|
669
594
|
hour: number;
|
|
670
595
|
minute: number;
|
|
671
|
-
interval?: number | undefined;
|
|
672
596
|
}>;
|
|
673
597
|
}, "strip", z.ZodTypeAny, {
|
|
674
598
|
properties: {
|
|
675
|
-
interval: number;
|
|
676
599
|
pattern_id: string;
|
|
677
600
|
hour: number;
|
|
678
601
|
minute: number;
|
|
@@ -688,7 +611,6 @@ export declare const DemandByPatternHourByMonthSchema: z.ZodObject<{
|
|
|
688
611
|
pattern_id: string;
|
|
689
612
|
hour: number;
|
|
690
613
|
minute: number;
|
|
691
|
-
interval?: number | undefined;
|
|
692
614
|
};
|
|
693
615
|
generated_at: Date;
|
|
694
616
|
metric: "demand_by_pattern_hour_by_month";
|
|
@@ -700,13 +622,6 @@ export declare const DemandByPatternHourByMonthSchema: z.ZodObject<{
|
|
|
700
622
|
export declare const TopDemandByAgencySchema: z.ZodObject<{
|
|
701
623
|
description: z.ZodOptional<z.ZodString>;
|
|
702
624
|
generated_at: z.ZodDate;
|
|
703
|
-
properties: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
704
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
705
|
-
}, "strip", z.ZodTypeAny, {
|
|
706
|
-
interval: number;
|
|
707
|
-
}, {
|
|
708
|
-
interval?: number | undefined;
|
|
709
|
-
}>>>;
|
|
710
625
|
} & {
|
|
711
626
|
data: z.ZodObject<{
|
|
712
627
|
operators: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -859,9 +774,6 @@ export declare const TopDemandByAgencySchema: z.ZodObject<{
|
|
|
859
774
|
};
|
|
860
775
|
};
|
|
861
776
|
description?: string | undefined;
|
|
862
|
-
properties?: {
|
|
863
|
-
interval: number;
|
|
864
|
-
} | undefined;
|
|
865
777
|
}, {
|
|
866
778
|
generated_at: Date;
|
|
867
779
|
metric: "top_demand_by_agency";
|
|
@@ -888,7 +800,4 @@ export declare const TopDemandByAgencySchema: z.ZodObject<{
|
|
|
888
800
|
};
|
|
889
801
|
};
|
|
890
802
|
description?: string | undefined;
|
|
891
|
-
properties?: {
|
|
892
|
-
interval?: number | undefined;
|
|
893
|
-
} | undefined;
|
|
894
803
|
}>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/* * */
|
|
3
|
-
import {
|
|
3
|
+
import { MetricBaseSchema } from './common.js';
|
|
4
4
|
/* DEMAND BY LINE */
|
|
5
|
-
const DemandByLinePropertiesSchema = MetricBasePropertiesSchema.extend({
|
|
6
|
-
line_id: z.string(),
|
|
7
|
-
});
|
|
8
5
|
const DemandByLineSchema = MetricBaseSchema.extend({
|
|
9
6
|
data: z.record(z.string(), z.object({
|
|
10
7
|
qty: z.number(),
|
|
11
8
|
})),
|
|
12
|
-
properties:
|
|
9
|
+
properties: z.object({
|
|
10
|
+
line_id: z.string(),
|
|
11
|
+
}),
|
|
13
12
|
});
|
|
14
13
|
export const DemandByLineByYearSchema = DemandByLineSchema.extend({
|
|
15
14
|
metric: z.literal('demand_by_line_by_year'),
|
|
@@ -51,7 +50,7 @@ export const TopMeanDemandByLineByMonthSchema = DemandByLineSchema.extend({
|
|
|
51
50
|
year_avg: z.number(),
|
|
52
51
|
})),
|
|
53
52
|
metric: z.literal('top_mean_demand_by_line_by_month'),
|
|
54
|
-
properties:
|
|
53
|
+
properties: z.object({
|
|
55
54
|
year_month: z.string(),
|
|
56
55
|
}),
|
|
57
56
|
});
|
|
@@ -60,7 +59,7 @@ const DemandByAgencySchema = MetricBaseSchema.extend({
|
|
|
60
59
|
data: z.record(z.string(), z.object({
|
|
61
60
|
qty: z.number(),
|
|
62
61
|
})),
|
|
63
|
-
properties:
|
|
62
|
+
properties: z.object({
|
|
64
63
|
agency_id: z.string(),
|
|
65
64
|
}),
|
|
66
65
|
});
|
|
@@ -73,9 +72,9 @@ export const DemandByAgencyByMonthSchema = DemandByAgencySchema.extend({
|
|
|
73
72
|
export const DemandByAgencyByDaySchema = DemandByAgencySchema.extend({
|
|
74
73
|
data: z.record(z.string(), z.object({
|
|
75
74
|
day_type: z.enum(['1', '2', '3']),
|
|
76
|
-
holiday: z.
|
|
75
|
+
holiday: z.enum(['0', '1']),
|
|
77
76
|
notes: z.string().nullable(),
|
|
78
|
-
period: z.
|
|
77
|
+
period: z.enum(['1', '2', '3']),
|
|
79
78
|
qty: z.number(),
|
|
80
79
|
})),
|
|
81
80
|
metric: z.literal('demand_by_agency_by_day'),
|
|
@@ -85,13 +84,13 @@ const DemandByPatternSchema = MetricBaseSchema.extend({
|
|
|
85
84
|
data: z.record(z.string(), z.object({
|
|
86
85
|
qty: z.number(),
|
|
87
86
|
})),
|
|
88
|
-
properties:
|
|
87
|
+
properties: z.object({
|
|
89
88
|
pattern_id: z.string(),
|
|
90
89
|
}),
|
|
91
90
|
});
|
|
92
91
|
export const DemandByPatternByYearSchema = DemandByPatternSchema.extend({
|
|
93
92
|
metric: z.literal('demand_by_pattern_by_year'),
|
|
94
|
-
properties:
|
|
93
|
+
properties: z.object({
|
|
95
94
|
pattern_id: z.string(),
|
|
96
95
|
}),
|
|
97
96
|
});
|
|
@@ -101,9 +100,9 @@ export const DemandByPatternByMonthSchema = DemandByPatternSchema.extend({
|
|
|
101
100
|
export const DemandByPatternByDaySchema = DemandByPatternSchema.extend({
|
|
102
101
|
data: z.record(z.string(), z.object({
|
|
103
102
|
day_type: z.enum(['1', '2', '3']),
|
|
104
|
-
holiday: z.
|
|
103
|
+
holiday: z.enum(['0', '1']),
|
|
105
104
|
notes: z.string().nullable(),
|
|
106
|
-
period: z.
|
|
105
|
+
period: z.enum(['1', '2', '3']),
|
|
107
106
|
qty: z.number(),
|
|
108
107
|
})),
|
|
109
108
|
metric: z.literal('demand_by_pattern_by_day'),
|
|
@@ -111,7 +110,7 @@ export const DemandByPatternByDaySchema = DemandByPatternSchema.extend({
|
|
|
111
110
|
/* DEMAND BY PATTERN_HOUR */
|
|
112
111
|
export const DemandByPatternHourByYearSchema = DemandByPatternSchema.extend({
|
|
113
112
|
metric: z.literal('demand_by_pattern_hour_by_year'),
|
|
114
|
-
properties:
|
|
113
|
+
properties: z.object({
|
|
115
114
|
hour: z.number().min(0).max(23),
|
|
116
115
|
minute: z.number().min(0).max(59),
|
|
117
116
|
pattern_id: z.string(),
|
|
@@ -119,7 +118,7 @@ export const DemandByPatternHourByYearSchema = DemandByPatternSchema.extend({
|
|
|
119
118
|
});
|
|
120
119
|
export const DemandByPatternHourByMonthSchema = DemandByPatternSchema.extend({
|
|
121
120
|
metric: z.literal('demand_by_pattern_hour_by_month'),
|
|
122
|
-
properties:
|
|
121
|
+
properties: z.object({
|
|
123
122
|
hour: z.number().min(0).max(23),
|
|
124
123
|
minute: z.number().min(0).max(59),
|
|
125
124
|
pattern_id: z.string(),
|
|
@@ -11,22 +11,17 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
11
11
|
qty: number;
|
|
12
12
|
}>>;
|
|
13
13
|
properties: z.ZodObject<{
|
|
14
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
15
|
-
} & {
|
|
16
14
|
line_id: z.ZodString;
|
|
17
15
|
}, "strip", z.ZodTypeAny, {
|
|
18
16
|
line_id: string;
|
|
19
|
-
interval: number;
|
|
20
17
|
}, {
|
|
21
18
|
line_id: string;
|
|
22
|
-
interval?: number | undefined;
|
|
23
19
|
}>;
|
|
24
20
|
} & {
|
|
25
21
|
metric: z.ZodLiteral<"demand_by_line_by_year">;
|
|
26
22
|
}, "strip", z.ZodTypeAny, {
|
|
27
23
|
properties: {
|
|
28
24
|
line_id: string;
|
|
29
|
-
interval: number;
|
|
30
25
|
};
|
|
31
26
|
generated_at: Date;
|
|
32
27
|
metric: "demand_by_line_by_year";
|
|
@@ -37,7 +32,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
37
32
|
}, {
|
|
38
33
|
properties: {
|
|
39
34
|
line_id: string;
|
|
40
|
-
interval?: number | undefined;
|
|
41
35
|
};
|
|
42
36
|
generated_at: Date;
|
|
43
37
|
metric: "demand_by_line_by_year";
|
|
@@ -56,22 +50,17 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
56
50
|
qty: number;
|
|
57
51
|
}>>;
|
|
58
52
|
properties: z.ZodObject<{
|
|
59
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
60
|
-
} & {
|
|
61
53
|
line_id: z.ZodString;
|
|
62
54
|
}, "strip", z.ZodTypeAny, {
|
|
63
55
|
line_id: string;
|
|
64
|
-
interval: number;
|
|
65
56
|
}, {
|
|
66
57
|
line_id: string;
|
|
67
|
-
interval?: number | undefined;
|
|
68
58
|
}>;
|
|
69
59
|
} & {
|
|
70
60
|
metric: z.ZodLiteral<"demand_by_line_by_month">;
|
|
71
61
|
}, "strip", z.ZodTypeAny, {
|
|
72
62
|
properties: {
|
|
73
63
|
line_id: string;
|
|
74
|
-
interval: number;
|
|
75
64
|
};
|
|
76
65
|
generated_at: Date;
|
|
77
66
|
metric: "demand_by_line_by_month";
|
|
@@ -82,7 +71,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
82
71
|
}, {
|
|
83
72
|
properties: {
|
|
84
73
|
line_id: string;
|
|
85
|
-
interval?: number | undefined;
|
|
86
74
|
};
|
|
87
75
|
generated_at: Date;
|
|
88
76
|
metric: "demand_by_line_by_month";
|
|
@@ -94,15 +82,11 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
94
82
|
description: z.ZodOptional<z.ZodString>;
|
|
95
83
|
generated_at: z.ZodDate;
|
|
96
84
|
properties: z.ZodObject<{
|
|
97
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
98
|
-
} & {
|
|
99
85
|
line_id: z.ZodString;
|
|
100
86
|
}, "strip", z.ZodTypeAny, {
|
|
101
87
|
line_id: string;
|
|
102
|
-
interval: number;
|
|
103
88
|
}, {
|
|
104
89
|
line_id: string;
|
|
105
|
-
interval?: number | undefined;
|
|
106
90
|
}>;
|
|
107
91
|
} & {
|
|
108
92
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -128,7 +112,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
128
112
|
}, "strip", z.ZodTypeAny, {
|
|
129
113
|
properties: {
|
|
130
114
|
line_id: string;
|
|
131
|
-
interval: number;
|
|
132
115
|
};
|
|
133
116
|
generated_at: Date;
|
|
134
117
|
metric: "demand_by_line_by_day";
|
|
@@ -143,7 +126,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
143
126
|
}, {
|
|
144
127
|
properties: {
|
|
145
128
|
line_id: string;
|
|
146
|
-
interval?: number | undefined;
|
|
147
129
|
};
|
|
148
130
|
generated_at: Date;
|
|
149
131
|
metric: "demand_by_line_by_day";
|
|
@@ -168,19 +150,14 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
168
150
|
} & {
|
|
169
151
|
metric: z.ZodLiteral<"demand_by_pattern_by_year">;
|
|
170
152
|
properties: z.ZodObject<{
|
|
171
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
172
|
-
} & {
|
|
173
153
|
pattern_id: z.ZodString;
|
|
174
154
|
}, "strip", z.ZodTypeAny, {
|
|
175
|
-
interval: number;
|
|
176
155
|
pattern_id: string;
|
|
177
156
|
}, {
|
|
178
157
|
pattern_id: string;
|
|
179
|
-
interval?: number | undefined;
|
|
180
158
|
}>;
|
|
181
159
|
}, "strip", z.ZodTypeAny, {
|
|
182
160
|
properties: {
|
|
183
|
-
interval: number;
|
|
184
161
|
pattern_id: string;
|
|
185
162
|
};
|
|
186
163
|
generated_at: Date;
|
|
@@ -192,7 +169,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
192
169
|
}, {
|
|
193
170
|
properties: {
|
|
194
171
|
pattern_id: string;
|
|
195
|
-
interval?: number | undefined;
|
|
196
172
|
};
|
|
197
173
|
generated_at: Date;
|
|
198
174
|
metric: "demand_by_pattern_by_year";
|
|
@@ -211,21 +187,16 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
211
187
|
qty: number;
|
|
212
188
|
}>>;
|
|
213
189
|
properties: z.ZodObject<{
|
|
214
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
215
|
-
} & {
|
|
216
190
|
pattern_id: z.ZodString;
|
|
217
191
|
}, "strip", z.ZodTypeAny, {
|
|
218
|
-
interval: number;
|
|
219
192
|
pattern_id: string;
|
|
220
193
|
}, {
|
|
221
194
|
pattern_id: string;
|
|
222
|
-
interval?: number | undefined;
|
|
223
195
|
}>;
|
|
224
196
|
} & {
|
|
225
197
|
metric: z.ZodLiteral<"demand_by_pattern_by_month">;
|
|
226
198
|
}, "strip", z.ZodTypeAny, {
|
|
227
199
|
properties: {
|
|
228
|
-
interval: number;
|
|
229
200
|
pattern_id: string;
|
|
230
201
|
};
|
|
231
202
|
generated_at: Date;
|
|
@@ -237,7 +208,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
237
208
|
}, {
|
|
238
209
|
properties: {
|
|
239
210
|
pattern_id: string;
|
|
240
|
-
interval?: number | undefined;
|
|
241
211
|
};
|
|
242
212
|
generated_at: Date;
|
|
243
213
|
metric: "demand_by_pattern_by_month";
|
|
@@ -249,40 +219,35 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
249
219
|
description: z.ZodOptional<z.ZodString>;
|
|
250
220
|
generated_at: z.ZodDate;
|
|
251
221
|
properties: z.ZodObject<{
|
|
252
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
253
|
-
} & {
|
|
254
222
|
pattern_id: z.ZodString;
|
|
255
223
|
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
interval: number;
|
|
257
224
|
pattern_id: string;
|
|
258
225
|
}, {
|
|
259
226
|
pattern_id: string;
|
|
260
|
-
interval?: number | undefined;
|
|
261
227
|
}>;
|
|
262
228
|
} & {
|
|
263
229
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
264
230
|
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
265
|
-
holiday: z.
|
|
231
|
+
holiday: z.ZodEnum<["0", "1"]>;
|
|
266
232
|
notes: z.ZodNullable<z.ZodString>;
|
|
267
|
-
period: z.
|
|
233
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
268
234
|
qty: z.ZodNumber;
|
|
269
235
|
}, "strip", z.ZodTypeAny, {
|
|
270
236
|
qty: number;
|
|
271
237
|
day_type: "1" | "2" | "3";
|
|
272
|
-
holiday:
|
|
238
|
+
holiday: "0" | "1";
|
|
273
239
|
notes: string | null;
|
|
274
|
-
period:
|
|
240
|
+
period: "1" | "2" | "3";
|
|
275
241
|
}, {
|
|
276
242
|
qty: number;
|
|
277
243
|
day_type: "1" | "2" | "3";
|
|
278
|
-
holiday:
|
|
244
|
+
holiday: "0" | "1";
|
|
279
245
|
notes: string | null;
|
|
280
|
-
period:
|
|
246
|
+
period: "1" | "2" | "3";
|
|
281
247
|
}>>;
|
|
282
248
|
metric: z.ZodLiteral<"demand_by_pattern_by_day">;
|
|
283
249
|
}, "strip", z.ZodTypeAny, {
|
|
284
250
|
properties: {
|
|
285
|
-
interval: number;
|
|
286
251
|
pattern_id: string;
|
|
287
252
|
};
|
|
288
253
|
generated_at: Date;
|
|
@@ -290,24 +255,23 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
290
255
|
data: Record<string, {
|
|
291
256
|
qty: number;
|
|
292
257
|
day_type: "1" | "2" | "3";
|
|
293
|
-
holiday:
|
|
258
|
+
holiday: "0" | "1";
|
|
294
259
|
notes: string | null;
|
|
295
|
-
period:
|
|
260
|
+
period: "1" | "2" | "3";
|
|
296
261
|
}>;
|
|
297
262
|
description?: string | undefined;
|
|
298
263
|
}, {
|
|
299
264
|
properties: {
|
|
300
265
|
pattern_id: string;
|
|
301
|
-
interval?: number | undefined;
|
|
302
266
|
};
|
|
303
267
|
generated_at: Date;
|
|
304
268
|
metric: "demand_by_pattern_by_day";
|
|
305
269
|
data: Record<string, {
|
|
306
270
|
qty: number;
|
|
307
271
|
day_type: "1" | "2" | "3";
|
|
308
|
-
holiday:
|
|
272
|
+
holiday: "0" | "1";
|
|
309
273
|
notes: string | null;
|
|
310
|
-
period:
|
|
274
|
+
period: "1" | "2" | "3";
|
|
311
275
|
}>;
|
|
312
276
|
description?: string | undefined;
|
|
313
277
|
}>, z.ZodObject<{
|
|
@@ -323,13 +287,10 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
323
287
|
} & {
|
|
324
288
|
metric: z.ZodLiteral<"demand_by_pattern_hour_by_year">;
|
|
325
289
|
properties: z.ZodObject<{
|
|
326
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
327
|
-
} & {
|
|
328
290
|
hour: z.ZodNumber;
|
|
329
291
|
minute: z.ZodNumber;
|
|
330
292
|
pattern_id: z.ZodString;
|
|
331
293
|
}, "strip", z.ZodTypeAny, {
|
|
332
|
-
interval: number;
|
|
333
294
|
pattern_id: string;
|
|
334
295
|
hour: number;
|
|
335
296
|
minute: number;
|
|
@@ -337,11 +298,9 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
337
298
|
pattern_id: string;
|
|
338
299
|
hour: number;
|
|
339
300
|
minute: number;
|
|
340
|
-
interval?: number | undefined;
|
|
341
301
|
}>;
|
|
342
302
|
}, "strip", z.ZodTypeAny, {
|
|
343
303
|
properties: {
|
|
344
|
-
interval: number;
|
|
345
304
|
pattern_id: string;
|
|
346
305
|
hour: number;
|
|
347
306
|
minute: number;
|
|
@@ -357,7 +316,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
357
316
|
pattern_id: string;
|
|
358
317
|
hour: number;
|
|
359
318
|
minute: number;
|
|
360
|
-
interval?: number | undefined;
|
|
361
319
|
};
|
|
362
320
|
generated_at: Date;
|
|
363
321
|
metric: "demand_by_pattern_hour_by_year";
|
|
@@ -378,13 +336,10 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
378
336
|
} & {
|
|
379
337
|
metric: z.ZodLiteral<"demand_by_pattern_hour_by_month">;
|
|
380
338
|
properties: z.ZodObject<{
|
|
381
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
382
|
-
} & {
|
|
383
339
|
hour: z.ZodNumber;
|
|
384
340
|
minute: z.ZodNumber;
|
|
385
341
|
pattern_id: z.ZodString;
|
|
386
342
|
}, "strip", z.ZodTypeAny, {
|
|
387
|
-
interval: number;
|
|
388
343
|
pattern_id: string;
|
|
389
344
|
hour: number;
|
|
390
345
|
minute: number;
|
|
@@ -392,11 +347,9 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
392
347
|
pattern_id: string;
|
|
393
348
|
hour: number;
|
|
394
349
|
minute: number;
|
|
395
|
-
interval?: number | undefined;
|
|
396
350
|
}>;
|
|
397
351
|
}, "strip", z.ZodTypeAny, {
|
|
398
352
|
properties: {
|
|
399
|
-
interval: number;
|
|
400
353
|
pattern_id: string;
|
|
401
354
|
hour: number;
|
|
402
355
|
minute: number;
|
|
@@ -412,7 +365,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
412
365
|
pattern_id: string;
|
|
413
366
|
hour: number;
|
|
414
367
|
minute: number;
|
|
415
|
-
interval?: number | undefined;
|
|
416
368
|
};
|
|
417
369
|
generated_at: Date;
|
|
418
370
|
metric: "demand_by_pattern_hour_by_month";
|
|
@@ -431,22 +383,17 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
431
383
|
qty: number;
|
|
432
384
|
}>>;
|
|
433
385
|
properties: z.ZodObject<{
|
|
434
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
435
|
-
} & {
|
|
436
386
|
agency_id: z.ZodString;
|
|
437
387
|
}, "strip", z.ZodTypeAny, {
|
|
438
388
|
agency_id: string;
|
|
439
|
-
interval: number;
|
|
440
389
|
}, {
|
|
441
390
|
agency_id: string;
|
|
442
|
-
interval?: number | undefined;
|
|
443
391
|
}>;
|
|
444
392
|
} & {
|
|
445
393
|
metric: z.ZodLiteral<"demand_by_agency_by_year">;
|
|
446
394
|
}, "strip", z.ZodTypeAny, {
|
|
447
395
|
properties: {
|
|
448
396
|
agency_id: string;
|
|
449
|
-
interval: number;
|
|
450
397
|
};
|
|
451
398
|
generated_at: Date;
|
|
452
399
|
metric: "demand_by_agency_by_year";
|
|
@@ -457,7 +404,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
457
404
|
}, {
|
|
458
405
|
properties: {
|
|
459
406
|
agency_id: string;
|
|
460
|
-
interval?: number | undefined;
|
|
461
407
|
};
|
|
462
408
|
generated_at: Date;
|
|
463
409
|
metric: "demand_by_agency_by_year";
|
|
@@ -476,22 +422,17 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
476
422
|
qty: number;
|
|
477
423
|
}>>;
|
|
478
424
|
properties: z.ZodObject<{
|
|
479
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
480
|
-
} & {
|
|
481
425
|
agency_id: z.ZodString;
|
|
482
426
|
}, "strip", z.ZodTypeAny, {
|
|
483
427
|
agency_id: string;
|
|
484
|
-
interval: number;
|
|
485
428
|
}, {
|
|
486
429
|
agency_id: string;
|
|
487
|
-
interval?: number | undefined;
|
|
488
430
|
}>;
|
|
489
431
|
} & {
|
|
490
432
|
metric: z.ZodLiteral<"demand_by_agency_by_month">;
|
|
491
433
|
}, "strip", z.ZodTypeAny, {
|
|
492
434
|
properties: {
|
|
493
435
|
agency_id: string;
|
|
494
|
-
interval: number;
|
|
495
436
|
};
|
|
496
437
|
generated_at: Date;
|
|
497
438
|
metric: "demand_by_agency_by_month";
|
|
@@ -502,7 +443,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
502
443
|
}, {
|
|
503
444
|
properties: {
|
|
504
445
|
agency_id: string;
|
|
505
|
-
interval?: number | undefined;
|
|
506
446
|
};
|
|
507
447
|
generated_at: Date;
|
|
508
448
|
metric: "demand_by_agency_by_month";
|
|
@@ -514,77 +454,64 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
514
454
|
description: z.ZodOptional<z.ZodString>;
|
|
515
455
|
generated_at: z.ZodDate;
|
|
516
456
|
properties: z.ZodObject<{
|
|
517
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
518
|
-
} & {
|
|
519
457
|
agency_id: z.ZodString;
|
|
520
458
|
}, "strip", z.ZodTypeAny, {
|
|
521
459
|
agency_id: string;
|
|
522
|
-
interval: number;
|
|
523
460
|
}, {
|
|
524
461
|
agency_id: string;
|
|
525
|
-
interval?: number | undefined;
|
|
526
462
|
}>;
|
|
527
463
|
} & {
|
|
528
464
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
529
465
|
day_type: z.ZodEnum<["1", "2", "3"]>;
|
|
530
|
-
holiday: z.
|
|
466
|
+
holiday: z.ZodEnum<["0", "1"]>;
|
|
531
467
|
notes: z.ZodNullable<z.ZodString>;
|
|
532
|
-
period: z.
|
|
468
|
+
period: z.ZodEnum<["1", "2", "3"]>;
|
|
533
469
|
qty: z.ZodNumber;
|
|
534
470
|
}, "strip", z.ZodTypeAny, {
|
|
535
471
|
qty: number;
|
|
536
472
|
day_type: "1" | "2" | "3";
|
|
537
|
-
holiday:
|
|
473
|
+
holiday: "0" | "1";
|
|
538
474
|
notes: string | null;
|
|
539
|
-
period:
|
|
475
|
+
period: "1" | "2" | "3";
|
|
540
476
|
}, {
|
|
541
477
|
qty: number;
|
|
542
478
|
day_type: "1" | "2" | "3";
|
|
543
|
-
holiday:
|
|
479
|
+
holiday: "0" | "1";
|
|
544
480
|
notes: string | null;
|
|
545
|
-
period:
|
|
481
|
+
period: "1" | "2" | "3";
|
|
546
482
|
}>>;
|
|
547
483
|
metric: z.ZodLiteral<"demand_by_agency_by_day">;
|
|
548
484
|
}, "strip", z.ZodTypeAny, {
|
|
549
485
|
properties: {
|
|
550
486
|
agency_id: string;
|
|
551
|
-
interval: number;
|
|
552
487
|
};
|
|
553
488
|
generated_at: Date;
|
|
554
489
|
metric: "demand_by_agency_by_day";
|
|
555
490
|
data: Record<string, {
|
|
556
491
|
qty: number;
|
|
557
492
|
day_type: "1" | "2" | "3";
|
|
558
|
-
holiday:
|
|
493
|
+
holiday: "0" | "1";
|
|
559
494
|
notes: string | null;
|
|
560
|
-
period:
|
|
495
|
+
period: "1" | "2" | "3";
|
|
561
496
|
}>;
|
|
562
497
|
description?: string | undefined;
|
|
563
498
|
}, {
|
|
564
499
|
properties: {
|
|
565
500
|
agency_id: string;
|
|
566
|
-
interval?: number | undefined;
|
|
567
501
|
};
|
|
568
502
|
generated_at: Date;
|
|
569
503
|
metric: "demand_by_agency_by_day";
|
|
570
504
|
data: Record<string, {
|
|
571
505
|
qty: number;
|
|
572
506
|
day_type: "1" | "2" | "3";
|
|
573
|
-
holiday:
|
|
507
|
+
holiday: "0" | "1";
|
|
574
508
|
notes: string | null;
|
|
575
|
-
period:
|
|
509
|
+
period: "1" | "2" | "3";
|
|
576
510
|
}>;
|
|
577
511
|
description?: string | undefined;
|
|
578
512
|
}>, z.ZodObject<{
|
|
579
513
|
description: z.ZodOptional<z.ZodString>;
|
|
580
514
|
generated_at: z.ZodDate;
|
|
581
|
-
properties: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
582
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
583
|
-
}, "strip", z.ZodTypeAny, {
|
|
584
|
-
interval: number;
|
|
585
|
-
}, {
|
|
586
|
-
interval?: number | undefined;
|
|
587
|
-
}>>>;
|
|
588
515
|
} & {
|
|
589
516
|
data: z.ZodObject<{
|
|
590
517
|
operators: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -737,9 +664,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
737
664
|
};
|
|
738
665
|
};
|
|
739
666
|
description?: string | undefined;
|
|
740
|
-
properties?: {
|
|
741
|
-
interval: number;
|
|
742
|
-
} | undefined;
|
|
743
667
|
}, {
|
|
744
668
|
generated_at: Date;
|
|
745
669
|
metric: "top_demand_by_agency";
|
|
@@ -766,22 +690,15 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
766
690
|
};
|
|
767
691
|
};
|
|
768
692
|
description?: string | undefined;
|
|
769
|
-
properties?: {
|
|
770
|
-
interval?: number | undefined;
|
|
771
|
-
} | undefined;
|
|
772
693
|
}>, z.ZodObject<{
|
|
773
694
|
description: z.ZodOptional<z.ZodString>;
|
|
774
695
|
generated_at: z.ZodDate;
|
|
775
696
|
properties: z.ZodObject<{
|
|
776
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
777
|
-
} & {
|
|
778
697
|
line_id: z.ZodString;
|
|
779
698
|
}, "strip", z.ZodTypeAny, {
|
|
780
699
|
line_id: string;
|
|
781
|
-
interval: number;
|
|
782
700
|
}, {
|
|
783
701
|
line_id: string;
|
|
784
|
-
interval?: number | undefined;
|
|
785
702
|
}>;
|
|
786
703
|
} & {
|
|
787
704
|
data: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -801,7 +718,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
801
718
|
}, "strip", z.ZodTypeAny, {
|
|
802
719
|
properties: {
|
|
803
720
|
line_id: string;
|
|
804
|
-
interval: number;
|
|
805
721
|
};
|
|
806
722
|
generated_at: Date;
|
|
807
723
|
metric: "mean_demand_by_line_by_month";
|
|
@@ -814,7 +730,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
814
730
|
}, {
|
|
815
731
|
properties: {
|
|
816
732
|
line_id: string;
|
|
817
|
-
interval?: number | undefined;
|
|
818
733
|
};
|
|
819
734
|
generated_at: Date;
|
|
820
735
|
metric: "mean_demand_by_line_by_month";
|
|
@@ -843,19 +758,14 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
843
758
|
}>>;
|
|
844
759
|
metric: z.ZodLiteral<"top_mean_demand_by_line_by_month">;
|
|
845
760
|
properties: z.ZodObject<{
|
|
846
|
-
interval: z.ZodDefault<z.ZodNumber>;
|
|
847
|
-
} & {
|
|
848
761
|
year_month: z.ZodString;
|
|
849
762
|
}, "strip", z.ZodTypeAny, {
|
|
850
|
-
interval: number;
|
|
851
763
|
year_month: string;
|
|
852
764
|
}, {
|
|
853
765
|
year_month: string;
|
|
854
|
-
interval?: number | undefined;
|
|
855
766
|
}>;
|
|
856
767
|
}, "strip", z.ZodTypeAny, {
|
|
857
768
|
properties: {
|
|
858
|
-
interval: number;
|
|
859
769
|
year_month: string;
|
|
860
770
|
};
|
|
861
771
|
generated_at: Date;
|
|
@@ -869,7 +779,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
869
779
|
}, {
|
|
870
780
|
properties: {
|
|
871
781
|
year_month: string;
|
|
872
|
-
interval?: number | undefined;
|
|
873
782
|
};
|
|
874
783
|
generated_at: Date;
|
|
875
784
|
metric: "top_mean_demand_by_line_by_month";
|
|
@@ -895,4 +804,3 @@ export type DemandByAgencyByDay = z.infer<typeof DemandByAgencyByDaySchema>;
|
|
|
895
804
|
export type TopDemandByAgency = z.infer<typeof TopDemandByAgencySchema>;
|
|
896
805
|
export type MeanDemandByLineByMonth = z.infer<typeof MeanDemandByLineByMonthSchema>;
|
|
897
806
|
export type TopMeanDemandByLineByMonth = z.infer<typeof TopMeanDemandByLineByMonthSchema>;
|
|
898
|
-
export { MetricBasePropertiesSchema } from './common.js';
|
package/package.json
CHANGED