@tmlmobilidade/types 20260121.2332.6 → 20260128.2248.28

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.
Files changed (150) hide show
  1. package/dist/_common/comment.d.ts +24 -24
  2. package/dist/_common/document.d.ts +3 -3
  3. package/dist/_common/document.js +1 -1
  4. package/dist/_common/status.d.ts +2 -2
  5. package/dist/_common/status.js +1 -1
  6. package/dist/_common/unix-timestamp.js +1 -0
  7. package/dist/agency.d.ts +6 -6
  8. package/dist/alerts/alert.d.ts +262 -0
  9. package/dist/alerts/alert.js +34 -0
  10. package/dist/alerts/cause-effect-map.d.ts +106 -0
  11. package/dist/alerts/cause-effect-map.js +94 -0
  12. package/dist/alerts/cause.d.ts +17 -0
  13. package/dist/alerts/cause.js +45 -0
  14. package/dist/alerts/effect.d.ts +17 -0
  15. package/dist/alerts/effect.js +35 -0
  16. package/dist/alerts/index.d.ts +6 -0
  17. package/dist/alerts/index.js +6 -0
  18. package/dist/alerts/query.d.ts +9 -0
  19. package/dist/alerts/query.js +6 -0
  20. package/dist/alerts/reference-type.d.ts +4 -0
  21. package/dist/alerts/reference-type.js +10 -0
  22. package/dist/apex/simplified-apex-location.d.ts +2 -12
  23. package/dist/apex/simplified-apex-location.js +1 -1
  24. package/dist/apex/simplified-apex-on-board-refund.d.ts +2 -12
  25. package/dist/apex/simplified-apex-on-board-refund.js +1 -1
  26. package/dist/apex/simplified-apex-on-board-sale.d.ts +12 -19
  27. package/dist/apex/simplified-apex-on-board-sale.js +2 -2
  28. package/dist/apex/simplified-apex-validation.d.ts +6 -16
  29. package/dist/apex/simplified-apex-validation.js +1 -1
  30. package/dist/auth/role.d.ts +718 -130
  31. package/dist/auth/session.d.ts +6 -6
  32. package/dist/auth/user.d.ts +1182 -270
  33. package/dist/auth/verification-token.d.ts +4 -4
  34. package/dist/calendar/event.d.ts +43 -0
  35. package/dist/calendar/event.js +16 -0
  36. package/dist/calendar/index.d.ts +1 -0
  37. package/dist/calendar/index.js +2 -0
  38. package/dist/dates/annotation.d.ts +6 -6
  39. package/dist/dates/date.d.ts +32 -0
  40. package/dist/dates/date.js +18 -0
  41. package/dist/dates/index.d.ts +2 -0
  42. package/dist/dates/index.js +2 -0
  43. package/dist/dates/period.d.ts +94 -0
  44. package/dist/dates/period.js +14 -0
  45. package/dist/file-exports/base.d.ts +9 -9
  46. package/dist/file-exports/file-exports.d.ts +7 -7
  47. package/dist/file-exports/ride-export.d.ts +14 -14
  48. package/dist/file-exports/ride-export.js +2 -2
  49. package/dist/gtfs/cause.d.ts +10 -0
  50. package/dist/gtfs/cause.js +18 -0
  51. package/dist/gtfs/effect.d.ts +10 -0
  52. package/dist/gtfs/effect.js +17 -0
  53. package/dist/gtfs/index.d.ts +2 -1
  54. package/dist/gtfs/index.js +2 -1
  55. package/dist/index.d.ts +5 -2
  56. package/dist/index.js +5 -2
  57. package/dist/locations/queries.d.ts +2 -2
  58. package/dist/metrics/demand/demand_by_agency.d.ts +8 -8
  59. package/dist/metrics/demand/demand_by_category.d.ts +12 -12
  60. package/dist/metrics/demand/demand_by_line.d.ts +4 -4
  61. package/dist/metrics/demand/demand_by_pattern.d.ts +8 -8
  62. package/dist/metrics/demand/demand_by_product.d.ts +12 -12
  63. package/dist/metrics/index.d.ts +93 -48
  64. package/dist/metrics/index.js +4 -1
  65. package/dist/metrics/passenger-impact/index.d.ts +1 -0
  66. package/dist/metrics/passenger-impact/index.js +1 -0
  67. package/dist/metrics/passenger-impact/passenger-impact.d.ts +97 -0
  68. package/dist/metrics/passenger-impact/passenger-impact.js +22 -0
  69. package/dist/metrics/supply/supply_by_agency.d.ts +4 -4
  70. package/dist/notification.d.ts +18 -18
  71. package/dist/offer/index.d.ts +5 -0
  72. package/dist/offer/index.js +5 -0
  73. package/dist/offer/line.d.ts +296 -0
  74. package/dist/offer/line.js +60 -0
  75. package/dist/offer/pattern.d.ts +3608 -0
  76. package/dist/offer/pattern.js +75 -0
  77. package/dist/offer/route.d.ts +187 -0
  78. package/dist/offer/route.js +33 -0
  79. package/dist/offer/scheduleRule.d.ts +80 -0
  80. package/dist/offer/scheduleRule.js +50 -0
  81. package/dist/offer/typology.d.ts +124 -0
  82. package/dist/offer/typology.js +30 -0
  83. package/dist/organization.d.ts +20 -20
  84. package/dist/permissions/alerts.d.ts +13 -19
  85. package/dist/permissions/alerts.js +8 -13
  86. package/dist/permissions/annotations.d.ts +25 -0
  87. package/dist/permissions/annotations.js +16 -0
  88. package/dist/permissions/fares.d.ts +25 -0
  89. package/dist/permissions/fares.js +16 -0
  90. package/dist/permissions/index.d.ts +196 -21
  91. package/dist/permissions/index.js +142 -6
  92. package/dist/permissions/lines.d.ts +25 -0
  93. package/dist/permissions/lines.js +16 -0
  94. package/dist/permissions/periods.d.ts +25 -0
  95. package/dist/permissions/periods.js +16 -0
  96. package/dist/permissions/typologies.d.ts +25 -0
  97. package/dist/permissions/typologies.js +16 -0
  98. package/dist/permissions/vehicles.d.ts +25 -0
  99. package/dist/permissions/vehicles.js +16 -0
  100. package/dist/permissions/zones.d.ts +25 -0
  101. package/dist/permissions/zones.js +16 -0
  102. package/dist/plans/gtfs-validation.d.ts +30 -30
  103. package/dist/plans/plan.d.ts +6 -6
  104. package/dist/proposed-change.d.ts +12 -12
  105. package/dist/rides/batch-query.d.ts +52 -0
  106. package/dist/rides/batch-query.js +54 -0
  107. package/dist/rides/index.d.ts +1 -0
  108. package/dist/rides/index.js +1 -0
  109. package/dist/rides/ride-acceptance.d.ts +105 -105
  110. package/dist/rides/ride-acceptance.js +2 -2
  111. package/dist/rides/ride-audit.d.ts +21 -21
  112. package/dist/rides/ride-normalized.d.ts +808 -21
  113. package/dist/rides/ride-normalized.js +31 -1
  114. package/dist/rides/ride.d.ts +6 -6
  115. package/dist/sams/sam.d.ts +0 -15
  116. package/dist/sams/sam.js +2 -2
  117. package/dist/stops/connections.d.ts +1 -0
  118. package/dist/stops/connections.js +1 -1
  119. package/dist/stops/equipment.d.ts +1 -0
  120. package/dist/stops/equipment.js +1 -1
  121. package/dist/stops/parent-station.d.ts +6 -6
  122. package/dist/stops/stop-area.d.ts +6 -6
  123. package/dist/stops/stop.d.ts +69 -69
  124. package/dist/ticketing/fare.d.ts +137 -0
  125. package/dist/ticketing/fare.js +44 -0
  126. package/dist/ticketing/index.d.ts +2 -0
  127. package/dist/ticketing/index.js +2 -0
  128. package/dist/ticketing/zone.d.ts +220 -0
  129. package/dist/ticketing/zone.js +34 -0
  130. package/dist/vehicle/emission.d.ts +3 -0
  131. package/dist/vehicle/emission.js +12 -0
  132. package/dist/vehicle/index.d.ts +4 -0
  133. package/dist/vehicle/index.js +4 -0
  134. package/dist/vehicle/propulsion.d.ts +3 -0
  135. package/dist/vehicle/propulsion.js +14 -0
  136. package/dist/vehicle/vehicle.d.ts +189 -0
  137. package/dist/vehicle/vehicle.js +27 -0
  138. package/dist/vehicle/wheelchair.d.ts +3 -0
  139. package/dist/vehicle/wheelchair.js +10 -0
  140. package/dist/vehicle-events/clickhouse-vehicle-event.d.ts +2 -6
  141. package/dist/vehicle-events/simplified-vehicle-event.d.ts +2 -6
  142. package/dist/vehicle-events/simplified-vehicle-event.js +1 -1
  143. package/dist/zone.d.ts +6 -6
  144. package/package.json +2 -2
  145. package/dist/alert.d.ts +0 -265
  146. package/dist/alert.js +0 -42
  147. package/dist/gtfs/cause-effetcs.d.ts +0 -86
  148. package/dist/gtfs/cause-effetcs.js +0 -31
  149. package/dist/permissions/dates.d.ts +0 -25
  150. package/dist/permissions/dates.js +0 -16
