@tmlmobilidade/types 20251009.1648.44 → 20251009.1744.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.
|
@@ -7,7 +7,6 @@ export declare const MetricBasePropertiesSchema: z.ZodObject<{
|
|
|
7
7
|
interval: number;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const MetricBaseSchema: z.ZodObject<{
|
|
10
|
-
_id: z.ZodString;
|
|
11
10
|
description: z.ZodOptional<z.ZodString>;
|
|
12
11
|
generated_at: z.ZodDate;
|
|
13
12
|
metric: z.ZodString;
|
|
@@ -19,7 +18,6 @@ export declare const MetricBaseSchema: z.ZodObject<{
|
|
|
19
18
|
interval: number;
|
|
20
19
|
}>;
|
|
21
20
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
_id: string;
|
|
23
21
|
properties: {
|
|
24
22
|
interval: number;
|
|
25
23
|
};
|
|
@@ -27,7 +25,6 @@ export declare const MetricBaseSchema: z.ZodObject<{
|
|
|
27
25
|
metric: string;
|
|
28
26
|
description?: string | undefined;
|
|
29
27
|
}, {
|
|
30
|
-
_id: string;
|
|
31
28
|
properties: {
|
|
32
29
|
interval: number;
|
|
33
30
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const DemandByLineByYearSchema: z.ZodObject<{
|
|
3
|
-
_id: z.ZodString;
|
|
4
3
|
description: z.ZodOptional<z.ZodString>;
|
|
5
4
|
generated_at: z.ZodDate;
|
|
6
5
|
} & {
|
|
@@ -23,7 +22,6 @@ export declare const DemandByLineByYearSchema: z.ZodObject<{
|
|
|
23
22
|
interval: 300000;
|
|
24
23
|
}>;
|
|
25
24
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
_id: string;
|
|
27
25
|
properties: {
|
|
28
26
|
line_id: string;
|
|
29
27
|
interval: 300000;
|
|
@@ -35,7 +33,6 @@ export declare const DemandByLineByYearSchema: z.ZodObject<{
|
|
|
35
33
|
}>;
|
|
36
34
|
description?: string | undefined;
|
|
37
35
|
}, {
|
|
38
|
-
_id: string;
|
|
39
36
|
properties: {
|
|
40
37
|
line_id: string;
|
|
41
38
|
interval: 300000;
|
|
@@ -48,7 +45,6 @@ export declare const DemandByLineByYearSchema: z.ZodObject<{
|
|
|
48
45
|
description?: string | undefined;
|
|
49
46
|
}>;
|
|
50
47
|
export declare const DemandByLineByMonthSchema: z.ZodObject<{
|
|
51
|
-
_id: z.ZodString;
|
|
52
48
|
description: z.ZodOptional<z.ZodString>;
|
|
53
49
|
generated_at: z.ZodDate;
|
|
54
50
|
} & {
|
|
@@ -71,7 +67,6 @@ export declare const DemandByLineByMonthSchema: z.ZodObject<{
|
|
|
71
67
|
interval: 300000;
|
|
72
68
|
}>;
|
|
73
69
|
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
_id: string;
|
|
75
70
|
properties: {
|
|
76
71
|
line_id: string;
|
|
77
72
|
interval: 300000;
|
|
@@ -83,7 +78,6 @@ export declare const DemandByLineByMonthSchema: z.ZodObject<{
|
|
|
83
78
|
}>;
|
|
84
79
|
description?: string | undefined;
|
|
85
80
|
}, {
|
|
86
|
-
_id: string;
|
|
87
81
|
properties: {
|
|
88
82
|
line_id: string;
|
|
89
83
|
interval: 300000;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObject<{
|
|
3
|
-
_id: z.ZodString;
|
|
4
3
|
description: z.ZodOptional<z.ZodString>;
|
|
5
4
|
generated_at: z.ZodDate;
|
|
6
5
|
} & {
|
|
@@ -23,7 +22,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
23
22
|
interval: 300000;
|
|
24
23
|
}>;
|
|
25
24
|
}, "strip", z.ZodTypeAny, {
|
|
26
|
-
_id: string;
|
|
27
25
|
properties: {
|
|
28
26
|
line_id: string;
|
|
29
27
|
interval: 300000;
|
|
@@ -35,7 +33,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
35
33
|
}>;
|
|
36
34
|
description?: string | undefined;
|
|
37
35
|
}, {
|
|
38
|
-
_id: string;
|
|
39
36
|
properties: {
|
|
40
37
|
line_id: string;
|
|
41
38
|
interval: 300000;
|
|
@@ -47,7 +44,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
47
44
|
}>;
|
|
48
45
|
description?: string | undefined;
|
|
49
46
|
}>, z.ZodObject<{
|
|
50
|
-
_id: z.ZodString;
|
|
51
47
|
description: z.ZodOptional<z.ZodString>;
|
|
52
48
|
generated_at: z.ZodDate;
|
|
53
49
|
} & {
|
|
@@ -70,7 +66,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
70
66
|
interval: 300000;
|
|
71
67
|
}>;
|
|
72
68
|
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
_id: string;
|
|
74
69
|
properties: {
|
|
75
70
|
line_id: string;
|
|
76
71
|
interval: 300000;
|
|
@@ -82,7 +77,6 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
82
77
|
}>;
|
|
83
78
|
description?: string | undefined;
|
|
84
79
|
}, {
|
|
85
|
-
_id: string;
|
|
86
80
|
properties: {
|
|
87
81
|
line_id: string;
|
|
88
82
|
interval: 300000;
|
|
@@ -94,184 +88,4 @@ export declare const MetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObjec
|
|
|
94
88
|
}>;
|
|
95
89
|
description?: string | undefined;
|
|
96
90
|
}>]>;
|
|
97
|
-
export declare const CreateMetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObject<Omit<{
|
|
98
|
-
_id: z.ZodString;
|
|
99
|
-
description: z.ZodOptional<z.ZodString>;
|
|
100
|
-
generated_at: z.ZodDate;
|
|
101
|
-
} & {
|
|
102
|
-
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
103
|
-
qty: z.ZodNumber;
|
|
104
|
-
}, "strip", z.ZodTypeAny, {
|
|
105
|
-
qty: number;
|
|
106
|
-
}, {
|
|
107
|
-
qty: number;
|
|
108
|
-
}>>;
|
|
109
|
-
metric: z.ZodLiteral<"demand_by_line_by_year">;
|
|
110
|
-
properties: z.ZodObject<{} & {
|
|
111
|
-
interval: z.ZodLiteral<300000>;
|
|
112
|
-
line_id: z.ZodString;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
line_id: string;
|
|
115
|
-
interval: 300000;
|
|
116
|
-
}, {
|
|
117
|
-
line_id: string;
|
|
118
|
-
interval: 300000;
|
|
119
|
-
}>;
|
|
120
|
-
}, "_id">, "strip", z.ZodTypeAny, {
|
|
121
|
-
properties: {
|
|
122
|
-
line_id: string;
|
|
123
|
-
interval: 300000;
|
|
124
|
-
};
|
|
125
|
-
generated_at: Date;
|
|
126
|
-
metric: "demand_by_line_by_year";
|
|
127
|
-
data: Record<string, {
|
|
128
|
-
qty: number;
|
|
129
|
-
}>;
|
|
130
|
-
description?: string | undefined;
|
|
131
|
-
}, {
|
|
132
|
-
properties: {
|
|
133
|
-
line_id: string;
|
|
134
|
-
interval: 300000;
|
|
135
|
-
};
|
|
136
|
-
generated_at: Date;
|
|
137
|
-
metric: "demand_by_line_by_year";
|
|
138
|
-
data: Record<string, {
|
|
139
|
-
qty: number;
|
|
140
|
-
}>;
|
|
141
|
-
description?: string | undefined;
|
|
142
|
-
}>, z.ZodObject<Omit<{
|
|
143
|
-
_id: z.ZodString;
|
|
144
|
-
description: z.ZodOptional<z.ZodString>;
|
|
145
|
-
generated_at: z.ZodDate;
|
|
146
|
-
} & {
|
|
147
|
-
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
148
|
-
qty: z.ZodNumber;
|
|
149
|
-
}, "strip", z.ZodTypeAny, {
|
|
150
|
-
qty: number;
|
|
151
|
-
}, {
|
|
152
|
-
qty: number;
|
|
153
|
-
}>>;
|
|
154
|
-
metric: z.ZodLiteral<"demand_by_line_by_month">;
|
|
155
|
-
properties: z.ZodObject<{} & {
|
|
156
|
-
interval: z.ZodLiteral<300000>;
|
|
157
|
-
line_id: z.ZodString;
|
|
158
|
-
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
line_id: string;
|
|
160
|
-
interval: 300000;
|
|
161
|
-
}, {
|
|
162
|
-
line_id: string;
|
|
163
|
-
interval: 300000;
|
|
164
|
-
}>;
|
|
165
|
-
}, "_id">, "strip", z.ZodTypeAny, {
|
|
166
|
-
properties: {
|
|
167
|
-
line_id: string;
|
|
168
|
-
interval: 300000;
|
|
169
|
-
};
|
|
170
|
-
generated_at: Date;
|
|
171
|
-
metric: "demand_by_line_by_month";
|
|
172
|
-
data: Record<string, {
|
|
173
|
-
qty: number;
|
|
174
|
-
}>;
|
|
175
|
-
description?: string | undefined;
|
|
176
|
-
}, {
|
|
177
|
-
properties: {
|
|
178
|
-
line_id: string;
|
|
179
|
-
interval: 300000;
|
|
180
|
-
};
|
|
181
|
-
generated_at: Date;
|
|
182
|
-
metric: "demand_by_line_by_month";
|
|
183
|
-
data: Record<string, {
|
|
184
|
-
qty: number;
|
|
185
|
-
}>;
|
|
186
|
-
description?: string | undefined;
|
|
187
|
-
}>]>;
|
|
188
|
-
export declare const UpdateMetricSchema: z.ZodDiscriminatedUnion<"metric", [z.ZodObject<{
|
|
189
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
190
|
-
properties: z.ZodOptional<z.ZodObject<{} & {
|
|
191
|
-
interval: z.ZodLiteral<300000>;
|
|
192
|
-
line_id: z.ZodString;
|
|
193
|
-
}, "strip", z.ZodTypeAny, {
|
|
194
|
-
line_id: string;
|
|
195
|
-
interval: 300000;
|
|
196
|
-
}, {
|
|
197
|
-
line_id: string;
|
|
198
|
-
interval: 300000;
|
|
199
|
-
}>>;
|
|
200
|
-
generated_at: z.ZodOptional<z.ZodDate>;
|
|
201
|
-
metric: z.ZodOptional<z.ZodLiteral<"demand_by_line_by_year">>;
|
|
202
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
203
|
-
qty: z.ZodNumber;
|
|
204
|
-
}, "strip", z.ZodTypeAny, {
|
|
205
|
-
qty: number;
|
|
206
|
-
}, {
|
|
207
|
-
qty: number;
|
|
208
|
-
}>>>;
|
|
209
|
-
}, "strip", z.ZodTypeAny, {
|
|
210
|
-
description?: string | undefined;
|
|
211
|
-
properties?: {
|
|
212
|
-
line_id: string;
|
|
213
|
-
interval: 300000;
|
|
214
|
-
} | undefined;
|
|
215
|
-
generated_at?: Date | undefined;
|
|
216
|
-
metric?: "demand_by_line_by_year" | undefined;
|
|
217
|
-
data?: Record<string, {
|
|
218
|
-
qty: number;
|
|
219
|
-
}> | undefined;
|
|
220
|
-
}, {
|
|
221
|
-
description?: string | undefined;
|
|
222
|
-
properties?: {
|
|
223
|
-
line_id: string;
|
|
224
|
-
interval: 300000;
|
|
225
|
-
} | undefined;
|
|
226
|
-
generated_at?: Date | undefined;
|
|
227
|
-
metric?: "demand_by_line_by_year" | undefined;
|
|
228
|
-
data?: Record<string, {
|
|
229
|
-
qty: number;
|
|
230
|
-
}> | undefined;
|
|
231
|
-
}>, z.ZodObject<{
|
|
232
|
-
description: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
233
|
-
properties: z.ZodOptional<z.ZodObject<{} & {
|
|
234
|
-
interval: z.ZodLiteral<300000>;
|
|
235
|
-
line_id: z.ZodString;
|
|
236
|
-
}, "strip", z.ZodTypeAny, {
|
|
237
|
-
line_id: string;
|
|
238
|
-
interval: 300000;
|
|
239
|
-
}, {
|
|
240
|
-
line_id: string;
|
|
241
|
-
interval: 300000;
|
|
242
|
-
}>>;
|
|
243
|
-
generated_at: z.ZodOptional<z.ZodDate>;
|
|
244
|
-
metric: z.ZodOptional<z.ZodLiteral<"demand_by_line_by_month">>;
|
|
245
|
-
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
246
|
-
qty: z.ZodNumber;
|
|
247
|
-
}, "strip", z.ZodTypeAny, {
|
|
248
|
-
qty: number;
|
|
249
|
-
}, {
|
|
250
|
-
qty: number;
|
|
251
|
-
}>>>;
|
|
252
|
-
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
description?: string | undefined;
|
|
254
|
-
properties?: {
|
|
255
|
-
line_id: string;
|
|
256
|
-
interval: 300000;
|
|
257
|
-
} | undefined;
|
|
258
|
-
generated_at?: Date | undefined;
|
|
259
|
-
metric?: "demand_by_line_by_month" | undefined;
|
|
260
|
-
data?: Record<string, {
|
|
261
|
-
qty: number;
|
|
262
|
-
}> | undefined;
|
|
263
|
-
}, {
|
|
264
|
-
description?: string | undefined;
|
|
265
|
-
properties?: {
|
|
266
|
-
line_id: string;
|
|
267
|
-
interval: 300000;
|
|
268
|
-
} | undefined;
|
|
269
|
-
generated_at?: Date | undefined;
|
|
270
|
-
metric?: "demand_by_line_by_month" | undefined;
|
|
271
|
-
data?: Record<string, {
|
|
272
|
-
qty: number;
|
|
273
|
-
}> | undefined;
|
|
274
|
-
}>]>;
|
|
275
91
|
export type Metric = z.infer<typeof MetricSchema>;
|
|
276
|
-
export type CreateMetricDto = z.infer<typeof CreateMetricSchema>;
|
|
277
|
-
export type UpdateMetricDto = z.infer<typeof UpdateMetricSchema>;
|
|
@@ -5,11 +5,3 @@ export const MetricSchema = z.discriminatedUnion('metric', [
|
|
|
5
5
|
DemandByLineByYearSchema,
|
|
6
6
|
DemandByLineByMonthSchema,
|
|
7
7
|
]);
|
|
8
|
-
export const CreateMetricSchema = z.discriminatedUnion('metric', [
|
|
9
|
-
DemandByLineByYearSchema.omit({ _id: true }),
|
|
10
|
-
DemandByLineByMonthSchema.omit({ _id: true }),
|
|
11
|
-
]);
|
|
12
|
-
export const UpdateMetricSchema = z.discriminatedUnion('metric', [
|
|
13
|
-
DemandByLineByYearSchema.omit({ _id: true }).partial(),
|
|
14
|
-
DemandByLineByMonthSchema.omit({ _id: true }).partial(),
|
|
15
|
-
]);
|
package/package.json
CHANGED