@tmlmobilidade/types 20250915.1331.9 → 20250915.1518.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/_common/comment.d.ts +168 -27
- package/dist/src/_common/comment.js +26 -5
- package/dist/src/file.d.ts +7 -7
- package/dist/src/rides/ride-audit.d.ts +15 -0
- package/dist/src/rides/ride-justification.d.ts +138 -475
- package/dist/src/rides/ride-justification.js +4 -22
- package/dist/src/stop.d.ts +126 -63
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* * */
|
|
2
|
-
import { CommentSchema
|
|
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
|
|
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(
|
|
19
|
+
comments: z.array(CommentSchema).default([]),
|
|
38
20
|
is_locked: z.boolean().default(false),
|
|
39
21
|
justification_cause: RideJustificationCauseSchema,
|
|
40
22
|
justification_source: RideJustificationSourceSchema,
|
package/dist/src/stop.d.ts
CHANGED
|
@@ -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,10 @@ 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
|
-
|
|
134
|
-
|
|
138
|
+
curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
139
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
140
|
+
prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
141
|
+
type: z.ZodLiteral<"status_changed">;
|
|
135
142
|
}, "strip", z.ZodTypeAny, {
|
|
136
143
|
_id: string;
|
|
137
144
|
created_at: number & {
|
|
@@ -140,20 +147,22 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
140
147
|
updated_at: number & {
|
|
141
148
|
__brand: "UnixTimestamp";
|
|
142
149
|
};
|
|
143
|
-
type: "
|
|
144
|
-
curr_status: string;
|
|
145
|
-
prev_status: string;
|
|
150
|
+
type: "status_changed";
|
|
151
|
+
curr_status: string | boolean;
|
|
152
|
+
prev_status: string | boolean;
|
|
146
153
|
created_by?: string | undefined;
|
|
147
154
|
updated_by?: string | undefined;
|
|
155
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
148
156
|
}, {
|
|
149
157
|
_id: string;
|
|
150
158
|
created_at: number;
|
|
151
159
|
updated_at: number;
|
|
152
|
-
type: "
|
|
153
|
-
curr_status: string;
|
|
154
|
-
prev_status: string;
|
|
160
|
+
type: "status_changed";
|
|
161
|
+
curr_status: string | boolean;
|
|
162
|
+
prev_status: string | boolean;
|
|
155
163
|
created_by?: string | undefined;
|
|
156
164
|
updated_by?: string | undefined;
|
|
165
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
157
166
|
}>]>, {
|
|
158
167
|
_id: string;
|
|
159
168
|
created_at: number & {
|
|
@@ -166,6 +175,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
166
175
|
type: "note";
|
|
167
176
|
created_by?: string | undefined;
|
|
168
177
|
updated_by?: string | undefined;
|
|
178
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
169
179
|
} | {
|
|
170
180
|
_id: string;
|
|
171
181
|
created_at: number & {
|
|
@@ -178,6 +188,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
178
188
|
updated_by: "system";
|
|
179
189
|
message: string;
|
|
180
190
|
type: "system_info";
|
|
191
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
181
192
|
} | {
|
|
182
193
|
_id: string;
|
|
183
194
|
created_at: number & {
|
|
@@ -186,11 +197,12 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
186
197
|
updated_at: number & {
|
|
187
198
|
__brand: "UnixTimestamp";
|
|
188
199
|
};
|
|
189
|
-
type: "
|
|
190
|
-
curr_status: string;
|
|
191
|
-
prev_status: string;
|
|
200
|
+
type: "status_changed";
|
|
201
|
+
curr_status: string | boolean;
|
|
202
|
+
prev_status: string | boolean;
|
|
192
203
|
created_by?: string | undefined;
|
|
193
204
|
updated_by?: string | undefined;
|
|
205
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
194
206
|
}, {
|
|
195
207
|
_id: string;
|
|
196
208
|
created_at: number;
|
|
@@ -199,6 +211,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
199
211
|
type: "note";
|
|
200
212
|
created_by?: string | undefined;
|
|
201
213
|
updated_by?: string | undefined;
|
|
214
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
202
215
|
} | {
|
|
203
216
|
_id: string;
|
|
204
217
|
created_at: number;
|
|
@@ -207,15 +220,17 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
207
220
|
updated_by: "system";
|
|
208
221
|
message: string;
|
|
209
222
|
type: "system_info";
|
|
223
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
210
224
|
} | {
|
|
211
225
|
_id: string;
|
|
212
226
|
created_at: number;
|
|
213
227
|
updated_at: number;
|
|
214
|
-
type: "
|
|
215
|
-
curr_status: string;
|
|
216
|
-
prev_status: string;
|
|
228
|
+
type: "status_changed";
|
|
229
|
+
curr_status: string | boolean;
|
|
230
|
+
prev_status: string | boolean;
|
|
217
231
|
created_by?: string | undefined;
|
|
218
232
|
updated_by?: string | undefined;
|
|
233
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
219
234
|
}>, "many">;
|
|
220
235
|
observations: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
221
236
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -246,6 +261,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
246
261
|
type: "note";
|
|
247
262
|
created_by?: string | undefined;
|
|
248
263
|
updated_by?: string | undefined;
|
|
264
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
249
265
|
} | {
|
|
250
266
|
_id: string;
|
|
251
267
|
created_at: number & {
|
|
@@ -258,6 +274,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
258
274
|
updated_by: "system";
|
|
259
275
|
message: string;
|
|
260
276
|
type: "system_info";
|
|
277
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
261
278
|
} | {
|
|
262
279
|
_id: string;
|
|
263
280
|
created_at: number & {
|
|
@@ -266,11 +283,12 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
266
283
|
updated_at: number & {
|
|
267
284
|
__brand: "UnixTimestamp";
|
|
268
285
|
};
|
|
269
|
-
type: "
|
|
270
|
-
curr_status: string;
|
|
271
|
-
prev_status: string;
|
|
286
|
+
type: "status_changed";
|
|
287
|
+
curr_status: string | boolean;
|
|
288
|
+
prev_status: string | boolean;
|
|
272
289
|
created_by?: string | undefined;
|
|
273
290
|
updated_by?: string | undefined;
|
|
291
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
274
292
|
})[];
|
|
275
293
|
is_archived: boolean;
|
|
276
294
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
@@ -327,6 +345,7 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
327
345
|
type: "note";
|
|
328
346
|
created_by?: string | undefined;
|
|
329
347
|
updated_by?: string | undefined;
|
|
348
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
330
349
|
} | {
|
|
331
350
|
_id: string;
|
|
332
351
|
created_at: number;
|
|
@@ -335,15 +354,17 @@ export declare const StopSchema: z.ZodObject<{
|
|
|
335
354
|
updated_by: "system";
|
|
336
355
|
message: string;
|
|
337
356
|
type: "system_info";
|
|
357
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
338
358
|
} | {
|
|
339
359
|
_id: string;
|
|
340
360
|
created_at: number;
|
|
341
361
|
updated_at: number;
|
|
342
|
-
type: "
|
|
343
|
-
curr_status: string;
|
|
344
|
-
prev_status: string;
|
|
362
|
+
type: "status_changed";
|
|
363
|
+
curr_status: string | boolean;
|
|
364
|
+
prev_status: string | boolean;
|
|
345
365
|
created_by?: string | undefined;
|
|
346
366
|
updated_by?: string | undefined;
|
|
367
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
347
368
|
})[];
|
|
348
369
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
349
370
|
operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
@@ -496,6 +517,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
496
517
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
497
518
|
} & {
|
|
498
519
|
message: z.ZodString;
|
|
520
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
499
521
|
type: z.ZodLiteral<"note">;
|
|
500
522
|
}, "strip", z.ZodTypeAny, {
|
|
501
523
|
_id: string;
|
|
@@ -509,6 +531,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
509
531
|
type: "note";
|
|
510
532
|
created_by?: string | undefined;
|
|
511
533
|
updated_by?: string | undefined;
|
|
534
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
512
535
|
}, {
|
|
513
536
|
_id: string;
|
|
514
537
|
created_at: number;
|
|
@@ -517,6 +540,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
517
540
|
type: "note";
|
|
518
541
|
created_by?: string | undefined;
|
|
519
542
|
updated_by?: string | undefined;
|
|
543
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
520
544
|
}>, z.ZodObject<{
|
|
521
545
|
_id: z.ZodString;
|
|
522
546
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -524,6 +548,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
524
548
|
} & {
|
|
525
549
|
created_by: z.ZodLiteral<"system">;
|
|
526
550
|
message: z.ZodString;
|
|
551
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
527
552
|
type: z.ZodLiteral<"system_info">;
|
|
528
553
|
updated_by: z.ZodLiteral<"system">;
|
|
529
554
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -538,6 +563,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
538
563
|
updated_by: "system";
|
|
539
564
|
message: string;
|
|
540
565
|
type: "system_info";
|
|
566
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
541
567
|
}, {
|
|
542
568
|
_id: string;
|
|
543
569
|
created_at: number;
|
|
@@ -546,6 +572,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
546
572
|
updated_by: "system";
|
|
547
573
|
message: string;
|
|
548
574
|
type: "system_info";
|
|
575
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
549
576
|
}>, z.ZodObject<{
|
|
550
577
|
_id: z.ZodString;
|
|
551
578
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -553,9 +580,10 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
553
580
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
554
581
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
555
582
|
} & {
|
|
556
|
-
curr_status: z.ZodString
|
|
557
|
-
|
|
558
|
-
|
|
583
|
+
curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
584
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
585
|
+
prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
586
|
+
type: z.ZodLiteral<"status_changed">;
|
|
559
587
|
}, "strip", z.ZodTypeAny, {
|
|
560
588
|
_id: string;
|
|
561
589
|
created_at: number & {
|
|
@@ -564,20 +592,22 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
564
592
|
updated_at: number & {
|
|
565
593
|
__brand: "UnixTimestamp";
|
|
566
594
|
};
|
|
567
|
-
type: "
|
|
568
|
-
curr_status: string;
|
|
569
|
-
prev_status: string;
|
|
595
|
+
type: "status_changed";
|
|
596
|
+
curr_status: string | boolean;
|
|
597
|
+
prev_status: string | boolean;
|
|
570
598
|
created_by?: string | undefined;
|
|
571
599
|
updated_by?: string | undefined;
|
|
600
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
572
601
|
}, {
|
|
573
602
|
_id: string;
|
|
574
603
|
created_at: number;
|
|
575
604
|
updated_at: number;
|
|
576
|
-
type: "
|
|
577
|
-
curr_status: string;
|
|
578
|
-
prev_status: string;
|
|
605
|
+
type: "status_changed";
|
|
606
|
+
curr_status: string | boolean;
|
|
607
|
+
prev_status: string | boolean;
|
|
579
608
|
created_by?: string | undefined;
|
|
580
609
|
updated_by?: string | undefined;
|
|
610
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
581
611
|
}>]>, {
|
|
582
612
|
_id: string;
|
|
583
613
|
created_at: number & {
|
|
@@ -590,6 +620,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
590
620
|
type: "note";
|
|
591
621
|
created_by?: string | undefined;
|
|
592
622
|
updated_by?: string | undefined;
|
|
623
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
593
624
|
} | {
|
|
594
625
|
_id: string;
|
|
595
626
|
created_at: number & {
|
|
@@ -602,6 +633,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
602
633
|
updated_by: "system";
|
|
603
634
|
message: string;
|
|
604
635
|
type: "system_info";
|
|
636
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
605
637
|
} | {
|
|
606
638
|
_id: string;
|
|
607
639
|
created_at: number & {
|
|
@@ -610,11 +642,12 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
610
642
|
updated_at: number & {
|
|
611
643
|
__brand: "UnixTimestamp";
|
|
612
644
|
};
|
|
613
|
-
type: "
|
|
614
|
-
curr_status: string;
|
|
615
|
-
prev_status: string;
|
|
645
|
+
type: "status_changed";
|
|
646
|
+
curr_status: string | boolean;
|
|
647
|
+
prev_status: string | boolean;
|
|
616
648
|
created_by?: string | undefined;
|
|
617
649
|
updated_by?: string | undefined;
|
|
650
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
618
651
|
}, {
|
|
619
652
|
_id: string;
|
|
620
653
|
created_at: number;
|
|
@@ -623,6 +656,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
623
656
|
type: "note";
|
|
624
657
|
created_by?: string | undefined;
|
|
625
658
|
updated_by?: string | undefined;
|
|
659
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
626
660
|
} | {
|
|
627
661
|
_id: string;
|
|
628
662
|
created_at: number;
|
|
@@ -631,15 +665,17 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
631
665
|
updated_by: "system";
|
|
632
666
|
message: string;
|
|
633
667
|
type: "system_info";
|
|
668
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
634
669
|
} | {
|
|
635
670
|
_id: string;
|
|
636
671
|
created_at: number;
|
|
637
672
|
updated_at: number;
|
|
638
|
-
type: "
|
|
639
|
-
curr_status: string;
|
|
640
|
-
prev_status: string;
|
|
673
|
+
type: "status_changed";
|
|
674
|
+
curr_status: string | boolean;
|
|
675
|
+
prev_status: string | boolean;
|
|
641
676
|
created_by?: string | undefined;
|
|
642
677
|
updated_by?: string | undefined;
|
|
678
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
643
679
|
}>, "many">;
|
|
644
680
|
observations: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
645
681
|
}, "_id" | "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
@@ -663,6 +699,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
663
699
|
type: "note";
|
|
664
700
|
created_by?: string | undefined;
|
|
665
701
|
updated_by?: string | undefined;
|
|
702
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
666
703
|
} | {
|
|
667
704
|
_id: string;
|
|
668
705
|
created_at: number & {
|
|
@@ -675,6 +712,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
675
712
|
updated_by: "system";
|
|
676
713
|
message: string;
|
|
677
714
|
type: "system_info";
|
|
715
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
678
716
|
} | {
|
|
679
717
|
_id: string;
|
|
680
718
|
created_at: number & {
|
|
@@ -683,11 +721,12 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
683
721
|
updated_at: number & {
|
|
684
722
|
__brand: "UnixTimestamp";
|
|
685
723
|
};
|
|
686
|
-
type: "
|
|
687
|
-
curr_status: string;
|
|
688
|
-
prev_status: string;
|
|
724
|
+
type: "status_changed";
|
|
725
|
+
curr_status: string | boolean;
|
|
726
|
+
prev_status: string | boolean;
|
|
689
727
|
created_by?: string | undefined;
|
|
690
728
|
updated_by?: string | undefined;
|
|
729
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
691
730
|
})[];
|
|
692
731
|
is_archived: boolean;
|
|
693
732
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
@@ -741,6 +780,7 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
741
780
|
type: "note";
|
|
742
781
|
created_by?: string | undefined;
|
|
743
782
|
updated_by?: string | undefined;
|
|
783
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
744
784
|
} | {
|
|
745
785
|
_id: string;
|
|
746
786
|
created_at: number;
|
|
@@ -749,15 +789,17 @@ export declare const CreateStopSchema: z.ZodObject<Omit<{
|
|
|
749
789
|
updated_by: "system";
|
|
750
790
|
message: string;
|
|
751
791
|
type: "system_info";
|
|
792
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
752
793
|
} | {
|
|
753
794
|
_id: string;
|
|
754
795
|
created_at: number;
|
|
755
796
|
updated_at: number;
|
|
756
|
-
type: "
|
|
757
|
-
curr_status: string;
|
|
758
|
-
prev_status: string;
|
|
797
|
+
type: "status_changed";
|
|
798
|
+
curr_status: string | boolean;
|
|
799
|
+
prev_status: string | boolean;
|
|
759
800
|
created_by?: string | undefined;
|
|
760
801
|
updated_by?: string | undefined;
|
|
802
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
761
803
|
})[];
|
|
762
804
|
jurisdiction: "unknown" | "ip" | "municipality" | "other";
|
|
763
805
|
operational_status: "active" | "inactive" | "provisional" | "seasonal" | "voided";
|
|
@@ -819,6 +861,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
819
861
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
820
862
|
} & {
|
|
821
863
|
message: z.ZodString;
|
|
864
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
822
865
|
type: z.ZodLiteral<"note">;
|
|
823
866
|
}, "strip", z.ZodTypeAny, {
|
|
824
867
|
_id: string;
|
|
@@ -832,6 +875,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
832
875
|
type: "note";
|
|
833
876
|
created_by?: string | undefined;
|
|
834
877
|
updated_by?: string | undefined;
|
|
878
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
835
879
|
}, {
|
|
836
880
|
_id: string;
|
|
837
881
|
created_at: number;
|
|
@@ -840,6 +884,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
840
884
|
type: "note";
|
|
841
885
|
created_by?: string | undefined;
|
|
842
886
|
updated_by?: string | undefined;
|
|
887
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
843
888
|
}>, z.ZodObject<{
|
|
844
889
|
_id: z.ZodString;
|
|
845
890
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -847,6 +892,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
847
892
|
} & {
|
|
848
893
|
created_by: z.ZodLiteral<"system">;
|
|
849
894
|
message: z.ZodString;
|
|
895
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
850
896
|
type: z.ZodLiteral<"system_info">;
|
|
851
897
|
updated_by: z.ZodLiteral<"system">;
|
|
852
898
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -861,6 +907,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
861
907
|
updated_by: "system";
|
|
862
908
|
message: string;
|
|
863
909
|
type: "system_info";
|
|
910
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
864
911
|
}, {
|
|
865
912
|
_id: string;
|
|
866
913
|
created_at: number;
|
|
@@ -869,6 +916,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
869
916
|
updated_by: "system";
|
|
870
917
|
message: string;
|
|
871
918
|
type: "system_info";
|
|
919
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
872
920
|
}>, z.ZodObject<{
|
|
873
921
|
_id: z.ZodString;
|
|
874
922
|
created_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
@@ -876,9 +924,10 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
876
924
|
updated_at: z.ZodEffects<z.ZodNumber, import("./_common/unix-timestamp.js").UnixTimestamp, number>;
|
|
877
925
|
updated_by: z.ZodOptional<z.ZodString>;
|
|
878
926
|
} & {
|
|
879
|
-
curr_status: z.ZodString
|
|
880
|
-
|
|
881
|
-
|
|
927
|
+
curr_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
928
|
+
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
929
|
+
prev_status: z.ZodUnion<[z.ZodString, z.ZodBoolean]>;
|
|
930
|
+
type: z.ZodLiteral<"status_changed">;
|
|
882
931
|
}, "strip", z.ZodTypeAny, {
|
|
883
932
|
_id: string;
|
|
884
933
|
created_at: number & {
|
|
@@ -887,20 +936,22 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
887
936
|
updated_at: number & {
|
|
888
937
|
__brand: "UnixTimestamp";
|
|
889
938
|
};
|
|
890
|
-
type: "
|
|
891
|
-
curr_status: string;
|
|
892
|
-
prev_status: string;
|
|
939
|
+
type: "status_changed";
|
|
940
|
+
curr_status: string | boolean;
|
|
941
|
+
prev_status: string | boolean;
|
|
893
942
|
created_by?: string | undefined;
|
|
894
943
|
updated_by?: string | undefined;
|
|
944
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
895
945
|
}, {
|
|
896
946
|
_id: string;
|
|
897
947
|
created_at: number;
|
|
898
948
|
updated_at: number;
|
|
899
|
-
type: "
|
|
900
|
-
curr_status: string;
|
|
901
|
-
prev_status: string;
|
|
949
|
+
type: "status_changed";
|
|
950
|
+
curr_status: string | boolean;
|
|
951
|
+
prev_status: string | boolean;
|
|
902
952
|
created_by?: string | undefined;
|
|
903
953
|
updated_by?: string | undefined;
|
|
954
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
904
955
|
}>]>, {
|
|
905
956
|
_id: string;
|
|
906
957
|
created_at: number & {
|
|
@@ -913,6 +964,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
913
964
|
type: "note";
|
|
914
965
|
created_by?: string | undefined;
|
|
915
966
|
updated_by?: string | undefined;
|
|
967
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
916
968
|
} | {
|
|
917
969
|
_id: string;
|
|
918
970
|
created_at: number & {
|
|
@@ -925,6 +977,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
925
977
|
updated_by: "system";
|
|
926
978
|
message: string;
|
|
927
979
|
type: "system_info";
|
|
980
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
928
981
|
} | {
|
|
929
982
|
_id: string;
|
|
930
983
|
created_at: number & {
|
|
@@ -933,11 +986,12 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
933
986
|
updated_at: number & {
|
|
934
987
|
__brand: "UnixTimestamp";
|
|
935
988
|
};
|
|
936
|
-
type: "
|
|
937
|
-
curr_status: string;
|
|
938
|
-
prev_status: string;
|
|
989
|
+
type: "status_changed";
|
|
990
|
+
curr_status: string | boolean;
|
|
991
|
+
prev_status: string | boolean;
|
|
939
992
|
created_by?: string | undefined;
|
|
940
993
|
updated_by?: string | undefined;
|
|
994
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
941
995
|
}, {
|
|
942
996
|
_id: string;
|
|
943
997
|
created_at: number;
|
|
@@ -946,6 +1000,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
946
1000
|
type: "note";
|
|
947
1001
|
created_by?: string | undefined;
|
|
948
1002
|
updated_by?: string | undefined;
|
|
1003
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
949
1004
|
} | {
|
|
950
1005
|
_id: string;
|
|
951
1006
|
created_at: number;
|
|
@@ -954,15 +1009,17 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
954
1009
|
updated_by: "system";
|
|
955
1010
|
message: string;
|
|
956
1011
|
type: "system_info";
|
|
1012
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
957
1013
|
} | {
|
|
958
1014
|
_id: string;
|
|
959
1015
|
created_at: number;
|
|
960
1016
|
updated_at: number;
|
|
961
|
-
type: "
|
|
962
|
-
curr_status: string;
|
|
963
|
-
prev_status: string;
|
|
1017
|
+
type: "status_changed";
|
|
1018
|
+
curr_status: string | boolean;
|
|
1019
|
+
prev_status: string | boolean;
|
|
964
1020
|
created_by?: string | undefined;
|
|
965
1021
|
updated_by?: string | undefined;
|
|
1022
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
966
1023
|
}>, "many">>;
|
|
967
1024
|
is_archived: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
968
1025
|
jurisdiction: z.ZodOptional<z.ZodEnum<["ip", "municipality", "other", "unknown"]>>;
|
|
@@ -1020,6 +1077,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1020
1077
|
type: "note";
|
|
1021
1078
|
created_by?: string | undefined;
|
|
1022
1079
|
updated_by?: string | undefined;
|
|
1080
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1023
1081
|
} | {
|
|
1024
1082
|
_id: string;
|
|
1025
1083
|
created_at: number & {
|
|
@@ -1032,6 +1090,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1032
1090
|
updated_by: "system";
|
|
1033
1091
|
message: string;
|
|
1034
1092
|
type: "system_info";
|
|
1093
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1035
1094
|
} | {
|
|
1036
1095
|
_id: string;
|
|
1037
1096
|
created_at: number & {
|
|
@@ -1040,11 +1099,12 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1040
1099
|
updated_at: number & {
|
|
1041
1100
|
__brand: "UnixTimestamp";
|
|
1042
1101
|
};
|
|
1043
|
-
type: "
|
|
1044
|
-
curr_status: string;
|
|
1045
|
-
prev_status: string;
|
|
1102
|
+
type: "status_changed";
|
|
1103
|
+
curr_status: string | boolean;
|
|
1104
|
+
prev_status: string | boolean;
|
|
1046
1105
|
created_by?: string | undefined;
|
|
1047
1106
|
updated_by?: string | undefined;
|
|
1107
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1048
1108
|
})[] | undefined;
|
|
1049
1109
|
is_archived?: boolean | undefined;
|
|
1050
1110
|
jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
|
|
@@ -1098,6 +1158,7 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1098
1158
|
type: "note";
|
|
1099
1159
|
created_by?: string | undefined;
|
|
1100
1160
|
updated_by?: string | undefined;
|
|
1161
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1101
1162
|
} | {
|
|
1102
1163
|
_id: string;
|
|
1103
1164
|
created_at: number;
|
|
@@ -1106,15 +1167,17 @@ export declare const UpdateStopSchema: z.ZodObject<{
|
|
|
1106
1167
|
updated_by: "system";
|
|
1107
1168
|
message: string;
|
|
1108
1169
|
type: "system_info";
|
|
1170
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1109
1171
|
} | {
|
|
1110
1172
|
_id: string;
|
|
1111
1173
|
created_at: number;
|
|
1112
1174
|
updated_at: number;
|
|
1113
|
-
type: "
|
|
1114
|
-
curr_status: string;
|
|
1115
|
-
prev_status: string;
|
|
1175
|
+
type: "status_changed";
|
|
1176
|
+
curr_status: string | boolean;
|
|
1177
|
+
prev_status: string | boolean;
|
|
1116
1178
|
created_by?: string | undefined;
|
|
1117
1179
|
updated_by?: string | undefined;
|
|
1180
|
+
metadata?: Record<string, unknown> | null | undefined;
|
|
1118
1181
|
})[] | undefined;
|
|
1119
1182
|
is_archived?: boolean | undefined;
|
|
1120
1183
|
jurisdiction?: "unknown" | "ip" | "municipality" | "other" | undefined;
|
package/package.json
CHANGED