@@ -15,14 +15,14 @@ export declare const GTFSValidatorMessageSchema: z.ZodObject<{
15
15
  validation_id: string;
16
16
  file_name: string;
17
17
  rows: number[];
18
- severity: "error" | "warning" | "ignore" | "forbidden";
18
+ severity: "error" | "ignore" | "warning" | "forbidden";
19
19
  }, {
20
20
  message: string;
21
21
  field: string;
22
22
  validation_id: string;
23
23
  file_name: string;
24
24
  rows: number[];
25
- severity: "error" | "warning" | "ignore" | "forbidden";
25
+ severity: "error" | "ignore" | "warning" | "forbidden";
26
26
  }>;
27
27
  export declare const GTFSValidatorSummarySchema: z.ZodObject<{
28
28
  messages: z.ZodArray<z.ZodObject<{
@@ -38,14 +38,14 @@ export declare const GTFSValidatorSummarySchema: z.ZodObject<{
38
38
  validation_id: string;
39
39
  file_name: string;
40
40
  rows: number[];
41
- severity: "error" | "warning" | "ignore" | "forbidden";
41
+ severity: "error" | "ignore" | "warning" | "forbidden";
42
42
  }, {
43
43
  message: string;
44
44
  field: string;
45
45
  validation_id: string;
46
46
  file_name: string;
47
47
  rows: number[];
48
- severity: "error" | "warning" | "ignore" | "forbidden";
48
+ severity: "error" | "ignore" | "warning" | "forbidden";
49
49
  }>, "many">;
50
50
  total_errors: z.ZodNumber;
51
51
  total_warnings: z.ZodNumber;
@@ -56,7 +56,7 @@ export declare const GTFSValidatorSummarySchema: z.ZodObject<{
56
56
  validation_id: string;
57
57
  file_name: string;
58
58
  rows: number[];
59
- severity: "error" | "warning" | "ignore" | "forbidden";
59
+ severity: "error" | "ignore" | "warning" | "forbidden";
60
60
  }[];
61
61
  total_errors: number;
62
62
  total_warnings: number;
@@ -67,7 +67,7 @@ export declare const GTFSValidatorSummarySchema: z.ZodObject<{
67
67
  validation_id: string;
68
68
  file_name: string;
69
69
  rows: number[];
70
- severity: "error" | "warning" | "ignore" | "forbidden";
70
+ severity: "error" | "ignore" | "warning" | "forbidden";
71
71
  }[];
72
72
  total_errors: number;
73
73
  total_warnings: number;
@@ -77,7 +77,7 @@ export type GTFSValidatorMessage = z.infer<typeof GTFSValidatorMessageSchema>;
77
77
  export declare const GtfsValidationSchema: z.ZodObject<{
78
78
  _id: z.ZodString;
79
79
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
80
- created_by: z.ZodOptional<z.ZodString>;
80
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
81
81
  is_locked: z.ZodDefault<z.ZodBoolean>;
82
82
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
83
83
  updated_by: z.ZodOptional<z.ZodString>;
@@ -158,14 +158,14 @@ export declare const GtfsValidationSchema: z.ZodObject<{
158
158
  validation_id: string;
159
159
  file_name: string;
160
160
  rows: number[];
161
- severity: "error" | "warning" | "ignore" | "forbidden";
161
+ severity: "error" | "ignore" | "warning" | "forbidden";
162
162
  }, {
163
163
  message: string;
164
164
  field: string;
165
165
  validation_id: string;
166
166
  file_name: string;
167
167
  rows: number[];
168
- severity: "error" | "warning" | "ignore" | "forbidden";
168
+ severity: "error" | "ignore" | "warning" | "forbidden";
169
169
  }>, "many">;
170
170
  total_errors: z.ZodNumber;
171
171
  total_warnings: z.ZodNumber;
@@ -176,7 +176,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
176
176
  validation_id: string;
177
177
  file_name: string;
178
178
  rows: number[];
179
- severity: "error" | "warning" | "ignore" | "forbidden";
179
+ severity: "error" | "ignore" | "warning" | "forbidden";
180
180
  }[];
181
181
  total_errors: number;
182
182
  total_warnings: number;
@@ -187,7 +187,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
187
187
  validation_id: string;
188
188
  file_name: string;
189
189
  rows: number[];
190
- severity: "error" | "warning" | "ignore" | "forbidden";
190
+ severity: "error" | "ignore" | "warning" | "forbidden";
191
191
  }[];
192
192
  total_errors: number;
193
193
  total_warnings: number;
@@ -197,6 +197,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
197
197
  created_at: number & {
198
198
  __brand: "UnixTimestamp";
199
199
  };
200
+ created_by: string | null;
200
201
  is_locked: boolean;
201
202
  updated_at: number & {
202
203
  __brand: "UnixTimestamp";
@@ -225,7 +226,6 @@ export declare const GtfsValidationSchema: z.ZodObject<{
225
226
  feed_version?: string | null | undefined;
226
227
  };
227
228
  notification_sent: boolean;
228
- created_by?: string | undefined;
229
229
  updated_by?: string | undefined;
230
230
  summary?: {
231
231
  messages: {
@@ -234,7 +234,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
234
234
  validation_id: string;
235
235
  file_name: string;
236
236
  rows: number[];
237
- severity: "error" | "warning" | "ignore" | "forbidden";
237
+ severity: "error" | "ignore" | "warning" | "forbidden";
238
238
  }[];
239
239
  total_errors: number;
240
240
  total_warnings: number;
@@ -266,7 +266,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
266
266
  feed_start_date?: string | null | undefined;
267
267
  feed_version?: string | null | undefined;
268
268
  };
269
- created_by?: string | undefined;
269
+ created_by?: string | null | undefined;
270
270
  is_locked?: boolean | undefined;
271
271
  updated_by?: string | undefined;
272
272
  notification_sent?: boolean | undefined;
@@ -277,7 +277,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
277
277
  validation_id: string;
278
278
  file_name: string;
279
279
  rows: number[];
280
- severity: "error" | "warning" | "ignore" | "forbidden";
280
+ severity: "error" | "ignore" | "warning" | "forbidden";
281
281
  }[];
282
282
  total_errors: number;
283
283
  total_warnings: number;
@@ -286,7 +286,7 @@ export declare const GtfsValidationSchema: z.ZodObject<{
286
286
  export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
287
287
  _id: z.ZodString;
288
288
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
289
- created_by: z.ZodOptional<z.ZodString>;
289
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
290
290
  is_locked: z.ZodDefault<z.ZodBoolean>;
291
291
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
292
292
  updated_by: z.ZodOptional<z.ZodString>;
@@ -367,14 +367,14 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
367
367
  validation_id: string;
368
368
  file_name: string;
369
369
  rows: number[];
370
- severity: "error" | "warning" | "ignore" | "forbidden";
370
+ severity: "error" | "ignore" | "warning" | "forbidden";
371
371
  }, {
372
372
  message: string;
373
373
  field: string;
374
374
  validation_id: string;
375
375
  file_name: string;
376
376
  rows: number[];
377
- severity: "error" | "warning" | "ignore" | "forbidden";
377
+ severity: "error" | "ignore" | "warning" | "forbidden";
378
378
  }>, "many">;
379
379
  total_errors: z.ZodNumber;
380
380
  total_warnings: z.ZodNumber;
@@ -385,7 +385,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
385
385
  validation_id: string;
386
386
  file_name: string;
387
387
  rows: number[];
388
- severity: "error" | "warning" | "ignore" | "forbidden";
388
+ severity: "error" | "ignore" | "warning" | "forbidden";
389
389
  }[];
