@tmlmobilidade/types 20250911.1034.51 → 20250911.1325.18

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 (51) hide show
  1. package/dist/src/_common/operational-date.d.ts +1 -1
  2. package/dist/src/_common/operational-date.js +1 -2
  3. package/dist/src/_common/proposed-change.d.ts +9 -31
  4. package/dist/src/_common/proposed-change.js +5 -14
  5. package/dist/src/agency.d.ts +10 -21
  6. package/dist/src/agency.js +1 -1
  7. package/dist/src/alert.d.ts +32 -58
  8. package/dist/src/alert.js +8 -48
  9. package/dist/src/auth/login.js +2 -8
  10. package/dist/src/auth/role.d.ts +6 -13
  11. package/dist/src/auth/role.js +1 -1
  12. package/dist/src/auth/session.d.ts +13 -29
  13. package/dist/src/auth/session.js +3 -3
  14. package/dist/src/auth/user.d.ts +13 -32
  15. package/dist/src/auth/user.js +3 -3
  16. package/dist/src/auth/verification-token.d.ts +13 -25
  17. package/dist/src/auth/verification-token.js +3 -3
  18. package/dist/src/gtfs.d.ts +6 -17
  19. package/dist/src/organization.d.ts +1 -4
  20. package/dist/src/organization.js +1 -1
  21. package/dist/src/plans/gtfs-validation.d.ts +25 -63
  22. package/dist/src/plans/gtfs-validation.js +2 -6
  23. package/dist/src/plans/plan-controller.d.ts +3 -8
  24. package/dist/src/plans/plan-controller.js +2 -2
  25. package/dist/src/plans/plan.d.ts +34 -86
  26. package/dist/src/plans/plan.js +2 -6
  27. package/dist/src/rides/ride-audit.d.ts +0 -3
  28. package/dist/src/rides/ride-audit.js +1 -1
  29. package/dist/src/rides/ride-justification.d.ts +0 -3
  30. package/dist/src/rides/ride-justification.js +1 -1
  31. package/dist/src/rides/ride.d.ts +46 -97
  32. package/dist/src/rides/ride.js +8 -8
  33. package/dist/src/sams/sam-analysis.d.ts +5 -13
  34. package/dist/src/sams/sam-analysis.js +3 -3
  35. package/dist/src/sams/sam.d.ts +37 -88
  36. package/dist/src/sams/sam.js +4 -4
  37. package/dist/src/simplified-apex/simplified-apex-location.d.ts +12 -19
  38. package/dist/src/simplified-apex/simplified-apex-location.js +2 -2
  39. package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +12 -19
  40. package/dist/src/simplified-apex/simplified-apex-on-board-refund.js +2 -2
  41. package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +23 -33
  42. package/dist/src/simplified-apex/simplified-apex-on-board-sale.js +3 -3
  43. package/dist/src/simplified-apex/simplified-apex-validation.d.ts +12 -19
  44. package/dist/src/simplified-apex/simplified-apex-validation.js +2 -2
  45. package/dist/src/stop.d.ts +68 -86
  46. package/dist/src/stop.js +11 -74
  47. package/dist/src/vehicle-event.d.ts +5 -10
  48. package/dist/src/vehicle-event.js +2 -2
  49. package/dist/src/zone.d.ts +0 -3
  50. package/dist/src/zone.js +1 -1
  51. 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,9 +76,9 @@ 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>;
79
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
82
80
  created_by: z.ZodDefault<z.ZodString>;
83
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
81
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
84
82
  updated_by: z.ZodDefault<z.ZodString>;
