@tmlmobilidade/types 20250909.1538.52 → 20250910.1344.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.
- package/dist/src/_common/comment.d.ts +20 -12
- package/dist/src/_common/comment.js +0 -1
- package/dist/src/_common/document.d.ts +14 -8
- package/dist/src/_common/document.js +4 -2
- package/dist/src/_common/proposed-change.d.ts +37 -19
- package/dist/src/agency.d.ts +30 -12
- package/dist/src/alert.d.ts +21 -12
- package/dist/src/auth/role.d.ts +30 -12
- package/dist/src/auth/session.d.ts +30 -12
- package/dist/src/auth/user.d.ts +30 -12
- package/dist/src/auth/verification-token.d.ts +30 -12
- package/dist/src/file.d.ts +23 -23
- package/dist/src/organization.d.ts +30 -12
- package/dist/src/plans/gtfs-validation.d.ts +30 -12
- package/dist/src/plans/plan.d.ts +30 -12
- package/dist/src/rides/index.d.ts +2 -1
- package/dist/src/rides/index.js +2 -1
- package/dist/src/rides/ride-audit.d.ts +219 -0
- package/dist/src/rides/ride-audit.js +12 -0
- package/dist/src/rides/ride-justification.d.ts +447 -0
- package/dist/src/rides/ride-justification.js +43 -0
- package/dist/src/rides/ride-overrides.d.ts +9 -0
- package/dist/src/rides/ride-overrides.js +6 -0
- package/dist/src/rides/ride.d.ts +38 -20
- package/dist/src/sams/sam.d.ts +30 -12
- package/dist/src/simplified-apex/simplified-apex-location.d.ts +32 -20
- package/dist/src/simplified-apex/simplified-apex-on-board-refund.d.ts +32 -20
- package/dist/src/simplified-apex/simplified-apex-on-board-sale.d.ts +32 -20
- package/dist/src/simplified-apex/simplified-apex-validation.d.ts +32 -20
- package/dist/src/stop.d.ts +146 -101
- package/dist/src/vehicle-event.d.ts +18 -12
- package/dist/src/zone.d.ts +24 -6
- package/package.json +1 -1
- package/dist/src/rides/ride-annotation.d.ts +0 -579
- package/dist/src/rides/ride-annotation.js +0 -34
|
@@ -1,579 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const RIDE_ACCEPTANCE_STATUS_OPTIONS: readonly ["justification_required", "under_review", "accepted", "rejected"];
|
|
3
|
-
export declare const RideAcceptanceStatusSchema: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
4
|
-
export declare const RideAcceptanceSchema: z.ZodObject<{
|
|
5
|
-
_id: z.ZodString;
|
|
6
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
7
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
8
|
-
} & {
|
|
9
|
-
analysis_summary: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<["pass", "fail", "skip", "error"]>>>>;
|
|
10
|
-
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
11
|
-
mode: z.ZodEnum<["manual", "auto"]>;
|
|
12
|
-
status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
13
|
-
}, "strict", z.ZodTypeAny, {
|
|
14
|
-
_id: string;
|
|
15
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
16
|
-
created_by: string | null;
|
|
17
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
18
|
-
mode: "manual" | "auto";
|
|
19
|
-
created_at?: (number & {
|
|
20
|
-
__brand: "UnixTimestamp";
|
|
21
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
22
|
-
updated_at?: (number & {
|
|
23
|
-
__brand: "UnixTimestamp";
|
|
24
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
_id: string;
|
|
27
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
28
|
-
mode: "manual" | "auto";
|
|
29
|
-
created_at?: number | null | undefined;
|
|
30
|
-
updated_at?: number | null | undefined;
|
|
31
|
-
created_by?: string | null | undefined;
|
|
32
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
33
|
-
}>;
|
|
34
|
-
export type RideAcceptance = z.infer<typeof RideAcceptanceSchema>;
|
|
35
|
-
export declare const RideJustificationSchema: z.ZodObject<{
|
|
36
|
-
comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
37
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
38
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
39
|
-
} & {
|
|
40
|
-
_id: z.ZodString;
|
|
41
|
-
text: z.ZodString;
|
|
42
|
-
user_id: z.ZodString;
|
|
43
|
-
}, "strict", z.ZodTypeAny, {
|
|
44
|
-
_id: string;
|
|
45
|
-
text: string;
|
|
46
|
-
user_id: string;
|
|
47
|
-
created_at?: (number & {
|
|
48
|
-
__brand: "UnixTimestamp";
|
|
49
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
50
|
-
updated_at?: (number & {
|
|
51
|
-
__brand: "UnixTimestamp";
|
|
52
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
53
|
-
}, {
|
|
54
|
-
_id: string;
|
|
55
|
-
text: string;
|
|
56
|
-
user_id: string;
|
|
57
|
-
created_at?: number | null | undefined;
|
|
58
|
-
updated_at?: number | null | undefined;
|
|
59
|
-
}>, "many">>;
|
|
60
|
-
file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
61
|
-
pto_message: z.ZodDefault<z.ZodString>;
|
|
62
|
-
}, "strict", z.ZodTypeAny, {
|
|
63
|
-
comments: {
|
|
64
|
-
_id: string;
|
|
65
|
-
text: string;
|
|
66
|
-
user_id: string;
|
|
67
|
-
created_at?: (number & {
|
|
68
|
-
__brand: "UnixTimestamp";
|
|
69
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
70
|
-
updated_at?: (number & {
|
|
71
|
-
__brand: "UnixTimestamp";
|
|
72
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
73
|
-
}[];
|
|
74
|
-
file_ids: string[];
|
|
75
|
-
pto_message: string;
|
|
76
|
-
}, {
|
|
77
|
-
comments?: {
|
|
78
|
-
_id: string;
|
|
79
|
-
text: string;
|
|
80
|
-
user_id: string;
|
|
81
|
-
created_at?: number | null | undefined;
|
|
82
|
-
updated_at?: number | null | undefined;
|
|
83
|
-
}[] | undefined;
|
|
84
|
-
file_ids?: string[] | undefined;
|
|
85
|
-
pto_message?: string | undefined;
|
|
86
|
-
}>;
|
|
87
|
-
export type RideJustification = z.infer<typeof RideJustificationSchema>;
|
|
88
|
-
export declare const RideOverridesSchema: z.ZodObject<{
|
|
89
|
-
trip_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
90
|
-
}, "strict", z.ZodTypeAny, {
|
|
91
|
-
trip_id: string | null;
|
|
92
|
-
}, {
|
|
93
|
-
trip_id?: string | null | undefined;
|
|
94
|
-
}>;
|
|
95
|
-
export type RideOverrides = z.infer<typeof RideOverridesSchema>;
|
|
96
|
-
export declare const RideAnnotationSchema: z.ZodObject<{
|
|
97
|
-
_id: z.ZodString;
|
|
98
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
99
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
100
|
-
} & {
|
|
101
|
-
acceptance: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
102
|
-
_id: z.ZodString;
|
|
103
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
104
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
105
|
-
} & {
|
|
106
|
-
analysis_summary: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<["pass", "fail", "skip", "error"]>>>>;
|
|
107
|
-
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
108
|
-
mode: z.ZodEnum<["manual", "auto"]>;
|
|
109
|
-
status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
110
|
-
}, "strict", z.ZodTypeAny, {
|
|
111
|
-
_id: string;
|
|
112
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
113
|
-
created_by: string | null;
|
|
114
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
115
|
-
mode: "manual" | "auto";
|
|
116
|
-
created_at?: (number & {
|
|
117
|
-
__brand: "UnixTimestamp";
|
|
118
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
119
|
-
updated_at?: (number & {
|
|
120
|
-
__brand: "UnixTimestamp";
|
|
121
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
122
|
-
}, {
|
|
123
|
-
_id: string;
|
|
124
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
125
|
-
mode: "manual" | "auto";
|
|
126
|
-
created_at?: number | null | undefined;
|
|
127
|
-
updated_at?: number | null | undefined;
|
|
128
|
-
created_by?: string | null | undefined;
|
|
129
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
130
|
-
}>, "many">>;
|
|
131
|
-
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
132
|
-
justification: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
133
|
-
comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
134
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
135
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
136
|
-
} & {
|
|
137
|
-
_id: z.ZodString;
|
|
138
|
-
text: z.ZodString;
|
|
139
|
-
user_id: z.ZodString;
|
|
140
|
-
}, "strict", z.ZodTypeAny, {
|
|
141
|
-
_id: string;
|
|
142
|
-
text: string;
|
|
143
|
-
user_id: string;
|
|
144
|
-
created_at?: (number & {
|
|
145
|
-
__brand: "UnixTimestamp";
|
|
146
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
147
|
-
updated_at?: (number & {
|
|
148
|
-
__brand: "UnixTimestamp";
|
|
149
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
150
|
-
}, {
|
|
151
|
-
_id: string;
|
|
152
|
-
text: string;
|
|
153
|
-
user_id: string;
|
|
154
|
-
created_at?: number | null | undefined;
|
|
155
|
-
updated_at?: number | null | undefined;
|
|
156
|
-
}>, "many">>;
|
|
157
|
-
file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
158
|
-
pto_message: z.ZodDefault<z.ZodString>;
|
|
159
|
-
}, "strict", z.ZodTypeAny, {
|
|
160
|
-
comments: {
|
|
161
|
-
_id: string;
|
|
162
|
-
text: string;
|
|
163
|
-
user_id: string;
|
|
164
|
-
created_at?: (number & {
|
|
165
|
-
__brand: "UnixTimestamp";
|
|
166
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
167
|
-
updated_at?: (number & {
|
|
168
|
-
__brand: "UnixTimestamp";
|
|
169
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
170
|
-
}[];
|
|
171
|
-
file_ids: string[];
|
|
172
|
-
pto_message: string;
|
|
173
|
-
}, {
|
|
174
|
-
comments?: {
|
|
175
|
-
_id: string;
|
|
176
|
-
text: string;
|
|
177
|
-
user_id: string;
|
|
178
|
-
created_at?: number | null | undefined;
|
|
179
|
-
updated_at?: number | null | undefined;
|
|
180
|
-
}[] | undefined;
|
|
181
|
-
file_ids?: string[] | undefined;
|
|
182
|
-
pto_message?: string | undefined;
|
|
183
|
-
}>>>;
|
|
184
|
-
overrides: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
185
|
-
trip_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
186
|
-
}, "strict", z.ZodTypeAny, {
|
|
187
|
-
trip_id: string | null;
|
|
188
|
-
}, {
|
|
189
|
-
trip_id?: string | null | undefined;
|
|
190
|
-
}>>>;
|
|
191
|
-
ride_id: z.ZodString;
|
|
192
|
-
}, "strict", z.ZodTypeAny, {
|
|
193
|
-
_id: string;
|
|
194
|
-
is_locked: boolean;
|
|
195
|
-
acceptance: {
|
|
196
|
-
_id: string;
|
|
197
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
198
|
-
created_by: string | null;
|
|
199
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
200
|
-
mode: "manual" | "auto";
|
|
201
|
-
created_at?: (number & {
|
|
202
|
-
__brand: "UnixTimestamp";
|
|
203
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
204
|
-
updated_at?: (number & {
|
|
205
|
-
__brand: "UnixTimestamp";
|
|
206
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
207
|
-
}[];
|
|
208
|
-
justification: {
|
|
209
|
-
comments: {
|
|
210
|
-
_id: string;
|
|
211
|
-
text: string;
|
|
212
|
-
user_id: string;
|
|
213
|
-
created_at?: (number & {
|
|
214
|
-
__brand: "UnixTimestamp";
|
|
215
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
216
|
-
updated_at?: (number & {
|
|
217
|
-
__brand: "UnixTimestamp";
|
|
218
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
219
|
-
}[];
|
|
220
|
-
file_ids: string[];
|
|
221
|
-
pto_message: string;
|
|
222
|
-
} | null;
|
|
223
|
-
overrides: {
|
|
224
|
-
trip_id: string | null;
|
|
225
|
-
} | null;
|
|
226
|
-
ride_id: string;
|
|
227
|
-
created_at?: (number & {
|
|
228
|
-
__brand: "UnixTimestamp";
|
|
229
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
230
|
-
updated_at?: (number & {
|
|
231
|
-
__brand: "UnixTimestamp";
|
|
232
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
233
|
-
}, {
|
|
234
|
-
_id: string;
|
|
235
|
-
ride_id: string;
|
|
236
|
-
created_at?: number | null | undefined;
|
|
237
|
-
updated_at?: number | null | undefined;
|
|
238
|
-
is_locked?: boolean | undefined;
|
|
239
|
-
acceptance?: {
|
|
240
|
-
_id: string;
|
|
241
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
242
|
-
mode: "manual" | "auto";
|
|
243
|
-
created_at?: number | null | undefined;
|
|
244
|
-
updated_at?: number | null | undefined;
|
|
245
|
-
created_by?: string | null | undefined;
|
|
246
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
247
|
-
}[] | undefined;
|
|
248
|
-
justification?: {
|
|
249
|
-
comments?: {
|
|
250
|
-
_id: string;
|
|
251
|
-
text: string;
|
|
252
|
-
user_id: string;
|
|
253
|
-
created_at?: number | null | undefined;
|
|
254
|
-
updated_at?: number | null | undefined;
|
|
255
|
-
}[] | undefined;
|
|
256
|
-
file_ids?: string[] | undefined;
|
|
257
|
-
pto_message?: string | undefined;
|
|
258
|
-
} | null | undefined;
|
|
259
|
-
overrides?: {
|
|
260
|
-
trip_id?: string | null | undefined;
|
|
261
|
-
} | null | undefined;
|
|
262
|
-
}>;
|
|
263
|
-
export declare const CreateRideAnnotationSchema: z.ZodObject<Omit<{
|
|
264
|
-
_id: z.ZodOptional<z.ZodString>;
|
|
265
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
266
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
267
|
-
is_locked: z.ZodDefault<z.ZodBoolean>;
|
|
268
|
-
acceptance: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
269
|
-
_id: z.ZodString;
|
|
270
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
271
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
272
|
-
} & {
|
|
273
|
-
analysis_summary: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<["pass", "fail", "skip", "error"]>>>>;
|
|
274
|
-
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
275
|
-
mode: z.ZodEnum<["manual", "auto"]>;
|
|
276
|
-
status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
277
|
-
}, "strict", z.ZodTypeAny, {
|
|
278
|
-
_id: string;
|
|
279
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
280
|
-
created_by: string | null;
|
|
281
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
282
|
-
mode: "manual" | "auto";
|
|
283
|
-
created_at?: (number & {
|
|
284
|
-
__brand: "UnixTimestamp";
|
|
285
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
286
|
-
updated_at?: (number & {
|
|
287
|
-
__brand: "UnixTimestamp";
|
|
288
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
289
|
-
}, {
|
|
290
|
-
_id: string;
|
|
291
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
292
|
-
mode: "manual" | "auto";
|
|
293
|
-
created_at?: number | null | undefined;
|
|
294
|
-
updated_at?: number | null | undefined;
|
|
295
|
-
created_by?: string | null | undefined;
|
|
296
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
297
|
-
}>, "many">>;
|
|
298
|
-
justification: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
299
|
-
comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
300
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
301
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
302
|
-
} & {
|
|
303
|
-
_id: z.ZodString;
|
|
304
|
-
text: z.ZodString;
|
|
305
|
-
user_id: z.ZodString;
|
|
306
|
-
}, "strict", z.ZodTypeAny, {
|
|
307
|
-
_id: string;
|
|
308
|
-
text: string;
|
|
309
|
-
user_id: string;
|
|
310
|
-
created_at?: (number & {
|
|
311
|
-
__brand: "UnixTimestamp";
|
|
312
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
313
|
-
updated_at?: (number & {
|
|
314
|
-
__brand: "UnixTimestamp";
|
|
315
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
316
|
-
}, {
|
|
317
|
-
_id: string;
|
|
318
|
-
text: string;
|
|
319
|
-
user_id: string;
|
|
320
|
-
created_at?: number | null | undefined;
|
|
321
|
-
updated_at?: number | null | undefined;
|
|
322
|
-
}>, "many">>;
|
|
323
|
-
file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
324
|
-
pto_message: z.ZodDefault<z.ZodString>;
|
|
325
|
-
}, "strict", z.ZodTypeAny, {
|
|
326
|
-
comments: {
|
|
327
|
-
_id: string;
|
|
328
|
-
text: string;
|
|
329
|
-
user_id: string;
|
|
330
|
-
created_at?: (number & {
|
|
331
|
-
__brand: "UnixTimestamp";
|
|
332
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
333
|
-
updated_at?: (number & {
|
|
334
|
-
__brand: "UnixTimestamp";
|
|
335
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
336
|
-
}[];
|
|
337
|
-
file_ids: string[];
|
|
338
|
-
pto_message: string;
|
|
339
|
-
}, {
|
|
340
|
-
comments?: {
|
|
341
|
-
_id: string;
|
|
342
|
-
text: string;
|
|
343
|
-
user_id: string;
|
|
344
|
-
created_at?: number | null | undefined;
|
|
345
|
-
updated_at?: number | null | undefined;
|
|
346
|
-
}[] | undefined;
|
|
347
|
-
file_ids?: string[] | undefined;
|
|
348
|
-
pto_message?: string | undefined;
|
|
349
|
-
}>>>;
|
|
350
|
-
overrides: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
351
|
-
trip_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
352
|
-
}, "strict", z.ZodTypeAny, {
|
|
353
|
-
trip_id: string | null;
|
|
354
|
-
}, {
|
|
355
|
-
trip_id?: string | null | undefined;
|
|
356
|
-
}>>>;
|
|
357
|
-
ride_id: z.ZodString;
|
|
358
|
-
}, "created_at" | "updated_at">, "strict", z.ZodTypeAny, {
|
|
359
|
-
is_locked: boolean;
|
|
360
|
-
acceptance: {
|
|
361
|
-
_id: string;
|
|
362
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
363
|
-
created_by: string | null;
|
|
364
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
365
|
-
mode: "manual" | "auto";
|
|
366
|
-
created_at?: (number & {
|
|
367
|
-
__brand: "UnixTimestamp";
|
|
368
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
369
|
-
updated_at?: (number & {
|
|
370
|
-
__brand: "UnixTimestamp";
|
|
371
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
372
|
-
}[];
|
|
373
|
-
justification: {
|
|
374
|
-
comments: {
|
|
375
|
-
_id: string;
|
|
376
|
-
text: string;
|
|
377
|
-
user_id: string;
|
|
378
|
-
created_at?: (number & {
|
|
379
|
-
__brand: "UnixTimestamp";
|
|
380
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
381
|
-
updated_at?: (number & {
|
|
382
|
-
__brand: "UnixTimestamp";
|
|
383
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
384
|
-
}[];
|
|
385
|
-
file_ids: string[];
|
|
386
|
-
pto_message: string;
|
|
387
|
-
} | null;
|
|
388
|
-
overrides: {
|
|
389
|
-
trip_id: string | null;
|
|
390
|
-
} | null;
|
|
391
|
-
ride_id: string;
|
|
392
|
-
_id?: string | undefined;
|
|
393
|
-
}, {
|
|
394
|
-
ride_id: string;
|
|
395
|
-
_id?: string | undefined;
|
|
396
|
-
is_locked?: boolean | undefined;
|
|
397
|
-
acceptance?: {
|
|
398
|
-
_id: string;
|
|
399
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
400
|
-
mode: "manual" | "auto";
|
|
401
|
-
created_at?: number | null | undefined;
|
|
402
|
-
updated_at?: number | null | undefined;
|
|
403
|
-
created_by?: string | null | undefined;
|
|
404
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
405
|
-
}[] | undefined;
|
|
406
|
-
justification?: {
|
|
407
|
-
comments?: {
|
|
408
|
-
_id: string;
|
|
409
|
-
text: string;
|
|
410
|
-
user_id: string;
|
|
411
|
-
created_at?: number | null | undefined;
|
|
412
|
-
updated_at?: number | null | undefined;
|
|
413
|
-
}[] | undefined;
|
|
414
|
-
file_ids?: string[] | undefined;
|
|
415
|
-
pto_message?: string | undefined;
|
|
416
|
-
} | null | undefined;
|
|
417
|
-
overrides?: {
|
|
418
|
-
trip_id?: string | null | undefined;
|
|
419
|
-
} | null | undefined;
|
|
420
|
-
}>;
|
|
421
|
-
export declare const UpdateRideAnnotationSchema: z.ZodObject<{
|
|
422
|
-
_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
423
|
-
is_locked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
424
|
-
acceptance: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
425
|
-
_id: z.ZodString;
|
|
426
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
427
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
428
|
-
} & {
|
|
429
|
-
analysis_summary: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodEnum<["pass", "fail", "skip", "error"]>>>>;
|
|
430
|
-
created_by: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
431
|
-
mode: z.ZodEnum<["manual", "auto"]>;
|
|
432
|
-
status: z.ZodEnum<["justification_required", "under_review", "accepted", "rejected"]>;
|
|
433
|
-
}, "strict", z.ZodTypeAny, {
|
|
434
|
-
_id: string;
|
|
435
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
436
|
-
created_by: string | null;
|
|
437
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
438
|
-
mode: "manual" | "auto";
|
|
439
|
-
created_at?: (number & {
|
|
440
|
-
__brand: "UnixTimestamp";
|
|
441
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
442
|
-
updated_at?: (number & {
|
|
443
|
-
__brand: "UnixTimestamp";
|
|
444
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
445
|
-
}, {
|
|
446
|
-
_id: string;
|
|
447
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
448
|
-
mode: "manual" | "auto";
|
|
449
|
-
created_at?: number | null | undefined;
|
|
450
|
-
updated_at?: number | null | undefined;
|
|
451
|
-
created_by?: string | null | undefined;
|
|
452
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
453
|
-
}>, "many">>>;
|
|
454
|
-
justification: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
455
|
-
comments: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
456
|
-
created_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
457
|
-
updated_at: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodEffects<z.ZodNumber, import("../_common/unix-timestamp.js").UnixTimestamp, number>, "UnixTimestamp">>>;
|
|
458
|
-
} & {
|
|
459
|
-
_id: z.ZodString;
|
|
460
|
-
text: z.ZodString;
|
|
461
|
-
user_id: z.ZodString;
|
|
462
|
-
}, "strict", z.ZodTypeAny, {
|
|
463
|
-
_id: string;
|
|
464
|
-
text: string;
|
|
465
|
-
user_id: string;
|
|
466
|
-
created_at?: (number & {
|
|
467
|
-
__brand: "UnixTimestamp";
|
|
468
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
469
|
-
updated_at?: (number & {
|
|
470
|
-
__brand: "UnixTimestamp";
|
|
471
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
472
|
-
}, {
|
|
473
|
-
_id: string;
|
|
474
|
-
text: string;
|
|
475
|
-
user_id: string;
|
|
476
|
-
created_at?: number | null | undefined;
|
|
477
|
-
updated_at?: number | null | undefined;
|
|
478
|
-
}>, "many">>;
|
|
479
|
-
file_ids: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
480
|
-
pto_message: z.ZodDefault<z.ZodString>;
|
|
481
|
-
}, "strict", z.ZodTypeAny, {
|
|
482
|
-
comments: {
|
|
483
|
-
_id: string;
|
|
484
|
-
text: string;
|
|
485
|
-
user_id: string;
|
|
486
|
-
created_at?: (number & {
|
|
487
|
-
__brand: "UnixTimestamp";
|
|
488
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
489
|
-
updated_at?: (number & {
|
|
490
|
-
__brand: "UnixTimestamp";
|
|
491
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
492
|
-
}[];
|
|
493
|
-
file_ids: string[];
|
|
494
|
-
pto_message: string;
|
|
495
|
-
}, {
|
|
496
|
-
comments?: {
|
|
497
|
-
_id: string;
|
|
498
|
-
text: string;
|
|
499
|
-
user_id: string;
|
|
500
|
-
created_at?: number | null | undefined;
|
|
501
|
-
updated_at?: number | null | undefined;
|
|
502
|
-
}[] | undefined;
|
|
503
|
-
file_ids?: string[] | undefined;
|
|
504
|
-
pto_message?: string | undefined;
|
|
505
|
-
}>>>>;
|
|
506
|
-
overrides: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
507
|
-
trip_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
508
|
-
}, "strict", z.ZodTypeAny, {
|
|
509
|
-
trip_id: string | null;
|
|
510
|
-
}, {
|
|
511
|
-
trip_id?: string | null | undefined;
|
|
512
|
-
}>>>>;
|
|
513
|
-
ride_id: z.ZodOptional<z.ZodString>;
|
|
514
|
-
}, "strict", z.ZodTypeAny, {
|
|
515
|
-
_id?: string | undefined;
|
|
516
|
-
is_locked?: boolean | undefined;
|
|
517
|
-
acceptance?: {
|
|
518
|
-
_id: string;
|
|
519
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
520
|
-
created_by: string | null;
|
|
521
|
-
analysis_summary: Record<string, "error" | "pass" | "fail" | "skip"> | null;
|
|
522
|
-
mode: "manual" | "auto";
|
|
523
|
-
created_at?: (number & {
|
|
524
|
-
__brand: "UnixTimestamp";
|
|
525
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
526
|
-
updated_at?: (number & {
|
|
527
|
-
__brand: "UnixTimestamp";
|
|
528
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
529
|
-
}[] | undefined;
|
|
530
|
-
justification?: {
|
|
531
|
-
comments: {
|
|
532
|
-
_id: string;
|
|
533
|
-
text: string;
|
|
534
|
-
user_id: string;
|
|
535
|
-
created_at?: (number & {
|
|
536
|
-
__brand: "UnixTimestamp";
|
|
537
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
538
|
-
updated_at?: (number & {
|
|
539
|
-
__brand: "UnixTimestamp";
|
|
540
|
-
} & z.BRAND<"UnixTimestamp">) | null | undefined;
|
|
541
|
-
}[];
|
|
542
|
-
file_ids: string[];
|
|
543
|
-
pto_message: string;
|
|
544
|
-
} | null | undefined;
|
|
545
|
-
overrides?: {
|
|
546
|
-
trip_id: string | null;
|
|
547
|
-
} | null | undefined;
|
|
548
|
-
ride_id?: string | undefined;
|
|
549
|
-
}, {
|
|
550
|
-
_id?: string | undefined;
|
|
551
|
-
is_locked?: boolean | undefined;
|
|
552
|
-
acceptance?: {
|
|
553
|
-
_id: string;
|
|
554
|
-
status: "accepted" | "justification_required" | "under_review" | "rejected";
|
|
555
|
-
mode: "manual" | "auto";
|
|
556
|
-
created_at?: number | null | undefined;
|
|
557
|
-
updated_at?: number | null | undefined;
|
|
558
|
-
created_by?: string | null | undefined;
|
|
559
|
-
analysis_summary?: Record<string, "error" | "pass" | "fail" | "skip"> | null | undefined;
|
|
560
|
-
}[] | undefined;
|
|
561
|
-
justification?: {
|
|
562
|
-
comments?: {
|
|
563
|
-
_id: string;
|
|
564
|
-
text: string;
|
|
565
|
-
user_id: string;
|
|
566
|
-
created_at?: number | null | undefined;
|
|
567
|
-
updated_at?: number | null | undefined;
|
|
568
|
-
}[] | undefined;
|
|
569
|
-
file_ids?: string[] | undefined;
|
|
570
|
-
pto_message?: string | undefined;
|
|
571
|
-
} | null | undefined;
|
|
572
|
-
overrides?: {
|
|
573
|
-
trip_id?: string | null | undefined;
|
|
574
|
-
} | null | undefined;
|
|
575
|
-
ride_id?: string | undefined;
|
|
576
|
-
}>;
|
|
577
|
-
export type RideAnnotation = z.infer<typeof RideAnnotationSchema>;
|
|
578
|
-
export type CreateRideAnnotationDto = z.infer<typeof CreateRideAnnotationSchema>;
|
|
579
|
-
export type UpdateRideAnnotationDto = Partial<CreateRideAnnotationDto>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* * */
|
|
2
|
-
import { CommentSchema } from '../_common/comment.js';
|
|
3
|
-
import { DocumentSchema } from '../_common/document.js';
|
|
4
|
-
import { RideAnalysisGradeSchema } from './ride-analysis.js';
|
|
5
|
-
import { z } from 'zod';
|
|
6
|
-
/* * */
|
|
7
|
-
export const RIDE_ACCEPTANCE_STATUS_OPTIONS = ['justification_required', 'under_review', 'accepted', 'rejected'];
|
|
8
|
-
export const RideAcceptanceStatusSchema = z.enum(RIDE_ACCEPTANCE_STATUS_OPTIONS);
|
|
9
|
-
export const RideAcceptanceSchema = DocumentSchema.extend({
|
|
10
|
-
analysis_summary: z.record(RideAnalysisGradeSchema).nullable().default(null),
|
|
11
|
-
created_by: z.string().nullable().default(null),
|
|
12
|
-
mode: z.enum(['manual', 'auto']),
|
|
13
|
-
status: RideAcceptanceStatusSchema,
|
|
14
|
-
}).strict();
|
|
15
|
-
/* * */
|
|
16
|
-
export const RideJustificationSchema = z.object({
|
|
17
|
-
comments: z.array(CommentSchema).default([]),
|
|
18
|
-
file_ids: z.array(z.string()).default([]),
|
|
19
|
-
pto_message: z.string().min(2).max(5000).default(''),
|
|
20
|
-
}).strict();
|
|
21
|
-
/* * */
|
|
22
|
-
export const RideOverridesSchema = z.object({
|
|
23
|
-
trip_id: z.string().nullable().default(null),
|
|
24
|
-
}).strict();
|
|
25
|
-
/* * */
|
|
26
|
-
export const RideAnnotationSchema = DocumentSchema.extend({
|
|
27
|
-
acceptance: z.array(RideAcceptanceSchema).default([]),
|
|
28
|
-
is_locked: z.boolean().default(false),
|
|
29
|
-
justification: RideJustificationSchema.nullable().default(null),
|
|
30
|
-
overrides: RideOverridesSchema.nullable().default(null),
|
|
31
|
-
ride_id: z.string(),
|
|
32
|
-
}).strict();
|
|
33
|
-
export const CreateRideAnnotationSchema = RideAnnotationSchema.partial({ _id: true }).omit({ created_at: true, updated_at: true });
|
|
34
|
-
export const UpdateRideAnnotationSchema = CreateRideAnnotationSchema.partial();
|