390
390
  total_errors: number;
391
391
  total_warnings: number;
@@ -396,12 +396,13 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
396
396
  validation_id: string;
397
397
  file_name: string;
398
398
  rows: number[];
399
- severity: "error" | "warning" | "ignore" | "forbidden";
399
+ severity: "error" | "ignore" | "warning" | "forbidden";
400
400
  }[];
401
401
  total_errors: number;
402
402
  total_warnings: number;
403
403
  }>>>;
404
404
  }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
405
+ created_by: string | null;
405
406
  is_locked: boolean;
406
407
  file_id: string;
407
408
  feeder_status: "waiting" | "processing" | "complete" | "error" | "skipped";
@@ -427,7 +428,6 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
427
428
  feed_version?: string | null | undefined;
428
429
  };
429
430
  notification_sent: boolean;
430
- created_by?: string | undefined;
431
431
  updated_by?: string | undefined;
432
432
  summary?: {
433
433
  messages: {
@@ -436,7 +436,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
436
436
  validation_id: string;
437
437
  file_name: string;
438
438
  rows: number[];
439
- severity: "error" | "warning" | "ignore" | "forbidden";
439
+ severity: "error" | "ignore" | "warning" | "forbidden";
440
440
  }[];
441
441
  total_errors: number;
442
442
  total_warnings: number;
@@ -465,7 +465,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
465
465
  feed_start_date?: string | null | undefined;
466
466
  feed_version?: string | null | undefined;
467
467
  };
