@tmlmobilidade/types 20250915.1331.9 → 20250915.1643.34

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.
@@ -1,5 +1,5 @@
1
1
  /* * */
2
- import { CommentSchema, CommentTypeSchema } from '../_common/comment.js';
2
+ import { CommentSchema } from '../_common/comment.js';
3
3
  import { DocumentSchema } from '../_common/document.js';
4
4
  import { RideAnalysisSchema } from './ride-analysis.js';
5
5
  import { z } from 'zod';
@@ -10,31 +10,13 @@ export const RIDE_JUSTIFICATION_CAUSE_OPTIONS = ['TECHNICAL_PROBLEM', 'DEMONSTRA
10
10
  export const RideJustificationCauseSchema = z.enum(RIDE_JUSTIFICATION_CAUSE_OPTIONS);
11
11
  export const RIDE_JUSTIFICATION_SOURCE_OPTIONS = ['MANUAL', 'REALTIME_ALERT'];
12
12
  export const RideJustificationSourceSchema = z.enum(RIDE_JUSTIFICATION_SOURCE_OPTIONS);
13
- /* * */
14
- const CommentSchemaWithRideJustificationStatus = CommentSchema.superRefine((data, ctx) => {
15
- if (data.type === CommentTypeSchema.enum.statusChanged) {
16
- const d = data;
17
- if (RideAcceptanceStatusSchema.safeParse(d.curr_status).error) {
18
- ctx.addIssue({
19
- code: z.ZodIssueCode.custom,
20
- message: 'curr_status must be a valid ride acceptance status',
21
- path: ['curr_status'],
22
- });
23
- }
24
- if (RideAcceptanceStatusSchema.safeParse(d.prev_status).error) {
25
- ctx.addIssue({
26
- code: z.ZodIssueCode.custom,
27
- message: 'prev_status must be a valid ride acceptance status',
28
- path: ['prev_status'],
29
- });
30
- }
31
- }
32
- });
13
+ export const RIDE_JUSTIFICATION_STATUS_TYPE_OPTIONS = ['locked_status', 'acceptance_status', 'pto_message'];
14
+ export const RideJustificationStatusTypeSchema = z.enum(RIDE_JUSTIFICATION_STATUS_TYPE_OPTIONS);
33
15
  /* * */
34
16
  export const RideJustificationSchema = DocumentSchema.extend({
35
17
  acceptance_status: RideAcceptanceStatusSchema,
36
18
  analysis: RideAnalysisSchema,
37
- comments: z.array(CommentSchemaWithRideJustificationStatus).default([]),
19
+ comments: z.array(CommentSchema).default([]),
38
20
  is_locked: z.boolean().default(false),
39
21
  justification_cause: RideJustificationCauseSchema,
40
22
  justification_source: RideJustificationSourceSchema,
@@ -72,6 +72,7 @@ export declare const StopSchema: z.ZodObject<{
72
72
  updated_by: z.ZodOptional<z.ZodString>;
73
73
  } & {
74
74
  message: z.ZodString;
75
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
75
76
  type: z.ZodLiteral<"note">;
76
77
  }, "strip", z.ZodTypeAny, {
77
78
  _id: string;
@@ -85,6 +86,7 @@ export declare const StopSchema: z.ZodObject<{
85
86
  type: "note";
86
87
  created_by?: string | undefined;
87
88
  updated_by?: string | undefined;
89
+ metadata?: Record<string, unknown> | null | undefined;
88
90
  }, {
89
91
  _id: string;
90
92
  created_at: number;
@@ -93,6 +95,7 @@ export declare const StopSchema: z.ZodObject<{
93
95
  type: "note";
94
96
  created_by?: string | undefined;
95
97
  updated_by?: string | undefined;
98
+ metadata?: Record<string, unknown> | null | undefined;
96
99
  }>, z.ZodObject<{
97
100
  _id: z.ZodString;
98
101
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -100,6 +103,7 @@ export declare const StopSchema: z.ZodObject<{
100
103
  } & {
101
104
  created_by: z.ZodLiteral<"system">;
102
105
  message: z.ZodString;
106
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
103
107
  type: z.ZodLiteral<"system_info">;
104
108
  updated_by: z.ZodLiteral<"system">;
105
109
  }, "strip", z.ZodTypeAny, {
@@ -114,6 +118,7 @@ export declare const StopSchema: z.ZodObject<{
114
118
  updated_by: "system";
115
119
  message: string;
116
120
  type: "system_info";
121
+ metadata?: Record<string, unknown> | null | undefined;
117
122
  }, {
118
123
  _id: string;
119
124
  created_at: number;
@@ -122,6 +127,7 @@ export declare const StopSchema: z.ZodObject<{
122
127
  updated_by: "system";
123
128
  message: string;
124
129
  type: "system_info";
130
+ metadata?: Record<string, unknown> | null | undefined;
125
131
  }>, z.ZodObject<{
126
132
  _id: z.ZodString;
127
133
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -129,9 +135,11 @@ export declare const StopSchema: z.ZodObject<{
129
135
  updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
130
136
  updated_by: z.ZodOptional<z.ZodString>;
131
137
  } & {
132
- curr_status: z.ZodString;
133
- prev_status: z.ZodString;
134
- type: z.ZodLiteral<"statusChanged">;
138
+ accessor: z.ZodString;
139
+ curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
140
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
141
+ prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
142
+ type: z.ZodLiteral<"status_changed">;
135
143
  }, "strip", z.ZodTypeAny, {
136
144
  _id: string;
137
145
  created_at: number & {
@@ -140,20 +148,24 @@ export declare const StopSchema: z.ZodObject<{
140
148
  updated_at: number & {
141
149
  __brand: "UnixTimestamp";
142
150
  };
143
- type: "statusChanged";
144
- curr_status: string;
145
- prev_status: string;
151
+ type: "status_changed";
152
+ accessor: string;
153
+ curr_status: string | boolean;
154
+ prev_status: string | boolean;
146
155
  created_by?: string | undefined;
147
156
  updated_by?: string | undefined;
157
+ metadata?: Record<string, unknown> | null | undefined;
148
158
  }, {
149
159
  _id: string;
150
160
  created_at: number;
151
161
  updated_at: number;
152
- type: "statusChanged";
153
- curr_status: string;
154
- prev_status: string;
162
+ type: "status_changed";
163
+ accessor: string;
164
+ curr_status: string | boolean;
165
+ prev_status: string | boolean;
155
166
  created_by?: string | undefined;
156
167
  updated_by?: string | undefined;
168
+ metadata?: Record<string, unknown> | null | undefined;
157
169
  }>]>, {
158
170
  _id: string;
159
171
  created_at: number & {
@@ -166,6 +178,7 @@ export declare const StopSchema: z.ZodObject<{
166
178
  type: "note";
167
179
  created_by?: string | undefined;
168
180
  updated_by?: string | undefined;
181
+ metadata?: Record<string, unknown> | null | undefined;
169
182
  } | {
170
183
  _id: string;
171
184
  created_at: number & {
@@ -178,6 +191,7 @@ export declare const StopSchema: z.ZodObject<{
178
191
  updated_by: "system";
179
192
  message: string;
180
193
  type: "system_info";
194
+ metadata?: Record<string, unknown> | null | undefined;
181
195
  } | {
182
196
  _id: string;
183
197
  created_at: number & {
@@ -186,11 +200,13 @@ export declare const StopSchema: z.ZodObject<{
186
200
  updated_at: number & {
187
201
  __brand: "UnixTimestamp";
188
202
  };
189
- type: "statusChanged";
190
- curr_status: string;
191
- prev_status: string;
203
+ type: "status_changed";
204
+ accessor: string;
205
+ curr_status: string | boolean;
206
+ prev_status: string | boolean;
192
207
  created_by?: string | undefined;
193
208
  updated_by?: string | undefined;
209
+ metadata?: Record<string, unknown> | null | undefined;
194
210
  }, {
195
211
  _id: string;
196
212
  created_at: number;
@@ -199,6 +215,7 @@ export declare const StopSchema: z.ZodObject<{
199
215
  type: "note";
200
216
  created_by?: string | undefined;
201
217
  updated_by?: string | undefined;
218
+ metadata?: Record<string, unknown> | null | undefined;
202
219
  } | {
203
220
  _id: string;
204
221
  created_at: number;
@@ -207,15 +224,18 @@ export declare const StopSchema: z.ZodObject<{
207
224
  updated_by: "system";
208
225
  message: string;
209
226
  type: "system_info";
227
+ metadata?: Record<string, unknown> | null | undefined;
210
228
  } | {
211
229
  _id: string;
212
230
  created_at: number;
213
231
  updated_at: number;
214
- type: "statusChanged";
215
- curr_status: string;
216
- prev_status: string;
232
+ type: "status_changed";
233
+ accessor: string;
234
+ curr_status: string | boolean;
235
+ prev_status: string | boolean;
217
236
  created_by?: string | undefined;
218
237
  updated_by?: string | undefined;
238
+ metadata?: Record<string, unknown> | null | undefined;
219
239
  }>, "many">;
220
240
  observations: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
241
  }, "strict", z.ZodTypeAny, {
@@ -246,6 +266,7 @@ export declare const StopSchema: z.ZodObject<{
246
266
  type: "note";
247
267
  created_by?: string | undefined;
248
268
  updated_by?: string | undefined;
269
+ metadata?: Record<string, unknown> | null | undefined;
249
270
  } | {
250
271
  _id: string;
251
272
  created_at: number & {
@@ -258,6 +279,7 @@ export declare const StopSchema: z.ZodObject<{
258
279
  updated_by: "system";
259
280
  message: string;
260
281
  type: "system_info";
282
+ metadata?: Record<string, unknown> | null | undefined;
261
283
  } | {
262
284
  _id: string;
263
285
  created_at: number & {
@@ -266,11 +288,13 @@ export declare const StopSchema: z.ZodObject<{
266
288
  updated_at: number & {
267
289
  __brand: "UnixTimestamp";
268
290
  };
269
- type: "statusChanged";
270
- curr_status: string;
271
- prev_status: string;
291
+ type: "status_changed";
292
+ accessor: string;
293
+ curr_status: string | boolean;
294
+ prev_status: string | boolean;
272
295
  created_by?: string | undefined;
273
296
  updated_by?: string | undefined;
297
+ metadata?: Record<string, unknown> | null | undefined;
274
298
  })[];
275
299
  is_archived: boolean;
276
300
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
@@ -327,6 +351,7 @@ export declare const StopSchema: z.ZodObject<{
327
351
  type: "note";
328
352
  created_by?: string | undefined;
329
353
  updated_by?: string | undefined;
354
+ metadata?: Record<string, unknown> | null | undefined;
330
355
  } | {
331
356
  _id: string;
332
357
  created_at: number;
@@ -335,15 +360,18 @@ export declare const StopSchema: z.ZodObject<{
335
360
  updated_by: "system";
336
361
  message: string;
337
362
  type: "system_info";
363
+ metadata?: Record<string, unknown> | null | undefined;
338
364
  } | {
339
365
  _id: string;
340
366
  created_at: number;
341
367
  updated_at: number;
342
- type: "statusChanged";
343
- curr_status: string;
344
- prev_status: string;
368
+ type: "status_changed";
369
+ accessor: string;
370
+ curr_status: string | boolean;
371
+ prev_status: string | boolean;
345
372
  created_by?: string | undefined;
346
373
  updated_by?: string | undefined;
374
+ metadata?: Record<string, unknown> | null | undefined;
347
375
  })[];
348
376
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
349
377
  operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
@@ -496,6 +524,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
496
524
  updated_by: z.ZodOptional<z.ZodString>;
497
525
  } & {
498
526
  message: z.ZodString;
527
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
499
528
  type: z.ZodLiteral<"note">;
500
529
  }, "strip", z.ZodTypeAny, {
501
530
  _id: string;
@@ -509,6 +538,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
509
538
  type: "note";
510
539
  created_by?: string | undefined;
511
540
  updated_by?: string | undefined;
541
+ metadata?: Record<string, unknown> | null | undefined;
512
542
  }, {
513
543
  _id: string;
514
544
  created_at: number;
@@ -517,6 +547,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
517
547
  type: "note";
518
548
  created_by?: string | undefined;
519
549
  updated_by?: string | undefined;
550
+ metadata?: Record<string, unknown> | null | undefined;
520
551
  }>, z.ZodObject<{
521
552
  _id: z.ZodString;
522
553
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -524,6 +555,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
524
555
  } & {
525
556
  created_by: z.ZodLiteral<"system">;
526
557
  message: z.ZodString;
558
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
527
559
  type: z.ZodLiteral<"system_info">;
528
560
  updated_by: z.ZodLiteral<"system">;
529
561
  }, "strip", z.ZodTypeAny, {
@@ -538,6 +570,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
538
570
  updated_by: "system";
539
571
  message: string;
540
572
  type: "system_info";
573
+ metadata?: Record<string, unknown> | null | undefined;
541
574
  }, {
542
575
  _id: string;
543
576
  created_at: number;
@@ -546,6 +579,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
546
579
  updated_by: "system";
547
580
  message: string;
548
581
  type: "system_info";
582
+ metadata?: Record<string, unknown> | null | undefined;
549
583
  }>, z.ZodObject<{
550
584
  _id: z.ZodString;
551
585
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -553,9 +587,11 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
553
587
  updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
554
588
  updated_by: z.ZodOptional<z.ZodString>;
555
589
  } & {
556
- curr_status: z.ZodString;
557
- prev_status: z.ZodString;
558
- type: z.ZodLiteral<"statusChanged">;
590
+ accessor: z.ZodString;
591
+ curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
592
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
593
+ prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
594
+ type: z.ZodLiteral<"status_changed">;
559
595
  }, "strip", z.ZodTypeAny, {
560
596
  _id: string;
561
597
  created_at: number & {
@@ -564,20 +600,24 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
564
600
  updated_at: number & {
565
601
  __brand: "UnixTimestamp";
566
602
  };
567
- type: "statusChanged";
568
- curr_status: string;
569
- prev_status: string;
603
+ type: "status_changed";
604
+ accessor: string;
605
+ curr_status: string | boolean;
606
+ prev_status: string | boolean;
570
607
  created_by?: string | undefined;
571
608
  updated_by?: string | undefined;
609
+ metadata?: Record<string, unknown> | null | undefined;
572
610
  }, {
573
611
  _id: string;
574
612
  created_at: number;
575
613
  updated_at: number;
576
- type: "statusChanged";
577
- curr_status: string;
578
- prev_status: string;
614
+ type: "status_changed";
615
+ accessor: string;
616
+ curr_status: string | boolean;
617
+ prev_status: string | boolean;
579
618
  created_by?: string | undefined;
580
619
  updated_by?: string | undefined;
620
+ metadata?: Record<string, unknown> | null | undefined;
581
621
  }>]>, {
582
622
  _id: string;
583
623
  created_at: number & {
@@ -590,6 +630,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
590
630
  type: "note";
591
631
  created_by?: string | undefined;
592
632
  updated_by?: string | undefined;
633
+ metadata?: Record<string, unknown> | null | undefined;
593
634
  } | {
594
635
  _id: string;
595
636
  created_at: number & {
@@ -602,6 +643,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
602
643
  updated_by: "system";
603
644
  message: string;
604
645
  type: "system_info";
646
+ metadata?: Record<string, unknown> | null | undefined;
605
647
  } | {
606
648
  _id: string;
607
649
  created_at: number & {
@@ -610,11 +652,13 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
610
652
  updated_at: number & {
611
653
  __brand: "UnixTimestamp";
612
654
  };
613
- type: "statusChanged";
614
- curr_status: string;
615
- prev_status: string;
655
+ type: "status_changed";
656
+ accessor: string;
657
+ curr_status: string | boolean;
658
+ prev_status: string | boolean;
616
659
  created_by?: string | undefined;
617
660
  updated_by?: string | undefined;
661
+ metadata?: Record<string, unknown> | null | undefined;
618
662
  }, {
619
663
  _id: string;
620
664
  created_at: number;
@@ -623,6 +667,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
623
667
  type: "note";
624
668
  created_by?: string | undefined;
625
669
  updated_by?: string | undefined;
670
+ metadata?: Record<string, unknown> | null | undefined;
626
671
  } | {
627
672
  _id: string;
628
673
  created_at: number;
@@ -631,15 +676,18 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
631
676
  updated_by: "system";
632
677
  message: string;
633
678
  type: "system_info";
679
+ metadata?: Record<string, unknown> | null | undefined;
634
680
  } | {
635
681
  _id: string;
636
682
  created_at: number;
637
683
  updated_at: number;
638
- type: "statusChanged";
639
- curr_status: string;
640
- prev_status: string;
684
+ type: "status_changed";
685
+ accessor: string;
686
+ curr_status: string | boolean;
687
+ prev_status: string | boolean;
641
688
  created_by?: string | undefined;
642
689
  updated_by?: string | undefined;
690
+ metadata?: Record<string, unknown> | null | undefined;
643
691
  }>, "many">;
644
692
  observations: z.ZodOptional<z.ZodNullable<z.ZodString>>;
645
693
  }, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
@@ -663,6 +711,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
663
711
  type: "note";
664
712
  created_by?: string | undefined;
665
713
  updated_by?: string | undefined;
714
+ metadata?: Record<string, unknown> | null | undefined;
666
715
  } | {
667
716
  _id: string;
668
717
  created_at: number & {
@@ -675,6 +724,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
675
724
  updated_by: "system";
676
725
  message: string;
677
726
  type: "system_info";
727
+ metadata?: Record<string, unknown> | null | undefined;
678
728
  } | {
679
729
  _id: string;
680
730
  created_at: number & {
@@ -683,11 +733,13 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
683
733
  updated_at: number & {
684
734
  __brand: "UnixTimestamp";
685
735
  };
686
- type: "statusChanged";
687
- curr_status: string;
688
- prev_status: string;
736
+ type: "status_changed";
737
+ accessor: string;
738
+ curr_status: string | boolean;
739
+ prev_status: string | boolean;
689
740
  created_by?: string | undefined;
690
741
  updated_by?: string | undefined;
742
+ metadata?: Record<string, unknown> | null | undefined;
691
743
  })[];
692
744
  is_archived: boolean;
693
745
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
@@ -741,6 +793,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
741
793
  type: "note";
742
794
  created_by?: string | undefined;
743
795
  updated_by?: string | undefined;
796
+ metadata?: Record<string, unknown> | null | undefined;
744
797
  } | {
745
798
  _id: string;
746
799
  created_at: number;
@@ -749,15 +802,18 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
749
802
  updated_by: "system";
750
803
  message: string;
751
804
  type: "system_info";
805
+ metadata?: Record<string, unknown> | null | undefined;
752
806
  } | {
753
807
  _id: string;
754
808
  created_at: number;
755
809
  updated_at: number;
756
- type: "statusChanged";
757
- curr_status: string;
758
- prev_status: string;
810
+ type: "status_changed";
811
+ accessor: string;
812
+ curr_status: string | boolean;
813
+ prev_status: string | boolean;
759
814
  created_by?: string | undefined;
760
815
  updated_by?: string | undefined;
816
+ metadata?: Record<string, unknown> | null | undefined;
761
817
  })[];
762
818
  jurisdiction: "unknown" | "ip" | "municipality" | "other";
763
819
  operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
@@ -819,6 +875,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
819
875
  updated_by: z.ZodOptional<z.ZodString>;
820
876
  } & {
821
877
  message: z.ZodString;
878
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
822
879
  type: z.ZodLiteral<"note">;
823
880
  }, "strip", z.ZodTypeAny, {
824
881
  _id: string;
@@ -832,6 +889,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
832
889
  type: "note";
833
890
  created_by?: string | undefined;
834
891
  updated_by?: string | undefined;
892
+ metadata?: Record<string, unknown> | null | undefined;
835
893
  }, {
836
894
  _id: string;
837
895
  created_at: number;
@@ -840,6 +898,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
840
898
  type: "note";
841
899
  created_by?: string | undefined;
842
900
  updated_by?: string | undefined;
901
+ metadata?: Record<string, unknown> | null | undefined;
843
902
  }>, z.ZodObject<{
844
903
  _id: z.ZodString;
845
904
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -847,6 +906,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
847
906
  } & {
848
907
  created_by: z.ZodLiteral<"system">;
849
908
  message: z.ZodString;
909
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
850
910
  type: z.ZodLiteral<"system_info">;
851
911
  updated_by: z.ZodLiteral<"system">;
852
912
  }, "strip", z.ZodTypeAny, {
@@ -861,6 +921,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
861
921
  updated_by: "system";
862
922
  message: string;
863
923
  type: "system_info";
924
+ metadata?: Record<string, unknown> | null | undefined;
864
925
  }, {
865
926
  _id: string;
866
927
  created_at: number;
@@ -869,6 +930,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
869
930
  updated_by: "system";
870
931
  message: string;
871
932
  type: "system_info";
933
+ metadata?: Record<string, unknown> | null | undefined;
872
934
  }>, z.ZodObject<{
873
935
  _id: z.ZodString;
874
936
  created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
@@ -876,9 +938,11 @@ export declare const UpdateStopSchema: z.ZodObject<{
876
938
  updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
877
939
  updated_by: z.ZodOptional<z.ZodString>;
878
940
  } & {
879
- curr_status: z.ZodString;
880
- prev_status: z.ZodString;
881
- type: z.ZodLiteral<"statusChanged">;
941
+ accessor: z.ZodString;
942
+ curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
943
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
944
+ prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
945
+ type: z.ZodLiteral<"status_changed">;
882
946
  }, "strip", z.ZodTypeAny, {
883
947
  _id: string;
884
948
  created_at: number & {
@@ -887,20 +951,24 @@ export declare const UpdateStopSchema: z.ZodObject<{
887
951
  updated_at: number & {
888
952
  __brand: "UnixTimestamp";
889
953
  };
890
- type: "statusChanged";
891
- curr_status: string;
892
- prev_status: string;
954
+ type: "status_changed";
955
+ accessor: string;
956
+ curr_status: string | boolean;
957
+ prev_status: string | boolean;
893
958
  created_by?: string | undefined;
894
959
  updated_by?: string | undefined;
960
+ metadata?: Record<string, unknown> | null | undefined;
895
961
  }, {
896
962
  _id: string;
897
963
  created_at: number;
898
964
  updated_at: number;
899
- type: "statusChanged";
900
- curr_status: string;
901
- prev_status: string;
965
+ type: "status_changed";
966
+ accessor: string;
967
+ curr_status: string | boolean;
968
+ prev_status: string | boolean;
902
969
  created_by?: string | undefined;
903
970
  updated_by?: string | undefined;
971
+ metadata?: Record<string, unknown> | null | undefined;
904
972
  }>]>, {
905
973
  _id: string;
906
974
  created_at: number & {
@@ -913,6 +981,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
913
981
  type: "note";
914
982
  created_by?: string | undefined;
915
983
  updated_by?: string | undefined;
984
+ metadata?: Record<string, unknown> | null | undefined;
916
985
  } | {
917
986
  _id: string;
918
987
  created_at: number & {
@@ -925,6 +994,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
925
994
  updated_by: "system";
926
995
  message: string;
927
996
  type: "system_info";
997
+ metadata?: Record<string, unknown> | null | undefined;
928
998
  } | {
929
999
  _id: string;
930
1000
  created_at: number & {
@@ -933,11 +1003,13 @@ export declare const UpdateStopSchema: z.ZodObject<{
933
1003
  updated_at: number & {
934
1004
  __brand: "UnixTimestamp";
935
1005
  };
936
- type: "statusChanged";
937
- curr_status: string;
938
- prev_status: string;
1006
+ type: "status_changed";
1007
+ accessor: string;
1008
+ curr_status: string | boolean;
1009
+ prev_status: string | boolean;
939
1010
  created_by?: string | undefined;
940
1011
  updated_by?: string | undefined;
1012
+ metadata?: Record<string, unknown> | null | undefined;
941
1013
  }, {
942
1014
  _id: string;
943
1015
  created_at: number;
@@ -946,6 +1018,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
946
1018
  type: "note";
947
1019
  created_by?: string | undefined;
948
1020
  updated_by?: string | undefined;
1021
+ metadata?: Record<string, unknown> | null | undefined;
949
1022
  } | {
950
1023
  _id: string;
951
1024
  created_at: number;
@@ -954,15 +1027,18 @@ export declare const UpdateStopSchema: z.ZodObject<{
954
1027
  updated_by: "system";
955
1028
  message: string;
956
1029
  type: "system_info";
1030
+ metadata?: Record<string, unknown> | null | undefined;
957
1031
  } | {
958
1032
  _id: string;
959
1033
  created_at: number;
960
1034
  updated_at: number;
961
- type: "statusChanged";
962
- curr_status: string;
963
- prev_status: string;
1035
+ type: "status_changed";
1036
+ accessor: string;
1037
+ curr_status: string | boolean;
1038
+ prev_status: string | boolean;
964
1039
  created_by?: string | undefined;
965
1040
  updated_by?: string | undefined;
1041
+ metadata?: Record<string, unknown> | null | undefined;
966
1042
  }>, "many">>;
967
1043
  is_archived: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
968
1044
  jurisdiction: z.ZodOptional<z.ZodEnum<["ip", "municipality", "other", "unknown"]>>;
@@ -1020,6 +1096,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
1020
1096
  type: "note";
1021
1097
  created_by?: string | undefined;
1022
1098
  updated_by?: string | undefined;
1099
+ metadata?: Record<string, unknown> | null | undefined;
1023
1100
  } | {
1024
1101
  _id: string;
1025
1102
  created_at: number & {
@@ -1032,6 +1109,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
1032
1109
  updated_by: "system";
1033
1110
  message: string;
1034
1111
  type: "system_info";
1112
+ metadata?: Record<string, unknown> | null | undefined;
1035
1113
  } | {
1036
1114
  _id: string;
1037
1115
  created_at: number & {
@@ -1040,11 +1118,13 @@ export declare const UpdateStopSchema: z.ZodObject<{
1040
1118
  updated_at: number & {
1041
1119
  __brand: "UnixTimestamp";
1042
1120
  };
1043
- type: "statusChanged";
1044
- curr_status: string;
1045
- prev_status: string;
1121
+ type: "status_changed";
1122
+ accessor: string;
1123
+ curr_status: string | boolean;
1124
+ prev_status: string | boolean;
1046
1125
  created_by?: string | undefined;
1047
1126
  updated_by?: string | undefined;
1127
+ metadata?: Record<string, unknown> | null | undefined;
1048
1128
  })[] | undefined;
1049
1129
  is_archived?: boolean | undefined;
1050
1130
  jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
@@ -1098,6 +1178,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
1098
1178
  type: "note";
1099
1179
  created_by?: string | undefined;
1100
1180
  updated_by?: string | undefined;
1181
+ metadata?: Record<string, unknown> | null | undefined;
1101
1182
  } | {
1102
1183
  _id: string;
1103
1184
  created_at: number;
@@ -1106,15 +1187,18 @@ export declare const UpdateStopSchema: z.ZodObject<{
1106
1187
  updated_by: "system";
1107
1188
  message: string;
1108
1189
  type: "system_info";
1190
+ metadata?: Record<string, unknown> | null | undefined;
1109
1191
  } | {
1110
1192
  _id: string;
1111
1193
  created_at: number;
1112
1194
  updated_at: number;
1113
- type: "statusChanged";
1114
- curr_status: string;
1115
- prev_status: string;
1195
+ type: "status_changed";
1196
+ accessor: string;
1197
+ curr_status: string | boolean;
1198
+ prev_status: string | boolean;
1116
1199
  created_by?: string | undefined;
1117
1200
  updated_by?: string | undefined;
1201
+ metadata?: Record<string, unknown> | null | undefined;
1118
1202
  })[] | undefined;
1119
1203
  is_archived?: boolean | undefined;
1120
1204
  jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;