@tmlmobilidade/types 20250911.1034.51 → 20250911.1425.9

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 (54) hide show
  1. package/dist/src/_common/comment.d.ts +20 -20
  2. package/dist/src/_common/document.d.ts +4 -4
  3. package/dist/src/_common/document.js +2 -2
  4. package/dist/src/_common/operational-date.d.ts +1 -1
  5. package/dist/src/_common/operational-date.js +1 -2
  6. package/dist/src/_common/proposed-change.d.ts +18 -40
  7. package/dist/src/_common/proposed-change.js +5 -14
  8. package/dist/src/agency.d.ts +19 -30
  9. package/dist/src/agency.js +1 -1
  10. package/dist/src/alert.d.ts +37 -63
  11. package/dist/src/alert.js +8 -48
  12. package/dist/src/auth/login.js +2 -8
  13. package/dist/src/auth/role.d.ts +15 -22
  14. package/dist/src/auth/role.js +1 -1
  15. package/dist/src/auth/session.d.ts +22 -38
  16. package/dist/src/auth/session.js +3 -3
  17. package/dist/src/auth/user.d.ts +22 -41
  18. package/dist/src/auth/user.js +3 -3
  19. package/dist/src/auth/verification-token.d.ts +22 -34
  20. package/dist/src/auth/verification-token.js +3 -3
  21. package/dist/src/gtfs.d.ts +6 -17
  22. package/dist/src/organization.d.ts +10 -13
  23. package/dist/src/organization.js +1 -1
  24. package/dist/src/plans/gtfs-validation.d.ts +34 -72
  25. package/dist/src/plans/gtfs-validation.js +2 -6
  26. package/dist/src/plans/plan-controller.d.ts +3 -8
  27. package/dist/src/plans/plan-controller.js +2 -2
  28. package/dist/src/plans/plan.d.ts +43 -95
  29. package/dist/src/plans/plan.js +2 -6
  30. package/dist/src/rides/ride-audit.d.ts +27 -30
  31. package/dist/src/rides/ride-audit.js +1 -1
  32. package/dist/src/rides/ride-justification.d.ts +69 -72
  33. package/dist/src/rides/ride-justification.js +1 -1
  34. package/dist/src/rides/ride.d.ts +55 -106
  35. package/dist/src/rides/ride.js +8 -8
  36. package/dist/src/sams/sam-analysis.d.ts +5 -13
  37. package/dist/src/sams/sam-analysis.js +3 -3
  38. package/dist/src/sams/sam.d.ts +46 -97
  39. package/dist/src/sams/sam.js +4 -4
  40. package/dist/src/simplified-apex/simplified-apex-location.d.ts +18 -25
  41. package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
  42. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +18 -25
  43. package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
  44. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +28 -38
  45. package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
  46. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +18 -25
  47. package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
  48. package/dist/src/stop.d.ts +133 -151
  49. package/dist/src/stop.js +11 -74
  50. package/dist/src/vehicle-event.d.ts +9 -14
  51. package/dist/src/vehicle-event.js +2 -2
  52. package/dist/src/zone.d.ts +9 -12
  53. package/dist/src/zone.js +1 -1
  54. package/package.json +1 -1
@@ -1,5 +1,3 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
- import { type GtfsAgency, type GtfsFeedInfo } from '../gtfs.js';
3
1
  import { z } from 'zod';
4
2
  export declare const SEVERITY_LEVELS: readonly ["error", "warning", "ignore", "forbidden"];
5
3
  export declare const SeverityLevelSchema: z.ZodEnum<["error", "warning", "ignore", "forbidden"]>;
@@ -78,10 +76,10 @@ export type GTFSValidatorSummary = z.infer<typeof GTFSValidatorSummarySchema>;
78
76
  export type GTFSValidatorMessage = z.infer<typeof GTFSValidatorMessageSchema>;