468
- created_by?: string | undefined;
468
+ created_by?: string | null | undefined;
469
469
  is_locked?: boolean | undefined;
470
470
  updated_by?: string | undefined;
471
471
  notification_sent?: boolean | undefined;
@@ -476,7 +476,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
476
476
  validation_id: string;
477
477
  file_name: string;
478
478
  rows: number[];
479
- severity: "error" | "warning" | "ignore" | "forbidden";
479
+ severity: "error" | "ignore" | "warning" | "forbidden";
480
480
  }[];
481
481
  total_errors: number;
482
482
  total_warnings: number;
@@ -561,14 +561,14 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
561
561
  validation_id: string;
562
562
  file_name: string;
563
563
  rows: number[];
564
- severity: "error" | "warning" | "ignore" | "forbidden";
564
+ severity: "error" | "ignore" | "warning" | "forbidden";
565
565
  }, {
566
566
  message: string;
567
567
  field: string;
568
568
  validation_id: string;
569
569
  file_name: string;
570
570
  rows: number[];
571
- severity: "error" | "warning" | "ignore" | "forbidden";
571
+ severity: "error" | "ignore" | "warning" | "forbidden";
572
572
  }>, "many">;
573
573
  total_errors: z.ZodNumber;
574
574
  total_warnings: z.ZodNumber;
