@updraft-solutions/mcrit-sdk 0.3.1 → 0.5.0
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/chunk-AKLFMP7G.cjs +2525 -0
- package/dist/{chunk-MF7G76QS.cjs → chunk-IVMOR5SW.cjs} +26 -1
- package/dist/{chunk-D5DUVW34.js → chunk-KIMCBEY7.js} +26 -1
- package/dist/chunk-YCIXOVEC.js +2525 -0
- package/dist/format/index.cjs +2 -2
- package/dist/format/index.d.cts +13 -4
- package/dist/format/index.d.ts +13 -4
- package/dist/format/index.js +1 -1
- package/dist/index.cjs +201 -5
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +208 -12
- package/dist/schemas/index.cjs +198 -2
- package/dist/schemas/index.d.cts +3157 -128
- package/dist/schemas/index.d.ts +3157 -128
- package/dist/schemas/index.js +201 -5
- package/dist/{models-BWmpcfR8.d.cts → training-Der1DPU-.d.cts} +23757 -6528
- package/dist/{models-BWmpcfR8.d.ts → training-Der1DPU-.d.ts} +23757 -6528
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +277 -6
- package/dist/types/index.d.ts +277 -6
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/src/format/index.ts +51 -5
- package/src/index.ts +39 -0
- package/src/schemas/common.ts +37 -0
- package/src/schemas/course-milestone.ts +78 -0
- package/src/schemas/equipment.ts +27 -0
- package/src/schemas/form-template.ts +413 -0
- package/src/schemas/index.ts +7 -1
- package/src/schemas/location-map.ts +175 -0
- package/src/schemas/models.ts +110 -28
- package/src/schemas/newsletter.ts +362 -0
- package/src/schemas/todo.ts +46 -0
- package/src/schemas/training.ts +500 -0
- package/src/types/ai.ts +85 -0
- package/src/types/aircraft-block.ts +23 -0
- package/src/types/api.ts +3 -1
- package/src/types/background-task.ts +28 -0
- package/src/types/compliance.ts +27 -3
- package/src/types/index.ts +5 -0
- package/src/types/landing-fee.ts +92 -0
- package/src/types/models.ts +44 -0
- package/src/types/roles.ts +26 -0
- package/dist/chunk-7QF3OJ45.cjs +0 -1325
- package/dist/chunk-FS5I4MBG.js +0 -1325
- package/src/schemas/fee.ts +0 -37
- /package/dist/{chunk-LXNCAKJZ.js → chunk-2WJHTRIE.js} +0 -0
- /package/dist/{chunk-MOOGM3DW.cjs → chunk-DCEOET63.cjs} +0 -0
|
@@ -0,0 +1,2525 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/schemas/common.ts
|
|
2
|
+
var _zod = require('zod');
|
|
3
|
+
var zNullableBool = _zod.z.boolean().nullable().optional();
|
|
4
|
+
var zNetGross = _zod.z.enum(["net", "gross"]).optional();
|
|
5
|
+
var zContactDTO = _zod.z.object({
|
|
6
|
+
name: _zod.z.string().optional(),
|
|
7
|
+
email: _zod.z.string().email().optional(),
|
|
8
|
+
phone: _zod.z.string().optional()
|
|
9
|
+
});
|
|
10
|
+
var zPhpMoneyObject = _zod.z.object({
|
|
11
|
+
amount: _zod.z.number(),
|
|
12
|
+
currency: _zod.z.string(),
|
|
13
|
+
formatted: _zod.z.string()
|
|
14
|
+
});
|
|
15
|
+
var contactAttributeSchema = _zod.z.object({
|
|
16
|
+
name: _zod.z.string().optional(),
|
|
17
|
+
email: _zod.z.string().optional(),
|
|
18
|
+
phone: _zod.z.string().optional(),
|
|
19
|
+
company: _zod.z.string().optional(),
|
|
20
|
+
fax: _zod.z.string().optional()
|
|
21
|
+
});
|
|
22
|
+
var BaseModel = _zod.z.object({
|
|
23
|
+
type: _zod.z.string(),
|
|
24
|
+
id: _zod.z.number(),
|
|
25
|
+
created_at: _zod.z.string(),
|
|
26
|
+
updated_at: _zod.z.string()
|
|
27
|
+
});
|
|
28
|
+
var mediaSchema = _zod.z.object({
|
|
29
|
+
type: _zod.z.literal("media"),
|
|
30
|
+
id: _zod.z.number(),
|
|
31
|
+
description: _zod.z.string().optional(),
|
|
32
|
+
collection_name: _zod.z.string().optional(),
|
|
33
|
+
conversions: _zod.z.record(_zod.z.string().url()).optional(),
|
|
34
|
+
created_at: _zod.z.string().optional(),
|
|
35
|
+
updated_at: _zod.z.string().optional(),
|
|
36
|
+
url: _zod.z.string().optional(),
|
|
37
|
+
mime_type: _zod.z.string().optional(),
|
|
38
|
+
file_name: _zod.z.string().optional(),
|
|
39
|
+
size: _zod.z.number().optional()
|
|
40
|
+
});
|
|
41
|
+
var mediaCollection = _zod.z.object({
|
|
42
|
+
avatar: mediaSchema.nullable().optional(),
|
|
43
|
+
header: mediaSchema.nullable().optional(),
|
|
44
|
+
images: _zod.z.array(mediaSchema).nullable().optional(),
|
|
45
|
+
documents: _zod.z.array(mediaSchema).nullable().optional()
|
|
46
|
+
}).nullable().optional();
|
|
47
|
+
var impersonationParticipantSchema = _zod.z.object({
|
|
48
|
+
id: _zod.z.number(),
|
|
49
|
+
name: _zod.z.string(),
|
|
50
|
+
email: _zod.z.string()
|
|
51
|
+
});
|
|
52
|
+
var impersonationStateSchema = _zod.z.object({
|
|
53
|
+
is_impersonating: _zod.z.boolean(),
|
|
54
|
+
impersonator: impersonationParticipantSchema.optional(),
|
|
55
|
+
impersonated: impersonationParticipantSchema.optional(),
|
|
56
|
+
started_at: _zod.z.string().optional(),
|
|
57
|
+
expires_at: _zod.z.string().optional()
|
|
58
|
+
});
|
|
59
|
+
var userSchema = _zod.z.object({
|
|
60
|
+
type: _zod.z.literal("user"),
|
|
61
|
+
id: _zod.z.number(),
|
|
62
|
+
name: _zod.z.string(),
|
|
63
|
+
email: _zod.z.string().optional(),
|
|
64
|
+
mobile: _zod.z.string().optional(),
|
|
65
|
+
// Present only on the authenticated-user payload while an admin
|
|
66
|
+
// impersonation session is active.
|
|
67
|
+
impersonation: impersonationStateSchema.optional()
|
|
68
|
+
});
|
|
69
|
+
var companySchema = _zod.z.object({
|
|
70
|
+
type: _zod.z.literal("company"),
|
|
71
|
+
id: _zod.z.number(),
|
|
72
|
+
name: _zod.z.string(),
|
|
73
|
+
media: mediaCollection,
|
|
74
|
+
can: _zod.z.record(_zod.z.string(), _zod.z.boolean().nullable()).optional(),
|
|
75
|
+
permissions: _zod.z.array(_zod.z.string()).optional(),
|
|
76
|
+
// Company display timezone (companies.timezone, default Europe/Berlin
|
|
77
|
+
// server-side); booking/event surfaces render in this zone. Optional:
|
|
78
|
+
// slim company payloads may omit it.
|
|
79
|
+
timezone: _zod.z.string().optional(),
|
|
80
|
+
ai_landing_fee_invoices_enabled: _zod.z.boolean().optional(),
|
|
81
|
+
// Active AI-feature entitlement keys (per-company subscription gating,
|
|
82
|
+
// e.g. "ai.logbook_import"). Serialized by CompanyResource alongside
|
|
83
|
+
// `permissions[]`; slim payloads may omit it.
|
|
84
|
+
entitlements: _zod.z.array(_zod.z.string()).optional()
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// src/schemas/models.ts
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
// src/schemas/equipment.ts
|
|
91
|
+
|
|
92
|
+
var equipmentSchema = _zod.z.object({
|
|
93
|
+
type: _zod.z.literal("equipment").optional(),
|
|
94
|
+
id: _zod.z.number(),
|
|
95
|
+
name: _zod.z.string(),
|
|
96
|
+
description: _zod.z.string().nullable().optional(),
|
|
97
|
+
manual_url: _zod.z.string().nullable().optional()
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// src/schemas/training.ts
|
|
101
|
+
|
|
102
|
+
var gradingScalePointSchema = _zod.z.object({
|
|
103
|
+
key: _zod.z.string(),
|
|
104
|
+
description: _zod.z.string()
|
|
105
|
+
});
|
|
106
|
+
var gradingScaleSchema = _zod.z.object({
|
|
107
|
+
id: _zod.z.number(),
|
|
108
|
+
name: _zod.z.string(),
|
|
109
|
+
points: _zod.z.array(gradingScalePointSchema)
|
|
110
|
+
});
|
|
111
|
+
var GradingScaleFormSchema = _zod.z.object({
|
|
112
|
+
name: _zod.z.string().min(1).max(255),
|
|
113
|
+
points: _zod.z.array(gradingScalePointSchema).min(2)
|
|
114
|
+
});
|
|
115
|
+
var TrainingElementKindEnum = _zod.z.enum([
|
|
116
|
+
"flight_exercise",
|
|
117
|
+
"theory",
|
|
118
|
+
"briefing",
|
|
119
|
+
"check"
|
|
120
|
+
]);
|
|
121
|
+
var trainingElementSchema = _zod.z.object({
|
|
122
|
+
id: _zod.z.number(),
|
|
123
|
+
code: _zod.z.string(),
|
|
124
|
+
name: _zod.z.string(),
|
|
125
|
+
description: _zod.z.string().nullable().optional(),
|
|
126
|
+
kind: TrainingElementKindEnum,
|
|
127
|
+
grading_scale_id: _zod.z.number().nullable().optional(),
|
|
128
|
+
grading_scale: gradingScaleSchema.nullable(),
|
|
129
|
+
is_active: _zod.z.boolean(),
|
|
130
|
+
// Where-used count — how many of the company's syllabi carry this
|
|
131
|
+
// element (`TrainingElementController::index`'s `attached_syllabi_count`
|
|
132
|
+
// withCount alias). Absent on any payload that doesn't count it.
|
|
133
|
+
attached_syllabi_count: _zod.z.number().optional(),
|
|
134
|
+
// Provenance stamp (which template element this row was seeded/adopted
|
|
135
|
+
// from) — not yet exposed by TrainingElementResource; optional/forward-
|
|
136
|
+
// compatible.
|
|
137
|
+
template_element_id: _zod.z.number().nullable().optional()
|
|
138
|
+
});
|
|
139
|
+
var TrainingElementFormSchema = _zod.z.object({
|
|
140
|
+
code: _zod.z.string().min(1).max(32),
|
|
141
|
+
name: _zod.z.string().min(1).max(255),
|
|
142
|
+
description: _zod.z.string().nullable().optional(),
|
|
143
|
+
kind: TrainingElementKindEnum,
|
|
144
|
+
grading_scale_id: _zod.z.number().nullable().optional(),
|
|
145
|
+
is_active: _zod.z.boolean().optional()
|
|
146
|
+
});
|
|
147
|
+
var SyllabusKindEnum = _zod.z.enum(["regular", "progress_check"]);
|
|
148
|
+
var syllabusElementSchema = _zod.z.object({
|
|
149
|
+
id: _zod.z.number(),
|
|
150
|
+
syllabus_id: _zod.z.number(),
|
|
151
|
+
// Embedded so a row still renders once its element is deactivated;
|
|
152
|
+
// `.nullable().optional()` mirrors `trainingRecordEntrySchema`'s own
|
|
153
|
+
// embedded-element convention — the backend omits the key entirely on any
|
|
154
|
+
// response that didn't eager-load the relation.
|
|
155
|
+
training_element: trainingElementSchema.nullable().optional(),
|
|
156
|
+
// The sheet's section header (was `phase` pre-amendment). `null` = no
|
|
157
|
+
// group declared.
|
|
158
|
+
group: _zod.z.string().nullable().optional(),
|
|
159
|
+
sort_order: _zod.z.number(),
|
|
160
|
+
is_required_each_flight: _zod.z.boolean()
|
|
161
|
+
});
|
|
162
|
+
var AttachSyllabusElementFormSchema = _zod.z.object({
|
|
163
|
+
training_element_id: _zod.z.number(),
|
|
164
|
+
group: _zod.z.string().nullable().optional(),
|
|
165
|
+
sort_order: _zod.z.number().int().min(0).optional(),
|
|
166
|
+
is_required_each_flight: _zod.z.boolean().optional()
|
|
167
|
+
});
|
|
168
|
+
var UpdateSyllabusElementFormSchema = _zod.z.object({
|
|
169
|
+
group: _zod.z.string().nullable().optional(),
|
|
170
|
+
sort_order: _zod.z.number().int().min(0).optional(),
|
|
171
|
+
is_required_each_flight: _zod.z.boolean().optional()
|
|
172
|
+
});
|
|
173
|
+
var ReorderSyllabusElementItemSchema = _zod.z.object({
|
|
174
|
+
id: _zod.z.number(),
|
|
175
|
+
group: _zod.z.string().nullable()
|
|
176
|
+
});
|
|
177
|
+
var usedByCourseSchema = _zod.z.object({
|
|
178
|
+
id: _zod.z.number(),
|
|
179
|
+
name: _zod.z.string(),
|
|
180
|
+
as: _zod.z.enum(["syllabus", "booking_form", "both", "check"])
|
|
181
|
+
});
|
|
182
|
+
var syllabusSchema = _zod.z.object({
|
|
183
|
+
id: _zod.z.number(),
|
|
184
|
+
company_id: _zod.z.number(),
|
|
185
|
+
name: _zod.z.string(),
|
|
186
|
+
description: _zod.z.string().nullable().optional(),
|
|
187
|
+
// `regular` | `progress_check` — a CONTENT field like
|
|
188
|
+
// `has_flight_evaluation`: changing it on a published, in-use revision
|
|
189
|
+
// auto-spawns a draft.
|
|
190
|
+
kind: SyllabusKindEnum.default("regular"),
|
|
191
|
+
// Gates whether the per-flight record renders/validates section 2
|
|
192
|
+
// (Gesamtbewertung + the three "Anmerkungen des Fluglehrers" prompts).
|
|
193
|
+
has_flight_evaluation: _zod.z.boolean(),
|
|
194
|
+
// Gates whether `ready-to-sign` issues a student countersignature
|
|
195
|
+
// alongside the instructor's — per-syllabus (Amendment 2, replaces the
|
|
196
|
+
// former company-wide toggle).
|
|
197
|
+
requires_student_signature: _zod.z.boolean(),
|
|
198
|
+
// ── Versioning (Amendment 2) — always present, flat (no server-side
|
|
199
|
+
// lineage grouping; the frontend groups client-side from these fields). ──
|
|
200
|
+
version: _zod.z.number(),
|
|
201
|
+
root_syllabus_id: _zod.z.number().nullable(),
|
|
202
|
+
is_draft: _zod.z.boolean(),
|
|
203
|
+
// Derived server-side from the same eager-loaded where-used collections as
|
|
204
|
+
// the two `courses_as_*_count` fields below — same availability (`index`
|
|
205
|
+
// AND `show`, absent on `store`/`update`).
|
|
206
|
+
is_in_use: _zod.z.boolean().optional(),
|
|
207
|
+
// Transient, request-scoped: present (non-null) only on the response of a
|
|
208
|
+
// mutation that just auto-spawned THIS row as the new draft — never a
|
|
209
|
+
// persisted property. The frontend's signal to toast-explain and
|
|
210
|
+
// `router.replace` onto this syllabus's own page.
|
|
211
|
+
spawned_from_id: _zod.z.number().nullable().optional(),
|
|
212
|
+
// Only present when the relation was loaded (`show`/`store`/`update` —
|
|
213
|
+
// never on the `index` list).
|
|
214
|
+
elements: _zod.z.array(syllabusElementSchema).optional(),
|
|
215
|
+
// `withCount('elements')` — present on `index` AND `show`; absent on
|
|
216
|
+
// `store`/`update` responses (use `elements.length` there instead, since
|
|
217
|
+
// those always eager-load the full `elements` relation anyway).
|
|
218
|
+
elements_count: _zod.z.number().optional(),
|
|
219
|
+
// Where-used — present on `index` AND `show` (both eager-load both
|
|
220
|
+
// `coursesAs*` relations); absent on `store`/`update`.
|
|
221
|
+
courses_as_syllabus_count: _zod.z.number().optional(),
|
|
222
|
+
courses_as_booking_form_syllabus_count: _zod.z.number().optional(),
|
|
223
|
+
// One deduped entry per distinct course referencing this syllabus via
|
|
224
|
+
// either pointer (`as: "both"` when a course uses it for both). Same
|
|
225
|
+
// availability as the two counts above.
|
|
226
|
+
used_by_courses: _zod.z.array(usedByCourseSchema).optional(),
|
|
227
|
+
// Heavier metric, `show` only.
|
|
228
|
+
materialized_enrollment_count: _zod.z.number().optional(),
|
|
229
|
+
// Server-evaluated per-instance policy decisions (`HasGatesOnRequest`) —
|
|
230
|
+
// present when the fetch sends `permissions[syllabus]=*`. Loose record on
|
|
231
|
+
// purpose, same rationale as `companySchema.can`.
|
|
232
|
+
can: _zod.z.record(_zod.z.string(), _zod.z.boolean().nullable()).optional(),
|
|
233
|
+
created_at: _zod.z.string().optional(),
|
|
234
|
+
updated_at: _zod.z.string().optional()
|
|
235
|
+
});
|
|
236
|
+
var StoreSyllabusFormSchema = _zod.z.object({
|
|
237
|
+
name: _zod.z.string().min(1).max(255),
|
|
238
|
+
description: _zod.z.string().nullable().optional(),
|
|
239
|
+
kind: SyllabusKindEnum.optional(),
|
|
240
|
+
has_flight_evaluation: _zod.z.boolean().optional(),
|
|
241
|
+
requires_student_signature: _zod.z.boolean().optional()
|
|
242
|
+
});
|
|
243
|
+
var UpdateSyllabusFormSchema = _zod.z.object({
|
|
244
|
+
name: _zod.z.string().min(1).max(255).optional(),
|
|
245
|
+
description: _zod.z.string().nullable().optional(),
|
|
246
|
+
kind: SyllabusKindEnum.optional(),
|
|
247
|
+
has_flight_evaluation: _zod.z.boolean().optional(),
|
|
248
|
+
requires_student_signature: _zod.z.boolean().optional()
|
|
249
|
+
});
|
|
250
|
+
var courseCheckSyllabusSchema = _zod.z.object({
|
|
251
|
+
id: _zod.z.number(),
|
|
252
|
+
name: _zod.z.string(),
|
|
253
|
+
version: _zod.z.number(),
|
|
254
|
+
kind: SyllabusKindEnum.default("regular")
|
|
255
|
+
});
|
|
256
|
+
var syllabusElementMutationResultSchema = _zod.z.object({
|
|
257
|
+
syllabus: syllabusSchema,
|
|
258
|
+
element: syllabusElementSchema.nullable(),
|
|
259
|
+
spawned_from_id: _zod.z.number().nullable()
|
|
260
|
+
});
|
|
261
|
+
var syllabusRolloutResultItemSchema = _zod.z.object({
|
|
262
|
+
course_id: _zod.z.number(),
|
|
263
|
+
course_name: _zod.z.string(),
|
|
264
|
+
pointer: _zod.z.enum(["syllabus", "booking_form", "check"])
|
|
265
|
+
});
|
|
266
|
+
var syllabusRolloutSkippedItemSchema = syllabusRolloutResultItemSchema.extend({
|
|
267
|
+
reason: _zod.z.enum(["kind_mismatch"])
|
|
268
|
+
});
|
|
269
|
+
var syllabusRolloutResultSchema = _zod.z.object({
|
|
270
|
+
results: _zod.z.array(syllabusRolloutResultItemSchema),
|
|
271
|
+
skipped: _zod.z.array(syllabusRolloutSkippedItemSchema)
|
|
272
|
+
});
|
|
273
|
+
var EnrollmentTrainingStatusEnum = _zod.z.enum([
|
|
274
|
+
"not_started",
|
|
275
|
+
"in_training",
|
|
276
|
+
"completed",
|
|
277
|
+
"removed_from_syllabus"
|
|
278
|
+
]);
|
|
279
|
+
var gradeHistoryItemSchema = _zod.z.object({
|
|
280
|
+
training_record_id: _zod.z.number(),
|
|
281
|
+
booking_id: _zod.z.number(),
|
|
282
|
+
date: _zod.z.string().nullable().optional(),
|
|
283
|
+
grade_key: _zod.z.string().nullable().optional(),
|
|
284
|
+
comment: _zod.z.string().nullable().optional(),
|
|
285
|
+
instructor_name: _zod.z.string().nullable().optional()
|
|
286
|
+
});
|
|
287
|
+
var enrollmentTrainingElementSchema = _zod.z.object({
|
|
288
|
+
id: _zod.z.number(),
|
|
289
|
+
course_enrollment_id: _zod.z.number(),
|
|
290
|
+
status: EnrollmentTrainingStatusEnum,
|
|
291
|
+
// Denormalized from the course's (Übersicht-driving) syllabus row at
|
|
292
|
+
// materialization time — was `phase` pre-amendment.
|
|
293
|
+
group_label: _zod.z.string().nullable().optional(),
|
|
294
|
+
sort_order: _zod.z.number(),
|
|
295
|
+
signed_off_at: _zod.z.string().nullable(),
|
|
296
|
+
signed_off_by: _zod.z.object({
|
|
297
|
+
id: _zod.z.number(),
|
|
298
|
+
name: _zod.z.string().optional()
|
|
299
|
+
}).nullable(),
|
|
300
|
+
notes: _zod.z.string().nullable().optional(),
|
|
301
|
+
training_element: trainingElementSchema,
|
|
302
|
+
grade_history: _zod.z.array(gradeHistoryItemSchema),
|
|
303
|
+
latest_grade_key: _zod.z.string().nullable().optional()
|
|
304
|
+
});
|
|
305
|
+
var SignOffTrainingElementFormSchema = _zod.z.object({
|
|
306
|
+
notes: _zod.z.string().nullable().optional(),
|
|
307
|
+
signed_off_by_membership_id: _zod.z.number().nullable().optional()
|
|
308
|
+
});
|
|
309
|
+
var TrainingRecordStatusEnum = _zod.z.enum([
|
|
310
|
+
"draft",
|
|
311
|
+
"awaiting_signatures",
|
|
312
|
+
"signed"
|
|
313
|
+
]);
|
|
314
|
+
var TrainingRecordResultEnum = _zod.z.enum(["passed", "failed"]);
|
|
315
|
+
var trainingRecordEntrySchema = _zod.z.object({
|
|
316
|
+
id: _zod.z.number(),
|
|
317
|
+
training_element_id: _zod.z.number(),
|
|
318
|
+
// Embedded so a signed record (immutable evidence) still renders fully
|
|
319
|
+
// even if the element is later detached from the syllabus —
|
|
320
|
+
// callers must prefer this over resolving `training_element_id` against
|
|
321
|
+
// the (mutable, current) syllabus. `.nullable().optional()`: the backend
|
|
322
|
+
// omits the key entirely (via `whenLoaded`) on any response that didn't
|
|
323
|
+
// eager-load the relation, and could resolve it to `null` in a genuinely
|
|
324
|
+
// orphaned edge case — both degrade to "treat as unresolved", not a
|
|
325
|
+
// parse failure.
|
|
326
|
+
training_element: trainingElementSchema.nullable().optional(),
|
|
327
|
+
grade_key: _zod.z.string().nullable().optional(),
|
|
328
|
+
comment: _zod.z.string().nullable().optional()
|
|
329
|
+
});
|
|
330
|
+
var trainingRecordEntryInputSchema = _zod.z.object({
|
|
331
|
+
training_element_id: _zod.z.number(),
|
|
332
|
+
grade_key: _zod.z.string().nullable().optional(),
|
|
333
|
+
comment: _zod.z.string().nullable().optional()
|
|
334
|
+
});
|
|
335
|
+
var trainingSignatureSchema = _zod.z.object({
|
|
336
|
+
type: _zod.z.literal("signature").optional(),
|
|
337
|
+
id: _zod.z.number(),
|
|
338
|
+
signable_type: _zod.z.string().optional(),
|
|
339
|
+
signable_id: _zod.z.number().optional(),
|
|
340
|
+
field_key: _zod.z.string(),
|
|
341
|
+
status: _zod.z.enum(["pending", "signed", "revoked"]),
|
|
342
|
+
required_signer_membership_id: _zod.z.number().nullable(),
|
|
343
|
+
required_signer_name: _zod.z.string().nullable().optional(),
|
|
344
|
+
required_signer_permission: _zod.z.string().nullable().optional(),
|
|
345
|
+
signed_by_user_id: _zod.z.number().nullable(),
|
|
346
|
+
signed_by_membership_id: _zod.z.number().nullable(),
|
|
347
|
+
signed_by_name: _zod.z.string().nullable().optional(),
|
|
348
|
+
is_current_user_designated: _zod.z.boolean().optional().default(false),
|
|
349
|
+
signed_at: _zod.z.string().nullable(),
|
|
350
|
+
image: _zod.z.string().nullable(),
|
|
351
|
+
data_hash: _zod.z.string().nullable(),
|
|
352
|
+
schema_version: _zod.z.number().nullable(),
|
|
353
|
+
schema_hash: _zod.z.string().nullable(),
|
|
354
|
+
consent_text_hash: _zod.z.string().nullable(),
|
|
355
|
+
auth_method: _zod.z.string().nullable(),
|
|
356
|
+
auth_verified_at: _zod.z.string().nullable(),
|
|
357
|
+
ip_address: _zod.z.string().nullable(),
|
|
358
|
+
user_agent: _zod.z.string().nullable(),
|
|
359
|
+
geo_country: _zod.z.string().nullable(),
|
|
360
|
+
signing_event_id: _zod.z.string().nullable(),
|
|
361
|
+
created_at: _zod.z.string().optional(),
|
|
362
|
+
updated_at: _zod.z.string().optional()
|
|
363
|
+
});
|
|
364
|
+
var trainingRecordSchema = _zod.z.object({
|
|
365
|
+
id: _zod.z.number(),
|
|
366
|
+
booking_id: _zod.z.number(),
|
|
367
|
+
course_enrollment_id: _zod.z.number(),
|
|
368
|
+
instructor_membership_id: _zod.z.number().nullable().optional(),
|
|
369
|
+
status: TrainingRecordStatusEnum,
|
|
370
|
+
// Whether section 2 (Gesamtbewertung + Anmerkungen) applies at all — read
|
|
371
|
+
// live off the course's booking-form syllabus by
|
|
372
|
+
// `TrainingRecordResource`, the single source of truth. `false` (never
|
|
373
|
+
// absent) when there's no booking-form syllabus at all.
|
|
374
|
+
has_flight_evaluation: _zod.z.boolean().default(false),
|
|
375
|
+
// The exact booking-form syllabus revision stamped at CREATE time (never
|
|
376
|
+
// on a later update) — the audit-chain provenance ("Rev. n this session
|
|
377
|
+
// was graded against"). `syllabus` is `null` when the course had no
|
|
378
|
+
// booking-form syllabus assigned at creation time.
|
|
379
|
+
syllabus_id: _zod.z.number().nullable().optional(),
|
|
380
|
+
// `kind` is the frontend's signal to render the check-only "Ergebnis"
|
|
381
|
+
// section for this record.
|
|
382
|
+
syllabus: _zod.z.object({
|
|
383
|
+
id: _zod.z.number(),
|
|
384
|
+
name: _zod.z.string(),
|
|
385
|
+
version: _zod.z.number(),
|
|
386
|
+
kind: SyllabusKindEnum.default("regular")
|
|
387
|
+
}).nullable().optional(),
|
|
388
|
+
// Non-null only on check-kind records (see TrainingRecordResultEnum).
|
|
389
|
+
result: TrainingRecordResultEnum.nullable().optional(),
|
|
390
|
+
// The J3-mirroring fields — the Gesamtbewertung (a point key from the
|
|
391
|
+
// booking-form syllabus's element grading scales) plus the three
|
|
392
|
+
// "Anmerkungen des Fluglehrers" comment sections from the paper form.
|
|
393
|
+
overall_grade_key: _zod.z.string().nullable().optional(),
|
|
394
|
+
what_went_well: _zod.z.string().nullable().optional(),
|
|
395
|
+
needs_improvement: _zod.z.string().nullable().optional(),
|
|
396
|
+
repeat_next_flight: _zod.z.string().nullable().optional(),
|
|
397
|
+
entries: _zod.z.array(trainingRecordEntrySchema),
|
|
398
|
+
signatures: _zod.z.array(trainingSignatureSchema),
|
|
399
|
+
created_at: _zod.z.string().optional(),
|
|
400
|
+
updated_at: _zod.z.string().optional()
|
|
401
|
+
});
|
|
402
|
+
var UpsertTrainingRecordFormSchema = _zod.z.object({
|
|
403
|
+
// CREATE only — which sheet this record fills (the course's booking-form
|
|
404
|
+
// syllabus when omitted, or one of its attached check syllabi). The choice
|
|
405
|
+
// IS the stamp; PATCH prohibits this key entirely (the stamp never moves).
|
|
406
|
+
syllabus_id: _zod.z.number().nullable().optional(),
|
|
407
|
+
// Check-kind sheets only — 422 on any other sheet.
|
|
408
|
+
result: TrainingRecordResultEnum.nullable().optional(),
|
|
409
|
+
overall_grade_key: _zod.z.string().nullable().optional(),
|
|
410
|
+
what_went_well: _zod.z.string().nullable().optional(),
|
|
411
|
+
needs_improvement: _zod.z.string().nullable().optional(),
|
|
412
|
+
repeat_next_flight: _zod.z.string().nullable().optional(),
|
|
413
|
+
instructor_membership_id: _zod.z.number().nullable().optional(),
|
|
414
|
+
entries: _zod.z.array(trainingRecordEntryInputSchema)
|
|
415
|
+
});
|
|
416
|
+
var trainingTemplatePackSchema = _zod.z.object({
|
|
417
|
+
key: _zod.z.string(),
|
|
418
|
+
name: _zod.z.string(),
|
|
419
|
+
description: _zod.z.string().nullable().optional(),
|
|
420
|
+
// Carried onto the syllabus the pack creates (regular vs. progress check).
|
|
421
|
+
kind: SyllabusKindEnum.default("regular"),
|
|
422
|
+
element_count: _zod.z.number().optional()
|
|
423
|
+
});
|
|
424
|
+
var CreateSyllabusFromTemplateFormSchema = _zod.z.object({
|
|
425
|
+
template_key: _zod.z.string().min(1)
|
|
426
|
+
});
|
|
427
|
+
var createSyllabusFromTemplateResultSchema = _zod.z.object({
|
|
428
|
+
catalog: _zod.z.object({
|
|
429
|
+
created: _zod.z.number(),
|
|
430
|
+
existing: _zod.z.number(),
|
|
431
|
+
adopted: _zod.z.number(),
|
|
432
|
+
mismatched: _zod.z.array(
|
|
433
|
+
_zod.z.object({
|
|
434
|
+
code: _zod.z.string(),
|
|
435
|
+
company_name: _zod.z.string(),
|
|
436
|
+
template_name: _zod.z.string()
|
|
437
|
+
})
|
|
438
|
+
)
|
|
439
|
+
}),
|
|
440
|
+
elements: _zod.z.object({
|
|
441
|
+
created: _zod.z.number(),
|
|
442
|
+
existing: _zod.z.number()
|
|
443
|
+
}),
|
|
444
|
+
syllabus: syllabusSchema
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
// src/schemas/models.ts
|
|
448
|
+
var baseMembershipSchema = _zod.z.object({
|
|
449
|
+
type: _zod.z.literal("membership"),
|
|
450
|
+
id: _zod.z.number(),
|
|
451
|
+
user_id: _zod.z.number(),
|
|
452
|
+
user: userSchema.optional(),
|
|
453
|
+
company_id: _zod.z.number(),
|
|
454
|
+
company: companySchema.nullable().optional(),
|
|
455
|
+
name: _zod.z.string(),
|
|
456
|
+
phone: _zod.z.string().nullable().optional(),
|
|
457
|
+
status: _zod.z.string(),
|
|
458
|
+
instructor: _zod.z.boolean(),
|
|
459
|
+
admin: _zod.z.boolean(),
|
|
460
|
+
accountant: _zod.z.boolean(),
|
|
461
|
+
student: _zod.z.boolean(),
|
|
462
|
+
content_creator: _zod.z.boolean(),
|
|
463
|
+
charter_client: _zod.z.boolean(),
|
|
464
|
+
roles: _zod.z.array(
|
|
465
|
+
_zod.z.object({
|
|
466
|
+
id: _zod.z.number(),
|
|
467
|
+
name: _zod.z.string()
|
|
468
|
+
}).passthrough()
|
|
469
|
+
).optional(),
|
|
470
|
+
created_at: _zod.z.string(),
|
|
471
|
+
updated_at: _zod.z.string(),
|
|
472
|
+
can: _zod.z.object({
|
|
473
|
+
update: zNullableBool,
|
|
474
|
+
deactivate: zNullableBool,
|
|
475
|
+
activate: zNullableBool,
|
|
476
|
+
delete: zNullableBool
|
|
477
|
+
}).optional()
|
|
478
|
+
});
|
|
479
|
+
var membershipSchema = baseMembershipSchema.extend({
|
|
480
|
+
remarks: _zod.z.string().nullable().optional(),
|
|
481
|
+
confirmed_at: _zod.z.string().nullable(),
|
|
482
|
+
created_at: _zod.z.string(),
|
|
483
|
+
updated_at: _zod.z.string()
|
|
484
|
+
});
|
|
485
|
+
var documentType = _zod.z.object({
|
|
486
|
+
label: _zod.z.string(),
|
|
487
|
+
description: _zod.z.string(),
|
|
488
|
+
documentTypeClass: _zod.z.string(),
|
|
489
|
+
requiresFile: _zod.z.boolean().optional(),
|
|
490
|
+
fieldDefinitions: _zod.z.object({
|
|
491
|
+
base: _zod.z.record(_zod.z.any()).optional(),
|
|
492
|
+
data: _zod.z.record(_zod.z.any()).optional()
|
|
493
|
+
}).optional(),
|
|
494
|
+
validationRules: _zod.z.record(_zod.z.any()).optional()
|
|
495
|
+
});
|
|
496
|
+
var priceSchema = _zod.z.object({
|
|
497
|
+
id: _zod.z.number(),
|
|
498
|
+
gross_total: zPhpMoneyObject,
|
|
499
|
+
net_total: zPhpMoneyObject,
|
|
500
|
+
tax_percentage: _zod.z.number(),
|
|
501
|
+
valid_from: _zod.z.string(),
|
|
502
|
+
created_at: _zod.z.string(),
|
|
503
|
+
updated_at: _zod.z.string(),
|
|
504
|
+
input_value: _zod.z.number().optional(),
|
|
505
|
+
net_gross: zNetGross
|
|
506
|
+
});
|
|
507
|
+
var feeSchema = BaseModel.extend({
|
|
508
|
+
type: _zod.z.literal("fee"),
|
|
509
|
+
id: _zod.z.number(),
|
|
510
|
+
price: priceSchema.optional(),
|
|
511
|
+
prices: _zod.z.array(priceSchema).optional(),
|
|
512
|
+
provider: _zod.z.string().nullable().optional(),
|
|
513
|
+
company_id: _zod.z.number().optional(),
|
|
514
|
+
company: companySchema.optional(),
|
|
515
|
+
ident: _zod.z.string().optional(),
|
|
516
|
+
category: _zod.z.string().optional(),
|
|
517
|
+
subcategory: _zod.z.string().nullable().optional(),
|
|
518
|
+
title: _zod.z.string().optional(),
|
|
519
|
+
internal_title: _zod.z.string().nullable().optional(),
|
|
520
|
+
// internal_title falling back to title, resolved server-side.
|
|
521
|
+
display_title: _zod.z.string().optional(),
|
|
522
|
+
// Course-derived fees (source course + which course fee spawned them).
|
|
523
|
+
source_course_id: _zod.z.number().nullable().optional(),
|
|
524
|
+
source_key: _zod.z.string().nullable().optional(),
|
|
525
|
+
is_derived: _zod.z.boolean().optional(),
|
|
526
|
+
relation: _zod.z.array(_zod.z.enum(["booking", "flightLog", "invoice", "instructor"])).nullable().optional(),
|
|
527
|
+
payment_per: _zod.z.string().nullable().optional(),
|
|
528
|
+
can: _zod.z.record(_zod.z.string(), zNullableBool).optional(),
|
|
529
|
+
course_count: _zod.z.number().optional(),
|
|
530
|
+
// feeables-pivot fields, present when the fee is serialized through an
|
|
531
|
+
// attachment (course/enrollment listings).
|
|
532
|
+
count: _zod.z.number().optional(),
|
|
533
|
+
variant: _zod.z.string().nullable().optional(),
|
|
534
|
+
is_optional: _zod.z.boolean().optional(),
|
|
535
|
+
sort_order: _zod.z.number().nullable().optional(),
|
|
536
|
+
is_initial_payment: _zod.z.boolean().optional(),
|
|
537
|
+
feeables: _zod.z.array(
|
|
538
|
+
_zod.z.object({
|
|
539
|
+
feeable_id: _zod.z.number(),
|
|
540
|
+
feeable_type: _zod.z.string(),
|
|
541
|
+
count: _zod.z.number().nullable(),
|
|
542
|
+
variant: _zod.z.string().nullable(),
|
|
543
|
+
is_optional: _zod.z.boolean().nullable(),
|
|
544
|
+
is_initial_payment: _zod.z.boolean().nullable(),
|
|
545
|
+
sort_order: _zod.z.number().nullable()
|
|
546
|
+
})
|
|
547
|
+
).optional(),
|
|
548
|
+
input_value: _zod.z.number().optional(),
|
|
549
|
+
net_gross: zNetGross,
|
|
550
|
+
tax_percentage: _zod.z.string().optional(),
|
|
551
|
+
valid_from: _zod.z.string()
|
|
552
|
+
});
|
|
553
|
+
var feeCategoryOptionsSchema = _zod.z.object({
|
|
554
|
+
categories: _zod.z.array(_zod.z.string()),
|
|
555
|
+
subcategories: _zod.z.record(_zod.z.string(), _zod.z.array(_zod.z.string()))
|
|
556
|
+
});
|
|
557
|
+
var courseFeeSchema = feeSchema.extend({
|
|
558
|
+
count: _zod.z.number().optional(),
|
|
559
|
+
variant: _zod.z.string().optional(),
|
|
560
|
+
is_optional: _zod.z.boolean().optional(),
|
|
561
|
+
is_initial_payment: _zod.z.boolean().optional()
|
|
562
|
+
});
|
|
563
|
+
var airplaneSchema = BaseModel.extend({
|
|
564
|
+
type: _zod.z.literal("airplane"),
|
|
565
|
+
id: _zod.z.number(),
|
|
566
|
+
company_id: _zod.z.number(),
|
|
567
|
+
registration: _zod.z.string(),
|
|
568
|
+
model: _zod.z.string(),
|
|
569
|
+
media: mediaCollection.optional(),
|
|
570
|
+
fee: feeSchema.optional(),
|
|
571
|
+
booking_fee: feeSchema.optional(),
|
|
572
|
+
hasFavorited: _zod.z.boolean().optional(),
|
|
573
|
+
homebase_id: _zod.z.number().nullable().optional(),
|
|
574
|
+
hangar_location_map_feature_id: _zod.z.number().nullable().optional(),
|
|
575
|
+
parking_lng: _zod.z.number().nullable().optional(),
|
|
576
|
+
parking_lat: _zod.z.number().nullable().optional(),
|
|
577
|
+
hangar: _zod.z.object({
|
|
578
|
+
id: _zod.z.number(),
|
|
579
|
+
name: _zod.z.string().nullable(),
|
|
580
|
+
kind: _zod.z.string(),
|
|
581
|
+
location_map_id: _zod.z.number()
|
|
582
|
+
}).nullable().optional(),
|
|
583
|
+
description: _zod.z.string().optional(),
|
|
584
|
+
capacity: _zod.z.number().optional(),
|
|
585
|
+
manufacturer: _zod.z.string().optional(),
|
|
586
|
+
year_of_construction: _zod.z.string().optional(),
|
|
587
|
+
span: _zod.z.string().optional(),
|
|
588
|
+
height: _zod.z.string().optional(),
|
|
589
|
+
length: _zod.z.string().optional(),
|
|
590
|
+
ato: _zod.z.boolean().optional(),
|
|
591
|
+
restricted_access: _zod.z.boolean().optional(),
|
|
592
|
+
global_airplane_id: _zod.z.number().nullable().optional(),
|
|
593
|
+
is_master: _zod.z.boolean().optional(),
|
|
594
|
+
master_company_id: _zod.z.number().nullable().optional(),
|
|
595
|
+
shared_companies: _zod.z.array(_zod.z.object({ id: _zod.z.number(), name: _zod.z.string() })).optional(),
|
|
596
|
+
is_simulator: _zod.z.boolean().optional(),
|
|
597
|
+
category: _zod.z.string().nullable().optional(),
|
|
598
|
+
averageFuelConsumption: _zod.z.string().nullable().optional(),
|
|
599
|
+
weightUnitString: _zod.z.string().optional(),
|
|
600
|
+
fuelUnitString: _zod.z.string().optional(),
|
|
601
|
+
isoCountryCodeFromRegistration: _zod.z.string().optional(),
|
|
602
|
+
registrationWithoutSpecialChars: _zod.z.string().nullable().optional(),
|
|
603
|
+
equipmentCodes: _zod.z.array(_zod.z.string()).nullable().optional(),
|
|
604
|
+
compliance_required: _zod.z.boolean().optional(),
|
|
605
|
+
show_on_website: _zod.z.boolean().optional(),
|
|
606
|
+
is_public: _zod.z.boolean().optional(),
|
|
607
|
+
company_timezone: _zod.z.string().optional(),
|
|
608
|
+
defaultFlightType: _zod.z.string().optional(),
|
|
609
|
+
defaultFlightRule: _zod.z.string().optional(),
|
|
610
|
+
status: _zod.z.string().optional(),
|
|
611
|
+
can: _zod.z.object({
|
|
612
|
+
view: zNullableBool,
|
|
613
|
+
update: zNullableBool,
|
|
614
|
+
viewMaintenanceEvents: zNullableBool,
|
|
615
|
+
createMaintenanceEvents: zNullableBool,
|
|
616
|
+
createBooking: zNullableBool,
|
|
617
|
+
createAirplanePermissions: zNullableBool
|
|
618
|
+
})
|
|
619
|
+
});
|
|
620
|
+
var airplaneShareInviteSchema = _zod.z.object({
|
|
621
|
+
id: _zod.z.number(),
|
|
622
|
+
status: _zod.z.enum(["pending", "accepted", "declined", "withdrawn"]),
|
|
623
|
+
responded_at: _zod.z.string().nullable().optional(),
|
|
624
|
+
created_at: _zod.z.string().optional(),
|
|
625
|
+
global_airplane: _zod.z.object({
|
|
626
|
+
id: _zod.z.number(),
|
|
627
|
+
registration: _zod.z.string(),
|
|
628
|
+
model: _zod.z.string()
|
|
629
|
+
}),
|
|
630
|
+
master_company: _zod.z.object({ id: _zod.z.number(), name: _zod.z.string() }),
|
|
631
|
+
invited_company: _zod.z.object({ id: _zod.z.number(), name: _zod.z.string() })
|
|
632
|
+
});
|
|
633
|
+
var airplanePermissionSchema = _zod.z.object({
|
|
634
|
+
type: _zod.z.literal("airplane_permission"),
|
|
635
|
+
id: _zod.z.number(),
|
|
636
|
+
airplane_id: _zod.z.number(),
|
|
637
|
+
airplane: airplaneSchema.optional(),
|
|
638
|
+
membership_id: _zod.z.number(),
|
|
639
|
+
membership: baseMembershipSchema.optional(),
|
|
640
|
+
notes: _zod.z.string().nullable().optional(),
|
|
641
|
+
conditions: _zod.z.string().nullable().optional(),
|
|
642
|
+
expires_at: _zod.z.string().nullable().optional(),
|
|
643
|
+
is_active: _zod.z.boolean(),
|
|
644
|
+
granted_by: userSchema.nullable().optional(),
|
|
645
|
+
granted_at: _zod.z.string(),
|
|
646
|
+
created_at: _zod.z.string(),
|
|
647
|
+
updated_at: _zod.z.string(),
|
|
648
|
+
can: _zod.z.object({
|
|
649
|
+
view: zNullableBool,
|
|
650
|
+
update: zNullableBool,
|
|
651
|
+
delete: zNullableBool
|
|
652
|
+
}).optional()
|
|
653
|
+
});
|
|
654
|
+
var landingFeeSchema = _zod.z.object({
|
|
655
|
+
id: _zod.z.number(),
|
|
656
|
+
airplane_id: _zod.z.number(),
|
|
657
|
+
price: priceSchema.optional()
|
|
658
|
+
});
|
|
659
|
+
var aircraftRatingSchema = _zod.z.object({
|
|
660
|
+
id: _zod.z.number(),
|
|
661
|
+
manufacturer: _zod.z.string(),
|
|
662
|
+
aircraft_model: _zod.z.string(),
|
|
663
|
+
licence_endorsement: _zod.z.string(),
|
|
664
|
+
is_complex: _zod.z.boolean(),
|
|
665
|
+
is_single_pilot: _zod.z.boolean(),
|
|
666
|
+
is_high_performance: _zod.z.boolean(),
|
|
667
|
+
is_multi_pilot: _zod.z.boolean(),
|
|
668
|
+
remarks: _zod.z.string().optional()
|
|
669
|
+
});
|
|
670
|
+
var userAircraftRatingSchema = _zod.z.object({
|
|
671
|
+
id: _zod.z.number(),
|
|
672
|
+
user_id: _zod.z.number(),
|
|
673
|
+
aircraft_rating_id: _zod.z.number(),
|
|
674
|
+
aircraftRating: aircraftRatingSchema,
|
|
675
|
+
reminder_enabled: _zod.z.boolean(),
|
|
676
|
+
reminder_days: _zod.z.number(),
|
|
677
|
+
expires_at: _zod.z.string(),
|
|
678
|
+
created_at: _zod.z.string(),
|
|
679
|
+
updated_at: _zod.z.string()
|
|
680
|
+
});
|
|
681
|
+
var userQualificationSchema = _zod.z.object({
|
|
682
|
+
id: _zod.z.number(),
|
|
683
|
+
user_id: _zod.z.number(),
|
|
684
|
+
title: _zod.z.string(),
|
|
685
|
+
reminder_enabled: _zod.z.boolean(),
|
|
686
|
+
reminder_days: _zod.z.number(),
|
|
687
|
+
expires_at: _zod.z.string(),
|
|
688
|
+
created_at: _zod.z.string(),
|
|
689
|
+
updated_at: _zod.z.string()
|
|
690
|
+
});
|
|
691
|
+
var airportSchema = _zod.z.object({
|
|
692
|
+
// Aligned with what AirportResource actually serializes: `type` and
|
|
693
|
+
// `country` are absent on minified payloads (e.g. booking waypoint
|
|
694
|
+
// airports); coordinates + municipality/iso_country ride along on the
|
|
695
|
+
// full shape.
|
|
696
|
+
type: _zod.z.literal("airport").optional(),
|
|
697
|
+
id: _zod.z.number(),
|
|
698
|
+
ident: _zod.z.string(),
|
|
699
|
+
name: _zod.z.string(),
|
|
700
|
+
country: _zod.z.string().optional(),
|
|
701
|
+
municipality: _zod.z.string().nullable().optional(),
|
|
702
|
+
iso_country: _zod.z.string().nullable().optional(),
|
|
703
|
+
latitude_deg: _zod.z.number().nullable().optional(),
|
|
704
|
+
longitude_deg: _zod.z.number().nullable().optional()
|
|
705
|
+
});
|
|
706
|
+
var recurringFlightSchema = _zod.z.object({
|
|
707
|
+
id: _zod.z.number(),
|
|
708
|
+
departure_airport_id: _zod.z.number(),
|
|
709
|
+
departure_airport: airportSchema.optional(),
|
|
710
|
+
destination_airport_id: _zod.z.number(),
|
|
711
|
+
destination_airport: airportSchema.optional(),
|
|
712
|
+
dep_time: _zod.z.string(),
|
|
713
|
+
arr_time: _zod.z.string()
|
|
714
|
+
});
|
|
715
|
+
var maintenanceEventSchema = _zod.z.object({
|
|
716
|
+
type: _zod.z.literal("maintenanceEvent"),
|
|
717
|
+
id: _zod.z.number(),
|
|
718
|
+
airplane_id: _zod.z.number(),
|
|
719
|
+
company_id: _zod.z.number(),
|
|
720
|
+
description: _zod.z.string().nullable(),
|
|
721
|
+
remarks: _zod.z.string().nullable(),
|
|
722
|
+
scheduled_at: _zod.z.string().nullable(),
|
|
723
|
+
completed_at: _zod.z.string().nullable(),
|
|
724
|
+
created_at: _zod.z.string(),
|
|
725
|
+
updated_at: _zod.z.string(),
|
|
726
|
+
elapsed_time: _zod.z.number().nullable(),
|
|
727
|
+
remaining_time: _zod.z.number().nullable(),
|
|
728
|
+
can: _zod.z.object({
|
|
729
|
+
update: zNullableBool
|
|
730
|
+
}).optional()
|
|
731
|
+
});
|
|
732
|
+
var maintenanceEventEstimationSchema = _zod.z.object({
|
|
733
|
+
estimated_at: _zod.z.string().nullable().optional(),
|
|
734
|
+
actual_at: _zod.z.string().nullable().optional()
|
|
735
|
+
});
|
|
736
|
+
var maintenanceStatusSchema = _zod.z.object({
|
|
737
|
+
intervalSetting: _zod.z.number().optional(),
|
|
738
|
+
lastMaintenanceEvent: maintenanceEventSchema.nullable().optional(),
|
|
739
|
+
nextMaintenanceEventEstimation: maintenanceEventEstimationSchema.nullable().optional()
|
|
740
|
+
});
|
|
741
|
+
var extendedAirplaneSchema = airplaneSchema.extend({
|
|
742
|
+
manufacturer: _zod.z.string().optional(),
|
|
743
|
+
capacity: _zod.z.number().optional(),
|
|
744
|
+
description: _zod.z.string().optional(),
|
|
745
|
+
homebase_id: _zod.z.number().optional(),
|
|
746
|
+
ato: _zod.z.boolean().optional(),
|
|
747
|
+
year_of_construction: _zod.z.string().optional(),
|
|
748
|
+
span: _zod.z.string().optional(),
|
|
749
|
+
height: _zod.z.string().optional(),
|
|
750
|
+
length: _zod.z.string().optional(),
|
|
751
|
+
empty_weight: _zod.z.string().optional(),
|
|
752
|
+
max_takeoff_mass: _zod.z.string().optional(),
|
|
753
|
+
max_speed: _zod.z.string().optional(),
|
|
754
|
+
max_range: _zod.z.string().optional(),
|
|
755
|
+
power: _zod.z.string().optional(),
|
|
756
|
+
fuel_type: _zod.z.string().optional(),
|
|
757
|
+
oil_min: _zod.z.string().optional(),
|
|
758
|
+
oil_max: _zod.z.string().optional(),
|
|
759
|
+
oil_type_winter: _zod.z.string().optional(),
|
|
760
|
+
oil_type_summer: _zod.z.string().optional(),
|
|
761
|
+
minimumCrewCount: _zod.z.number().optional(),
|
|
762
|
+
VFR: _zod.z.boolean().optional(),
|
|
763
|
+
VFRNight: _zod.z.boolean().optional(),
|
|
764
|
+
IFR: _zod.z.boolean().optional(),
|
|
765
|
+
IFRKnownIcing: _zod.z.boolean().optional(),
|
|
766
|
+
equipment: _zod.z.array(equipmentSchema).optional(),
|
|
767
|
+
contact: contactAttributeSchema.optional(),
|
|
768
|
+
hints: _zod.z.object({
|
|
769
|
+
booking: _zod.z.object({
|
|
770
|
+
ifr: _zod.z.string().optional()
|
|
771
|
+
}).optional()
|
|
772
|
+
}).optional(),
|
|
773
|
+
has_pre_paid_package: _zod.z.boolean().optional(),
|
|
774
|
+
fee_id: _zod.z.number().optional(),
|
|
775
|
+
booking_fee_id: _zod.z.number().optional(),
|
|
776
|
+
logging_required_from: _zod.z.string().optional(),
|
|
777
|
+
foreflight_profile_url: _zod.z.string().optional(),
|
|
778
|
+
media: _zod.z.object({
|
|
779
|
+
avatar: _zod.z.any().optional(),
|
|
780
|
+
header: _zod.z.any().optional(),
|
|
781
|
+
images: _zod.z.array(_zod.z.any()).optional(),
|
|
782
|
+
documents: _zod.z.array(_zod.z.any()).optional()
|
|
783
|
+
}).optional(),
|
|
784
|
+
master_media: mediaCollection.optional(),
|
|
785
|
+
can: _zod.z.object({
|
|
786
|
+
update: zNullableBool,
|
|
787
|
+
viewMaintenanceEvents: zNullableBool
|
|
788
|
+
}).optional()
|
|
789
|
+
});
|
|
790
|
+
var availSchema = _zod.z.object({
|
|
791
|
+
type: _zod.z.literal("avail"),
|
|
792
|
+
id: _zod.z.number(),
|
|
793
|
+
airplane_id: _zod.z.number(),
|
|
794
|
+
title: _zod.z.string(),
|
|
795
|
+
etdZ: _zod.z.string(),
|
|
796
|
+
etaZ: _zod.z.string(),
|
|
797
|
+
can: _zod.z.object({
|
|
798
|
+
update: zNullableBool
|
|
799
|
+
}).optional()
|
|
800
|
+
});
|
|
801
|
+
var bookingWaypointSchema = _zod.z.object({
|
|
802
|
+
sequence: _zod.z.number(),
|
|
803
|
+
airport_id: _zod.z.number(),
|
|
804
|
+
airport: _zod.z.object({
|
|
805
|
+
id: _zod.z.number(),
|
|
806
|
+
ident: _zod.z.string(),
|
|
807
|
+
name: _zod.z.string(),
|
|
808
|
+
municipality: _zod.z.string().nullable().optional(),
|
|
809
|
+
iso_country: _zod.z.string().nullable().optional(),
|
|
810
|
+
latitude_deg: _zod.z.number().nullable().optional(),
|
|
811
|
+
longitude_deg: _zod.z.number().nullable().optional()
|
|
812
|
+
}).nullable().optional()
|
|
813
|
+
});
|
|
814
|
+
var bookingSchema = BaseModel.extend({
|
|
815
|
+
type: _zod.z.literal("booking"),
|
|
816
|
+
ifr: _zod.z.boolean().default(false),
|
|
817
|
+
airplane_id: _zod.z.number(),
|
|
818
|
+
author: userSchema.optional(),
|
|
819
|
+
company_id: _zod.z.number(),
|
|
820
|
+
company_name: _zod.z.string().nullable().optional(),
|
|
821
|
+
company: companySchema.optional(),
|
|
822
|
+
airplane: airplaneSchema.optional(),
|
|
823
|
+
etdZ: _zod.z.string(),
|
|
824
|
+
etaZ: _zod.z.string(),
|
|
825
|
+
duration_minutes: _zod.z.number().optional(),
|
|
826
|
+
departure_airport_id: _zod.z.number().optional(),
|
|
827
|
+
destination_airport_id: _zod.z.number().optional(),
|
|
828
|
+
departure_airport: airportSchema.optional(),
|
|
829
|
+
destination_airport: airportSchema.optional(),
|
|
830
|
+
waypoints: _zod.z.array(bookingWaypointSchema).optional(),
|
|
831
|
+
// Flat, always-present home timezone on BookingResource.
|
|
832
|
+
company_timezone: _zod.z.string().nullable().optional(),
|
|
833
|
+
// Slim per-booking training-record status, present when the backend
|
|
834
|
+
// eager-loaded `trainingRecord` (enrollment bookings surfaces).
|
|
835
|
+
training_record_status: _zod.z.enum(["draft", "awaiting_signatures", "signed"]).nullable().optional(),
|
|
836
|
+
next_booking_id: _zod.z.number().nullable().optional(),
|
|
837
|
+
previous_booking_id: _zod.z.number().nullable().optional(),
|
|
838
|
+
maintenance: _zod.z.number().optional(),
|
|
839
|
+
is_solo: _zod.z.boolean().optional().default(false),
|
|
840
|
+
course_enrollment_id: _zod.z.number().nullable().optional(),
|
|
841
|
+
// Minimal linked enrollment, present on booking show/store/update payloads.
|
|
842
|
+
// Used by the form prefill registry to derive the J2 Flugauftrag course.
|
|
843
|
+
course_enrollment: _zod.z.object({
|
|
844
|
+
id: _zod.z.number(),
|
|
845
|
+
course_id: _zod.z.number().nullable().optional()
|
|
846
|
+
}).nullable().optional(),
|
|
847
|
+
crew_assignments: _zod.z.array(
|
|
848
|
+
_zod.z.object({
|
|
849
|
+
id: _zod.z.number().optional(),
|
|
850
|
+
membership_id: _zod.z.number(),
|
|
851
|
+
role: _zod.z.string(),
|
|
852
|
+
is_pic: _zod.z.boolean().optional(),
|
|
853
|
+
membership: _zod.z.any().optional()
|
|
854
|
+
})
|
|
855
|
+
).optional(),
|
|
856
|
+
contact: zContactDTO.optional(),
|
|
857
|
+
remarks: _zod.z.string().optional(),
|
|
858
|
+
can: _zod.z.object({
|
|
859
|
+
update: zNullableBool
|
|
860
|
+
}).optional()
|
|
861
|
+
});
|
|
862
|
+
var alertSchema = _zod.z.object({
|
|
863
|
+
id: _zod.z.number(),
|
|
864
|
+
start_time: _zod.z.string(),
|
|
865
|
+
finish_time: _zod.z.string(),
|
|
866
|
+
can: _zod.z.object({
|
|
867
|
+
update: zNullableBool
|
|
868
|
+
}).optional()
|
|
869
|
+
});
|
|
870
|
+
var documentSchema = _zod.z.object({
|
|
871
|
+
type: _zod.z.literal("document"),
|
|
872
|
+
id: _zod.z.number(),
|
|
873
|
+
documentable_type: _zod.z.string(),
|
|
874
|
+
documentable_id: _zod.z.number(),
|
|
875
|
+
document_type_class: _zod.z.string(),
|
|
876
|
+
document_type: documentType.optional(),
|
|
877
|
+
title: _zod.z.string().nullable().optional(),
|
|
878
|
+
description: _zod.z.string().nullable().optional(),
|
|
879
|
+
expires_at: _zod.z.string().nullable().optional(),
|
|
880
|
+
is_notifiable: _zod.z.boolean().default(true),
|
|
881
|
+
notification_days: _zod.z.number().nullable().optional(),
|
|
882
|
+
data: _zod.z.record(_zod.z.any()).nullable().optional(),
|
|
883
|
+
created_by: _zod.z.number().nullable().optional(),
|
|
884
|
+
updated_by: _zod.z.number().nullable().optional(),
|
|
885
|
+
created_at: _zod.z.string(),
|
|
886
|
+
updated_at: _zod.z.string(),
|
|
887
|
+
media: _zod.z.array(mediaSchema).optional(),
|
|
888
|
+
can: _zod.z.object({
|
|
889
|
+
update: zNullableBool,
|
|
890
|
+
delete: zNullableBool,
|
|
891
|
+
share: zNullableBool
|
|
892
|
+
}).optional()
|
|
893
|
+
});
|
|
894
|
+
var documentRequirement = _zod.z.object({
|
|
895
|
+
id: _zod.z.number(),
|
|
896
|
+
form_requirement_group_id: _zod.z.number(),
|
|
897
|
+
form_template_id: _zod.z.number(),
|
|
898
|
+
form_template: _zod.z.object({
|
|
899
|
+
id: _zod.z.number(),
|
|
900
|
+
name: _zod.z.string(),
|
|
901
|
+
slug: _zod.z.string().nullable().optional()
|
|
902
|
+
}).optional(),
|
|
903
|
+
logical_group: _zod.z.string().nullable().optional(),
|
|
904
|
+
group_operator: _zod.z.enum(["AND", "OR"]).nullable().optional(),
|
|
905
|
+
metadata: _zod.z.object({
|
|
906
|
+
min_validity_days: _zod.z.number().optional(),
|
|
907
|
+
max_validity_days: _zod.z.number().optional(),
|
|
908
|
+
required_fields: _zod.z.array(_zod.z.string()).optional()
|
|
909
|
+
}).nullable().optional(),
|
|
910
|
+
created_by: _zod.z.number().nullable().optional(),
|
|
911
|
+
updated_by: _zod.z.number().nullable().optional(),
|
|
912
|
+
created_at: _zod.z.string(),
|
|
913
|
+
updated_at: _zod.z.string()
|
|
914
|
+
});
|
|
915
|
+
var documentRequirementGroup = _zod.z.object({
|
|
916
|
+
id: _zod.z.number(),
|
|
917
|
+
name: _zod.z.string(),
|
|
918
|
+
description: _zod.z.string().nullable().optional(),
|
|
919
|
+
target_model_type: _zod.z.string(),
|
|
920
|
+
company_id: _zod.z.number().nullable().optional(),
|
|
921
|
+
is_default_template: _zod.z.boolean().default(false),
|
|
922
|
+
is_active: _zod.z.boolean().default(true),
|
|
923
|
+
requirements: _zod.z.array(documentRequirement).optional(),
|
|
924
|
+
// Backend uses 'requirements'
|
|
925
|
+
documentRequirements: _zod.z.array(documentRequirement).optional(),
|
|
926
|
+
// Frontend compatibility
|
|
927
|
+
group_operator: _zod.z.enum(["AND", "OR"]).default("AND"),
|
|
928
|
+
documentRequirements_count: _zod.z.number().optional(),
|
|
929
|
+
assignments_count: _zod.z.number().optional(),
|
|
930
|
+
created_by: _zod.z.number().nullable().optional(),
|
|
931
|
+
updated_by: _zod.z.number().nullable().optional(),
|
|
932
|
+
created_at: _zod.z.string(),
|
|
933
|
+
updated_at: _zod.z.string(),
|
|
934
|
+
can: _zod.z.object({
|
|
935
|
+
update: zNullableBool,
|
|
936
|
+
delete: zNullableBool,
|
|
937
|
+
assign: zNullableBool
|
|
938
|
+
}).optional()
|
|
939
|
+
});
|
|
940
|
+
var documentRequirementGroupAssignment = _zod.z.object({
|
|
941
|
+
id: _zod.z.number(),
|
|
942
|
+
assignable_type: _zod.z.string(),
|
|
943
|
+
assignable_id: _zod.z.number(),
|
|
944
|
+
requirement_group_id: _zod.z.number(),
|
|
945
|
+
requirement_group: documentRequirementGroup.optional(),
|
|
946
|
+
requirementGroup: documentRequirementGroup.optional(),
|
|
947
|
+
// Frontend compatibility
|
|
948
|
+
created_at: _zod.z.string(),
|
|
949
|
+
updated_at: _zod.z.string()
|
|
950
|
+
});
|
|
951
|
+
var documentComplianceStatus = _zod.z.object({
|
|
952
|
+
overall_compliant: _zod.z.boolean(),
|
|
953
|
+
missing_documents: _zod.z.array(
|
|
954
|
+
_zod.z.object({
|
|
955
|
+
requirement_id: _zod.z.number(),
|
|
956
|
+
document_type_class: _zod.z.string(),
|
|
957
|
+
document_type: documentType.optional(),
|
|
958
|
+
reason: _zod.z.string()
|
|
959
|
+
})
|
|
960
|
+
).optional(),
|
|
961
|
+
expired_documents: _zod.z.array(
|
|
962
|
+
_zod.z.object({
|
|
963
|
+
document_id: _zod.z.number(),
|
|
964
|
+
document_type_class: _zod.z.string(),
|
|
965
|
+
document_type: documentType.optional(),
|
|
966
|
+
expired_at: _zod.z.string()
|
|
967
|
+
})
|
|
968
|
+
).optional(),
|
|
969
|
+
expiring_soon_documents: _zod.z.array(
|
|
970
|
+
_zod.z.object({
|
|
971
|
+
document_id: _zod.z.number(),
|
|
972
|
+
document_type_class: _zod.z.string(),
|
|
973
|
+
document_type: documentType.optional(),
|
|
974
|
+
expires_at: _zod.z.string(),
|
|
975
|
+
days_until_expiry: _zod.z.number()
|
|
976
|
+
})
|
|
977
|
+
).optional(),
|
|
978
|
+
group_compliance_status: _zod.z.array(
|
|
979
|
+
_zod.z.object({
|
|
980
|
+
group_id: _zod.z.number(),
|
|
981
|
+
group_name: _zod.z.string(),
|
|
982
|
+
is_compliant: _zod.z.boolean(),
|
|
983
|
+
missing_requirements: _zod.z.array(_zod.z.string()).optional()
|
|
984
|
+
})
|
|
985
|
+
).optional()
|
|
986
|
+
});
|
|
987
|
+
var documentShareSchema = _zod.z.object({
|
|
988
|
+
id: _zod.z.number(),
|
|
989
|
+
document_id: _zod.z.number(),
|
|
990
|
+
document: documentSchema.optional(),
|
|
991
|
+
shared_by: _zod.z.number(),
|
|
992
|
+
sharer: userSchema.optional(),
|
|
993
|
+
shared_with_type: _zod.z.string(),
|
|
994
|
+
shared_with_id: _zod.z.number(),
|
|
995
|
+
can_download: _zod.z.boolean().default(true),
|
|
996
|
+
can_delete: _zod.z.boolean().default(false),
|
|
997
|
+
expires_at: _zod.z.string().nullable().optional(),
|
|
998
|
+
accessed_at: _zod.z.string().nullable().optional(),
|
|
999
|
+
access_count: _zod.z.number().default(0),
|
|
1000
|
+
created_at: _zod.z.string(),
|
|
1001
|
+
updated_at: _zod.z.string()
|
|
1002
|
+
});
|
|
1003
|
+
var allowedDocumentTypeSchema = _zod.z.object({
|
|
1004
|
+
label: _zod.z.string(),
|
|
1005
|
+
description: _zod.z.string(),
|
|
1006
|
+
documentTypeClass: _zod.z.string(),
|
|
1007
|
+
requiresFile: _zod.z.boolean(),
|
|
1008
|
+
category: _zod.z.string().optional(),
|
|
1009
|
+
fieldDefinitions: _zod.z.object({
|
|
1010
|
+
base: _zod.z.record(
|
|
1011
|
+
_zod.z.object({
|
|
1012
|
+
type: _zod.z.string(),
|
|
1013
|
+
label: _zod.z.string(),
|
|
1014
|
+
required: _zod.z.boolean().optional(),
|
|
1015
|
+
rules: _zod.z.array(_zod.z.any()).optional(),
|
|
1016
|
+
options: _zod.z.array(_zod.z.any()).optional(),
|
|
1017
|
+
hint: _zod.z.string().optional()
|
|
1018
|
+
})
|
|
1019
|
+
).optional(),
|
|
1020
|
+
data: _zod.z.record(
|
|
1021
|
+
_zod.z.object({
|
|
1022
|
+
type: _zod.z.string(),
|
|
1023
|
+
label: _zod.z.string(),
|
|
1024
|
+
required: _zod.z.boolean().optional(),
|
|
1025
|
+
rules: _zod.z.array(_zod.z.any()).optional(),
|
|
1026
|
+
options: _zod.z.array(_zod.z.any()).optional(),
|
|
1027
|
+
hint: _zod.z.string().optional()
|
|
1028
|
+
})
|
|
1029
|
+
).optional()
|
|
1030
|
+
}).optional()
|
|
1031
|
+
});
|
|
1032
|
+
var flightLogSchema = _zod.z.object({
|
|
1033
|
+
type: _zod.z.literal("flightLog"),
|
|
1034
|
+
id: _zod.z.number(),
|
|
1035
|
+
airplane_id: _zod.z.number(),
|
|
1036
|
+
airplane: airplaneSchema.optional(),
|
|
1037
|
+
ac_type: _zod.z.string().nullable().optional(),
|
|
1038
|
+
ac_reg: _zod.z.string().nullable().optional(),
|
|
1039
|
+
ac_call: _zod.z.string().nullable().optional(),
|
|
1040
|
+
booking_id: _zod.z.number().nullable().optional(),
|
|
1041
|
+
membership_id: _zod.z.number().nullable().optional(),
|
|
1042
|
+
membership: baseMembershipSchema.optional(),
|
|
1043
|
+
author_id: _zod.z.number(),
|
|
1044
|
+
author: userSchema.optional(),
|
|
1045
|
+
invoice_id: _zod.z.number().nullable().optional(),
|
|
1046
|
+
special_flight_id: _zod.z.number().nullable().optional(),
|
|
1047
|
+
etdZ: _zod.z.string(),
|
|
1048
|
+
etaZ: _zod.z.string(),
|
|
1049
|
+
duration_minutes: _zod.z.number(),
|
|
1050
|
+
crew_assignments: _zod.z.array(
|
|
1051
|
+
_zod.z.object({
|
|
1052
|
+
id: _zod.z.number().optional(),
|
|
1053
|
+
membership_id: _zod.z.number(),
|
|
1054
|
+
role: _zod.z.string(),
|
|
1055
|
+
is_pic: _zod.z.boolean().optional(),
|
|
1056
|
+
membership: _zod.z.any().optional()
|
|
1057
|
+
})
|
|
1058
|
+
).optional(),
|
|
1059
|
+
total_landings: _zod.z.number().nullable().optional(),
|
|
1060
|
+
full_stop_landings: _zod.z.number().nullable().optional(),
|
|
1061
|
+
touch_and_gos: _zod.z.number().default(0),
|
|
1062
|
+
low_approaches: _zod.z.number().default(0),
|
|
1063
|
+
flight_rule: _zod.z.string().nullable().optional(),
|
|
1064
|
+
flight_time_type: _zod.z.string().nullable().optional(),
|
|
1065
|
+
dep_airport_id: _zod.z.number().nullable().optional(),
|
|
1066
|
+
dep_airport: airportSchema.optional(),
|
|
1067
|
+
arr_airport_id: _zod.z.number().nullable().optional(),
|
|
1068
|
+
arr_airport: airportSchema.optional(),
|
|
1069
|
+
from: _zod.z.string().nullable().optional(),
|
|
1070
|
+
to: _zod.z.string().nullable().optional(),
|
|
1071
|
+
costs: zPhpMoneyObject.nullable().optional(),
|
|
1072
|
+
charge: zPhpMoneyObject.nullable().optional(),
|
|
1073
|
+
remarks: _zod.z.string().nullable().optional(),
|
|
1074
|
+
created_at: _zod.z.string(),
|
|
1075
|
+
updated_at: _zod.z.string(),
|
|
1076
|
+
can: _zod.z.object({
|
|
1077
|
+
update: zNullableBool,
|
|
1078
|
+
delete: zNullableBool
|
|
1079
|
+
}).optional()
|
|
1080
|
+
});
|
|
1081
|
+
var invoiceSchema = _zod.z.object({
|
|
1082
|
+
type: _zod.z.literal("invoice"),
|
|
1083
|
+
id: _zod.z.number(),
|
|
1084
|
+
title: _zod.z.string(),
|
|
1085
|
+
membership_id: _zod.z.number(),
|
|
1086
|
+
membership: baseMembershipSchema.optional(),
|
|
1087
|
+
company_id: _zod.z.number().optional(),
|
|
1088
|
+
company: companySchema.optional(),
|
|
1089
|
+
sequence_number: _zod.z.string().nullable().optional(),
|
|
1090
|
+
order_number: _zod.z.string().nullable().optional(),
|
|
1091
|
+
invoice_date: _zod.z.string().nullable().optional(),
|
|
1092
|
+
due_date: _zod.z.string().nullable().optional(),
|
|
1093
|
+
status: _zod.z.string().nullable().optional(),
|
|
1094
|
+
paid_status: _zod.z.string().nullable().optional(),
|
|
1095
|
+
total: zPhpMoneyObject.nullable().optional(),
|
|
1096
|
+
subtotal: zPhpMoneyObject.nullable().optional(),
|
|
1097
|
+
tax_amount: zPhpMoneyObject.nullable().optional(),
|
|
1098
|
+
discount_amount: zPhpMoneyObject.nullable().optional(),
|
|
1099
|
+
paid_at: _zod.z.string().nullable().optional(),
|
|
1100
|
+
released_at: _zod.z.string().nullable().optional(),
|
|
1101
|
+
sent: _zod.z.number().default(0),
|
|
1102
|
+
viewed: _zod.z.boolean().default(false),
|
|
1103
|
+
remarks: _zod.z.string().nullable().optional(),
|
|
1104
|
+
notes: _zod.z.string().nullable().optional(),
|
|
1105
|
+
recipient_company: _zod.z.string().nullable().optional(),
|
|
1106
|
+
recipient_name: _zod.z.string().nullable().optional(),
|
|
1107
|
+
recipient_address_street_1: _zod.z.string().nullable().optional(),
|
|
1108
|
+
recipient_address_street_2: _zod.z.string().nullable().optional(),
|
|
1109
|
+
recipient_city: _zod.z.string().nullable().optional(),
|
|
1110
|
+
recipient_zip: _zod.z.string().nullable().optional(),
|
|
1111
|
+
recipient_state: _zod.z.string().nullable().optional(),
|
|
1112
|
+
recipient_country: _zod.z.string().nullable().optional(),
|
|
1113
|
+
recipient_vat_id: _zod.z.string().nullable().optional(),
|
|
1114
|
+
issuer_name: _zod.z.string().nullable().optional(),
|
|
1115
|
+
issuer_address_street_1: _zod.z.string().nullable().optional(),
|
|
1116
|
+
issuer_address_street_2: _zod.z.string().nullable().optional(),
|
|
1117
|
+
issuer_city: _zod.z.string().nullable().optional(),
|
|
1118
|
+
issuer_zip: _zod.z.string().nullable().optional(),
|
|
1119
|
+
issuer_state: _zod.z.string().nullable().optional(),
|
|
1120
|
+
created_at: _zod.z.string(),
|
|
1121
|
+
updated_at: _zod.z.string(),
|
|
1122
|
+
can: _zod.z.object({
|
|
1123
|
+
update: zNullableBool,
|
|
1124
|
+
delete: zNullableBool,
|
|
1125
|
+
release: zNullableBool,
|
|
1126
|
+
view: zNullableBool
|
|
1127
|
+
}).optional()
|
|
1128
|
+
});
|
|
1129
|
+
var scheduledFlightSchema = _zod.z.object({
|
|
1130
|
+
type: _zod.z.literal("scheduledFlight"),
|
|
1131
|
+
id: _zod.z.number(),
|
|
1132
|
+
booking_id: _zod.z.number(),
|
|
1133
|
+
departure_time: _zod.z.string(),
|
|
1134
|
+
arrival_time: _zod.z.string(),
|
|
1135
|
+
departure_airport_id: _zod.z.number().nullable().optional(),
|
|
1136
|
+
departure_airport: airportSchema.optional(),
|
|
1137
|
+
arrival_airport_id: _zod.z.number().nullable().optional(),
|
|
1138
|
+
arrival_airport: airportSchema.optional(),
|
|
1139
|
+
flight_number: _zod.z.string().nullable().optional(),
|
|
1140
|
+
notes: _zod.z.string().nullable().optional(),
|
|
1141
|
+
created_at: _zod.z.string(),
|
|
1142
|
+
updated_at: _zod.z.string()
|
|
1143
|
+
});
|
|
1144
|
+
var qualificationSchema = _zod.z.object({
|
|
1145
|
+
type: _zod.z.literal("qualification"),
|
|
1146
|
+
id: _zod.z.number(),
|
|
1147
|
+
title: _zod.z.string(),
|
|
1148
|
+
description: _zod.z.string().nullable().optional(),
|
|
1149
|
+
category: _zod.z.string().nullable().optional(),
|
|
1150
|
+
created_at: _zod.z.string(),
|
|
1151
|
+
updated_at: _zod.z.string()
|
|
1152
|
+
});
|
|
1153
|
+
var expenseSchema = _zod.z.object({
|
|
1154
|
+
type: _zod.z.literal("expense"),
|
|
1155
|
+
id: _zod.z.number(),
|
|
1156
|
+
company_id: _zod.z.number(),
|
|
1157
|
+
company: companySchema.optional(),
|
|
1158
|
+
membership_id: _zod.z.number(),
|
|
1159
|
+
membership: baseMembershipSchema.optional(),
|
|
1160
|
+
title: _zod.z.string(),
|
|
1161
|
+
description: _zod.z.string().nullable().optional(),
|
|
1162
|
+
amount: zPhpMoneyObject,
|
|
1163
|
+
status: _zod.z.string().nullable().optional(),
|
|
1164
|
+
expense_date: _zod.z.string().nullable().optional(),
|
|
1165
|
+
invoice_id: _zod.z.number().nullable().optional(),
|
|
1166
|
+
created_at: _zod.z.string(),
|
|
1167
|
+
updated_at: _zod.z.string(),
|
|
1168
|
+
can: _zod.z.object({
|
|
1169
|
+
update: zNullableBool,
|
|
1170
|
+
delete: zNullableBool,
|
|
1171
|
+
approve: zNullableBool
|
|
1172
|
+
}).optional()
|
|
1173
|
+
});
|
|
1174
|
+
var tagSchema = _zod.z.object({
|
|
1175
|
+
type: _zod.z.literal("tag").optional(),
|
|
1176
|
+
id: _zod.z.number(),
|
|
1177
|
+
name: _zod.z.string(),
|
|
1178
|
+
color: _zod.z.string().nullable().optional()
|
|
1179
|
+
});
|
|
1180
|
+
var courseSchema = _zod.z.object({
|
|
1181
|
+
type: _zod.z.literal("course"),
|
|
1182
|
+
id: _zod.z.number(),
|
|
1183
|
+
company_id: _zod.z.number(),
|
|
1184
|
+
company: companySchema.optional(),
|
|
1185
|
+
name: _zod.z.string(),
|
|
1186
|
+
description: _zod.z.string().nullable().optional(),
|
|
1187
|
+
start_date: _zod.z.string().nullable().optional(),
|
|
1188
|
+
end_date: _zod.z.string().nullable().optional(),
|
|
1189
|
+
max_participants: _zod.z.number().nullable().optional(),
|
|
1190
|
+
price: zPhpMoneyObject.nullable().optional(),
|
|
1191
|
+
instructor_id: _zod.z.number().nullable().optional(),
|
|
1192
|
+
instructor: userSchema.optional(),
|
|
1193
|
+
aircraft_required: _zod.z.boolean().default(false),
|
|
1194
|
+
qualification_id: _zod.z.number().nullable().optional(),
|
|
1195
|
+
qualification: qualificationSchema.optional(),
|
|
1196
|
+
is_archived: _zod.z.boolean().optional(),
|
|
1197
|
+
archived_at: _zod.z.string().nullable().optional(),
|
|
1198
|
+
category: _zod.z.string().nullable().optional(),
|
|
1199
|
+
title: _zod.z.string().nullable().optional(),
|
|
1200
|
+
subtitle: _zod.z.string().nullable().optional(),
|
|
1201
|
+
content: _zod.z.string().nullable().optional(),
|
|
1202
|
+
footer: _zod.z.string().nullable().optional(),
|
|
1203
|
+
// Syllabus assignment pointers: `syllabus_id` drives the Übersicht,
|
|
1204
|
+
// `booking_form_syllabus_id` the per-flight Ausbildungsnachweis.
|
|
1205
|
+
syllabus_id: _zod.z.number().nullable().optional(),
|
|
1206
|
+
booking_form_syllabus_id: _zod.z.number().nullable().optional(),
|
|
1207
|
+
// Present only when the backend eager-loaded `checkSyllabi`.
|
|
1208
|
+
check_syllabi: _zod.z.array(courseCheckSyllabusSchema).optional(),
|
|
1209
|
+
tags: _zod.z.array(tagSchema).optional(),
|
|
1210
|
+
created_at: _zod.z.string(),
|
|
1211
|
+
updated_at: _zod.z.string(),
|
|
1212
|
+
// Loose record on purpose: gates are policy-reflected server-side and
|
|
1213
|
+
// grow over time (useAssistant, …) — same convention as companySchema.
|
|
1214
|
+
can: _zod.z.record(_zod.z.string(), zNullableBool).optional()
|
|
1215
|
+
});
|
|
1216
|
+
var courseEnrollmentMetricsSchema = _zod.z.object({
|
|
1217
|
+
last_flight_at: _zod.z.string().nullable(),
|
|
1218
|
+
next_flight_at: _zod.z.string().nullable(),
|
|
1219
|
+
total_flight_minutes: _zod.z.number().default(0),
|
|
1220
|
+
flags: _zod.z.record(_zod.z.string(), _zod.z.union([_zod.z.boolean(), _zod.z.number(), _zod.z.string()])).default({}),
|
|
1221
|
+
calculated_at: _zod.z.string().nullable()
|
|
1222
|
+
});
|
|
1223
|
+
var courseEnrollmentSchema = _zod.z.object({
|
|
1224
|
+
type: _zod.z.literal("course_enrollment").optional(),
|
|
1225
|
+
id: _zod.z.number(),
|
|
1226
|
+
course_id: _zod.z.number(),
|
|
1227
|
+
membership_id: _zod.z.number(),
|
|
1228
|
+
company_id: _zod.z.number(),
|
|
1229
|
+
mentor_id: _zod.z.number().nullable().optional(),
|
|
1230
|
+
status: _zod.z.enum(["enrolled", "completed", "cancelled", "suspended"]),
|
|
1231
|
+
enrollment_date: _zod.z.string(),
|
|
1232
|
+
completion_date: _zod.z.string().nullable().optional(),
|
|
1233
|
+
progress_percentage: _zod.z.number().default(0),
|
|
1234
|
+
milestone_count: _zod.z.number().optional(),
|
|
1235
|
+
comments: _zod.z.string().nullable().optional(),
|
|
1236
|
+
initial_payment_generated: _zod.z.boolean().optional(),
|
|
1237
|
+
initial_payment_removable: _zod.z.boolean().optional(),
|
|
1238
|
+
// Element-driven training progress (see m-crit-api
|
|
1239
|
+
// docs/features/training-tracking.md).
|
|
1240
|
+
tracked_training_elements_count: _zod.z.number().optional(),
|
|
1241
|
+
progress_source: _zod.z.enum(["training_elements", "milestones"]).optional(),
|
|
1242
|
+
metrics: courseEnrollmentMetricsSchema.optional(),
|
|
1243
|
+
created_at: _zod.z.string(),
|
|
1244
|
+
updated_at: _zod.z.string(),
|
|
1245
|
+
course: courseSchema.optional(),
|
|
1246
|
+
membership: membershipSchema.optional(),
|
|
1247
|
+
mentor: userSchema.optional(),
|
|
1248
|
+
// Loose record on purpose: gates are policy-reflected server-side and
|
|
1249
|
+
// grow over time (updateTraining, manageInitialPayment, …).
|
|
1250
|
+
can: _zod.z.record(_zod.z.string(), zNullableBool).optional()
|
|
1251
|
+
});
|
|
1252
|
+
var eventSchema = _zod.z.object({
|
|
1253
|
+
type: _zod.z.literal("event"),
|
|
1254
|
+
id: _zod.z.number(),
|
|
1255
|
+
company_id: _zod.z.number(),
|
|
1256
|
+
company: companySchema.optional(),
|
|
1257
|
+
title: _zod.z.string(),
|
|
1258
|
+
description: _zod.z.string().nullable().optional(),
|
|
1259
|
+
start_date: _zod.z.string(),
|
|
1260
|
+
end_date: _zod.z.string().nullable().optional(),
|
|
1261
|
+
all_day: _zod.z.boolean().default(false),
|
|
1262
|
+
location: _zod.z.string().nullable().optional(),
|
|
1263
|
+
category: _zod.z.string().nullable().optional(),
|
|
1264
|
+
created_by: _zod.z.number(),
|
|
1265
|
+
creator: userSchema.optional(),
|
|
1266
|
+
created_at: _zod.z.string(),
|
|
1267
|
+
updated_at: _zod.z.string(),
|
|
1268
|
+
can: _zod.z.object({
|
|
1269
|
+
update: zNullableBool,
|
|
1270
|
+
delete: zNullableBool,
|
|
1271
|
+
attend: zNullableBool
|
|
1272
|
+
}).optional()
|
|
1273
|
+
});
|
|
1274
|
+
var addressSchema = _zod.z.object({
|
|
1275
|
+
type: _zod.z.literal("address"),
|
|
1276
|
+
id: _zod.z.number(),
|
|
1277
|
+
company_id: _zod.z.number().nullable().optional(),
|
|
1278
|
+
addressable_type: _zod.z.string(),
|
|
1279
|
+
addressable_id: _zod.z.number(),
|
|
1280
|
+
street: _zod.z.string().nullable().optional(),
|
|
1281
|
+
house_number: _zod.z.string().nullable().optional(),
|
|
1282
|
+
postal_code: _zod.z.string().nullable().optional(),
|
|
1283
|
+
city: _zod.z.string().nullable().optional(),
|
|
1284
|
+
state: _zod.z.string().nullable().optional(),
|
|
1285
|
+
country: _zod.z.string().nullable().optional(),
|
|
1286
|
+
additional_info: _zod.z.string().nullable().optional(),
|
|
1287
|
+
vat_id: _zod.z.string().nullable().optional(),
|
|
1288
|
+
created_at: _zod.z.string(),
|
|
1289
|
+
updated_at: _zod.z.string()
|
|
1290
|
+
});
|
|
1291
|
+
var roleSchema = _zod.z.object({
|
|
1292
|
+
type: _zod.z.literal("role"),
|
|
1293
|
+
id: _zod.z.number(),
|
|
1294
|
+
company_id: _zod.z.number(),
|
|
1295
|
+
name: _zod.z.string(),
|
|
1296
|
+
description: _zod.z.string().nullable().optional(),
|
|
1297
|
+
permissions: _zod.z.array(_zod.z.string()).optional(),
|
|
1298
|
+
created_at: _zod.z.string(),
|
|
1299
|
+
updated_at: _zod.z.string()
|
|
1300
|
+
});
|
|
1301
|
+
var landingSchema = _zod.z.object({
|
|
1302
|
+
type: _zod.z.literal("landing"),
|
|
1303
|
+
id: _zod.z.number(),
|
|
1304
|
+
flight_log_id: _zod.z.number(),
|
|
1305
|
+
approach_type_id: _zod.z.number().nullable().optional(),
|
|
1306
|
+
airport_id: _zod.z.number().nullable().optional(),
|
|
1307
|
+
airport: airportSchema.optional(),
|
|
1308
|
+
landing_fee_id: _zod.z.number().nullable().optional(),
|
|
1309
|
+
landing_time: _zod.z.string(),
|
|
1310
|
+
price: zPhpMoneyObject.nullable().optional(),
|
|
1311
|
+
created_at: _zod.z.string(),
|
|
1312
|
+
updated_at: _zod.z.string()
|
|
1313
|
+
});
|
|
1314
|
+
var ticketSchema = _zod.z.object({
|
|
1315
|
+
type: _zod.z.literal("ticket"),
|
|
1316
|
+
id: _zod.z.number(),
|
|
1317
|
+
company_id: _zod.z.number().nullable().optional(),
|
|
1318
|
+
company: companySchema.optional(),
|
|
1319
|
+
user_id: _zod.z.number(),
|
|
1320
|
+
user: userSchema.optional(),
|
|
1321
|
+
assigned_to: _zod.z.number().nullable().optional(),
|
|
1322
|
+
assignee: userSchema.optional(),
|
|
1323
|
+
title: _zod.z.string(),
|
|
1324
|
+
description: _zod.z.string(),
|
|
1325
|
+
status: _zod.z.string(),
|
|
1326
|
+
priority: _zod.z.string().nullable().optional(),
|
|
1327
|
+
category: _zod.z.string().nullable().optional(),
|
|
1328
|
+
resolved_at: _zod.z.string().nullable().optional(),
|
|
1329
|
+
created_at: _zod.z.string(),
|
|
1330
|
+
updated_at: _zod.z.string(),
|
|
1331
|
+
can: _zod.z.object({
|
|
1332
|
+
update: zNullableBool,
|
|
1333
|
+
delete: zNullableBool,
|
|
1334
|
+
resolve: zNullableBool
|
|
1335
|
+
}).optional()
|
|
1336
|
+
});
|
|
1337
|
+
var runwaySchema = _zod.z.object({
|
|
1338
|
+
type: _zod.z.literal("runway"),
|
|
1339
|
+
id: _zod.z.number(),
|
|
1340
|
+
airport_id: _zod.z.number(),
|
|
1341
|
+
airport: airportSchema.optional(),
|
|
1342
|
+
name: _zod.z.string(),
|
|
1343
|
+
length_m: _zod.z.number().nullable().optional(),
|
|
1344
|
+
width_m: _zod.z.number().nullable().optional(),
|
|
1345
|
+
surface: _zod.z.string().nullable().optional(),
|
|
1346
|
+
heading: _zod.z.number().nullable().optional(),
|
|
1347
|
+
elevation_m: _zod.z.number().nullable().optional(),
|
|
1348
|
+
active: _zod.z.boolean().default(true),
|
|
1349
|
+
created_at: _zod.z.string(),
|
|
1350
|
+
updated_at: _zod.z.string()
|
|
1351
|
+
});
|
|
1352
|
+
var settingSchema = _zod.z.object({
|
|
1353
|
+
type: _zod.z.literal("setting"),
|
|
1354
|
+
id: _zod.z.number(),
|
|
1355
|
+
model_type: _zod.z.string(),
|
|
1356
|
+
model_id: _zod.z.number(),
|
|
1357
|
+
key: _zod.z.string(),
|
|
1358
|
+
value: _zod.z.any(),
|
|
1359
|
+
created_at: _zod.z.string(),
|
|
1360
|
+
updated_at: _zod.z.string()
|
|
1361
|
+
});
|
|
1362
|
+
var postSchema = _zod.z.object({
|
|
1363
|
+
type: _zod.z.literal("post"),
|
|
1364
|
+
id: _zod.z.number(),
|
|
1365
|
+
company_id: _zod.z.number(),
|
|
1366
|
+
postable_type: _zod.z.string().nullable().optional(),
|
|
1367
|
+
postable_id: _zod.z.number().nullable().optional(),
|
|
1368
|
+
author_id: _zod.z.number(),
|
|
1369
|
+
author: userSchema.optional(),
|
|
1370
|
+
title: _zod.z.string().nullable().optional(),
|
|
1371
|
+
content: _zod.z.string(),
|
|
1372
|
+
sticky: _zod.z.boolean().default(false),
|
|
1373
|
+
public: _zod.z.boolean().default(false),
|
|
1374
|
+
media: mediaCollection.optional(),
|
|
1375
|
+
created_at: _zod.z.string(),
|
|
1376
|
+
updated_at: _zod.z.string(),
|
|
1377
|
+
can: _zod.z.object({
|
|
1378
|
+
view: zNullableBool,
|
|
1379
|
+
update: zNullableBool,
|
|
1380
|
+
delete: zNullableBool,
|
|
1381
|
+
setFlags: zNullableBool,
|
|
1382
|
+
restore: zNullableBool,
|
|
1383
|
+
forceDelete: zNullableBool
|
|
1384
|
+
}).optional()
|
|
1385
|
+
});
|
|
1386
|
+
var commentSchema = _zod.z.object({
|
|
1387
|
+
type: _zod.z.literal("comment"),
|
|
1388
|
+
id: _zod.z.number(),
|
|
1389
|
+
commentable_type: _zod.z.string().optional(),
|
|
1390
|
+
commentable_id: _zod.z.number().optional(),
|
|
1391
|
+
parent_id: _zod.z.number().optional().nullable(),
|
|
1392
|
+
title: _zod.z.string().optional().nullable(),
|
|
1393
|
+
body: _zod.z.string(),
|
|
1394
|
+
author_id: _zod.z.number().optional(),
|
|
1395
|
+
author: userSchema.optional(),
|
|
1396
|
+
created_at: _zod.z.string(),
|
|
1397
|
+
updated_at: _zod.z.string().optional(),
|
|
1398
|
+
children: _zod.z.lazy(() => commentSchema.array()).optional(),
|
|
1399
|
+
can: _zod.z.object({
|
|
1400
|
+
view: _zod.z.boolean().optional(),
|
|
1401
|
+
update: _zod.z.boolean().optional().nullable(),
|
|
1402
|
+
delete: _zod.z.boolean().optional().nullable(),
|
|
1403
|
+
reply: _zod.z.boolean().optional(),
|
|
1404
|
+
viewComments: _zod.z.boolean().optional(),
|
|
1405
|
+
createComments: _zod.z.boolean().optional()
|
|
1406
|
+
}).optional()
|
|
1407
|
+
});
|
|
1408
|
+
var airplaneIssueSeverityEnum = _zod.z.enum([
|
|
1409
|
+
"minor",
|
|
1410
|
+
"major",
|
|
1411
|
+
"grounding"
|
|
1412
|
+
]);
|
|
1413
|
+
var airplaneIssueStatusEnum = _zod.z.enum(["open", "deferred", "resolved"]);
|
|
1414
|
+
var airplaneIssueSchema = _zod.z.object({
|
|
1415
|
+
type: _zod.z.literal("airplaneIssue"),
|
|
1416
|
+
id: _zod.z.number(),
|
|
1417
|
+
airplane_id: _zod.z.number(),
|
|
1418
|
+
title: _zod.z.string().nullable().optional(),
|
|
1419
|
+
body: _zod.z.string(),
|
|
1420
|
+
severity: airplaneIssueSeverityEnum,
|
|
1421
|
+
ata_chapter: _zod.z.string().nullable().optional(),
|
|
1422
|
+
status: airplaneIssueStatusEnum,
|
|
1423
|
+
reporter: userSchema.optional(),
|
|
1424
|
+
resolver: userSchema.optional(),
|
|
1425
|
+
deferred_at: _zod.z.string().nullable().optional(),
|
|
1426
|
+
deferred_until: _zod.z.string().nullable().optional(),
|
|
1427
|
+
deferral_notes: _zod.z.string().nullable().optional(),
|
|
1428
|
+
resolved_at: _zod.z.string().nullable().optional(),
|
|
1429
|
+
resolution_notes: _zod.z.string().nullable().optional(),
|
|
1430
|
+
attachments: _zod.z.array(mediaSchema).optional(),
|
|
1431
|
+
created_at: _zod.z.string(),
|
|
1432
|
+
updated_at: _zod.z.string().optional(),
|
|
1433
|
+
can: _zod.z.object({
|
|
1434
|
+
view: _zod.z.boolean().nullable().optional(),
|
|
1435
|
+
update: _zod.z.boolean().nullable().optional(),
|
|
1436
|
+
resolve: _zod.z.boolean().nullable().optional(),
|
|
1437
|
+
defer: _zod.z.boolean().nullable().optional(),
|
|
1438
|
+
reopen: _zod.z.boolean().nullable().optional(),
|
|
1439
|
+
delete: _zod.z.boolean().nullable().optional()
|
|
1440
|
+
}).optional()
|
|
1441
|
+
});
|
|
1442
|
+
var specialFlightSchema = _zod.z.object({
|
|
1443
|
+
type: _zod.z.literal("specialFlight"),
|
|
1444
|
+
id: _zod.z.number(),
|
|
1445
|
+
company_id: _zod.z.number(),
|
|
1446
|
+
company: companySchema.optional(),
|
|
1447
|
+
name: _zod.z.string(),
|
|
1448
|
+
description: _zod.z.string().nullable().optional(),
|
|
1449
|
+
fee_id: _zod.z.number().nullable().optional(),
|
|
1450
|
+
fee: feeSchema.optional(),
|
|
1451
|
+
active: _zod.z.boolean().default(true),
|
|
1452
|
+
created_at: _zod.z.string(),
|
|
1453
|
+
updated_at: _zod.z.string()
|
|
1454
|
+
});
|
|
1455
|
+
var prePaidPackageSchema = _zod.z.object({
|
|
1456
|
+
type: _zod.z.literal("prePaidPackage"),
|
|
1457
|
+
id: _zod.z.number(),
|
|
1458
|
+
company_id: _zod.z.number(),
|
|
1459
|
+
company: companySchema.optional(),
|
|
1460
|
+
name: _zod.z.string(),
|
|
1461
|
+
description: _zod.z.string().nullable().optional(),
|
|
1462
|
+
balance: zPhpMoneyObject,
|
|
1463
|
+
initial_amount: zPhpMoneyObject,
|
|
1464
|
+
discount_percentage: _zod.z.number().nullable().optional(),
|
|
1465
|
+
valid_until: _zod.z.string().nullable().optional(),
|
|
1466
|
+
created_at: _zod.z.string(),
|
|
1467
|
+
updated_at: _zod.z.string(),
|
|
1468
|
+
can: _zod.z.object({
|
|
1469
|
+
update: zNullableBool,
|
|
1470
|
+
delete: zNullableBool,
|
|
1471
|
+
assign: zNullableBool
|
|
1472
|
+
}).optional()
|
|
1473
|
+
});
|
|
1474
|
+
var expenseItemSchema = _zod.z.object({
|
|
1475
|
+
type: _zod.z.literal("expenseItem"),
|
|
1476
|
+
id: _zod.z.number(),
|
|
1477
|
+
company_id: _zod.z.number(),
|
|
1478
|
+
company: companySchema.optional(),
|
|
1479
|
+
name: _zod.z.string(),
|
|
1480
|
+
description: _zod.z.string().nullable().optional(),
|
|
1481
|
+
category: _zod.z.string().nullable().optional(),
|
|
1482
|
+
active: _zod.z.boolean().default(true),
|
|
1483
|
+
created_at: _zod.z.string(),
|
|
1484
|
+
updated_at: _zod.z.string()
|
|
1485
|
+
});
|
|
1486
|
+
var waypointSchema = _zod.z.object({
|
|
1487
|
+
type: _zod.z.literal("waypoint"),
|
|
1488
|
+
id: _zod.z.number(),
|
|
1489
|
+
identifier: _zod.z.string(),
|
|
1490
|
+
name: _zod.z.string(),
|
|
1491
|
+
latitude: _zod.z.number(),
|
|
1492
|
+
longitude: _zod.z.number(),
|
|
1493
|
+
elevation_m: _zod.z.number().nullable().optional(),
|
|
1494
|
+
country: _zod.z.string().nullable().optional(),
|
|
1495
|
+
created_at: _zod.z.string(),
|
|
1496
|
+
updated_at: _zod.z.string()
|
|
1497
|
+
});
|
|
1498
|
+
var approachTypeSchema = _zod.z.object({
|
|
1499
|
+
type: _zod.z.literal("approachType"),
|
|
1500
|
+
id: _zod.z.number(),
|
|
1501
|
+
name: _zod.z.string(),
|
|
1502
|
+
abbreviation: _zod.z.string(),
|
|
1503
|
+
description: _zod.z.string().nullable().optional(),
|
|
1504
|
+
created_at: _zod.z.string(),
|
|
1505
|
+
updated_at: _zod.z.string()
|
|
1506
|
+
});
|
|
1507
|
+
|
|
1508
|
+
// src/schemas/faq.ts
|
|
1509
|
+
|
|
1510
|
+
var FaqStatus = /* @__PURE__ */ ((FaqStatus2) => {
|
|
1511
|
+
FaqStatus2["PENDING"] = "pending";
|
|
1512
|
+
FaqStatus2["APPROVED"] = "approved";
|
|
1513
|
+
FaqStatus2["REJECTED"] = "rejected";
|
|
1514
|
+
return FaqStatus2;
|
|
1515
|
+
})(FaqStatus || {});
|
|
1516
|
+
var UserBasicSchema = _zod.z.object({
|
|
1517
|
+
id: _zod.z.number(),
|
|
1518
|
+
name: _zod.z.string(),
|
|
1519
|
+
email: _zod.z.string().email()
|
|
1520
|
+
}).nullable();
|
|
1521
|
+
var FaqSchema = _zod.z.object({
|
|
1522
|
+
type: _zod.z.literal("faq"),
|
|
1523
|
+
id: _zod.z.number(),
|
|
1524
|
+
company_id: _zod.z.number().nullable(),
|
|
1525
|
+
faqable_type: _zod.z.string().nullable(),
|
|
1526
|
+
faqable_id: _zod.z.number().nullable(),
|
|
1527
|
+
category: _zod.z.string(),
|
|
1528
|
+
subcategory: _zod.z.string().nullable(),
|
|
1529
|
+
question: _zod.z.string(),
|
|
1530
|
+
answer: _zod.z.string().nullable(),
|
|
1531
|
+
order: _zod.z.number(),
|
|
1532
|
+
is_active: _zod.z.boolean(),
|
|
1533
|
+
status: _zod.z.enum(["pending", "approved", "rejected"]),
|
|
1534
|
+
submitted_by: _zod.z.number().nullable(),
|
|
1535
|
+
reviewed_by: _zod.z.number().nullable(),
|
|
1536
|
+
reviewed_at: _zod.z.string().nullable(),
|
|
1537
|
+
created_at: _zod.z.string(),
|
|
1538
|
+
updated_at: _zod.z.string(),
|
|
1539
|
+
submitter: UserBasicSchema.optional(),
|
|
1540
|
+
reviewer: UserBasicSchema.optional(),
|
|
1541
|
+
is_pending: _zod.z.boolean().optional(),
|
|
1542
|
+
is_user_submitted: _zod.z.boolean().optional(),
|
|
1543
|
+
can: _zod.z.object({
|
|
1544
|
+
view: _zod.z.boolean().optional(),
|
|
1545
|
+
update: _zod.z.boolean().optional(),
|
|
1546
|
+
delete: _zod.z.boolean().optional(),
|
|
1547
|
+
review: _zod.z.boolean().optional(),
|
|
1548
|
+
submit: _zod.z.boolean().optional()
|
|
1549
|
+
}).optional()
|
|
1550
|
+
});
|
|
1551
|
+
var SubmitFaqQuestionSchema = _zod.z.object({
|
|
1552
|
+
category: _zod.z.string().min(1, "Category is required"),
|
|
1553
|
+
subcategory: _zod.z.string().nullable().optional(),
|
|
1554
|
+
question: _zod.z.string().min(10, "Question must be at least 10 characters")
|
|
1555
|
+
});
|
|
1556
|
+
var ReviewFaqSchema = _zod.z.object({
|
|
1557
|
+
status: _zod.z.enum(["pending", "approved", "rejected"]),
|
|
1558
|
+
answer: _zod.z.string().optional(),
|
|
1559
|
+
category: _zod.z.string().optional(),
|
|
1560
|
+
subcategory: _zod.z.string().nullable().optional(),
|
|
1561
|
+
order: _zod.z.number().optional(),
|
|
1562
|
+
is_active: _zod.z.boolean().optional()
|
|
1563
|
+
});
|
|
1564
|
+
|
|
1565
|
+
// src/schemas/safety-report.ts
|
|
1566
|
+
|
|
1567
|
+
var SafetyReportStatusEnum = _zod.z.enum([
|
|
1568
|
+
"new",
|
|
1569
|
+
"under_review",
|
|
1570
|
+
"action_taken",
|
|
1571
|
+
"closed"
|
|
1572
|
+
]);
|
|
1573
|
+
var SafetyReportCategorySchema = _zod.z.object({
|
|
1574
|
+
id: _zod.z.number(),
|
|
1575
|
+
name: _zod.z.string(),
|
|
1576
|
+
description: _zod.z.string().nullable(),
|
|
1577
|
+
color: _zod.z.string(),
|
|
1578
|
+
sort_order: _zod.z.number(),
|
|
1579
|
+
is_active: _zod.z.boolean(),
|
|
1580
|
+
is_global: _zod.z.boolean().optional(),
|
|
1581
|
+
created_at: _zod.z.string().optional(),
|
|
1582
|
+
updated_at: _zod.z.string().optional()
|
|
1583
|
+
});
|
|
1584
|
+
var SafetyReportCategoryFormSchema = _zod.z.object({
|
|
1585
|
+
name: _zod.z.string().min(1, "Name is required").max(100, "Name must be at most 100 characters"),
|
|
1586
|
+
description: _zod.z.string().max(500).nullable().optional(),
|
|
1587
|
+
color: _zod.z.string().regex(/^#[0-9A-Fa-f]{6}$/, "Invalid hex color").nullable().optional(),
|
|
1588
|
+
sort_order: _zod.z.number().int().min(0).optional(),
|
|
1589
|
+
is_active: _zod.z.boolean().optional()
|
|
1590
|
+
});
|
|
1591
|
+
var SafetyReportMediaSchema = _zod.z.object({
|
|
1592
|
+
id: _zod.z.number(),
|
|
1593
|
+
file_name: _zod.z.string(),
|
|
1594
|
+
mime_type: _zod.z.string(),
|
|
1595
|
+
size: _zod.z.number(),
|
|
1596
|
+
url: _zod.z.string().nullable()
|
|
1597
|
+
});
|
|
1598
|
+
var SafetyReportSchema = _zod.z.object({
|
|
1599
|
+
id: _zod.z.number(),
|
|
1600
|
+
incident_date: _zod.z.string(),
|
|
1601
|
+
location: _zod.z.string().nullable(),
|
|
1602
|
+
description: _zod.z.string(),
|
|
1603
|
+
status: SafetyReportStatusEnum,
|
|
1604
|
+
is_archived: _zod.z.boolean(),
|
|
1605
|
+
category: SafetyReportCategorySchema.nullable().optional(),
|
|
1606
|
+
attachments: _zod.z.array(SafetyReportMediaSchema).optional(),
|
|
1607
|
+
attachments_count: _zod.z.number().optional(),
|
|
1608
|
+
created_at: _zod.z.string(),
|
|
1609
|
+
updated_at: _zod.z.string(),
|
|
1610
|
+
can: _zod.z.record(_zod.z.string(), _zod.z.boolean()).optional()
|
|
1611
|
+
});
|
|
1612
|
+
var SafetyReportListResponseSchema = _zod.z.object({
|
|
1613
|
+
data: _zod.z.array(SafetyReportSchema),
|
|
1614
|
+
links: _zod.z.object({
|
|
1615
|
+
first: _zod.z.string().nullable().optional(),
|
|
1616
|
+
last: _zod.z.string().nullable().optional(),
|
|
1617
|
+
prev: _zod.z.string().nullable().optional(),
|
|
1618
|
+
next: _zod.z.string().nullable().optional()
|
|
1619
|
+
}).optional(),
|
|
1620
|
+
meta: _zod.z.object({
|
|
1621
|
+
current_page: _zod.z.number(),
|
|
1622
|
+
from: _zod.z.number().nullable(),
|
|
1623
|
+
last_page: _zod.z.number(),
|
|
1624
|
+
per_page: _zod.z.number(),
|
|
1625
|
+
to: _zod.z.number().nullable(),
|
|
1626
|
+
total: _zod.z.number()
|
|
1627
|
+
}).optional()
|
|
1628
|
+
});
|
|
1629
|
+
var SafetyReportFormSchema = _zod.z.object({
|
|
1630
|
+
incident_date: _zod.z.string().min(1, "Incident date is required"),
|
|
1631
|
+
location: _zod.z.string().max(255).nullable().optional(),
|
|
1632
|
+
description: _zod.z.string().min(10, "Description must be at least 10 characters").max(1e4, "Description must be at most 10000 characters")
|
|
1633
|
+
});
|
|
1634
|
+
var SafetyReportUpdateSchema = _zod.z.object({
|
|
1635
|
+
status: SafetyReportStatusEnum.optional(),
|
|
1636
|
+
category_id: _zod.z.number().nullable().optional()
|
|
1637
|
+
});
|
|
1638
|
+
var SafetyReportFilterSchema = _zod.z.object({
|
|
1639
|
+
status: SafetyReportStatusEnum.optional(),
|
|
1640
|
+
category_id: _zod.z.number().optional(),
|
|
1641
|
+
date_from: _zod.z.string().optional(),
|
|
1642
|
+
date_to: _zod.z.string().optional(),
|
|
1643
|
+
include_archived: _zod.z.boolean().optional(),
|
|
1644
|
+
search: _zod.z.string().optional(),
|
|
1645
|
+
sort: _zod.z.enum(["incident_date", "created_at", "status"]).optional(),
|
|
1646
|
+
direction: _zod.z.enum(["asc", "desc"]).optional(),
|
|
1647
|
+
per_page: _zod.z.number().optional(),
|
|
1648
|
+
page: _zod.z.number().optional()
|
|
1649
|
+
});
|
|
1650
|
+
var SafetyReportSubmissionResponseSchema = _zod.z.object({
|
|
1651
|
+
message: _zod.z.string(),
|
|
1652
|
+
submitted: _zod.z.boolean()
|
|
1653
|
+
});
|
|
1654
|
+
var SAFETY_REPORT_STATUS_LABELS = {
|
|
1655
|
+
new: "New",
|
|
1656
|
+
under_review: "Under Review",
|
|
1657
|
+
action_taken: "Action Taken",
|
|
1658
|
+
closed: "Closed"
|
|
1659
|
+
};
|
|
1660
|
+
var SAFETY_REPORT_STATUS_COLORS = {
|
|
1661
|
+
new: "info",
|
|
1662
|
+
under_review: "warning",
|
|
1663
|
+
action_taken: "primary",
|
|
1664
|
+
closed: "success"
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
// src/schemas/form-template.ts
|
|
1668
|
+
|
|
1669
|
+
var FormFieldType = /* @__PURE__ */ ((FormFieldType2) => {
|
|
1670
|
+
FormFieldType2["Text"] = "text";
|
|
1671
|
+
FormFieldType2["Textarea"] = "textarea";
|
|
1672
|
+
FormFieldType2["Number"] = "number";
|
|
1673
|
+
FormFieldType2["Date"] = "date";
|
|
1674
|
+
FormFieldType2["Time"] = "time";
|
|
1675
|
+
FormFieldType2["Duration"] = "duration";
|
|
1676
|
+
FormFieldType2["Select"] = "select";
|
|
1677
|
+
FormFieldType2["MultiSelect"] = "multi_select";
|
|
1678
|
+
FormFieldType2["Checkbox"] = "checkbox";
|
|
1679
|
+
FormFieldType2["Radio"] = "radio";
|
|
1680
|
+
FormFieldType2["RatingScale"] = "rating_scale";
|
|
1681
|
+
FormFieldType2["Signature"] = "signature";
|
|
1682
|
+
FormFieldType2["PassFail"] = "pass_fail";
|
|
1683
|
+
FormFieldType2["MembershipSelect"] = "membership_select";
|
|
1684
|
+
FormFieldType2["InstructorSelect"] = "instructor_select";
|
|
1685
|
+
FormFieldType2["AirplaneSelect"] = "airplane_select";
|
|
1686
|
+
FormFieldType2["CourseSelect"] = "course_select";
|
|
1687
|
+
FormFieldType2["MembershipSignature"] = "membership_signature";
|
|
1688
|
+
FormFieldType2["FileUpload"] = "file_upload";
|
|
1689
|
+
FormFieldType2["MassUnitSelect"] = "mass_unit_select";
|
|
1690
|
+
FormFieldType2["StaticText"] = "static_text";
|
|
1691
|
+
return FormFieldType2;
|
|
1692
|
+
})(FormFieldType || {});
|
|
1693
|
+
var FormSubmissionStatus = /* @__PURE__ */ ((FormSubmissionStatus2) => {
|
|
1694
|
+
FormSubmissionStatus2["Draft"] = "draft";
|
|
1695
|
+
FormSubmissionStatus2["AwaitingSignatures"] = "awaiting_signatures";
|
|
1696
|
+
FormSubmissionStatus2["Submitted"] = "submitted";
|
|
1697
|
+
FormSubmissionStatus2["Approved"] = "approved";
|
|
1698
|
+
FormSubmissionStatus2["Rejected"] = "rejected";
|
|
1699
|
+
return FormSubmissionStatus2;
|
|
1700
|
+
})(FormSubmissionStatus || {});
|
|
1701
|
+
var FormSubmissionSource = /* @__PURE__ */ ((FormSubmissionSource2) => {
|
|
1702
|
+
FormSubmissionSource2["Voluntary"] = "voluntary";
|
|
1703
|
+
FormSubmissionSource2["Onboarding"] = "onboarding";
|
|
1704
|
+
FormSubmissionSource2["AdHocRequest"] = "ad_hoc_request";
|
|
1705
|
+
return FormSubmissionSource2;
|
|
1706
|
+
})(FormSubmissionSource || {});
|
|
1707
|
+
var FieldLabelSchema = _zod.z.object({
|
|
1708
|
+
de: _zod.z.string().optional(),
|
|
1709
|
+
en: _zod.z.string(),
|
|
1710
|
+
no: _zod.z.string().optional()
|
|
1711
|
+
});
|
|
1712
|
+
var ShowWhenSchema = _zod.z.object({
|
|
1713
|
+
field: _zod.z.string(),
|
|
1714
|
+
operator: _zod.z.enum(["eq", "neq", "in", "not_in", "gt", "lt", "gte", "lte"]),
|
|
1715
|
+
value: _zod.z.union([_zod.z.string(), _zod.z.number(), _zod.z.boolean(), _zod.z.array(_zod.z.string())])
|
|
1716
|
+
});
|
|
1717
|
+
var SchemaFieldSchema = _zod.z.object({
|
|
1718
|
+
key: _zod.z.string(),
|
|
1719
|
+
type: _zod.z.nativeEnum(FormFieldType),
|
|
1720
|
+
// Optional because static_text fields use `content` instead of `label`.
|
|
1721
|
+
label: FieldLabelSchema.optional(),
|
|
1722
|
+
// Display-only text for static_text fields (i18n), rendered with line breaks.
|
|
1723
|
+
content: FieldLabelSchema.optional(),
|
|
1724
|
+
required: _zod.z.boolean().optional().default(false),
|
|
1725
|
+
validation: _zod.z.record(_zod.z.any()).optional(),
|
|
1726
|
+
options: _zod.z.record(_zod.z.any()).optional(),
|
|
1727
|
+
col_span: _zod.z.number().min(1).max(12).optional(),
|
|
1728
|
+
order: _zod.z.number(),
|
|
1729
|
+
show_when: ShowWhenSchema.optional(),
|
|
1730
|
+
// Signature fields only: auto-binds the designated signer to the membership_id stored in the
|
|
1731
|
+
// referenced field (no manual designation needed).
|
|
1732
|
+
signer_membership_field: _zod.z.string().optional(),
|
|
1733
|
+
// Signature fields only: group designation — any member holding this permission at the
|
|
1734
|
+
// template's company may sign (e.g. "formSubmission.signAsCompany" for the company signature).
|
|
1735
|
+
signer_permission: _zod.z.string().optional(),
|
|
1736
|
+
// Signature fields only: bind the signer to the membership the form is attached to
|
|
1737
|
+
// ("submittable") — the person the form is about signs, with no picker.
|
|
1738
|
+
signer_source: _zod.z.string().optional(),
|
|
1739
|
+
// Text fields only: server-side party prefill (company.name|address,
|
|
1740
|
+
// member.name|address). Resolved & frozen into data at issuance — render
|
|
1741
|
+
// read-only; the backend rejects edits to these keys.
|
|
1742
|
+
prefill_source: _zod.z.string().optional()
|
|
1743
|
+
});
|
|
1744
|
+
var SchemaSectionSchema = _zod.z.object({
|
|
1745
|
+
key: _zod.z.string(),
|
|
1746
|
+
title: _zod.z.string(),
|
|
1747
|
+
order: _zod.z.number(),
|
|
1748
|
+
fields: _zod.z.array(SchemaFieldSchema)
|
|
1749
|
+
});
|
|
1750
|
+
var TemplateSchemaSchema = _zod.z.object({
|
|
1751
|
+
sections: _zod.z.array(SchemaSectionSchema)
|
|
1752
|
+
});
|
|
1753
|
+
var UserBasicSchema2 = _zod.z.object({
|
|
1754
|
+
id: _zod.z.number(),
|
|
1755
|
+
name: _zod.z.string(),
|
|
1756
|
+
email: _zod.z.string().optional()
|
|
1757
|
+
}).nullable();
|
|
1758
|
+
var FormTemplateSchema = _zod.z.object({
|
|
1759
|
+
type: _zod.z.literal("form_template"),
|
|
1760
|
+
id: _zod.z.number(),
|
|
1761
|
+
company_id: _zod.z.number().nullable(),
|
|
1762
|
+
name: _zod.z.string(),
|
|
1763
|
+
slug: _zod.z.string(),
|
|
1764
|
+
description: _zod.z.string().nullable(),
|
|
1765
|
+
schema: TemplateSchemaSchema,
|
|
1766
|
+
schema_version: _zod.z.number(),
|
|
1767
|
+
pdf_view: _zod.z.string().nullable(),
|
|
1768
|
+
requires_review: _zod.z.boolean(),
|
|
1769
|
+
is_active: _zod.z.boolean(),
|
|
1770
|
+
is_singleton: _zod.z.boolean().optional().default(false),
|
|
1771
|
+
// Sign-only: submissions skip the draft phase (issued straight into
|
|
1772
|
+
// awaiting_signatures) and auto-submit once all signatures are collected.
|
|
1773
|
+
is_sign_only: _zod.z.boolean().optional().default(false),
|
|
1774
|
+
// Requirable: this company template may be referenced by requirement groups
|
|
1775
|
+
// (a compliance document), vs a workflow form. System templates are always
|
|
1776
|
+
// requirable. Defaults false.
|
|
1777
|
+
is_requirable: _zod.z.boolean().optional().default(false),
|
|
1778
|
+
is_onboarding: _zod.z.boolean().optional().default(false),
|
|
1779
|
+
// Array of system role keys this onboarding template applies to.
|
|
1780
|
+
// null/missing = applies to every member at the company.
|
|
1781
|
+
onboarding_role_keys: _zod.z.array(_zod.z.string()).nullable().optional(),
|
|
1782
|
+
// System templates: platform-provided, super-admin maintained, no owning
|
|
1783
|
+
// company. Cannot be assigned/filled until merge Phase 2.
|
|
1784
|
+
is_system: _zod.z.boolean().optional().default(false),
|
|
1785
|
+
// Scope of a system template: null/"user" = a personal qualification;
|
|
1786
|
+
// "aircraft" = an aircraft document (e.g. weight report) excluded from the
|
|
1787
|
+
// user qualification picker.
|
|
1788
|
+
applies_to: _zod.z.string().nullable().optional(),
|
|
1789
|
+
// When true, submissions carry an expires_at (content validity, e.g. a
|
|
1790
|
+
// medical's expiry). Distinct from due_date (deadline to fill).
|
|
1791
|
+
has_expiry: _zod.z.boolean().optional().default(false),
|
|
1792
|
+
default_notification_days: _zod.z.number().nullable().optional(),
|
|
1793
|
+
created_by: _zod.z.number().nullable(),
|
|
1794
|
+
creator: UserBasicSchema2.optional(),
|
|
1795
|
+
assignments: _zod.z.array(_zod.z.any()).optional(),
|
|
1796
|
+
created_at: _zod.z.string(),
|
|
1797
|
+
updated_at: _zod.z.string()
|
|
1798
|
+
});
|
|
1799
|
+
var FormTemplateAssignmentSchema = _zod.z.object({
|
|
1800
|
+
type: _zod.z.literal("form_template_assignment"),
|
|
1801
|
+
id: _zod.z.number(),
|
|
1802
|
+
form_template_id: _zod.z.number(),
|
|
1803
|
+
assignable_type: _zod.z.string(),
|
|
1804
|
+
assignable_id: _zod.z.number(),
|
|
1805
|
+
target_type: _zod.z.string(),
|
|
1806
|
+
// `trigger` is soft-deprecated — column kept as a future escape hatch but no
|
|
1807
|
+
// handler reads it and the UI no longer surfaces it. See docs/features/forms.md.
|
|
1808
|
+
trigger: _zod.z.string().nullable(),
|
|
1809
|
+
sort_order: _zod.z.number(),
|
|
1810
|
+
form_template: FormTemplateSchema.optional(),
|
|
1811
|
+
created_at: _zod.z.string(),
|
|
1812
|
+
updated_at: _zod.z.string()
|
|
1813
|
+
});
|
|
1814
|
+
var SignatureSchema = _zod.z.object({
|
|
1815
|
+
type: _zod.z.literal("signature").optional(),
|
|
1816
|
+
id: _zod.z.number(),
|
|
1817
|
+
signable_type: _zod.z.string().optional(),
|
|
1818
|
+
signable_id: _zod.z.number().optional(),
|
|
1819
|
+
field_key: _zod.z.string(),
|
|
1820
|
+
status: _zod.z.enum(["pending", "signed", "revoked"]),
|
|
1821
|
+
required_signer_membership_id: _zod.z.number().nullable(),
|
|
1822
|
+
required_signer_name: _zod.z.string().nullable().optional(),
|
|
1823
|
+
signed_by_user_id: _zod.z.number().nullable(),
|
|
1824
|
+
signed_by_membership_id: _zod.z.number().nullable(),
|
|
1825
|
+
signed_by_name: _zod.z.string().nullable().optional(),
|
|
1826
|
+
is_current_user_designated: _zod.z.boolean().optional().default(false),
|
|
1827
|
+
signed_at: _zod.z.string().nullable(),
|
|
1828
|
+
image: _zod.z.string().nullable(),
|
|
1829
|
+
data_hash: _zod.z.string().nullable(),
|
|
1830
|
+
schema_version: _zod.z.number().nullable(),
|
|
1831
|
+
schema_hash: _zod.z.string().nullable(),
|
|
1832
|
+
consent_text_hash: _zod.z.string().nullable(),
|
|
1833
|
+
auth_method: _zod.z.string().nullable(),
|
|
1834
|
+
auth_verified_at: _zod.z.string().nullable(),
|
|
1835
|
+
ip_address: _zod.z.string().nullable(),
|
|
1836
|
+
user_agent: _zod.z.string().nullable(),
|
|
1837
|
+
geo_country: _zod.z.string().nullable(),
|
|
1838
|
+
signing_event_id: _zod.z.string().nullable(),
|
|
1839
|
+
created_at: _zod.z.string().optional(),
|
|
1840
|
+
updated_at: _zod.z.string().optional()
|
|
1841
|
+
});
|
|
1842
|
+
var SubmissionFileSchema = _zod.z.object({
|
|
1843
|
+
id: _zod.z.number(),
|
|
1844
|
+
file_name: _zod.z.string(),
|
|
1845
|
+
size: _zod.z.number(),
|
|
1846
|
+
mime_type: _zod.z.string().nullable().optional(),
|
|
1847
|
+
url: _zod.z.string().nullable().optional(),
|
|
1848
|
+
conversions: _zod.z.record(_zod.z.string(), _zod.z.string().nullable()).optional()
|
|
1849
|
+
});
|
|
1850
|
+
var FormSubmissionShareBaseSchema = _zod.z.object({
|
|
1851
|
+
type: _zod.z.literal("form_submission_share").optional(),
|
|
1852
|
+
id: _zod.z.number(),
|
|
1853
|
+
form_submission_id: _zod.z.number(),
|
|
1854
|
+
company_id: _zod.z.number(),
|
|
1855
|
+
shared_by: _zod.z.number(),
|
|
1856
|
+
company: _zod.z.object({
|
|
1857
|
+
id: _zod.z.number(),
|
|
1858
|
+
name: _zod.z.string()
|
|
1859
|
+
}).optional(),
|
|
1860
|
+
created_at: _zod.z.string()
|
|
1861
|
+
});
|
|
1862
|
+
var FormSubmissionSchema = _zod.z.object({
|
|
1863
|
+
type: _zod.z.literal("form_submission"),
|
|
1864
|
+
id: _zod.z.number(),
|
|
1865
|
+
form_template_id: _zod.z.number(),
|
|
1866
|
+
schema_version: _zod.z.number(),
|
|
1867
|
+
schema_snapshot: TemplateSchemaSchema,
|
|
1868
|
+
submittable_type: _zod.z.string(),
|
|
1869
|
+
submittable_id: _zod.z.number(),
|
|
1870
|
+
// Who/what the submission is about — shown in the dialog header. Present
|
|
1871
|
+
// when the backend loaded the submittable relation.
|
|
1872
|
+
submittable_summary: _zod.z.object({
|
|
1873
|
+
type: _zod.z.string(),
|
|
1874
|
+
id: _zod.z.number(),
|
|
1875
|
+
name: _zod.z.string().nullable(),
|
|
1876
|
+
email: _zod.z.string().nullable()
|
|
1877
|
+
}).nullable().optional(),
|
|
1878
|
+
submitted_by: _zod.z.number(),
|
|
1879
|
+
data: _zod.z.record(_zod.z.any()),
|
|
1880
|
+
data_resolved_names: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
1881
|
+
required_signers: _zod.z.record(_zod.z.string(), _zod.z.number()).nullable().optional(),
|
|
1882
|
+
signatures: _zod.z.array(SignatureSchema).optional(),
|
|
1883
|
+
status: _zod.z.nativeEnum(FormSubmissionStatus),
|
|
1884
|
+
submitted_at: _zod.z.string().nullable(),
|
|
1885
|
+
reviewed_by: _zod.z.number().nullable(),
|
|
1886
|
+
reviewed_at: _zod.z.string().nullable(),
|
|
1887
|
+
review_comment: _zod.z.string().nullable(),
|
|
1888
|
+
is_final: _zod.z.boolean().optional().default(false),
|
|
1889
|
+
is_mutable: _zod.z.boolean().optional().default(false),
|
|
1890
|
+
is_signable: _zod.z.boolean().optional().default(false),
|
|
1891
|
+
has_signature_fields: _zod.z.boolean().optional().default(false),
|
|
1892
|
+
all_signatures_collected: _zod.z.boolean().optional().default(true),
|
|
1893
|
+
// Server-evaluated policy decisions per gate (delete, revertToDraft, update, …),
|
|
1894
|
+
// read via hasModelPermission(submission, '<gate>'). Null when the fetch didn't
|
|
1895
|
+
// request permissions; populated when it passes permissions[form_submission].
|
|
1896
|
+
can: _zod.z.record(_zod.z.boolean().nullable()).optional().default({}),
|
|
1897
|
+
// Request envelope for pre-issued drafts (onboarding / ad-hoc admin request).
|
|
1898
|
+
// Voluntary submissions leave note/due_date/requester null.
|
|
1899
|
+
source: _zod.z.nativeEnum(FormSubmissionSource).optional().default("voluntary" /* Voluntary */),
|
|
1900
|
+
due_date: _zod.z.string().nullable().optional(),
|
|
1901
|
+
note: _zod.z.string().nullable().optional(),
|
|
1902
|
+
requested_by_user_id: _zod.z.number().nullable().optional(),
|
|
1903
|
+
is_overdue: _zod.z.boolean().optional().default(false),
|
|
1904
|
+
days_until_due: _zod.z.number().nullable().optional(),
|
|
1905
|
+
// Content validity (has_expiry templates only). ISO datetime.
|
|
1906
|
+
expires_at: _zod.z.string().nullable().optional(),
|
|
1907
|
+
notification_days_before: _zod.z.number().nullable().optional(),
|
|
1908
|
+
notifications_enabled: _zod.z.boolean().optional().default(true),
|
|
1909
|
+
is_expired: _zod.z.boolean().optional().default(false),
|
|
1910
|
+
// { field_key: media | null } for every file_upload field in the snapshot.
|
|
1911
|
+
files: _zod.z.record(_zod.z.string(), SubmissionFileSchema.nullable()).optional(),
|
|
1912
|
+
form_template: FormTemplateSchema.optional(),
|
|
1913
|
+
submitter: UserBasicSchema2.optional(),
|
|
1914
|
+
reviewer: UserBasicSchema2.optional(),
|
|
1915
|
+
requester: UserBasicSchema2.optional(),
|
|
1916
|
+
// Shares of this (user-owned) submission. Present on listings that
|
|
1917
|
+
// eager-load them — the owner sees all, recipient staff only their own
|
|
1918
|
+
// companies' rows (viewer-scoped in the backend resource).
|
|
1919
|
+
shares: _zod.z.array(FormSubmissionShareBaseSchema).optional(),
|
|
1920
|
+
created_at: _zod.z.string(),
|
|
1921
|
+
updated_at: _zod.z.string()
|
|
1922
|
+
});
|
|
1923
|
+
var FormSubmissionShareSchema = FormSubmissionShareBaseSchema.extend({
|
|
1924
|
+
form_submission: FormSubmissionSchema.optional()
|
|
1925
|
+
});
|
|
1926
|
+
var RequiredFormViaCrewSchema = _zod.z.object({
|
|
1927
|
+
name: _zod.z.string().nullable(),
|
|
1928
|
+
role: _zod.z.string(),
|
|
1929
|
+
is_pic: _zod.z.boolean()
|
|
1930
|
+
});
|
|
1931
|
+
var RequiredFormViaSchema = _zod.z.object({
|
|
1932
|
+
type: _zod.z.literal("booking"),
|
|
1933
|
+
booking_id: _zod.z.number(),
|
|
1934
|
+
etdZ: _zod.z.string().nullable(),
|
|
1935
|
+
route_display: _zod.z.string().nullable(),
|
|
1936
|
+
airplane_registration: _zod.z.string().nullable(),
|
|
1937
|
+
crew: _zod.z.array(RequiredFormViaCrewSchema).optional().default([])
|
|
1938
|
+
});
|
|
1939
|
+
var RequiredFormSchema = _zod.z.object({
|
|
1940
|
+
template: FormTemplateSchema,
|
|
1941
|
+
assignment: FormTemplateAssignmentSchema,
|
|
1942
|
+
// Latest submission (back-compat for callers that haven't migrated to the array).
|
|
1943
|
+
submission: FormSubmissionSchema.nullable(),
|
|
1944
|
+
// All submissions for this (template, submittable), newest first. For singleton templates
|
|
1945
|
+
// length is 0 or 1; non-singleton templates can grow over time.
|
|
1946
|
+
submissions: _zod.z.array(FormSubmissionSchema).optional().default([]),
|
|
1947
|
+
is_complete: _zod.z.boolean(),
|
|
1948
|
+
via: RequiredFormViaSchema.nullable().optional()
|
|
1949
|
+
});
|
|
1950
|
+
|
|
1951
|
+
// src/schemas/course-milestone.ts
|
|
1952
|
+
|
|
1953
|
+
var CourseMilestoneKindEnum = _zod.z.enum([
|
|
1954
|
+
"progress",
|
|
1955
|
+
"solo",
|
|
1956
|
+
"cross_country",
|
|
1957
|
+
"theory",
|
|
1958
|
+
"practical",
|
|
1959
|
+
"prerequisite",
|
|
1960
|
+
"custom"
|
|
1961
|
+
]);
|
|
1962
|
+
var courseMilestoneSchema = _zod.z.object({
|
|
1963
|
+
type: _zod.z.literal("courseMilestone").optional(),
|
|
1964
|
+
id: _zod.z.number(),
|
|
1965
|
+
course_id: _zod.z.number(),
|
|
1966
|
+
name: _zod.z.string(),
|
|
1967
|
+
description: _zod.z.string().nullable().optional(),
|
|
1968
|
+
kind: _zod.z.string(),
|
|
1969
|
+
is_prerequisite: _zod.z.boolean(),
|
|
1970
|
+
requires_form_template_id: _zod.z.number().nullable().optional(),
|
|
1971
|
+
required_form_template: _zod.z.object({ id: _zod.z.number(), name: _zod.z.string().optional() }).nullable().optional(),
|
|
1972
|
+
completion_rule: _zod.z.record(_zod.z.string(), _zod.z.unknown()).nullable().optional(),
|
|
1973
|
+
sort_order: _zod.z.number(),
|
|
1974
|
+
created_at: _zod.z.string().optional(),
|
|
1975
|
+
updated_at: _zod.z.string().optional(),
|
|
1976
|
+
can: _zod.z.object({
|
|
1977
|
+
update: _zod.z.boolean().nullable().optional(),
|
|
1978
|
+
delete: _zod.z.boolean().nullable().optional()
|
|
1979
|
+
}).optional()
|
|
1980
|
+
});
|
|
1981
|
+
var CourseMilestoneFormSchema = _zod.z.object({
|
|
1982
|
+
name: _zod.z.string().min(2).max(191),
|
|
1983
|
+
description: _zod.z.string().nullable().optional(),
|
|
1984
|
+
kind: _zod.z.string().max(64).default("progress"),
|
|
1985
|
+
is_prerequisite: _zod.z.boolean().default(false),
|
|
1986
|
+
requires_form_template_id: _zod.z.number().nullable().optional(),
|
|
1987
|
+
completion_rule: _zod.z.record(_zod.z.string(), _zod.z.unknown()).nullable().optional(),
|
|
1988
|
+
sort_order: _zod.z.number().int().min(0).optional()
|
|
1989
|
+
});
|
|
1990
|
+
var courseEnrollmentMilestoneSchema = _zod.z.object({
|
|
1991
|
+
type: _zod.z.literal("courseEnrollmentMilestone").optional(),
|
|
1992
|
+
id: _zod.z.number(),
|
|
1993
|
+
course_enrollment_id: _zod.z.number(),
|
|
1994
|
+
course_milestone_id: _zod.z.number(),
|
|
1995
|
+
milestone: courseMilestoneSchema.optional(),
|
|
1996
|
+
achieved_at: _zod.z.string().nullable().optional(),
|
|
1997
|
+
achieved_by_membership_id: _zod.z.number().nullable().optional(),
|
|
1998
|
+
achieved_by: _zod.z.object({
|
|
1999
|
+
id: _zod.z.number(),
|
|
2000
|
+
user: _zod.z.object({ name: _zod.z.string().optional() }).optional()
|
|
2001
|
+
}).nullable().optional(),
|
|
2002
|
+
notes: _zod.z.string().nullable().optional(),
|
|
2003
|
+
is_achieved: _zod.z.boolean(),
|
|
2004
|
+
can_be_achieved: _zod.z.boolean(),
|
|
2005
|
+
can: _zod.z.object({
|
|
2006
|
+
achieve: _zod.z.boolean().nullable().optional(),
|
|
2007
|
+
revoke: _zod.z.boolean().nullable().optional()
|
|
2008
|
+
}).optional()
|
|
2009
|
+
});
|
|
2010
|
+
|
|
2011
|
+
// src/schemas/newsletter.ts
|
|
2012
|
+
|
|
2013
|
+
var NewsletterBlockType = /* @__PURE__ */ ((NewsletterBlockType2) => {
|
|
2014
|
+
NewsletterBlockType2["Heading"] = "heading";
|
|
2015
|
+
NewsletterBlockType2["Paragraph"] = "paragraph";
|
|
2016
|
+
NewsletterBlockType2["Button"] = "button";
|
|
2017
|
+
NewsletterBlockType2["Divider"] = "divider";
|
|
2018
|
+
return NewsletterBlockType2;
|
|
2019
|
+
})(NewsletterBlockType || {});
|
|
2020
|
+
var TipTapNodeSchema = _zod.z.lazy(
|
|
2021
|
+
() => _zod.z.object({
|
|
2022
|
+
type: _zod.z.string(),
|
|
2023
|
+
attrs: _zod.z.record(_zod.z.any()).optional(),
|
|
2024
|
+
content: _zod.z.array(TipTapNodeSchema).optional(),
|
|
2025
|
+
marks: _zod.z.array(_zod.z.record(_zod.z.any())).optional(),
|
|
2026
|
+
text: _zod.z.string().optional()
|
|
2027
|
+
})
|
|
2028
|
+
);
|
|
2029
|
+
var Align = _zod.z.enum(["left", "center", "right"]).optional();
|
|
2030
|
+
var HeadingBlockSchema = _zod.z.object({
|
|
2031
|
+
key: _zod.z.string(),
|
|
2032
|
+
type: _zod.z.literal("heading" /* Heading */),
|
|
2033
|
+
level: _zod.z.number().int().min(1).max(3).default(1),
|
|
2034
|
+
text: _zod.z.string(),
|
|
2035
|
+
align: Align
|
|
2036
|
+
});
|
|
2037
|
+
var ParagraphBlockSchema = _zod.z.object({
|
|
2038
|
+
key: _zod.z.string(),
|
|
2039
|
+
type: _zod.z.literal("paragraph" /* Paragraph */),
|
|
2040
|
+
doc: TipTapNodeSchema,
|
|
2041
|
+
align: Align
|
|
2042
|
+
});
|
|
2043
|
+
var ButtonBlockSchema = _zod.z.object({
|
|
2044
|
+
key: _zod.z.string(),
|
|
2045
|
+
type: _zod.z.literal("button" /* Button */),
|
|
2046
|
+
label: _zod.z.string(),
|
|
2047
|
+
url: _zod.z.string(),
|
|
2048
|
+
align: Align,
|
|
2049
|
+
color: _zod.z.string().optional()
|
|
2050
|
+
});
|
|
2051
|
+
var DividerBlockSchema = _zod.z.object({
|
|
2052
|
+
key: _zod.z.string(),
|
|
2053
|
+
type: _zod.z.literal("divider" /* Divider */),
|
|
2054
|
+
thickness: _zod.z.number().int().min(1).max(10).optional(),
|
|
2055
|
+
color: _zod.z.string().optional()
|
|
2056
|
+
});
|
|
2057
|
+
var NewsletterBlockSchema = _zod.z.discriminatedUnion("type", [
|
|
2058
|
+
HeadingBlockSchema,
|
|
2059
|
+
ParagraphBlockSchema,
|
|
2060
|
+
ButtonBlockSchema,
|
|
2061
|
+
DividerBlockSchema
|
|
2062
|
+
]);
|
|
2063
|
+
var NewsletterCategorySchema = _zod.z.object({
|
|
2064
|
+
type: _zod.z.literal("newsletter_category").optional(),
|
|
2065
|
+
id: _zod.z.number(),
|
|
2066
|
+
key: _zod.z.string(),
|
|
2067
|
+
name: _zod.z.string(),
|
|
2068
|
+
description: _zod.z.string().nullable().optional(),
|
|
2069
|
+
is_mandatory: _zod.z.boolean(),
|
|
2070
|
+
is_active: _zod.z.boolean(),
|
|
2071
|
+
sort_order: _zod.z.number().int(),
|
|
2072
|
+
created_at: _zod.z.string().optional(),
|
|
2073
|
+
updated_at: _zod.z.string().optional()
|
|
2074
|
+
});
|
|
2075
|
+
var UserBasicSchema3 = _zod.z.object({
|
|
2076
|
+
id: _zod.z.number(),
|
|
2077
|
+
name: _zod.z.string(),
|
|
2078
|
+
email: _zod.z.string().optional()
|
|
2079
|
+
}).nullable();
|
|
2080
|
+
var NewsletterTemplateSchemaSchema = _zod.z.object({
|
|
2081
|
+
blocks: _zod.z.array(NewsletterBlockSchema),
|
|
2082
|
+
variables_used: _zod.z.array(_zod.z.string()).optional()
|
|
2083
|
+
});
|
|
2084
|
+
var NewsletterTemplateSchema = _zod.z.object({
|
|
2085
|
+
type: _zod.z.literal("newsletter_template").optional(),
|
|
2086
|
+
id: _zod.z.number(),
|
|
2087
|
+
company_id: _zod.z.number().nullable(),
|
|
2088
|
+
is_system: _zod.z.boolean().optional(),
|
|
2089
|
+
newsletter_category_id: _zod.z.number(),
|
|
2090
|
+
category: NewsletterCategorySchema.nullish(),
|
|
2091
|
+
name: _zod.z.string(),
|
|
2092
|
+
slug: _zod.z.string(),
|
|
2093
|
+
description: _zod.z.string().nullable().optional(),
|
|
2094
|
+
subject: _zod.z.string(),
|
|
2095
|
+
preheader: _zod.z.string().nullable().optional(),
|
|
2096
|
+
schema: NewsletterTemplateSchemaSchema,
|
|
2097
|
+
schema_version: _zod.z.number().int(),
|
|
2098
|
+
is_active: _zod.z.boolean(),
|
|
2099
|
+
created_by: _zod.z.number().nullable().optional(),
|
|
2100
|
+
creator: UserBasicSchema3.optional(),
|
|
2101
|
+
created_at: _zod.z.string().optional(),
|
|
2102
|
+
updated_at: _zod.z.string().optional()
|
|
2103
|
+
});
|
|
2104
|
+
var CreateNewsletterTemplateInputSchema = _zod.z.object({
|
|
2105
|
+
newsletter_category_id: _zod.z.number(),
|
|
2106
|
+
name: _zod.z.string().min(1),
|
|
2107
|
+
slug: _zod.z.string().optional(),
|
|
2108
|
+
description: _zod.z.string().nullable().optional(),
|
|
2109
|
+
subject: _zod.z.string().min(1),
|
|
2110
|
+
preheader: _zod.z.string().nullable().optional(),
|
|
2111
|
+
schema: NewsletterTemplateSchemaSchema,
|
|
2112
|
+
is_active: _zod.z.boolean().optional()
|
|
2113
|
+
});
|
|
2114
|
+
var AudienceBucketType = /* @__PURE__ */ ((AudienceBucketType2) => {
|
|
2115
|
+
AudienceBucketType2["AllUsers"] = "all_users";
|
|
2116
|
+
AudienceBucketType2["CompanyUsers"] = "company_users";
|
|
2117
|
+
AudienceBucketType2["RoleMembers"] = "role_members";
|
|
2118
|
+
return AudienceBucketType2;
|
|
2119
|
+
})(AudienceBucketType || {});
|
|
2120
|
+
var AllUsersBucketSchema = _zod.z.object({ type: _zod.z.literal("all_users" /* AllUsers */) });
|
|
2121
|
+
var CompanyUsersBucketSchema = _zod.z.object({
|
|
2122
|
+
type: _zod.z.literal("company_users" /* CompanyUsers */),
|
|
2123
|
+
company_ids: _zod.z.array(_zod.z.number()).min(1)
|
|
2124
|
+
});
|
|
2125
|
+
var RoleMembersBucketSchema = _zod.z.object({
|
|
2126
|
+
type: _zod.z.literal("role_members" /* RoleMembers */),
|
|
2127
|
+
role_ids: _zod.z.array(_zod.z.number()).min(1)
|
|
2128
|
+
});
|
|
2129
|
+
var AudienceBucketSchema = _zod.z.discriminatedUnion("type", [
|
|
2130
|
+
AllUsersBucketSchema,
|
|
2131
|
+
CompanyUsersBucketSchema,
|
|
2132
|
+
RoleMembersBucketSchema
|
|
2133
|
+
]);
|
|
2134
|
+
var NewsletterAudienceSchema = _zod.z.object({
|
|
2135
|
+
version: _zod.z.literal(1),
|
|
2136
|
+
include: _zod.z.array(AudienceBucketSchema).min(1),
|
|
2137
|
+
exclude: _zod.z.object({
|
|
2138
|
+
emails: _zod.z.array(_zod.z.string().email()).optional(),
|
|
2139
|
+
user_ids: _zod.z.array(_zod.z.number()).optional()
|
|
2140
|
+
}).optional()
|
|
2141
|
+
});
|
|
2142
|
+
function companyAudienceInclude(companyId, roleIds) {
|
|
2143
|
+
return roleIds.length > 0 ? [{ type: "role_members" /* RoleMembers */, role_ids: roleIds }] : [{ type: "company_users" /* CompanyUsers */, company_ids: [companyId] }];
|
|
2144
|
+
}
|
|
2145
|
+
var NewsletterCampaignStatus = /* @__PURE__ */ ((NewsletterCampaignStatus2) => {
|
|
2146
|
+
NewsletterCampaignStatus2["Draft"] = "draft";
|
|
2147
|
+
NewsletterCampaignStatus2["Scheduled"] = "scheduled";
|
|
2148
|
+
NewsletterCampaignStatus2["Sending"] = "sending";
|
|
2149
|
+
NewsletterCampaignStatus2["Sent"] = "sent";
|
|
2150
|
+
NewsletterCampaignStatus2["Failed"] = "failed";
|
|
2151
|
+
NewsletterCampaignStatus2["Cancelled"] = "cancelled";
|
|
2152
|
+
return NewsletterCampaignStatus2;
|
|
2153
|
+
})(NewsletterCampaignStatus || {});
|
|
2154
|
+
var NewsletterCampaignSchema = _zod.z.object({
|
|
2155
|
+
type: _zod.z.literal("newsletter_campaign").optional(),
|
|
2156
|
+
id: _zod.z.number(),
|
|
2157
|
+
company_id: _zod.z.number().nullable(),
|
|
2158
|
+
is_system: _zod.z.boolean().optional(),
|
|
2159
|
+
newsletter_template_id: _zod.z.number().nullable(),
|
|
2160
|
+
template: NewsletterTemplateSchema.partial().nullish(),
|
|
2161
|
+
newsletter_category_id: _zod.z.number(),
|
|
2162
|
+
category: NewsletterCategorySchema.nullish(),
|
|
2163
|
+
name: _zod.z.string(),
|
|
2164
|
+
subject: _zod.z.string(),
|
|
2165
|
+
preheader: _zod.z.string().nullable().optional(),
|
|
2166
|
+
schema_snapshot: NewsletterTemplateSchemaSchema,
|
|
2167
|
+
variables: _zod.z.record(_zod.z.string()).nullable().optional(),
|
|
2168
|
+
audience_definition: NewsletterAudienceSchema,
|
|
2169
|
+
status: _zod.z.nativeEnum(NewsletterCampaignStatus),
|
|
2170
|
+
scheduled_at: _zod.z.string().nullable().optional(),
|
|
2171
|
+
started_at: _zod.z.string().nullable().optional(),
|
|
2172
|
+
finished_at: _zod.z.string().nullable().optional(),
|
|
2173
|
+
cancelled_at: _zod.z.string().nullable().optional(),
|
|
2174
|
+
counts: _zod.z.object({
|
|
2175
|
+
queued: _zod.z.number().nullable(),
|
|
2176
|
+
sent: _zod.z.number(),
|
|
2177
|
+
failed: _zod.z.number(),
|
|
2178
|
+
bounced: _zod.z.number(),
|
|
2179
|
+
complained: _zod.z.number()
|
|
2180
|
+
}),
|
|
2181
|
+
sent_by_user_id: _zod.z.number().nullable().optional(),
|
|
2182
|
+
sent_by: UserBasicSchema3.optional(),
|
|
2183
|
+
can: _zod.z.object({
|
|
2184
|
+
update: _zod.z.boolean(),
|
|
2185
|
+
schedule: _zod.z.boolean(),
|
|
2186
|
+
send: _zod.z.boolean(),
|
|
2187
|
+
cancel: _zod.z.boolean(),
|
|
2188
|
+
test_send: _zod.z.boolean(),
|
|
2189
|
+
delete: _zod.z.boolean()
|
|
2190
|
+
}).partial().optional(),
|
|
2191
|
+
created_at: _zod.z.string().optional(),
|
|
2192
|
+
updated_at: _zod.z.string().optional()
|
|
2193
|
+
});
|
|
2194
|
+
var CreateNewsletterCampaignInputSchema = _zod.z.object({
|
|
2195
|
+
newsletter_template_id: _zod.z.number().nullable().optional(),
|
|
2196
|
+
newsletter_category_id: _zod.z.number().optional(),
|
|
2197
|
+
name: _zod.z.string().min(1),
|
|
2198
|
+
subject: _zod.z.string().optional(),
|
|
2199
|
+
preheader: _zod.z.string().nullable().optional(),
|
|
2200
|
+
schema_snapshot: NewsletterTemplateSchemaSchema.optional(),
|
|
2201
|
+
variables: _zod.z.record(_zod.z.string()).optional(),
|
|
2202
|
+
audience_definition: NewsletterAudienceSchema
|
|
2203
|
+
});
|
|
2204
|
+
var NewsletterRecipientStatus = /* @__PURE__ */ ((NewsletterRecipientStatus2) => {
|
|
2205
|
+
NewsletterRecipientStatus2["Queued"] = "queued";
|
|
2206
|
+
NewsletterRecipientStatus2["Sent"] = "sent";
|
|
2207
|
+
NewsletterRecipientStatus2["Failed"] = "failed";
|
|
2208
|
+
NewsletterRecipientStatus2["Bounced"] = "bounced";
|
|
2209
|
+
NewsletterRecipientStatus2["Complained"] = "complained";
|
|
2210
|
+
NewsletterRecipientStatus2["Suppressed"] = "suppressed";
|
|
2211
|
+
NewsletterRecipientStatus2["OptedOut"] = "opted_out";
|
|
2212
|
+
return NewsletterRecipientStatus2;
|
|
2213
|
+
})(NewsletterRecipientStatus || {});
|
|
2214
|
+
var NewsletterCampaignRecipientSchema = _zod.z.object({
|
|
2215
|
+
type: _zod.z.literal("newsletter_campaign_recipient").optional(),
|
|
2216
|
+
id: _zod.z.number(),
|
|
2217
|
+
newsletter_campaign_id: _zod.z.number(),
|
|
2218
|
+
user_id: _zod.z.number().nullable(),
|
|
2219
|
+
user: UserBasicSchema3.optional(),
|
|
2220
|
+
email: _zod.z.string(),
|
|
2221
|
+
status: _zod.z.nativeEnum(NewsletterRecipientStatus),
|
|
2222
|
+
error: _zod.z.string().nullable().optional(),
|
|
2223
|
+
message_id: _zod.z.string().nullable().optional(),
|
|
2224
|
+
queued_at: _zod.z.string().nullable().optional(),
|
|
2225
|
+
sent_at: _zod.z.string().nullable().optional(),
|
|
2226
|
+
bounced_at: _zod.z.string().nullable().optional(),
|
|
2227
|
+
complained_at: _zod.z.string().nullable().optional()
|
|
2228
|
+
});
|
|
2229
|
+
var NewsletterPreferenceRowSchema = _zod.z.object({
|
|
2230
|
+
category_id: _zod.z.number(),
|
|
2231
|
+
category_key: _zod.z.string(),
|
|
2232
|
+
name: _zod.z.string(),
|
|
2233
|
+
description: _zod.z.string().nullable().optional(),
|
|
2234
|
+
is_mandatory: _zod.z.boolean(),
|
|
2235
|
+
opted_in: _zod.z.boolean()
|
|
2236
|
+
});
|
|
2237
|
+
var ALLOWED_NEWSLETTER_VARIABLES = [
|
|
2238
|
+
"user.name",
|
|
2239
|
+
"user.first_name",
|
|
2240
|
+
"user.email",
|
|
2241
|
+
"company.name",
|
|
2242
|
+
"unsubscribe_url"
|
|
2243
|
+
];
|
|
2244
|
+
|
|
2245
|
+
// src/schemas/location-map.ts
|
|
2246
|
+
|
|
2247
|
+
var LocationMapKind = /* @__PURE__ */ ((LocationMapKind2) => {
|
|
2248
|
+
LocationMapKind2["Facility"] = "facility";
|
|
2249
|
+
LocationMapKind2["TrainingArea"] = "training_area";
|
|
2250
|
+
LocationMapKind2["Parking"] = "parking";
|
|
2251
|
+
LocationMapKind2["Procedural"] = "procedural";
|
|
2252
|
+
return LocationMapKind2;
|
|
2253
|
+
})(LocationMapKind || {});
|
|
2254
|
+
var LocationFeatureVisibility = /* @__PURE__ */ ((LocationFeatureVisibility2) => {
|
|
2255
|
+
LocationFeatureVisibility2["Public"] = "public";
|
|
2256
|
+
LocationFeatureVisibility2["Members"] = "members";
|
|
2257
|
+
return LocationFeatureVisibility2;
|
|
2258
|
+
})(LocationFeatureVisibility || {});
|
|
2259
|
+
var ALLOWED_GEOMETRY_TYPES = [
|
|
2260
|
+
"Point",
|
|
2261
|
+
"MultiPoint",
|
|
2262
|
+
"LineString",
|
|
2263
|
+
"MultiLineString",
|
|
2264
|
+
"Polygon",
|
|
2265
|
+
"MultiPolygon"
|
|
2266
|
+
];
|
|
2267
|
+
var ViewportSchema = _zod.z.object({
|
|
2268
|
+
center_lng: _zod.z.number().min(-180).max(180),
|
|
2269
|
+
center_lat: _zod.z.number().min(-90).max(90),
|
|
2270
|
+
zoom: _zod.z.number().min(0).max(24),
|
|
2271
|
+
pitch: _zod.z.number().min(0).max(85).optional(),
|
|
2272
|
+
bearing: _zod.z.number().min(-360).max(360).optional()
|
|
2273
|
+
});
|
|
2274
|
+
var GeometrySchema = _zod.z.object({
|
|
2275
|
+
type: _zod.z.enum(ALLOWED_GEOMETRY_TYPES),
|
|
2276
|
+
coordinates: _zod.z.array(_zod.z.unknown())
|
|
2277
|
+
});
|
|
2278
|
+
var CreateLocationMapSchema = _zod.z.object({
|
|
2279
|
+
name: _zod.z.string().min(1).max(255),
|
|
2280
|
+
slug: _zod.z.string().min(1).max(255).optional(),
|
|
2281
|
+
kind: _zod.z.string().max(64).optional(),
|
|
2282
|
+
description: _zod.z.string().nullable().optional(),
|
|
2283
|
+
default_viewport: ViewportSchema.nullable().optional(),
|
|
2284
|
+
is_active: _zod.z.boolean().optional()
|
|
2285
|
+
});
|
|
2286
|
+
var UpdateLocationMapSchema = CreateLocationMapSchema.partial();
|
|
2287
|
+
var CreateLocationMapFeatureSchema = _zod.z.object({
|
|
2288
|
+
name: _zod.z.string().max(255).nullable().optional(),
|
|
2289
|
+
kind: _zod.z.string().min(1).max(64),
|
|
2290
|
+
visibility: _zod.z.nativeEnum(LocationFeatureVisibility).optional(),
|
|
2291
|
+
geometry: GeometrySchema,
|
|
2292
|
+
properties: _zod.z.record(_zod.z.string(), _zod.z.unknown()).nullable().optional(),
|
|
2293
|
+
display_order: _zod.z.number().int().min(0).optional()
|
|
2294
|
+
});
|
|
2295
|
+
var UpdateLocationMapFeatureSchema = CreateLocationMapFeatureSchema.partial().extend({
|
|
2296
|
+
geometry: GeometrySchema.optional()
|
|
2297
|
+
});
|
|
2298
|
+
var ImportFeaturesSchema = _zod.z.object({
|
|
2299
|
+
type: _zod.z.literal("FeatureCollection"),
|
|
2300
|
+
features: _zod.z.array(
|
|
2301
|
+
_zod.z.object({
|
|
2302
|
+
type: _zod.z.literal("Feature"),
|
|
2303
|
+
geometry: GeometrySchema,
|
|
2304
|
+
properties: _zod.z.record(_zod.z.string(), _zod.z.unknown()).nullable().optional()
|
|
2305
|
+
})
|
|
2306
|
+
).min(1).max(500),
|
|
2307
|
+
defaults: _zod.z.object({
|
|
2308
|
+
kind: _zod.z.string().max(64).optional(),
|
|
2309
|
+
visibility: _zod.z.nativeEnum(LocationFeatureVisibility).optional()
|
|
2310
|
+
}).optional()
|
|
2311
|
+
});
|
|
2312
|
+
|
|
2313
|
+
// src/schemas/todo.ts
|
|
2314
|
+
|
|
2315
|
+
var TodoActionSchema = _zod.z.object({
|
|
2316
|
+
type: _zod.z.enum(["open_dialog", "navigate"]),
|
|
2317
|
+
target: _zod.z.string(),
|
|
2318
|
+
params: _zod.z.record(_zod.z.any()).optional()
|
|
2319
|
+
});
|
|
2320
|
+
var TodoKey = _zod.z.enum([
|
|
2321
|
+
"fill_form",
|
|
2322
|
+
"sign_form",
|
|
2323
|
+
"review_form",
|
|
2324
|
+
"log_booking",
|
|
2325
|
+
"add_address",
|
|
2326
|
+
"add_required_documents",
|
|
2327
|
+
"fill_training_record",
|
|
2328
|
+
"sign_training_record"
|
|
2329
|
+
]);
|
|
2330
|
+
var TodoSchema = _zod.z.object({
|
|
2331
|
+
key: TodoKey,
|
|
2332
|
+
ref_type: _zod.z.string(),
|
|
2333
|
+
ref_id: _zod.z.number(),
|
|
2334
|
+
title: _zod.z.string(),
|
|
2335
|
+
subtitle: _zod.z.string().nullable().optional(),
|
|
2336
|
+
due_date: _zod.z.string().nullable().optional(),
|
|
2337
|
+
is_overdue: _zod.z.boolean().default(false),
|
|
2338
|
+
priority: _zod.z.enum(["low", "normal", "high"]).default("normal"),
|
|
2339
|
+
company_id: _zod.z.number().nullable().optional(),
|
|
2340
|
+
action: TodoActionSchema,
|
|
2341
|
+
meta: _zod.z.record(_zod.z.any()).optional()
|
|
2342
|
+
});
|
|
2343
|
+
|
|
2344
|
+
|
|
2345
|
+
|
|
2346
|
+
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
|
|
2369
|
+
|
|
2370
|
+
|
|
2371
|
+
|
|
2372
|
+
|
|
2373
|
+
|
|
2374
|
+
|
|
2375
|
+
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
|
|
2380
|
+
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
|
|
2401
|
+
|
|
2402
|
+
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
|
|
2409
|
+
|
|
2410
|
+
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
|
|
2438
|
+
|
|
2439
|
+
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
|
|
2447
|
+
|
|
2448
|
+
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
|
|
2452
|
+
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
|
|
2464
|
+
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
|
|
2475
|
+
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
|
|
2479
|
+
|
|
2480
|
+
|
|
2481
|
+
|
|
2482
|
+
|
|
2483
|
+
|
|
2484
|
+
|
|
2485
|
+
|
|
2486
|
+
|
|
2487
|
+
|
|
2488
|
+
|
|
2489
|
+
|
|
2490
|
+
|
|
2491
|
+
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
|
|
2502
|
+
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
|
|
2509
|
+
|
|
2510
|
+
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
|
|
2515
|
+
|
|
2516
|
+
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
|
|
2522
|
+
|
|
2523
|
+
|
|
2524
|
+
|
|
2525
|
+
exports.zNullableBool = zNullableBool; exports.zNetGross = zNetGross; exports.zContactDTO = zContactDTO; exports.zPhpMoneyObject = zPhpMoneyObject; exports.contactAttributeSchema = contactAttributeSchema; exports.BaseModel = BaseModel; exports.mediaSchema = mediaSchema; exports.mediaCollection = mediaCollection; exports.impersonationParticipantSchema = impersonationParticipantSchema; exports.impersonationStateSchema = impersonationStateSchema; exports.userSchema = userSchema; exports.companySchema = companySchema; exports.equipmentSchema = equipmentSchema; exports.gradingScalePointSchema = gradingScalePointSchema; exports.gradingScaleSchema = gradingScaleSchema; exports.GradingScaleFormSchema = GradingScaleFormSchema; exports.TrainingElementKindEnum = TrainingElementKindEnum; exports.trainingElementSchema = trainingElementSchema; exports.TrainingElementFormSchema = TrainingElementFormSchema; exports.SyllabusKindEnum = SyllabusKindEnum; exports.syllabusElementSchema = syllabusElementSchema; exports.AttachSyllabusElementFormSchema = AttachSyllabusElementFormSchema; exports.UpdateSyllabusElementFormSchema = UpdateSyllabusElementFormSchema; exports.ReorderSyllabusElementItemSchema = ReorderSyllabusElementItemSchema; exports.usedByCourseSchema = usedByCourseSchema; exports.syllabusSchema = syllabusSchema; exports.StoreSyllabusFormSchema = StoreSyllabusFormSchema; exports.UpdateSyllabusFormSchema = UpdateSyllabusFormSchema; exports.courseCheckSyllabusSchema = courseCheckSyllabusSchema; exports.syllabusElementMutationResultSchema = syllabusElementMutationResultSchema; exports.syllabusRolloutResultItemSchema = syllabusRolloutResultItemSchema; exports.syllabusRolloutSkippedItemSchema = syllabusRolloutSkippedItemSchema; exports.syllabusRolloutResultSchema = syllabusRolloutResultSchema; exports.EnrollmentTrainingStatusEnum = EnrollmentTrainingStatusEnum; exports.gradeHistoryItemSchema = gradeHistoryItemSchema; exports.enrollmentTrainingElementSchema = enrollmentTrainingElementSchema; exports.SignOffTrainingElementFormSchema = SignOffTrainingElementFormSchema; exports.TrainingRecordStatusEnum = TrainingRecordStatusEnum; exports.TrainingRecordResultEnum = TrainingRecordResultEnum; exports.trainingRecordEntrySchema = trainingRecordEntrySchema; exports.trainingRecordEntryInputSchema = trainingRecordEntryInputSchema; exports.trainingSignatureSchema = trainingSignatureSchema; exports.trainingRecordSchema = trainingRecordSchema; exports.UpsertTrainingRecordFormSchema = UpsertTrainingRecordFormSchema; exports.trainingTemplatePackSchema = trainingTemplatePackSchema; exports.CreateSyllabusFromTemplateFormSchema = CreateSyllabusFromTemplateFormSchema; exports.createSyllabusFromTemplateResultSchema = createSyllabusFromTemplateResultSchema; exports.baseMembershipSchema = baseMembershipSchema; exports.membershipSchema = membershipSchema; exports.documentType = documentType; exports.priceSchema = priceSchema; exports.feeSchema = feeSchema; exports.feeCategoryOptionsSchema = feeCategoryOptionsSchema; exports.courseFeeSchema = courseFeeSchema; exports.airplaneSchema = airplaneSchema; exports.airplaneShareInviteSchema = airplaneShareInviteSchema; exports.airplanePermissionSchema = airplanePermissionSchema; exports.landingFeeSchema = landingFeeSchema; exports.aircraftRatingSchema = aircraftRatingSchema; exports.userAircraftRatingSchema = userAircraftRatingSchema; exports.userQualificationSchema = userQualificationSchema; exports.airportSchema = airportSchema; exports.recurringFlightSchema = recurringFlightSchema; exports.maintenanceEventSchema = maintenanceEventSchema; exports.maintenanceEventEstimationSchema = maintenanceEventEstimationSchema; exports.maintenanceStatusSchema = maintenanceStatusSchema; exports.extendedAirplaneSchema = extendedAirplaneSchema; exports.availSchema = availSchema; exports.bookingWaypointSchema = bookingWaypointSchema; exports.bookingSchema = bookingSchema; exports.alertSchema = alertSchema; exports.documentSchema = documentSchema; exports.documentRequirement = documentRequirement; exports.documentRequirementGroup = documentRequirementGroup; exports.documentRequirementGroupAssignment = documentRequirementGroupAssignment; exports.documentComplianceStatus = documentComplianceStatus; exports.documentShareSchema = documentShareSchema; exports.allowedDocumentTypeSchema = allowedDocumentTypeSchema; exports.flightLogSchema = flightLogSchema; exports.invoiceSchema = invoiceSchema; exports.scheduledFlightSchema = scheduledFlightSchema; exports.qualificationSchema = qualificationSchema; exports.expenseSchema = expenseSchema; exports.tagSchema = tagSchema; exports.courseSchema = courseSchema; exports.courseEnrollmentMetricsSchema = courseEnrollmentMetricsSchema; exports.courseEnrollmentSchema = courseEnrollmentSchema; exports.eventSchema = eventSchema; exports.addressSchema = addressSchema; exports.roleSchema = roleSchema; exports.landingSchema = landingSchema; exports.ticketSchema = ticketSchema; exports.runwaySchema = runwaySchema; exports.settingSchema = settingSchema; exports.postSchema = postSchema; exports.commentSchema = commentSchema; exports.airplaneIssueSeverityEnum = airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = airplaneIssueStatusEnum; exports.airplaneIssueSchema = airplaneIssueSchema; exports.specialFlightSchema = specialFlightSchema; exports.prePaidPackageSchema = prePaidPackageSchema; exports.expenseItemSchema = expenseItemSchema; exports.waypointSchema = waypointSchema; exports.approachTypeSchema = approachTypeSchema; exports.FaqStatus = FaqStatus; exports.FaqSchema = FaqSchema; exports.SubmitFaqQuestionSchema = SubmitFaqQuestionSchema; exports.ReviewFaqSchema = ReviewFaqSchema; exports.SafetyReportStatusEnum = SafetyReportStatusEnum; exports.SafetyReportCategorySchema = SafetyReportCategorySchema; exports.SafetyReportCategoryFormSchema = SafetyReportCategoryFormSchema; exports.SafetyReportMediaSchema = SafetyReportMediaSchema; exports.SafetyReportSchema = SafetyReportSchema; exports.SafetyReportListResponseSchema = SafetyReportListResponseSchema; exports.SafetyReportFormSchema = SafetyReportFormSchema; exports.SafetyReportUpdateSchema = SafetyReportUpdateSchema; exports.SafetyReportFilterSchema = SafetyReportFilterSchema; exports.SafetyReportSubmissionResponseSchema = SafetyReportSubmissionResponseSchema; exports.SAFETY_REPORT_STATUS_LABELS = SAFETY_REPORT_STATUS_LABELS; exports.SAFETY_REPORT_STATUS_COLORS = SAFETY_REPORT_STATUS_COLORS; exports.FormFieldType = FormFieldType; exports.FormSubmissionStatus = FormSubmissionStatus; exports.FormSubmissionSource = FormSubmissionSource; exports.FieldLabelSchema = FieldLabelSchema; exports.ShowWhenSchema = ShowWhenSchema; exports.SchemaFieldSchema = SchemaFieldSchema; exports.SchemaSectionSchema = SchemaSectionSchema; exports.TemplateSchemaSchema = TemplateSchemaSchema; exports.FormTemplateSchema = FormTemplateSchema; exports.FormTemplateAssignmentSchema = FormTemplateAssignmentSchema; exports.SignatureSchema = SignatureSchema; exports.SubmissionFileSchema = SubmissionFileSchema; exports.FormSubmissionShareBaseSchema = FormSubmissionShareBaseSchema; exports.FormSubmissionSchema = FormSubmissionSchema; exports.FormSubmissionShareSchema = FormSubmissionShareSchema; exports.RequiredFormViaCrewSchema = RequiredFormViaCrewSchema; exports.RequiredFormViaSchema = RequiredFormViaSchema; exports.RequiredFormSchema = RequiredFormSchema; exports.CourseMilestoneKindEnum = CourseMilestoneKindEnum; exports.courseMilestoneSchema = courseMilestoneSchema; exports.CourseMilestoneFormSchema = CourseMilestoneFormSchema; exports.courseEnrollmentMilestoneSchema = courseEnrollmentMilestoneSchema; exports.NewsletterBlockType = NewsletterBlockType; exports.TipTapNodeSchema = TipTapNodeSchema; exports.HeadingBlockSchema = HeadingBlockSchema; exports.ParagraphBlockSchema = ParagraphBlockSchema; exports.ButtonBlockSchema = ButtonBlockSchema; exports.DividerBlockSchema = DividerBlockSchema; exports.NewsletterBlockSchema = NewsletterBlockSchema; exports.NewsletterCategorySchema = NewsletterCategorySchema; exports.NewsletterTemplateSchemaSchema = NewsletterTemplateSchemaSchema; exports.NewsletterTemplateSchema = NewsletterTemplateSchema; exports.CreateNewsletterTemplateInputSchema = CreateNewsletterTemplateInputSchema; exports.AudienceBucketType = AudienceBucketType; exports.AllUsersBucketSchema = AllUsersBucketSchema; exports.CompanyUsersBucketSchema = CompanyUsersBucketSchema; exports.RoleMembersBucketSchema = RoleMembersBucketSchema; exports.AudienceBucketSchema = AudienceBucketSchema; exports.NewsletterAudienceSchema = NewsletterAudienceSchema; exports.companyAudienceInclude = companyAudienceInclude; exports.NewsletterCampaignStatus = NewsletterCampaignStatus; exports.NewsletterCampaignSchema = NewsletterCampaignSchema; exports.CreateNewsletterCampaignInputSchema = CreateNewsletterCampaignInputSchema; exports.NewsletterRecipientStatus = NewsletterRecipientStatus; exports.NewsletterCampaignRecipientSchema = NewsletterCampaignRecipientSchema; exports.NewsletterPreferenceRowSchema = NewsletterPreferenceRowSchema; exports.ALLOWED_NEWSLETTER_VARIABLES = ALLOWED_NEWSLETTER_VARIABLES; exports.LocationMapKind = LocationMapKind; exports.LocationFeatureVisibility = LocationFeatureVisibility; exports.ALLOWED_GEOMETRY_TYPES = ALLOWED_GEOMETRY_TYPES; exports.ViewportSchema = ViewportSchema; exports.GeometrySchema = GeometrySchema; exports.CreateLocationMapSchema = CreateLocationMapSchema; exports.UpdateLocationMapSchema = UpdateLocationMapSchema; exports.CreateLocationMapFeatureSchema = CreateLocationMapFeatureSchema; exports.UpdateLocationMapFeatureSchema = UpdateLocationMapFeatureSchema; exports.ImportFeaturesSchema = ImportFeaturesSchema; exports.TodoActionSchema = TodoActionSchema; exports.TodoKey = TodoKey; exports.TodoSchema = TodoSchema;
|