79
77
  export declare const GtfsValidationSchema: z.ZodObject<{
80
78
  _id: z.ZodString;
81
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
82
- created_by: z.ZodDefault<z.ZodString>;
83
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
84
- updated_by: z.ZodDefault<z.ZodString>;
79
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
80
+ created_by: z.ZodOptional<z.ZodString>;
81
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
82
+ updated_by: z.ZodOptional<z.ZodString>;
85
83
  } & {
86
84
  feeder_status: z.ZodEnum<["waiting", "processing", "complete", "error"]>;
87
85
  file_id: z.ZodString;
@@ -117,25 +115,21 @@ export declare const GtfsValidationSchema: z.ZodObject<{
117
115
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
116
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
117
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
118
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
121
119
  feed_lang: z.ZodString;
122
120
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
121
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
122
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
125
123
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
124
  }, "strip", z.ZodTypeAny, {
127
125
  feed_lang: string;
128
126
  default_lang?: string | null | undefined;
129
127
  feed_contact_email?: string | null | undefined;
130
128
  feed_contact_url?: string | null | undefined;
131
- feed_end_date?: (string & {
132
- __brand: "OperationalDate";
133
- } & z.BRAND<"OperationalDate">) | null | undefined;
129
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
134
130
  feed_publisher_name?: string | null | undefined;
135
131
  feed_publisher_url?: string | null | undefined;
136
- feed_start_date?: (string & {
137
- __brand: "OperationalDate";
138
- } & z.BRAND<"OperationalDate">) | null | undefined;
132
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
139
133
  feed_version?: string | null | undefined;
140
134
  }, {
141
135
  feed_lang: string;
@@ -202,11 +196,9 @@ export declare const GtfsValidationSchema: z.ZodObject<{
202
196
  created_at: number & {
203
197
  __brand: "UnixTimestamp";
204
198
  };
205
- created_by: string;
206
199
  updated_at: number & {
207
200
  __brand: "UnixTimestamp";
208
201
  };
209
- updated_by: string;
210
202
  file_id: string;
211
203
  feeder_status: "waiting" | "processing" | "complete" | "error";
212
204
  gtfs_agency: {
@@ -224,17 +216,15 @@ export declare const GtfsValidationSchema: z.ZodObject<{
224
216
  default_lang?: string | null | undefined;
225
217
  feed_contact_email?: string | null | undefined;
226
218
  feed_contact_url?: string | null | undefined;
227
- feed_end_date?: (string & {
228
- __brand: "OperationalDate";
229
- } & z.BRAND<"OperationalDate">) | null | undefined;
219
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
230
220
  feed_publisher_name?: string | null | undefined;
231
221
  feed_publisher_url?: string | null | undefined;
232
- feed_start_date?: (string & {
233
- __brand: "OperationalDate";
234
- } & z.BRAND<"OperationalDate">) | null | undefined;
222
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
235
223
  feed_version?: string | null | undefined;
236
224
  };
237
225
  notification_sent: boolean;
226
+ created_by?: string | undefined;
227
+ updated_by?: string | undefined;
238
228
  summary?: {
239
229
  messages: {
240
230
  message: string;
@@ -292,10 +282,10 @@ export declare const GtfsValidationSchema: z.ZodObject<{
292
282
  }>;
293
283
  export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
294
284
  _id: z.ZodString;
295
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
296
- created_by: z.ZodDefault<z.ZodString>;
297
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
298
- updated_by: z.ZodDefault<z.ZodString>;
285
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
286
+ created_by: z.ZodOptional<z.ZodString>;
287
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
288
+ updated_by: z.ZodOptional<z.ZodString>;
299
289
  } & {
300
290
  feeder_status: z.ZodEnum<["waiting", "processing", "complete", "error"]>;
301
291
  file_id: z.ZodString;
@@ -331,25 +321,21 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
331
321
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
322
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
333
323
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
334
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
324
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
335
325
  feed_lang: z.ZodString;
336
326
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
337
327
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
338
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
328
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
339
329
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
340
330
  }, "strip", z.ZodTypeAny, {
341
331
  feed_lang: string;
342
332
  default_lang?: string | null | undefined;
343
333
  feed_contact_email?: string | null | undefined;
344
334
  feed_contact_url?: string | null | undefined;
345
- feed_end_date?: (string & {
346
- __brand: "OperationalDate";
347
- } & z.BRAND<"OperationalDate">) | null | undefined;
335
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
348
336
  feed_publisher_name?: string | null | undefined;
349
337
  feed_publisher_url?: string | null | undefined;
350
- feed_start_date?: (string & {
351
- __brand: "OperationalDate";
352
- } & z.BRAND<"OperationalDate">) | null | undefined;
338
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
353
339
  feed_version?: string | null | undefined;
354
340
  }, {
355
341
  feed_lang: string;
@@ -412,8 +398,6 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
412
398
  total_warnings: number;
413
399
  }>>>;
414
400
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
415
- created_by: string;
416
- updated_by: string;
417
401
  file_id: string;
418
402
  feeder_status: "waiting" | "processing" | "complete" | "error";
419
403
  gtfs_agency: {
@@ -431,17 +415,15 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
431
415
  default_lang?: string | null | undefined;
432
416
  feed_contact_email?: string | null | undefined;
433
417
  feed_contact_url?: string | null | undefined;
434
- feed_end_date?: (string & {
435
- __brand: "OperationalDate";
436
- } & z.BRAND<"OperationalDate">) | null | undefined;
418
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
437
419
  feed_publisher_name?: string | null | undefined;
438
420
  feed_publisher_url?: string | null | undefined;
439
- feed_start_date?: (string & {
440
- __brand: "OperationalDate";
441
- } & z.BRAND<"OperationalDate">) | null | undefined;
421
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
442
422
  feed_version?: string | null | undefined;
443
423
  };
444
424
  notification_sent: boolean;
425
+ created_by?: string | undefined;
426
+ updated_by?: string | undefined;
445
427
  summary?: {
446
428
  messages: {
447
429
  message: string;
@@ -495,8 +477,7 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
495
477
  } | null | undefined;
496
478
  }>;
497
479
  export declare const UpdateGtfsValidationSchema: z.ZodObject<{
498
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
499
- updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
480
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
500
481
  file_id: z.ZodOptional<z.ZodString>;
501
482
  feeder_status: z.ZodOptional<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
502
483
  gtfs_agency: z.ZodOptional<z.ZodObject<{
@@ -531,25 +512,21 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
531
512
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
532
513
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
533
514
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
534
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
515
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
535
516
  feed_lang: z.ZodString;
536
517
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
518
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
519
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
539
520
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
540
521
  }, "strip", z.ZodTypeAny, {
541
522
  feed_lang: string;
542
523
  default_lang?: string | null | undefined;
543
524
  feed_contact_email?: string | null | undefined;
544
525
  feed_contact_url?: string | null | undefined;
545
- feed_end_date?: (string & {
546
- __brand: "OperationalDate";
547
- } & z.BRAND<"OperationalDate">) | null | undefined;
526
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
548
527
  feed_publisher_name?: string | null | undefined;
549
528
  feed_publisher_url?: string | null | undefined;
550
- feed_start_date?: (string & {
551
- __brand: "OperationalDate";
552
- } & z.BRAND<"OperationalDate">) | null | undefined;
529
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
553
530
  feed_version?: string | null | undefined;
554
531
  }, {
555
532
  feed_lang: string;
@@ -612,7 +589,6 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
612
589
  total_warnings: number;
613
590
  }>>>>;
614
591
  }, "strict", z.ZodTypeAny, {
615
- created_by?: string | undefined;
616
592
  updated_by?: string | undefined;
617
593
  file_id?: string | undefined;
618
594
  feeder_status?: "waiting" | "processing" | "complete" | "error" | undefined;
@@ -631,14 +607,10 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
631
607
  default_lang?: string | null | undefined;
632
608
  feed_contact_email?: string | null | undefined;
633
609
  feed_contact_url?: string | null | undefined;
634
- feed_end_date?: (string & {
635
- __brand: "OperationalDate";
636
- } & z.BRAND<"OperationalDate">) | null | undefined;
610
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
637
611
  feed_publisher_name?: string | null | undefined;
638
612
  feed_publisher_url?: string | null | undefined;
639
- feed_start_date?: (string & {
640
- __brand: "OperationalDate";
641
- } & z.BRAND<"OperationalDate">) | null | undefined;
613
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
642
614
  feed_version?: string | null | undefined;
643
615
  } | undefined;
644
616
  notification_sent?: boolean | undefined;
@@ -655,7 +627,6 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
655
627
  total_warnings: number;
656
628
  } | null | undefined;
657
629
  }, {
658
- created_by?: string | undefined;
659
630
  updated_by?: string | undefined;
660
631
  file_id?: string | undefined;
661
632
  feeder_status?: "waiting" | "processing" | "complete" | "error" | undefined;
@@ -694,18 +665,9 @@ export declare const UpdateGtfsValidationSchema: z.ZodObject<{
694
665
  total_warnings: number;
695
666
  } | null | undefined;
696
667
  }>;
697
- export interface GtfsValidation extends Omit<z.infer<typeof GtfsValidationSchema>, 'created_at' | 'gtfs_agency' | 'gtfs_feed_info' | 'summary' | 'updated_at'> {
698
- created_at: UnixTimestamp;
699
- gtfs_agency: GtfsAgency;
700
- gtfs_feed_info: GtfsFeedInfo;
701
- summary?: GTFSValidatorSummary;
702
- updated_at: UnixTimestamp;
703
- }
704
- export interface CreateGtfsValidationDto extends Omit<z.infer<typeof CreateGtfsValidationSchema>, 'gtfs_agency' | 'gtfs_feed_info'> {
705
- gtfs_agency: GtfsAgency;
706
- gtfs_feed_info: GtfsFeedInfo;
707
- }
708
- export type UpdateGtfsValidationDto = Partial<CreateGtfsValidationDto>;
668
+ export type GtfsValidation = z.infer<typeof GtfsValidationSchema>;
669
+ export type CreateGtfsValidationDto = z.infer<typeof CreateGtfsValidationSchema>;
670
+ export type UpdateGtfsValidationDto = z.infer<typeof UpdateGtfsValidationSchema>;
709
671
  export declare const GtfsValidationPermissionSchema: z.ZodObject<{
710
672
  agency_ids: z.ZodArray<z.ZodString, "many">;
711
673
  }, "strip", z.ZodTypeAny, {
@@ -29,12 +29,8 @@ export const GtfsValidationSchema = DocumentSchema.extend({
29
29
  notification_sent: z.boolean().default(false),
30
30
  summary: GTFSValidatorSummarySchema.nullish(),
31
31
  }).strict();
32
- export const CreateGtfsValidationSchema = GtfsValidationSchema.omit({
33
- _id: true,
34
- created_at: true,
35
- updated_at: true,
36
- });
37
- export const UpdateGtfsValidationSchema = CreateGtfsValidationSchema.partial();
32
+ export const CreateGtfsValidationSchema = GtfsValidationSchema.omit({ _id: true, created_at: true, updated_at: true });
33
+ export const UpdateGtfsValidationSchema = CreateGtfsValidationSchema.omit({ created_by: true }).partial();
38
34
  /* * */
39
35
  export const GtfsValidationPermissionSchema = z.object({
40
36
  agency_ids: z.array(z.string()),
@@ -1,20 +1,15 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
1
  import { z } from 'zod';
3
2
  export declare const PlanControllerSchema: z.ZodObject<{
4
3
  last_hash: z.ZodNullable<z.ZodString>;
5
4
  status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
6
- timestamp: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
5
+ timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
7
6
  }, "strict", z.ZodTypeAny, {
8
7
  status: "waiting" | "processing" | "complete" | "error";
9
8
  last_hash: string | null;
10
- timestamp: (number & {
11
- __brand: "UnixTimestamp";
12
- } & z.BRAND<"UnixTimestamp">) | null;
9
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
13
10
  }, {
14
11
  last_hash: string | null;
15
12
  timestamp: number | null;
16
13
  status?: "waiting" | "processing" | "complete" | "error" | undefined;
17
14
  }>;
18
- export interface PlanController extends Omit<z.infer<typeof PlanControllerSchema>, 'timestamp'> {
19
- timestamp: UnixTimestamp;
20
- }
15
+ export type PlanController = z.infer<typeof PlanControllerSchema>;
@@ -1,10 +1,10 @@
1
1
  /* * */
2
- import { validateUnixTimestamp } from '../_common/unix-timestamp.js';
2
+ import { unixTimeStampSchema } from '../_common/unix-timestamp.js';
3
3
  import { ProcessingStatusSchema } from '../system/processing-status.js';
4
4
  import { z } from 'zod';
5
5
  /* * */
6
6
  export const PlanControllerSchema = z.object({
7
7
  last_hash: z.string().nullable(),
8
8
  status: ProcessingStatusSchema.default('waiting'),
9
- timestamp: z.number().transform(validateUnixTimestamp).brand('UnixTimestamp').nullable(),
9
+ timestamp: unixTimeStampSchema.nullable(),
10
10
  }).strict();
@@ -1,24 +1,19 @@
1
- import { type UnixTimestamp } from '../_common/unix-timestamp.js';
2
- import { GtfsAgency, GtfsFeedInfo } from '../gtfs.js';
3
- import { PlanController } from './plan-controller.js';
4
1
  import { z } from 'zod';
5
2
  export declare const PlanSchema: z.ZodObject<{
6
3
  _id: z.ZodString;
7
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
8
- created_by: z.ZodDefault<z.ZodString>;
9
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
10
- updated_by: z.ZodDefault<z.ZodString>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
5
+ created_by: z.ZodOptional<z.ZodString>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
7
+ updated_by: z.ZodOptional<z.ZodString>;
11
8
  } & {
12
9
  controller: z.ZodObject<{
13
10
  last_hash: z.ZodNullable<z.ZodString>;
14
11
  status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
15
- timestamp: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
12
+ timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
16
13
  }, "strict", z.ZodTypeAny, {
17
14
  status: "waiting" | "processing" | "complete" | "error";
18
15
  last_hash: string | null;
19
- timestamp: (number & {
20
- __brand: "UnixTimestamp";
21
- } & z.BRAND<"UnixTimestamp">) | null;
16
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
22
17
  }, {
23
18
  last_hash: string | null;
24
19
  timestamp: number | null;
@@ -56,25 +51,21 @@ export declare const PlanSchema: z.ZodObject<{
56
51
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
52
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
53
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
54
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
60
55
  feed_lang: z.ZodString;
61
56
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
57
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
63
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
58
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
64
59
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
65
60
  }, "strip", z.ZodTypeAny, {
66
61
  feed_lang: string;
67
62
  default_lang?: string | null | undefined;
68
63
  feed_contact_email?: string | null | undefined;
69
64
  feed_contact_url?: string | null | undefined;
70
- feed_end_date?: (string & {
71
- __brand: "OperationalDate";
72
- } & z.BRAND<"OperationalDate">) | null | undefined;
65
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
73
66
  feed_publisher_name?: string | null | undefined;
74
67
  feed_publisher_url?: string | null | undefined;
75
- feed_start_date?: (string & {
76
- __brand: "OperationalDate";
77
- } & z.BRAND<"OperationalDate">) | null | undefined;
68
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
78
69
  feed_version?: string | null | undefined;
79
70
  }, {
80
71
  feed_lang: string;
@@ -103,11 +94,9 @@ export declare const PlanSchema: z.ZodObject<{
103
94
  created_at: number & {
104
95
  __brand: "UnixTimestamp";
105
96
  };
106
- created_by: string;
107
97
  updated_at: number & {
108
98
  __brand: "UnixTimestamp";
109
99
  };
110
- updated_by: string;
111
100
  gtfs_agency: {
112
101
  agency_id: string;
113
102
  agency_name: string;
@@ -123,22 +112,16 @@ export declare const PlanSchema: z.ZodObject<{
123
112
  default_lang?: string | null | undefined;
124
113
  feed_contact_email?: string | null | undefined;
125
114
  feed_contact_url?: string | null | undefined;
126
- feed_end_date?: (string & {
127
- __brand: "OperationalDate";
128
- } & z.BRAND<"OperationalDate">) | null | undefined;
115
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
129
116
  feed_publisher_name?: string | null | undefined;
130
117
  feed_publisher_url?: string | null | undefined;
131
- feed_start_date?: (string & {
132
- __brand: "OperationalDate";
133
- } & z.BRAND<"OperationalDate">) | null | undefined;
118
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
134
119
  feed_version?: string | null | undefined;
135
120
  };
136
121
  controller: {
137
122
  status: "waiting" | "processing" | "complete" | "error";
138
123
  last_hash: string | null;
139
- timestamp: (number & {
140
- __brand: "UnixTimestamp";
141
- } & z.BRAND<"UnixTimestamp">) | null;
124
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
142
125
  };
143
126
  hash: string;
144
127
  is_locked: boolean;
@@ -147,6 +130,8 @@ export declare const PlanSchema: z.ZodObject<{
147
130
  operation_plan_id: string | null;
148
131
  };
149
132
  status_merger: "waiting" | "processing" | "complete" | "error";
133
+ created_by?: string | undefined;
134
+ updated_by?: string | undefined;
150
135
  }, {
151
136
  _id: string;
152
137
  created_at: number;
@@ -189,21 +174,19 @@ export declare const PlanSchema: z.ZodObject<{
189
174
  }>;
190
175
  export declare const CreatePlanSchema: z.ZodObject<Omit<{
191
176
  _id: z.ZodString;
192
- created_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
193
- created_by: z.ZodDefault<z.ZodString>;
194
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
195
- updated_by: z.ZodDefault<z.ZodString>;
177
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
178
+ created_by: z.ZodOptional<z.ZodString>;
179
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
180
+ updated_by: z.ZodOptional<z.ZodString>;
196
181
  } & {
197
182
  controller: z.ZodObject<{
198
183
  last_hash: z.ZodNullable<z.ZodString>;
199
184
  status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
200
- timestamp: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
185
+ timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
201
186
  }, "strict", z.ZodTypeAny, {
202
187
  status: "waiting" | "processing" | "complete" | "error";
203
188
  last_hash: string | null;
204
- timestamp: (number & {
205
- __brand: "UnixTimestamp";
206
- } & z.BRAND<"UnixTimestamp">) | null;
189
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
207
190
  }, {
208
191
  last_hash: string | null;
209
192
  timestamp: number | null;
@@ -241,25 +224,21 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
241
224
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
225
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
243
226
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
244
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
227
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
245
228
  feed_lang: z.ZodString;
246
229
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
247
230
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
231
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
249
232
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
233
  }, "strip", z.ZodTypeAny, {
251
234
  feed_lang: string;
252
235
  default_lang?: string | null | undefined;
253
236
  feed_contact_email?: string | null | undefined;
254
237
  feed_contact_url?: string | null | undefined;
255
- feed_end_date?: (string & {
256
- __brand: "OperationalDate";
257
- } & z.BRAND<"OperationalDate">) | null | undefined;
238
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
258
239
  feed_publisher_name?: string | null | undefined;
259
240
  feed_publisher_url?: string | null | undefined;
260
- feed_start_date?: (string & {
261
- __brand: "OperationalDate";
262
- } & z.BRAND<"OperationalDate">) | null | undefined;
241
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
263
242
  feed_version?: string | null | undefined;
264
243
  }, {
265
244
  feed_lang: string;
@@ -284,8 +263,6 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
284
263
  }>;
285
264
  status_merger: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
286
265
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
287
- created_by: string;
288
- updated_by: string;
289
266
  gtfs_agency: {
290
267
  agency_id: string;
291
268
  agency_name: string;
@@ -301,22 +278,16 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
301
278
  default_lang?: string | null | undefined;
302
279
  feed_contact_email?: string | null | undefined;
303
280
  feed_contact_url?: string | null | undefined;
304
- feed_end_date?: (string & {
305
- __brand: "OperationalDate";
306
- } & z.BRAND<"OperationalDate">) | null | undefined;
281
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
307
282
  feed_publisher_name?: string | null | undefined;
308
283
  feed_publisher_url?: string | null | undefined;
309
- feed_start_date?: (string & {
310
- __brand: "OperationalDate";
311
- } & z.BRAND<"OperationalDate">) | null | undefined;
284
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
312
285
  feed_version?: string | null | undefined;
313
286
  };
314
287
  controller: {
315
288
  status: "waiting" | "processing" | "complete" | "error";
316
289
  last_hash: string | null;
317
- timestamp: (number & {
318
- __brand: "UnixTimestamp";
319
- } & z.BRAND<"UnixTimestamp">) | null;
290
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
320
291
  };
321
292
  hash: string;
322
293
  is_locked: boolean;
@@ -325,6 +296,8 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
325
296
  operation_plan_id: string | null;
326
297
  };
327
298
  status_merger: "waiting" | "processing" | "complete" | "error";
299
+ created_by?: string | undefined;
300
+ updated_by?: string | undefined;
328
301
  }, {
329
302
  gtfs_agency: {
330
303
  agency_id: string;
@@ -363,8 +336,7 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
363
336
  status_merger?: "waiting" | "processing" | "complete" | "error" | undefined;
364
337
  }>;
365
338
  export declare const UpdatePlanSchema: z.ZodObject<{
366
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
367
- updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
339
+ updated_by: z.ZodOptional<z.ZodOptional<z.ZodString>>;
368
340
  gtfs_agency: z.ZodOptional<z.ZodObject<{
369
341
  agency_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
370
342
  agency_fare_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -397,25 +369,21 @@ export declare const UpdatePlanSchema: z.ZodObject<{
397
369
  default_lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
398
370
  feed_contact_email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
399
371
  feed_contact_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
400
- feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
372
+ feed_end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
401
373
  feed_lang: z.ZodString;
402
374
  feed_publisher_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
403
375
  feed_publisher_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
404
- feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>, "OperationalDate">>>;
376
+ feed_start_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("../_common/operational-date.js").OperationalDate, string>>>;
405
377
  feed_version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
406
378
  }, "strip", z.ZodTypeAny, {
407
379
  feed_lang: string;
408
380
  default_lang?: string | null | undefined;
409
381
  feed_contact_email?: string | null | undefined;
410
382
  feed_contact_url?: string | null | undefined;
411
- feed_end_date?: (string & {
412
- __brand: "OperationalDate";
413
- } & z.BRAND<"OperationalDate">) | null | undefined;
383
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
414
384
  feed_publisher_name?: string | null | undefined;
415
385
  feed_publisher_url?: string | null | undefined;
416
- feed_start_date?: (string & {
417
- __brand: "OperationalDate";
418
- } & z.BRAND<"OperationalDate">) | null | undefined;
386
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
419
387
  feed_version?: string | null | undefined;
420
388
  }, {
421
389
  feed_lang: string;
@@ -431,13 +399,11 @@ export declare const UpdatePlanSchema: z.ZodObject<{
431
399
  controller: z.ZodOptional<z.ZodObject<{
432
400
  last_hash: z.ZodNullable<z.ZodString>;
433
401
  status: z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
434
- timestamp: z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, UnixTimestamp, number>, "UnixTimestamp">>;
402
+ timestamp: z.ZodNullable<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>>;
435
403
  }, "strict", z.ZodTypeAny, {
436
404
  status: "waiting" | "processing" | "complete" | "error";
437
405
  last_hash: string | null;
438
- timestamp: (number & {
439
- __brand: "UnixTimestamp";
440
- } & z.BRAND<"UnixTimestamp">) | null;
406
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
441
407
  }, {
442
408
  last_hash: string | null;
443
409
  timestamp: number | null;
@@ -455,7 +421,6 @@ export declare const UpdatePlanSchema: z.ZodObject<{
455
421
  }>>;
456
422
  status_merger: z.ZodOptional<z.ZodDefault<z.ZodEnum<["waiting", "processing", "complete", "error"]>>>;
457
423
  }, "strict", z.ZodTypeAny, {
458
- created_by?: string | undefined;
459
424
  updated_by?: string | undefined;
460
425
  gtfs_agency?: {
461
426
  agency_id: string;
@@ -472,22 +437,16 @@ export declare const UpdatePlanSchema: z.ZodObject<{
472
437
  default_lang?: string | null | undefined;
473
438
  feed_contact_email?: string | null | undefined;
474
439
  feed_contact_url?: string | null | undefined;
475
- feed_end_date?: (string & {
476
- __brand: "OperationalDate";
477
- } & z.BRAND<"OperationalDate">) | null | undefined;
440
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
478
441
  feed_publisher_name?: string | null | undefined;
479
442
  feed_publisher_url?: string | null | undefined;
480
- feed_start_date?: (string & {
481
- __brand: "OperationalDate";
482
- } & z.BRAND<"OperationalDate">) | null | undefined;
443
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
483
444
  feed_version?: string | null | undefined;
484
445
  } | undefined;
485
446
  controller?: {
486
447
  status: "waiting" | "processing" | "complete" | "error";
487
448
  last_hash: string | null;
488
- timestamp: (number & {
489
- __brand: "UnixTimestamp";
490
- } & z.BRAND<"UnixTimestamp">) | null;
449
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
491
450
  } | undefined;
492
451
  hash?: string | undefined;
493
452
  is_locked?: boolean | undefined;
@@ -497,7 +456,6 @@ export declare const UpdatePlanSchema: z.ZodObject<{
497
456
  } | undefined;
498
457
  status_merger?: "waiting" | "processing" | "complete" | "error" | undefined;
499
458
  }, {
500
- created_by?: string | undefined;
501
459
  updated_by?: string | undefined;
502
460
  gtfs_agency?: {
503
461
  agency_id: string;
@@ -533,19 +491,9 @@ export declare const UpdatePlanSchema: z.ZodObject<{
533
491
  } | undefined;
534
492
  status_merger?: "waiting" | "processing" | "complete" | "error" | undefined;
535
493
  }>;
536
- export interface Plan extends Omit<z.infer<typeof PlanSchema>, 'controller' | 'created_at' | 'gtfs_agency' | 'gtfs_feed_info' | 'updated_at'> {
537
- controller: PlanController;
538
- created_at: UnixTimestamp;
539
- gtfs_agency: GtfsAgency;
540
- gtfs_feed_info: GtfsFeedInfo;
541
- updated_at: UnixTimestamp;
542
- }
543
- export interface CreatePlanDto extends Omit<z.infer<typeof CreatePlanSchema>, 'controller' | 'gtfs_agency' | 'gtfs_feed_info'> {
544
- controller: PlanController;
545
- gtfs_agency: GtfsAgency;
546
- gtfs_feed_info: GtfsFeedInfo;
547
- }
548
- export type UpdatePlanDto = Partial<CreatePlanDto>;
494
+ export type Plan = z.infer<typeof PlanSchema>;
495
+ export type CreatePlanDto = z.infer<typeof CreatePlanSchema>;
496
+ export type UpdatePlanDto = z.infer<typeof UpdatePlanSchema>;
549
497
  export interface HashablePlanMetadata {
550
498
  _id: Plan['_id'];
551
499
  gtfs_agency: Plan['gtfs_agency'];