@@ -579,7 +579,7 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
579
579
  validation_id: string;
580
580
  file_name: string;
581
581
  rows: number[];
582
- severity: "error" | "warning" | "ignore" | "forbidden";
582
+ severity: "error" | "ignore" | "warning" | "forbidden";
583
583
  }[];
584
584
  total_errors: number;
585
585
  total_warnings: number;
@@ -590,7 +590,7 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
590
590
  validation_id: string;
591
591
  file_name: string;
592
592
  rows: number[];
593
- severity: "error" | "warning" | "ignore" | "forbidden";
593
+ severity: "error" | "ignore" | "warning" | "forbidden";
594
594
  }[];
595
595
  total_errors: number;
596
596
  total_warnings: number;
@@ -629,7 +629,7 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
629
629
  validation_id: string;
630
630
  file_name: string;
631
631
  rows: number[];
632
- severity: "error" | "warning" | "ignore" | "forbidden";
632
+ severity: "error" | "ignore" | "warning" | "forbidden";
633
633
  }[];
634
634
  total_errors: number;
635
635
  total_warnings: number;
@@ -668,7 +668,7 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
668
668
  validation_id: string;
669
669
  file_name: string;
670
670
  rows: number[];
671
- severity: "error" | "warning" | "ignore" | "forbidden";
671
+ severity: "error" | "ignore" | "warning" | "forbidden";
672
672
  }[];
673
673
  total_errors: number;
