@tmlmobilidade/go-types-extractions 20260917.1853.21 → 20260918.1217.51
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/create.d.ts +91 -0
- package/dist/create.js +2 -0
- package/dist/extraction.d.ts +130 -3
- package/dist/extraction.js +2 -0
- package/dist/modules/infrastructure/stops/v1/extraction.d.ts +1 -1
- package/dist/modules/offer/gtfs/v29/extraction.d.ts +1 -1
- package/dist/modules/operation/rides/index.d.ts +1 -0
- package/dist/modules/operation/rides/index.js +1 -0
- package/dist/modules/operation/rides/v1/extraction.d.ts +1 -1
- package/dist/modules/operation/rides/v2/create.d.ts +94 -0
- package/dist/modules/operation/rides/v2/create.js +9 -0
- package/dist/modules/operation/rides/v2/extraction.d.ts +130 -0
- package/dist/modules/operation/rides/v2/extraction.js +6 -0
- package/dist/modules/operation/rides/v2/index.d.ts +4 -0
- package/dist/modules/operation/rides/v2/index.js +4 -0
- package/dist/modules/operation/rides/v2/properties.d.ts +54 -0
- package/dist/modules/operation/rides/v2/properties.js +46 -0
- package/dist/modules/operation/rides/v2/version.d.ts +4 -0
- package/dist/modules/operation/rides/v2/version.js +5 -0
- package/dist/shared/base.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -0
- package/package.json +1 -1
package/dist/create.d.ts
CHANGED
|
@@ -152,5 +152,96 @@ export declare const ExtractionCreateSchema: z.ZodDiscriminatedUnion<"version",
|
|
|
152
152
|
};
|
|
153
153
|
version: "operation-rides-v1";
|
|
154
154
|
send_email_notification?: boolean | undefined;
|
|
155
|
+
}>, z.ZodObject<{
|
|
156
|
+
send_email_notification: z.ZodDefault<z.ZodBoolean>;
|
|
157
|
+
} & {
|
|
158
|
+
properties: z.ZodObject<{
|
|
159
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
160
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
161
|
+
analysis_expected_apex_validation_interval_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
162
|
+
analysis_simple_three_vehicle_events_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
163
|
+
analysis_transaction_sequentiality_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
164
|
+
driver_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
165
|
+
end_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
166
|
+
operational_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ended", "missed", "running", "scheduled"]>>, "many">>;
|
|
167
|
+
search: z.ZodOptional<z.ZodString>;
|
|
168
|
+
start_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
169
|
+
start_time_scheduled_end: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
170
|
+
start_time_scheduled_start: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
171
|
+
vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
172
|
+
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
agency_ids: string[];
|
|
174
|
+
start_time_scheduled_end: number & {
|
|
175
|
+
__brand: "UnixMilliseconds";
|
|
176
|
+
};
|
|
177
|
+
start_time_scheduled_start: number & {
|
|
178
|
+
__brand: "UnixMilliseconds";
|
|
179
|
+
};
|
|
180
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
181
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
182
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
183
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
184
|
+
driver_ids?: string[] | undefined;
|
|
185
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
186
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
187
|
+
search?: string | undefined;
|
|
188
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
189
|
+
vehicle_ids?: string[] | undefined;
|
|
190
|
+
}, {
|
|
191
|
+
start_time_scheduled_end: string | number;
|
|
192
|
+
start_time_scheduled_start: string | number;
|
|
193
|
+
agency_ids?: string[] | undefined;
|
|
194
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
195
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
196
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
197
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
198
|
+
driver_ids?: string[] | undefined;
|
|
199
|
+
end_delay_statuses?: string[] | undefined;
|
|
200
|
+
operational_statuses?: string[] | undefined;
|
|
201
|
+
search?: string | undefined;
|
|
202
|
+
start_delay_statuses?: string[] | undefined;
|
|
203
|
+
vehicle_ids?: string[] | undefined;
|
|
204
|
+
}>;
|
|
205
|
+
version: z.ZodLiteral<"operation-rides-v2">;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
send_email_notification: boolean;
|
|
208
|
+
properties: {
|
|
209
|
+
agency_ids: string[];
|
|
210
|
+
start_time_scheduled_end: number & {
|
|
211
|
+
__brand: "UnixMilliseconds";
|
|
212
|
+
};
|
|
213
|
+
start_time_scheduled_start: number & {
|
|
214
|
+
__brand: "UnixMilliseconds";
|
|
215
|
+
};
|
|
216
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
217
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
218
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
219
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
220
|
+
driver_ids?: string[] | undefined;
|
|
221
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
222
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
223
|
+
search?: string | undefined;
|
|
224
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
225
|
+
vehicle_ids?: string[] | undefined;
|
|
226
|
+
};
|
|
227
|
+
version: "operation-rides-v2";
|
|
228
|
+
}, {
|
|
229
|
+
properties: {
|
|
230
|
+
start_time_scheduled_end: string | number;
|
|
231
|
+
start_time_scheduled_start: string | number;
|
|
232
|
+
agency_ids?: string[] | undefined;
|
|
233
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
234
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
235
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
236
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
237
|
+
driver_ids?: string[] | undefined;
|
|
238
|
+
end_delay_statuses?: string[] | undefined;
|
|
239
|
+
operational_statuses?: string[] | undefined;
|
|
240
|
+
search?: string | undefined;
|
|
241
|
+
start_delay_statuses?: string[] | undefined;
|
|
242
|
+
vehicle_ids?: string[] | undefined;
|
|
243
|
+
};
|
|
244
|
+
version: "operation-rides-v2";
|
|
245
|
+
send_email_notification?: boolean | undefined;
|
|
155
246
|
}>]>;
|
|
156
247
|
export type ExtractionCreate = z.infer<typeof ExtractionCreateSchema>;
|
package/dist/create.js
CHANGED
|
@@ -3,9 +3,11 @@ import { z } from 'zod';
|
|
|
3
3
|
import { InfrastructureStopsV1ExtractionCreateSchema } from './modules/infrastructure/stops/v1/create.js';
|
|
4
4
|
import { OfferGtfsV29ExtractionCreateSchema } from './modules/offer/gtfs/v29/create.js';
|
|
5
5
|
import { OperationRidesV1ExtractionCreateSchema } from './modules/operation/rides/v1/create.js';
|
|
6
|
+
import { OperationRidesV2ExtractionCreateSchema } from './modules/operation/rides/v2/create.js';
|
|
6
7
|
/* * */
|
|
7
8
|
export const ExtractionCreateSchema = z.discriminatedUnion('version', [
|
|
8
9
|
InfrastructureStopsV1ExtractionCreateSchema,
|
|
9
10
|
OfferGtfsV29ExtractionCreateSchema,
|
|
10
11
|
OperationRidesV1ExtractionCreateSchema,
|
|
12
|
+
OperationRidesV2ExtractionCreateSchema,
|
|
11
13
|
]);
|
package/dist/extraction.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const ExtractionSchema: z.ZodDiscriminatedUnion<"version", [z.Zod
|
|
|
30
30
|
version: "infrastructure-stops-v1";
|
|
31
31
|
attachment_id: string | null;
|
|
32
32
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
33
|
-
processing_status: "
|
|
33
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
34
34
|
retries: number;
|
|
35
35
|
_id: string;
|
|
36
36
|
created_at: number & {
|
|
@@ -145,7 +145,7 @@ export declare const ExtractionSchema: z.ZodDiscriminatedUnion<"version", [z.Zod
|
|
|
145
145
|
version: "offer-gtfs-v29";
|
|
146
146
|
attachment_id: string | null;
|
|
147
147
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
148
|
-
processing_status: "
|
|
148
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
149
149
|
retries: number;
|
|
150
150
|
_id: string;
|
|
151
151
|
created_at: number & {
|
|
@@ -230,7 +230,7 @@ export declare const ExtractionSchema: z.ZodDiscriminatedUnion<"version", [z.Zod
|
|
|
230
230
|
version: "operation-rides-v1";
|
|
231
231
|
attachment_id: string | null;
|
|
232
232
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
233
|
-
processing_status: "
|
|
233
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
234
234
|
retries: number;
|
|
235
235
|
_id: string;
|
|
236
236
|
created_at: number & {
|
|
@@ -260,5 +260,132 @@ export declare const ExtractionSchema: z.ZodDiscriminatedUnion<"version", [z.Zod
|
|
|
260
260
|
retries?: number | undefined;
|
|
261
261
|
is_locked?: boolean | undefined;
|
|
262
262
|
updated_by?: string | undefined;
|
|
263
|
+
}>, z.ZodObject<{
|
|
264
|
+
_id: z.ZodString;
|
|
265
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
266
|
+
created_by: z.ZodString;
|
|
267
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
268
|
+
updated_at: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
269
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
270
|
+
} & {
|
|
271
|
+
attachment_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
272
|
+
downloaded_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>>>;
|
|
273
|
+
processing_status: z.ZodDefault<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>>;
|
|
274
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
275
|
+
} & {
|
|
276
|
+
send_email_notification: z.ZodDefault<z.ZodBoolean>;
|
|
277
|
+
} & {
|
|
278
|
+
properties: z.ZodObject<{
|
|
279
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
280
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
281
|
+
analysis_expected_apex_validation_interval_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
282
|
+
analysis_simple_three_vehicle_events_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
283
|
+
analysis_transaction_sequentiality_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
284
|
+
driver_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
285
|
+
end_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
286
|
+
operational_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ended", "missed", "running", "scheduled"]>>, "many">>;
|
|
287
|
+
search: z.ZodOptional<z.ZodString>;
|
|
288
|
+
start_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
289
|
+
start_time_scheduled_end: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
290
|
+
start_time_scheduled_start: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
291
|
+
vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
292
|
+
}, "strip", z.ZodTypeAny, {
|
|
293
|
+
agency_ids: string[];
|
|
294
|
+
start_time_scheduled_end: number & {
|
|
295
|
+
__brand: "UnixMilliseconds";
|
|
296
|
+
};
|
|
297
|
+
start_time_scheduled_start: number & {
|
|
298
|
+
__brand: "UnixMilliseconds";
|
|
299
|
+
};
|
|
300
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
301
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
302
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
303
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
304
|
+
driver_ids?: string[] | undefined;
|
|
305
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
306
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
307
|
+
search?: string | undefined;
|
|
308
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
309
|
+
vehicle_ids?: string[] | undefined;
|
|
310
|
+
}, {
|
|
311
|
+
start_time_scheduled_end: string | number;
|
|
312
|
+
start_time_scheduled_start: string | number;
|
|
313
|
+
agency_ids?: string[] | undefined;
|
|
314
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
315
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
316
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
317
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
318
|
+
driver_ids?: string[] | undefined;
|
|
319
|
+
end_delay_statuses?: string[] | undefined;
|
|
320
|
+
operational_statuses?: string[] | undefined;
|
|
321
|
+
search?: string | undefined;
|
|
322
|
+
start_delay_statuses?: string[] | undefined;
|
|
323
|
+
vehicle_ids?: string[] | undefined;
|
|
324
|
+
}>;
|
|
325
|
+
version: z.ZodLiteral<"operation-rides-v2">;
|
|
326
|
+
}, "strip", z.ZodTypeAny, {
|
|
327
|
+
send_email_notification: boolean;
|
|
328
|
+
properties: {
|
|
329
|
+
agency_ids: string[];
|
|
330
|
+
start_time_scheduled_end: number & {
|
|
331
|
+
__brand: "UnixMilliseconds";
|
|
332
|
+
};
|
|
333
|
+
start_time_scheduled_start: number & {
|
|
334
|
+
__brand: "UnixMilliseconds";
|
|
335
|
+
};
|
|
336
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
337
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
338
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
339
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
340
|
+
driver_ids?: string[] | undefined;
|
|
341
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
342
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
343
|
+
search?: string | undefined;
|
|
344
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
345
|
+
vehicle_ids?: string[] | undefined;
|
|
346
|
+
};
|
|
347
|
+
version: "operation-rides-v2";
|
|
348
|
+
attachment_id: string | null;
|
|
349
|
+
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
350
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
351
|
+
retries: number;
|
|
352
|
+
_id: string;
|
|
353
|
+
created_at: number & {
|
|
354
|
+
__brand: "UnixMilliseconds";
|
|
355
|
+
};
|
|
356
|
+
created_by: string;
|
|
357
|
+
is_locked: boolean;
|
|
358
|
+
updated_at: number & {
|
|
359
|
+
__brand: "UnixMilliseconds";
|
|
360
|
+
};
|
|
361
|
+
updated_by?: string | undefined;
|
|
362
|
+
}, {
|
|
363
|
+
properties: {
|
|
364
|
+
start_time_scheduled_end: string | number;
|
|
365
|
+
start_time_scheduled_start: string | number;
|
|
366
|
+
agency_ids?: string[] | undefined;
|
|
367
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
368
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
369
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
370
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
371
|
+
driver_ids?: string[] | undefined;
|
|
372
|
+
end_delay_statuses?: string[] | undefined;
|
|
373
|
+
operational_statuses?: string[] | undefined;
|
|
374
|
+
search?: string | undefined;
|
|
375
|
+
start_delay_statuses?: string[] | undefined;
|
|
376
|
+
vehicle_ids?: string[] | undefined;
|
|
377
|
+
};
|
|
378
|
+
version: "operation-rides-v2";
|
|
379
|
+
_id: string;
|
|
380
|
+
created_at: string | number;
|
|
381
|
+
created_by: string;
|
|
382
|
+
updated_at: string | number;
|
|
383
|
+
send_email_notification?: boolean | undefined;
|
|
384
|
+
attachment_id?: string | null | undefined;
|
|
385
|
+
downloaded_at?: string | number | null | undefined;
|
|
386
|
+
processing_status?: string | undefined;
|
|
387
|
+
retries?: number | undefined;
|
|
388
|
+
is_locked?: boolean | undefined;
|
|
389
|
+
updated_by?: string | undefined;
|
|
263
390
|
}>]>;
|
|
264
391
|
export type Extraction = z.infer<typeof ExtractionSchema>;
|
package/dist/extraction.js
CHANGED
|
@@ -3,9 +3,11 @@ import { z } from 'zod';
|
|
|
3
3
|
import { InfrastructureStopsV1ExtractionSchema } from './modules/infrastructure/stops/v1/extraction.js';
|
|
4
4
|
import { OfferGtfsV29ExtractionSchema } from './modules/offer/gtfs/v29/extraction.js';
|
|
5
5
|
import { OperationRidesV1ExtractionSchema } from './modules/operation/rides/v1/extraction.js';
|
|
6
|
+
import { OperationRidesV2ExtractionSchema } from './modules/operation/rides/v2/extraction.js';
|
|
6
7
|
/* * */
|
|
7
8
|
export const ExtractionSchema = z.discriminatedUnion('version', [
|
|
8
9
|
InfrastructureStopsV1ExtractionSchema,
|
|
9
10
|
OfferGtfsV29ExtractionSchema,
|
|
10
11
|
OperationRidesV1ExtractionSchema,
|
|
12
|
+
OperationRidesV2ExtractionSchema,
|
|
11
13
|
]);
|
|
@@ -30,7 +30,7 @@ export declare const InfrastructureStopsV1ExtractionSchema: z.ZodObject<{
|
|
|
30
30
|
version: "infrastructure-stops-v1";
|
|
31
31
|
attachment_id: string | null;
|
|
32
32
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
33
|
-
processing_status: "
|
|
33
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
34
34
|
retries: number;
|
|
35
35
|
_id: string;
|
|
36
36
|
created_at: number & {
|
|
@@ -86,7 +86,7 @@ export declare const OfferGtfsV29ExtractionSchema: z.ZodObject<{
|
|
|
86
86
|
version: "offer-gtfs-v29";
|
|
87
87
|
attachment_id: string | null;
|
|
88
88
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
89
|
-
processing_status: "
|
|
89
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
90
90
|
retries: number;
|
|
91
91
|
_id: string;
|
|
92
92
|
created_at: number & {
|
|
@@ -46,7 +46,7 @@ export declare const OperationRidesV1ExtractionSchema: z.ZodObject<{
|
|
|
46
46
|
version: "operation-rides-v1";
|
|
47
47
|
attachment_id: string | null;
|
|
48
48
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
49
|
-
processing_status: "
|
|
49
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
50
50
|
retries: number;
|
|
51
51
|
_id: string;
|
|
52
52
|
created_at: number & {
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OperationRidesV2ExtractionCreateSchema: z.ZodObject<{
|
|
3
|
+
send_email_notification: z.ZodDefault<z.ZodBoolean>;
|
|
4
|
+
} & {
|
|
5
|
+
properties: z.ZodObject<{
|
|
6
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
8
|
+
analysis_expected_apex_validation_interval_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
9
|
+
analysis_simple_three_vehicle_events_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
10
|
+
analysis_transaction_sequentiality_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
11
|
+
driver_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
end_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
13
|
+
operational_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ended", "missed", "running", "scheduled"]>>, "many">>;
|
|
14
|
+
search: z.ZodOptional<z.ZodString>;
|
|
15
|
+
start_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
16
|
+
start_time_scheduled_end: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
17
|
+
start_time_scheduled_start: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
18
|
+
vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
agency_ids: string[];
|
|
21
|
+
start_time_scheduled_end: number & {
|
|
22
|
+
__brand: "UnixMilliseconds";
|
|
23
|
+
};
|
|
24
|
+
start_time_scheduled_start: number & {
|
|
25
|
+
__brand: "UnixMilliseconds";
|
|
26
|
+
};
|
|
27
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
28
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
29
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
30
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
31
|
+
driver_ids?: string[] | undefined;
|
|
32
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
33
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
34
|
+
search?: string | undefined;
|
|
35
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
36
|
+
vehicle_ids?: string[] | undefined;
|
|
37
|
+
}, {
|
|
38
|
+
start_time_scheduled_end: string | number;
|
|
39
|
+
start_time_scheduled_start: string | number;
|
|
40
|
+
agency_ids?: string[] | undefined;
|
|
41
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
42
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
43
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
44
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
45
|
+
driver_ids?: string[] | undefined;
|
|
46
|
+
end_delay_statuses?: string[] | undefined;
|
|
47
|
+
operational_statuses?: string[] | undefined;
|
|
48
|
+
search?: string | undefined;
|
|
49
|
+
start_delay_statuses?: string[] | undefined;
|
|
50
|
+
vehicle_ids?: string[] | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
version: z.ZodLiteral<"operation-rides-v2">;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
send_email_notification: boolean;
|
|
55
|
+
properties: {
|
|
56
|
+
agency_ids: string[];
|
|
57
|
+
start_time_scheduled_end: number & {
|
|
58
|
+
__brand: "UnixMilliseconds";
|
|
59
|
+
};
|
|
60
|
+
start_time_scheduled_start: number & {
|
|
61
|
+
__brand: "UnixMilliseconds";
|
|
62
|
+
};
|
|
63
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
64
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
65
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
66
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
67
|
+
driver_ids?: string[] | undefined;
|
|
68
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
69
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
70
|
+
search?: string | undefined;
|
|
71
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
72
|
+
vehicle_ids?: string[] | undefined;
|
|
73
|
+
};
|
|
74
|
+
version: "operation-rides-v2";
|
|
75
|
+
}, {
|
|
76
|
+
properties: {
|
|
77
|
+
start_time_scheduled_end: string | number;
|
|
78
|
+
start_time_scheduled_start: string | number;
|
|
79
|
+
agency_ids?: string[] | undefined;
|
|
80
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
81
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
82
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
83
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
84
|
+
driver_ids?: string[] | undefined;
|
|
85
|
+
end_delay_statuses?: string[] | undefined;
|
|
86
|
+
operational_statuses?: string[] | undefined;
|
|
87
|
+
search?: string | undefined;
|
|
88
|
+
start_delay_statuses?: string[] | undefined;
|
|
89
|
+
vehicle_ids?: string[] | undefined;
|
|
90
|
+
};
|
|
91
|
+
version: "operation-rides-v2";
|
|
92
|
+
send_email_notification?: boolean | undefined;
|
|
93
|
+
}>;
|
|
94
|
+
export type OperationRidesV2ExtractionCreate = z.infer<typeof OperationRidesV2ExtractionCreateSchema>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { ExtractionBaseCreateSchema } from '../../../../shared/base-create.js';
|
|
3
|
+
import { OperationRidesV2ExtractionPropertiesSchema } from './properties.js';
|
|
4
|
+
import { OperationRidesV2ExtractionVersionSchema } from './version.js';
|
|
5
|
+
/* * */
|
|
6
|
+
export const OperationRidesV2ExtractionCreateSchema = ExtractionBaseCreateSchema.extend({
|
|
7
|
+
properties: OperationRidesV2ExtractionPropertiesSchema,
|
|
8
|
+
version: OperationRidesV2ExtractionVersionSchema,
|
|
9
|
+
});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OperationRidesV2ExtractionSchema: z.ZodObject<{
|
|
3
|
+
_id: z.ZodString;
|
|
4
|
+
created_at: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
5
|
+
created_by: z.ZodString;
|
|
6
|
+
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
7
|
+
updated_at: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
8
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
9
|
+
} & {
|
|
10
|
+
attachment_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
downloaded_at: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>>>;
|
|
12
|
+
processing_status: z.ZodDefault<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["waiting", "processing", "complete", "error", "skipped"]>>>;
|
|
13
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
14
|
+
} & {
|
|
15
|
+
send_email_notification: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
} & {
|
|
17
|
+
properties: z.ZodObject<{
|
|
18
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
19
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
20
|
+
analysis_expected_apex_validation_interval_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
21
|
+
analysis_simple_three_vehicle_events_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
22
|
+
analysis_transaction_sequentiality_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
23
|
+
driver_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
+
end_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
25
|
+
operational_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ended", "missed", "running", "scheduled"]>>, "many">>;
|
|
26
|
+
search: z.ZodOptional<z.ZodString>;
|
|
27
|
+
start_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
28
|
+
start_time_scheduled_end: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
29
|
+
start_time_scheduled_start: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
30
|
+
vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
agency_ids: string[];
|
|
33
|
+
start_time_scheduled_end: number & {
|
|
34
|
+
__brand: "UnixMilliseconds";
|
|
35
|
+
};
|
|
36
|
+
start_time_scheduled_start: number & {
|
|
37
|
+
__brand: "UnixMilliseconds";
|
|
38
|
+
};
|
|
39
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
40
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
41
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
42
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
43
|
+
driver_ids?: string[] | undefined;
|
|
44
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
45
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
46
|
+
search?: string | undefined;
|
|
47
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
48
|
+
vehicle_ids?: string[] | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
start_time_scheduled_end: string | number;
|
|
51
|
+
start_time_scheduled_start: string | number;
|
|
52
|
+
agency_ids?: string[] | undefined;
|
|
53
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
54
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
55
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
56
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
57
|
+
driver_ids?: string[] | undefined;
|
|
58
|
+
end_delay_statuses?: string[] | undefined;
|
|
59
|
+
operational_statuses?: string[] | undefined;
|
|
60
|
+
search?: string | undefined;
|
|
61
|
+
start_delay_statuses?: string[] | undefined;
|
|
62
|
+
vehicle_ids?: string[] | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
version: z.ZodLiteral<"operation-rides-v2">;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
send_email_notification: boolean;
|
|
67
|
+
properties: {
|
|
68
|
+
agency_ids: string[];
|
|
69
|
+
start_time_scheduled_end: number & {
|
|
70
|
+
__brand: "UnixMilliseconds";
|
|
71
|
+
};
|
|
72
|
+
start_time_scheduled_start: number & {
|
|
73
|
+
__brand: "UnixMilliseconds";
|
|
74
|
+
};
|
|
75
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
76
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
77
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
78
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
79
|
+
driver_ids?: string[] | undefined;
|
|
80
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
81
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
82
|
+
search?: string | undefined;
|
|
83
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
84
|
+
vehicle_ids?: string[] | undefined;
|
|
85
|
+
};
|
|
86
|
+
version: "operation-rides-v2";
|
|
87
|
+
attachment_id: string | null;
|
|
88
|
+
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
89
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
90
|
+
retries: number;
|
|
91
|
+
_id: string;
|
|
92
|
+
created_at: number & {
|
|
93
|
+
__brand: "UnixMilliseconds";
|
|
94
|
+
};
|
|
95
|
+
created_by: string;
|
|
96
|
+
is_locked: boolean;
|
|
97
|
+
updated_at: number & {
|
|
98
|
+
__brand: "UnixMilliseconds";
|
|
99
|
+
};
|
|
100
|
+
updated_by?: string | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
properties: {
|
|
103
|
+
start_time_scheduled_end: string | number;
|
|
104
|
+
start_time_scheduled_start: string | number;
|
|
105
|
+
agency_ids?: string[] | undefined;
|
|
106
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
107
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
108
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
109
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
110
|
+
driver_ids?: string[] | undefined;
|
|
111
|
+
end_delay_statuses?: string[] | undefined;
|
|
112
|
+
operational_statuses?: string[] | undefined;
|
|
113
|
+
search?: string | undefined;
|
|
114
|
+
start_delay_statuses?: string[] | undefined;
|
|
115
|
+
vehicle_ids?: string[] | undefined;
|
|
116
|
+
};
|
|
117
|
+
version: "operation-rides-v2";
|
|
118
|
+
_id: string;
|
|
119
|
+
created_at: string | number;
|
|
120
|
+
created_by: string;
|
|
121
|
+
updated_at: string | number;
|
|
122
|
+
send_email_notification?: boolean | undefined;
|
|
123
|
+
attachment_id?: string | null | undefined;
|
|
124
|
+
downloaded_at?: string | number | null | undefined;
|
|
125
|
+
processing_status?: string | undefined;
|
|
126
|
+
retries?: number | undefined;
|
|
127
|
+
is_locked?: boolean | undefined;
|
|
128
|
+
updated_by?: string | undefined;
|
|
129
|
+
}>;
|
|
130
|
+
export type OperationRidesV2Extraction = z.infer<typeof OperationRidesV2ExtractionSchema>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { ExtractionBaseSchema } from '../../../../shared/base.js';
|
|
3
|
+
import { OperationRidesV2ExtractionCreateSchema } from './create.js';
|
|
4
|
+
/* * */
|
|
5
|
+
export const OperationRidesV2ExtractionSchema = ExtractionBaseSchema
|
|
6
|
+
.merge(OperationRidesV2ExtractionCreateSchema);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The properties of a v2 Rides extraction.
|
|
4
|
+
* They mirror the filters of the Rides list, so that whatever is visible
|
|
5
|
+
* on screen can be extracted with the exact same criteria.
|
|
6
|
+
*/
|
|
7
|
+
export declare const OperationRidesV2ExtractionPropertiesSchema: z.ZodObject<{
|
|
8
|
+
agency_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
9
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
10
|
+
analysis_expected_apex_validation_interval_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
11
|
+
analysis_simple_three_vehicle_events_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
12
|
+
analysis_transaction_sequentiality_grades: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["skip", "pass", "fail", "error", "none"]>>, "many">>;
|
|
13
|
+
driver_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
14
|
+
end_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
15
|
+
operational_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ended", "missed", "running", "scheduled"]>>, "many">>;
|
|
16
|
+
search: z.ZodOptional<z.ZodString>;
|
|
17
|
+
start_delay_statuses: z.ZodOptional<z.ZodArray<z.ZodPipeline<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["ontime", "delayed", "early", "none"]>>, "many">>;
|
|
18
|
+
start_time_scheduled_end: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
19
|
+
start_time_scheduled_start: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, import("@tmlmobilidade/go-types-shared").UnixMilliseconds, string | number>;
|
|
20
|
+
vehicle_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
agency_ids: string[];
|
|
23
|
+
start_time_scheduled_end: number & {
|
|
24
|
+
__brand: "UnixMilliseconds";
|
|
25
|
+
};
|
|
26
|
+
start_time_scheduled_start: number & {
|
|
27
|
+
__brand: "UnixMilliseconds";
|
|
28
|
+
};
|
|
29
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
30
|
+
analysis_expected_apex_validation_interval_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
31
|
+
analysis_simple_three_vehicle_events_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
32
|
+
analysis_transaction_sequentiality_grades?: ("skip" | "pass" | "fail" | "error" | "none")[] | undefined;
|
|
33
|
+
driver_ids?: string[] | undefined;
|
|
34
|
+
end_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
35
|
+
operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
|
|
36
|
+
search?: string | undefined;
|
|
37
|
+
start_delay_statuses?: ("none" | "ontime" | "delayed" | "early")[] | undefined;
|
|
38
|
+
vehicle_ids?: string[] | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
start_time_scheduled_end: string | number;
|
|
41
|
+
start_time_scheduled_start: string | number;
|
|
42
|
+
agency_ids?: string[] | undefined;
|
|
43
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades?: string[] | undefined;
|
|
44
|
+
analysis_expected_apex_validation_interval_grades?: string[] | undefined;
|
|
45
|
+
analysis_simple_three_vehicle_events_grades?: string[] | undefined;
|
|
46
|
+
analysis_transaction_sequentiality_grades?: string[] | undefined;
|
|
47
|
+
driver_ids?: string[] | undefined;
|
|
48
|
+
end_delay_statuses?: string[] | undefined;
|
|
49
|
+
operational_statuses?: string[] | undefined;
|
|
50
|
+
search?: string | undefined;
|
|
51
|
+
start_delay_statuses?: string[] | undefined;
|
|
52
|
+
vehicle_ids?: string[] | undefined;
|
|
53
|
+
}>;
|
|
54
|
+
export type OperationRidesV2ExtractionProperties = z.infer<typeof OperationRidesV2ExtractionPropertiesSchema>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* * */
|
|
2
|
+
import { DelayStatusFilterSchema, GradeStatusFilterSchema, OperationalStatusSchema, UnixMillisecondsSchema } from '@tmlmobilidade/go-types-shared';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
/* * */
|
|
5
|
+
/**
|
|
6
|
+
* The properties of a v2 Rides extraction.
|
|
7
|
+
* They mirror the filters of the Rides list, so that whatever is visible
|
|
8
|
+
* on screen can be extracted with the exact same criteria.
|
|
9
|
+
*/
|
|
10
|
+
export const OperationRidesV2ExtractionPropertiesSchema = z.object({
|
|
11
|
+
agency_ids: z
|
|
12
|
+
.array(z.string())
|
|
13
|
+
.default([]),
|
|
14
|
+
analysis_at_least_one_vehicle_event_on_last_stop_grades: z
|
|
15
|
+
.array(GradeStatusFilterSchema)
|
|
16
|
+
.optional(),
|
|
17
|
+
analysis_expected_apex_validation_interval_grades: z
|
|
18
|
+
.array(GradeStatusFilterSchema)
|
|
19
|
+
.optional(),
|
|
20
|
+
analysis_simple_three_vehicle_events_grades: z
|
|
21
|
+
.array(GradeStatusFilterSchema)
|
|
22
|
+
.optional(),
|
|
23
|
+
analysis_transaction_sequentiality_grades: z
|
|
24
|
+
.array(GradeStatusFilterSchema)
|
|
25
|
+
.optional(),
|
|
26
|
+
driver_ids: z
|
|
27
|
+
.array(z.string())
|
|
28
|
+
.optional(),
|
|
29
|
+
end_delay_statuses: z
|
|
30
|
+
.array(DelayStatusFilterSchema)
|
|
31
|
+
.optional(),
|
|
32
|
+
operational_statuses: z
|
|
33
|
+
.array(OperationalStatusSchema)
|
|
34
|
+
.optional(),
|
|
35
|
+
search: z
|
|
36
|
+
.string()
|
|
37
|
+
.optional(),
|
|
38
|
+
start_delay_statuses: z
|
|
39
|
+
.array(DelayStatusFilterSchema)
|
|
40
|
+
.optional(),
|
|
41
|
+
start_time_scheduled_end: UnixMillisecondsSchema,
|
|
42
|
+
start_time_scheduled_start: UnixMillisecondsSchema,
|
|
43
|
+
vehicle_ids: z
|
|
44
|
+
.array(z.string())
|
|
45
|
+
.optional(),
|
|
46
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OperationRidesV2ExtractionVersionValue = "operation-rides-v2";
|
|
3
|
+
export declare const OperationRidesV2ExtractionVersionSchema: z.ZodLiteral<"operation-rides-v2">;
|
|
4
|
+
export type OperationRidesV2ExtractionVersion = z.infer<typeof OperationRidesV2ExtractionVersionSchema>;
|
package/dist/shared/base.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const ExtractionBaseSchema: z.ZodObject<{
|
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
15
|
attachment_id: string | null;
|
|
16
16
|
downloaded_at: import("@tmlmobilidade/go-types-shared").UnixMilliseconds | null;
|
|
17
|
-
processing_status: "
|
|
17
|
+
processing_status: "error" | "waiting" | "processing" | "complete" | "skipped";
|
|
18
18
|
retries: number;
|
|
19
19
|
_id: string;
|
|
20
20
|
created_at: number & {
|
package/dist/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const ExtractionVersionValues: readonly ["infrastructure-stops-v1", "offer-gtfs-v29", "operation-rides-v1"];
|
|
3
|
-
export declare const ExtractionVersionSchema: z.ZodEnum<["infrastructure-stops-v1", "offer-gtfs-v29", "operation-rides-v1"]>;
|
|
2
|
+
export declare const ExtractionVersionValues: readonly ["infrastructure-stops-v1", "offer-gtfs-v29", "operation-rides-v1", "operation-rides-v2"];
|
|
3
|
+
export declare const ExtractionVersionSchema: z.ZodEnum<["infrastructure-stops-v1", "offer-gtfs-v29", "operation-rides-v1", "operation-rides-v2"]>;
|
|
4
4
|
export type ExtractionVersion = z.infer<typeof ExtractionVersionSchema>;
|
package/dist/version.js
CHANGED
|
@@ -3,10 +3,12 @@ import { z } from 'zod';
|
|
|
3
3
|
import { InfrastructureStopsV1ExtractionVersionValue } from './modules/infrastructure/stops/v1/version.js';
|
|
4
4
|
import { OfferGtfsV29ExtractionVersionValue } from './modules/offer/gtfs/v29/version.js';
|
|
5
5
|
import { OperationRidesV1ExtractionVersionValue } from './modules/operation/rides/v1/version.js';
|
|
6
|
+
import { OperationRidesV2ExtractionVersionValue } from './modules/operation/rides/v2/version.js';
|
|
6
7
|
/* * */
|
|
7
8
|
export const ExtractionVersionValues = [
|
|
8
9
|
InfrastructureStopsV1ExtractionVersionValue,
|
|
9
10
|
OfferGtfsV29ExtractionVersionValue,
|
|
10
11
|
OperationRidesV1ExtractionVersionValue,
|
|
12
|
+
OperationRidesV2ExtractionVersionValue,
|
|
11
13
|
];
|
|
12
14
|
export const ExtractionVersionSchema = z.enum(ExtractionVersionValues);
|