85
83
  } & {
86
84
  feeder_status: z.ZodEnum<["waiting", "processing", "complete", "error"]>;
@@ -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;
@@ -224,14 +218,10 @@ export declare const GtfsValidationSchema: z.ZodObject<{
224
218
  default_lang?: string | null | undefined;
225
219
  feed_contact_email?: string | null | undefined;
226
220
  feed_contact_url?: string | null | undefined;
227
- feed_end_date?: (string & {
228
- __brand: "OperationalDate";
229
- } & z.BRAND<"OperationalDate">) | null | undefined;
221
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
230
222
  feed_publisher_name?: string | null | undefined;
231
223
  feed_publisher_url?: string | null | undefined;
232
- feed_start_date?: (string & {
233
- __brand: "OperationalDate";
234
- } & z.BRAND<"OperationalDate">) | null | undefined;
224
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
235
225
  feed_version?: string | null | undefined;
236
226
  };
237
227
  notification_sent: boolean;
@@ -292,9 +282,9 @@ 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>;
285
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
296
286
  created_by: z.ZodDefault<z.ZodString>;
297
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
287
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
298
288
  updated_by: z.ZodDefault<z.ZodString>;
299
289
  } & {
300
290
  feeder_status: z.ZodEnum<["waiting", "processing", "complete", "error"]>;
@@ -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;
@@ -431,14 +417,10 @@ export declare const CreateGtfsValidationSchema: z.ZodObject<Omit<{
431
417
  default_lang?: string | null | undefined;
432
418
  feed_contact_email?: string | null | undefined;
433
419
  feed_contact_url?: string | null | undefined;
434
- feed_end_date?: (string & {
435
- __brand: "OperationalDate";
436
- } & z.BRAND<"OperationalDate">) | null | undefined;
420
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
437
421
  feed_publisher_name?: string | null | undefined;
438
422
  feed_publisher_url?: string | null | undefined;
439
- feed_start_date?: (string & {
440
- __brand: "OperationalDate";
441
- } & z.BRAND<"OperationalDate">) | null | undefined;
423
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
442
424
  feed_version?: string | null | undefined;
443
425
  };
444
426
  notification_sent: boolean;
@@ -495,7 +477,6 @@ 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
480
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
500
481
  file_id: z.ZodOptional<z.ZodString>;
501
482
  feeder_status: z.ZodOptional<z.ZodEnum<["waiting", "processing", "complete", "error"]>>;
@@ -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>;
4
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
8
5
  created_by: z.ZodDefault<z.ZodString>;
9
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
6
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
10
7
  updated_by: z.ZodDefault<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;
@@ -123,22 +114,16 @@ export declare const PlanSchema: z.ZodObject<{
123
114
  default_lang?: string | null | undefined;
124
115
  feed_contact_email?: string | null | undefined;
125
116
  feed_contact_url?: string | null | undefined;
126
- feed_end_date?: (string & {
127
- __brand: "OperationalDate";
128
- } & z.BRAND<"OperationalDate">) | null | undefined;
117
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
129
118
  feed_publisher_name?: string | null | undefined;
130
119
  feed_publisher_url?: string | null | undefined;
131
- feed_start_date?: (string & {
132
- __brand: "OperationalDate";
133
- } & z.BRAND<"OperationalDate">) | null | undefined;
120
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
134
121
  feed_version?: string | null | undefined;
135
122
  };
136
123
  controller: {
137
124
  status: "waiting" | "processing" | "complete" | "error";
138
125
  last_hash: string | null;
139
- timestamp: (number & {
140
- __brand: "UnixTimestamp";
141
- } & z.BRAND<"UnixTimestamp">) | null;
126
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
142
127
  };
143
128
  hash: string;
144
129
  is_locked: boolean;
@@ -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>;
177
+ created_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
193
178
  created_by: z.ZodDefault<z.ZodString>;
194
- updated_at: z.ZodEffects<z.ZodNumber, UnixTimestamp, number>;
179
+ updated_at: z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>;
195
180
  updated_by: z.ZodDefault<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;
@@ -301,22 +280,16 @@ export declare const CreatePlanSchema: z.ZodObject<Omit<{
301
280
  default_lang?: string | null | undefined;
302
281
  feed_contact_email?: string | null | undefined;
303
282
  feed_contact_url?: string | null | undefined;
304
- feed_end_date?: (string & {
305
- __brand: "OperationalDate";
306
- } & z.BRAND<"OperationalDate">) | null | undefined;
283
+ feed_end_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
307
284
  feed_publisher_name?: string | null | undefined;
308
285
  feed_publisher_url?: string | null | undefined;
309
- feed_start_date?: (string & {
310
- __brand: "OperationalDate";
311
- } & z.BRAND<"OperationalDate">) | null | undefined;
286
+ feed_start_date?: import("../_common/operational-date.js").OperationalDate | null | undefined;
312
287
  feed_version?: string | null | undefined;
313
288
  };
314
289
  controller: {
315
290
  status: "waiting" | "processing" | "complete" | "error";
316
291
  last_hash: string | null;
317
- timestamp: (number & {
318
- __brand: "UnixTimestamp";
319
- } & z.BRAND<"UnixTimestamp">) | null;
292
+ timestamp: import("../_common/unix-timestamp.js").UnixTimestamp | null;
320
293
  };
321
294
  hash: string;
322
295
  is_locked: boolean;
@@ -363,7 +336,6 @@ 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
339
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
368
340
  gtfs_agency: z.ZodOptional<z.ZodObject<{
369
341
  agency_email: 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'];
@@ -16,12 +16,8 @@ export const PlanSchema = DocumentSchema.extend({
16
16
  pcgi_legacy: PlanPcgiLegacySchema,
17
17
  status_merger: ProcessingStatusSchema.default('waiting'),
18
18
  }).strict();
19
- export const CreatePlanSchema = PlanSchema.omit({
20
- _id: true,
21
- created_at: true,
22
- updated_at: true,
23
- });
24
- export const UpdatePlanSchema = CreatePlanSchema.partial();
19
+ export const CreatePlanSchema = PlanSchema.omit({ _id: true, created_at: true, updated_at: true });
20
+ export const UpdatePlanSchema = CreatePlanSchema.omit({ created_by: true }).partial();
25
21
  /* * */
26
22
  export const PlanPermissionSchema = z.object({
27
23
  agency_ids: z.array(z.string()),
@@ -156,7 +156,6 @@ export declare const CreateRideAuditSchema: z.ZodObject<Omit<{
156
156
  }>;
157
157
  export declare const UpdateRideAuditSchema: z.ZodObject<{
158
158
  _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
159
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
160
159
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
161
160
  is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
162
161
  comments: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -192,7 +191,6 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
192
191
  ride_id: z.ZodOptional<z.ZodString>;
193
192
  }, "strict", z.ZodTypeAny, {
194
193
  _id?: string | undefined;
195
- created_by?: string | undefined;
196
194
  updated_by?: string | undefined;
197
195
  is_locked?: boolean | undefined;
198
196
  comments?: {
@@ -211,7 +209,6 @@ export declare const UpdateRideAuditSchema: z.ZodObject<{
211
209
  ride_id?: string | undefined;
212
210
  }, {
213
211
  _id?: string | undefined;
214
- created_by?: string | undefined;
215
212
  updated_by?: string | undefined;
216
213
  is_locked?: boolean | undefined;
217
214
  comments?: {
@@ -9,4 +9,4 @@ export const RideAuditSchema = DocumentSchema.extend({
9
9
  ride_id: z.string(),
10
10
  }).strict();
11
11
  export const CreateRideAuditSchema = RideAuditSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
12
- export const UpdateRideAuditSchema = CreateRideAuditSchema.partial();
12
+ export const UpdateRideAuditSchema = CreateRideAuditSchema.omit({ created_by: true }).partial();
@@ -674,7 +674,6 @@ export declare const CreateRideJustificationSchema: z.ZodObject<Omit<{
674
674
  }>;
675
675
  export declare const UpdateRideJustificationSchema: z.ZodObject<{
676
676
  _id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
677
- created_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
678
677
  updated_by: z.ZodOptional<z.ZodDefault<z.ZodString>>;
679
678
  comments: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
680
679
  _id: z.ZodString;
@@ -910,7 +909,6 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
910
909
  trip_id: z.ZodOptional<z.ZodString>;
911
910
  }, "strict", z.ZodTypeAny, {
912
911
  _id?: string | undefined;
913
- created_by?: string | undefined;
914
912
  updated_by?: string | undefined;
915
913
  comments?: ({
916
914
  _id: string;
@@ -961,7 +959,6 @@ export declare const UpdateRideJustificationSchema: z.ZodObject<{
961
959
  trip_id?: string | undefined;
962
960
  }, {
963
961
  _id?: string | undefined;
964
- created_by?: string | undefined;
965
962
  updated_by?: string | undefined;
966
963
  comments?: ({
967
964
  _id: string;
@@ -38,4 +38,4 @@ export const RideJustificationSchema = DocumentSchema.extend({
38
38
  trip_id: z.string(),
39
39
  }).strict();
40
40
  export const CreateRideJustificationSchema = RideJustificationSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
41
- export const UpdateRideJustificationSchema = CreateRideJustificationSchema.partial();
41
+ export const UpdateRideJustificationSchema = CreateRideJustificationSchema.omit({ created_by: true }).partial();