674
674
  total_warnings: number;
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  export declare const PlanSchema: z.ZodObject<{
3
3
  _id: z.ZodString;
4
4
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
5
- created_by: z.ZodOptional<z.ZodString>;
5
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
6
6
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
7
7
  updated_by: z.ZodOptional<z.ZodString>;
8
8
  } & {
@@ -130,6 +130,7 @@ export declare const PlanSchema: z.ZodObject<{
130
130
  created_at: number & {
131
131
  __brand: "UnixTimestamp";
132
132
  };
133
+ created_by: string | null;
133
134
  is_locked: boolean;
134
135
  updated_at: number & {
135
136
  __brand: "UnixTimestamp";
@@ -172,7 +173,6 @@ export declare const PlanSchema: z.ZodObject<{
172
173
  pcgi_legacy: {
173
174
  operation_plan_id: string | null;
174
175
  };
175
- created_by?: string | undefined;
176
176
  updated_by?: string | undefined;
177
177
  }, {
178
178
  _id: string;
@@ -204,7 +204,7 @@ export declare const PlanSchema: z.ZodObject<{
204
204
  pcgi_legacy: {
205
205
  operation_plan_id: string | null;
206
206
  };
207
- created_by?: string | undefined;
207
+ created_by?: string | null | undefined;
208
208
  is_locked?: boolean | undefined;
209
209
  updated_by?: string | undefined;
210
210
  apps?: {
@@ -223,7 +223,7 @@ export declare const PlanSchema: z.ZodObject<{
223
223
  export declare const CreatePlanSchema: z.ZodObject<Omit<{
224
224
  _id: z.ZodString;
225
225
  created_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
226
- created_by: z.ZodOptional<z.ZodString>;
226
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
227
227
  updated_at: z.ZodEffects<z.ZodNumber, import("../index.js").UnixTimestamp, number>;
228
228
  updated_by: z.ZodOptional<z.ZodString>;
229
229
  } & {
@@ -347,6 +347,7 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
347
347
  operation_plan_id: string | null;
348
348
  }>;
349
349
  }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
350
+ created_by: string | null;
350
351
  is_locked: boolean;
351
352
  gtfs_agency: {
352
353
  agency_id: string;
@@ -386,7 +387,6 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
386
387
  pcgi_legacy: {
387
388
  operation_plan_id: string | null;
388
389
  };
389
- created_by?: string | undefined;
390
390
  updated_by?: string | undefined;
391
391
  }, {
392
392
  gtfs_agency: {
@@ -415,7 +415,7 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
415
415
  pcgi_legacy: {
416
416
  operation_plan_id: string | null;
417
417
  };
418
- created_by?: string | undefined;
418
+ created_by?: string | null | undefined;
419
419
  is_locked?: boolean | undefined;
420
420
  updated_by?: string | undefined;
421
421
  apps?: {
@@ -6,7 +6,7 @@ export type Scope = z.infer<typeof ScopeSchema>;
6
6
  export declare const ProposedChangeSchema: z.ZodObject<{
7
7
  _id: z.ZodString;
8
8
  created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
9
- created_by: z.ZodOptional<z.ZodString>;
9
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
10
10
  is_locked: z.ZodDefault<z.ZodBoolean>;
11
11
  updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
12
12
  updated_by: z.ZodOptional<z.ZodString>;
@@ -21,15 +21,15 @@ export declare const ProposedChangeSchema: z.ZodObject<{
21
21
  created_at: number & {
22
22
  __brand: "UnixTimestamp";
23
23
  };
24
+ created_by: string | null;
24
25
  is_locked: boolean;
25
26
  updated_at: number & {
26
27
  __brand: "UnixTimestamp";
27
28
  };
28
29
  status: "none" | "pending" | "approved" | "rejected";
29
- scope: "stop" | "lines";
30
+ scope: "lines" | "stop";
30
31
  field: string;
31
32
  related_id: string;
32
- created_by?: string | undefined;
33
33
  updated_by?: string | undefined;
34
34
  curr_value?: any;
35
35
  }, {
@@ -37,10 +37,10 @@ export declare const ProposedChangeSchema: z.ZodObject<{
37
37
  created_at: number;
38
38
  updated_at: number;
39
39
  status: "none" | "pending" | "approved" | "rejected";
40
- scope: "stop" | "lines";
40
+ scope: "lines" | "stop";
41
41
  field: string;
42
42
  related_id: string;
43
- created_by?: string | undefined;
43
+ created_by?: string | null | undefined;
44
44
  is_locked?: boolean | undefined;
45
45
  updated_by?: string | undefined;
46
46
  curr_value?: any;
@@ -62,7 +62,7 @@ export type ProposedChange<T> = {
62
62
  export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
63
63
  _id: z.ZodString;
64
64
  created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
65
- created_by: z.ZodOptional<z.ZodString>;
65
+ created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
66
66
  is_locked: z.ZodDefault<z.ZodBoolean>;
67
67
  updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
68
68
  updated_by: z.ZodOptional<z.ZodString>;
@@ -73,20 +73,20 @@ export declare const CreateProposedChangeSchema: z.ZodObject<Omit<{
73
73
  scope: z.ZodEnum<["stop", "lines"]>;
74
74
  status: z.ZodEnum<["pending", "approved", "rejected", "none"]>;
75
75
  }, "_id" | "created_at" | "updated_at">, "strip", z.ZodTypeAny, {
76
+ created_by: string | null;
76
77
  is_locked: boolean;
77
78
  status: "none" | "pending" | "approved" | "rejected";
78
- scope: "stop" | "lines";
79
+ scope: "lines" | "stop";
79
80
  field: string;
80
81
  related_id: string;
81
- created_by?: string | undefined;
82
82
  updated_by?: string | undefined;
83
83
  curr_value?: any;
84
84
  }, {
85
85
  status: "none" | "pending" | "approved" | "rejected";
86
- scope: "stop" | "lines";
86
+ scope: "lines" | "stop";
87
87
  field: string;
88
88
  related_id: string;
89
- created_by?: string | undefined;
89
+ created_by?: string | null | undefined;
90
90
  is_locked?: boolean | undefined;
91
91
  updated_by?: string | undefined;
92
92
  curr_value?: any;
@@ -103,7 +103,7 @@ export declare const UpdateProposedChangeSchema: z.ZodObject<{
103
103
  is_locked?: boolean | undefined;
104
104
  updated_by?: string | undefined;
105
105
  status?: "none" | "pending" | "approved" | "rejected" | undefined;
106
- scope?: "stop" | "lines" | undefined;
106
+ scope?: "lines" | "stop" | undefined;
107
107
  curr_value?: any;
108
108
  field?: string | undefined;
109
109
  related_id?: string | undefined;
@@ -111,7 +111,7 @@ export declare const UpdateProposedChangeSchema: z.ZodObject<{
111
111
  is_locked?: boolean | undefined;
112
112
  updated_by?: string | undefined;
113
113
  status?: "none" | "pending" | "approved" | "rejected" | undefined;
114
- scope?: "stop" | "lines" | undefined;
114
+ scope?: "lines" | "stop" | undefined;
115
115
  curr_value?: any;
116
116
  field?: string | undefined;
117
117
  related_id?: string | undefined;
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod';
2
+ export declare const GetRidesBatchQuerySchema: z.ZodObject<{
3
+ search: z.ZodOptional<z.ZodString>;
4
+ agency_ids: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
5
+ date_end: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
6
+ date_start: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
+ analysis_ended_at_last_stop_grade: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "none" | "pass" | "fail" | "skip")[], unknown>>;
8
+ analysis_expected_apex_validation_interval: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "none" | "pass" | "fail" | "skip")[], unknown>>;
9
+ analysis_simple_three_vehicle_events_grade: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "none" | "pass" | "fail" | "skip")[], unknown>>;
10
+ analysis_transaction_sequentiality: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodEnum<["pass", "fail", "skip", "error"]>, z.ZodLiteral<"none">]>, "many">, ("error" | "none" | "pass" | "fail" | "skip")[], unknown>>;
11
+ delay_statuses: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["delayed", "early", "ontime", "none"]>, "many">, ("delayed" | "early" | "ontime" | "none")[], unknown>>;
12
+ operational_statuses: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["ended", "missed", "running", "scheduled"]>, "many">, ("ended" | "missed" | "running" | "scheduled")[], unknown>>;
13
+ seen_statuses: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["unseen", "seen", "gone"]>, "many">, ("unseen" | "seen" | "gone")[], unknown>>;
14
+ line_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
15
+ stop_ids: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>>;
16
+ acceptance_status: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodEnum<["justification_required", "under_review", "accepted", "rejected", "none"]>, "many">, ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[], unknown>>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ agency_ids: string[];
19
+ date_end: number & {
20
+ __brand: "UnixTimestamp";
21
+ };
22
+ date_start: number & {
23
+ __brand: "UnixTimestamp";
24
+ };
25
+ search?: string | undefined;
26
+ acceptance_status?: ("none" | "rejected" | "justification_required" | "under_review" | "accepted")[] | undefined;
27
+ analysis_expected_apex_validation_interval?: ("error" | "none" | "pass" | "fail" | "skip")[] | undefined;
28
+ analysis_transaction_sequentiality?: ("error" | "none" | "pass" | "fail" | "skip")[] | undefined;
29
+ delay_statuses?: ("delayed" | "early" | "ontime" | "none")[] | undefined;
30
+ operational_statuses?: ("ended" | "missed" | "running" | "scheduled")[] | undefined;
31
+ seen_statuses?: ("unseen" | "seen" | "gone")[] | undefined;
32
+ line_ids?: string[] | undefined;
33
+ stop_ids?: string[] | undefined;
34
+ analysis_ended_at_last_stop_grade?: ("error" | "none" | "pass" | "fail" | "skip")[] | undefined;
35
+ analysis_simple_three_vehicle_events_grade?: ("error" | "none" | "pass" | "fail" | "skip")[] | undefined;
36
+ }, {
37
+ date_end: number;
38
+ date_start: number;
39
+ search?: string | undefined;
40
+ agency_ids?: unknown;
41
+ acceptance_status?: unknown;
42
+ analysis_expected_apex_validation_interval?: unknown;
43
+ analysis_transaction_sequentiality?: unknown;
44
+ delay_statuses?: unknown;
45
+ operational_statuses?: unknown;
46
+ seen_statuses?: unknown;
47
+ line_ids?: unknown;
48
+ stop_ids?: unknown;
49
+ analysis_ended_at_last_stop_grade?: unknown;
50
+ analysis_simple_three_vehicle_events_grade?: unknown;
51
+ }>;
52
+ export type GetRidesBatchQuery = z.infer<typeof GetRidesBatchQuerySchema>;
@@ -0,0 +1,54 @@
1
+ /* * */
2
+ import { DelayStatusSchema, OperationalStatusSchema, SeenStatusSchema } from '../_common/status.js';
3
+ import { UnixTimeStampSchema } from '../_common/unix-timestamp.js';
4
+ import { RideAcceptanceStatusSchema } from './ride-acceptance.js';
5
+ import { RideAnalysisGradeSchema } from './ride-analysis.js';
6
+ import { z } from 'zod';
7
+ /* * */
8
+ const RideAnalysisGradeWithNoneSchema = RideAnalysisGradeSchema.or(z.literal('none'));
9
+ /* * */
10
+ export const GetRidesBatchQuerySchema = z.object({
11
+ search: z
12
+ .string()
13
+ .optional(),
14
+ /* * */
15
+ agency_ids: z
16
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(id => id.trim()) : [], z.array(z.string()))
17
+ .default([]),
18
+ date_end: UnixTimeStampSchema,
19
+ date_start: UnixTimeStampSchema,
20
+ /* * */
21
+ analysis_ended_at_last_stop_grade: z
22
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema))
23
+ .optional(),
24
+ analysis_expected_apex_validation_interval: z
25
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema))
26
+ .optional(),
27
+ analysis_simple_three_vehicle_events_grade: z
28
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema))
29
+ .optional(),
30
+ analysis_transaction_sequentiality: z
31
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(grade => grade.trim()) : [], z.array(RideAnalysisGradeWithNoneSchema))
32
+ .optional(),
33
+ /* * */
34
+ delay_statuses: z
35
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(status => status.trim()) : [], z.array(DelayStatusSchema))
36
+ .optional(),
37
+ operational_statuses: z
38
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(status => status.trim()) : [], z.array(OperationalStatusSchema))
39
+ .optional(),
40
+ seen_statuses: z
41
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(status => status.trim()) : [], z.array(SeenStatusSchema))
42
+ .optional(),
43
+ /* * */
44
+ line_ids: z
45
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(id => id.trim()) : [], z.array(z.string()))
46
+ .optional(),
47
+ stop_ids: z
48
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(id => id.trim()) : [], z.array(z.string()))
49
+ .optional(),
50
+ /* * */
51
+ acceptance_status: z
52
+ .preprocess((val) => (val && typeof val === 'string') ? val.split(',').map(status => status.trim()) : [], z.array(z.enum([...RideAcceptanceStatusSchema.options, 'none'])))
53
+ .optional(),
54
+ });
@@ -1,3 +1,4 @@
1
+ export * from './batch-query.js';
1
2
  export * from './hashed-shape.js';
2
3
  export * from './hashed-trip.js';
3
4
  export * from './ride-acceptance.js';
@@ -1,3 +1,4 @@
1
+ export * from './batch-query.js';
1
2
  export * from './hashed-shape.js';
2
3
  export * from './hashed-trip.js';
3
4
  export * from './ride-acceptance.js';