@updraft-solutions/mcrit-sdk 0.4.0 → 0.6.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-EE4YY3AU.js +2620 -0
- package/dist/chunk-H4CJ2YEQ.cjs +2620 -0
- package/dist/courses/index.d.cts +2 -2
- package/dist/courses/index.d.ts +2 -2
- package/dist/index.cjs +201 -5
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +207 -11
- 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/training-C9rIBUeV.d.cts +101685 -0
- package/dist/training-C9rIBUeV.d.ts +101685 -0
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +278 -6
- package/dist/types/index.d.ts +278 -6
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/src/courses/index.ts +2 -2
- package/src/index.ts +42 -0
- package/src/schemas/common.ts +69 -5
- package/src/schemas/course-milestone.ts +78 -0
- package/src/schemas/equipment.ts +27 -0
- package/src/schemas/form-template.ts +416 -0
- package/src/schemas/index.ts +7 -1
- package/src/schemas/location-map.ts +175 -0
- package/src/schemas/models.ts +201 -100
- 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 +46 -3
- package/src/types/roles.ts +26 -0
- package/dist/chunk-RC2BBT6H.cjs +0 -1384
- package/dist/chunk-WQLDSZNN.js +0 -1384
- package/dist/models-Bc5BKYuI.d.cts +0 -36898
- package/dist/models-Bc5BKYuI.d.ts +0 -36898
- 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
package/src/schemas/models.ts
CHANGED
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
zNetGross,
|
|
12
12
|
zPhpMoneyObject,
|
|
13
13
|
} from "./common";
|
|
14
|
+
import { equipmentSchema } from "./equipment";
|
|
15
|
+
import { courseCheckSyllabusSchema } from "./training";
|
|
14
16
|
|
|
15
17
|
export const baseMembershipSchema = z.object({
|
|
16
18
|
type: z.literal("membership"),
|
|
@@ -88,33 +90,58 @@ export const feeSchema = BaseModel.extend({
|
|
|
88
90
|
id: z.number(),
|
|
89
91
|
price: priceSchema.optional(),
|
|
90
92
|
prices: z.array(priceSchema).optional(),
|
|
91
|
-
provider: z.string().optional(),
|
|
93
|
+
provider: z.string().nullable().optional(),
|
|
92
94
|
company_id: z.number().optional(),
|
|
93
95
|
company: companySchema.optional(),
|
|
94
96
|
ident: z.string().optional(),
|
|
95
97
|
category: z.string().optional(),
|
|
96
|
-
subcategory: z.string().optional(),
|
|
98
|
+
subcategory: z.string().nullable().optional(),
|
|
97
99
|
title: z.string().optional(),
|
|
100
|
+
internal_title: z.string().nullable().optional(),
|
|
101
|
+
// internal_title falling back to title, resolved server-side.
|
|
102
|
+
display_title: z.string().optional(),
|
|
103
|
+
// Course-derived fees (source course + which course fee spawned them).
|
|
104
|
+
source_course_id: z.number().nullable().optional(),
|
|
105
|
+
source_key: z.string().nullable().optional(),
|
|
106
|
+
is_derived: z.boolean().optional(),
|
|
98
107
|
relation: z
|
|
99
108
|
.array(z.enum(["booking", "flightLog", "invoice", "instructor"]))
|
|
109
|
+
.nullable()
|
|
100
110
|
.optional(),
|
|
101
|
-
payment_per: z.string().optional(),
|
|
102
|
-
can: z
|
|
103
|
-
.object({
|
|
104
|
-
update: zNullableBool,
|
|
105
|
-
delete: zNullableBool,
|
|
106
|
-
})
|
|
107
|
-
.optional(),
|
|
111
|
+
payment_per: z.string().nullable().optional(),
|
|
112
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
108
113
|
course_count: z.number().optional(),
|
|
114
|
+
// feeables-pivot fields, present when the fee is serialized through an
|
|
115
|
+
// attachment (course/enrollment listings).
|
|
109
116
|
count: z.number().optional(),
|
|
110
|
-
variant: z.string().optional(),
|
|
117
|
+
variant: z.string().nullable().optional(),
|
|
111
118
|
is_optional: z.boolean().optional(),
|
|
119
|
+
sort_order: z.number().nullable().optional(),
|
|
120
|
+
is_initial_payment: z.boolean().optional(),
|
|
121
|
+
feeables: z
|
|
122
|
+
.array(
|
|
123
|
+
z.object({
|
|
124
|
+
feeable_id: z.number(),
|
|
125
|
+
feeable_type: z.string(),
|
|
126
|
+
count: z.number().nullable(),
|
|
127
|
+
variant: z.string().nullable(),
|
|
128
|
+
is_optional: z.boolean().nullable(),
|
|
129
|
+
is_initial_payment: z.boolean().nullable(),
|
|
130
|
+
sort_order: z.number().nullable(),
|
|
131
|
+
}),
|
|
132
|
+
)
|
|
133
|
+
.optional(),
|
|
112
134
|
input_value: z.number().optional(),
|
|
113
135
|
net_gross: zNetGross,
|
|
114
136
|
tax_percentage: z.string().optional(),
|
|
115
137
|
valid_from: z.string(),
|
|
116
138
|
});
|
|
117
139
|
|
|
140
|
+
export const feeCategoryOptionsSchema = z.object({
|
|
141
|
+
categories: z.array(z.string()),
|
|
142
|
+
subcategories: z.record(z.string(), z.array(z.string())),
|
|
143
|
+
});
|
|
144
|
+
|
|
118
145
|
export const courseFeeSchema = feeSchema.extend({
|
|
119
146
|
count: z.number().optional(),
|
|
120
147
|
variant: z.string().optional(),
|
|
@@ -175,14 +202,51 @@ export const airplaneSchema = BaseModel.extend({
|
|
|
175
202
|
defaultFlightType: z.string().optional(),
|
|
176
203
|
defaultFlightRule: z.string().optional(),
|
|
177
204
|
status: z.string().optional(),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
205
|
+
// Physical/capability facts — serialized by BaseAirplaneResource on EVERY
|
|
206
|
+
// airplane payload (not just the extended show shape).
|
|
207
|
+
minimumCrewCount: z.number().optional(),
|
|
208
|
+
classRating: z.string().nullable().optional(),
|
|
209
|
+
typeRating: z.string().nullable().optional(),
|
|
210
|
+
VFR: z.boolean().optional(),
|
|
211
|
+
VFRNight: z.boolean().optional(),
|
|
212
|
+
IFR: z.boolean().optional(),
|
|
213
|
+
IFRKnownIcing: z.boolean().optional(),
|
|
214
|
+
power: z.string().optional(),
|
|
215
|
+
fuel_type: z.string().optional(),
|
|
216
|
+
oil_min: z.string().optional(),
|
|
217
|
+
oil_max: z.string().optional(),
|
|
218
|
+
oil_type_winter: z.string().optional(),
|
|
219
|
+
oil_type_summer: z.string().optional(),
|
|
220
|
+
empty_weight: z.string().optional(),
|
|
221
|
+
max_takeoff_mass: z.string().optional(),
|
|
222
|
+
max_speed: z.string().optional(),
|
|
223
|
+
max_range: z.string().optional(),
|
|
224
|
+
equipment: z.array(equipmentSchema).optional(),
|
|
225
|
+
has_pre_paid_package: z.boolean().optional(),
|
|
226
|
+
logging_required_from: z.string().optional(),
|
|
227
|
+
fee_id: z.number().nullable().optional(),
|
|
228
|
+
booking_fee_id: z.number().nullable().optional(),
|
|
229
|
+
homebase: z
|
|
230
|
+
.object({
|
|
231
|
+
id: z.number(),
|
|
232
|
+
ident: z.string().optional(),
|
|
233
|
+
name: z.string().optional(),
|
|
234
|
+
})
|
|
235
|
+
.nullable()
|
|
236
|
+
.optional(),
|
|
237
|
+
// Loose record on purpose: gates are policy-reflected server-side and
|
|
238
|
+
// grow over time — same convention as companySchema.
|
|
239
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Latest ADS-B position of the physical aircraft (eager-loaded relation on
|
|
244
|
+
* the company fleet-map payloads).
|
|
245
|
+
*/
|
|
246
|
+
export const aircraftPositionSchema = z.object({
|
|
247
|
+
lat: z.number().nullable().optional(),
|
|
248
|
+
lon: z.number().nullable().optional(),
|
|
249
|
+
timestamp: z.union([z.string(), z.number()]).nullable().optional(),
|
|
186
250
|
});
|
|
187
251
|
|
|
188
252
|
export const airplaneShareInviteSchema = z.object({
|
|
@@ -323,32 +387,8 @@ export const maintenanceStatusSchema = z.object({
|
|
|
323
387
|
.optional(),
|
|
324
388
|
});
|
|
325
389
|
|
|
390
|
+
// AirplaneResource extras on top of the base shape (show payloads, fleet map).
|
|
326
391
|
export const extendedAirplaneSchema = airplaneSchema.extend({
|
|
327
|
-
manufacturer: z.string().optional(),
|
|
328
|
-
capacity: z.number().optional(),
|
|
329
|
-
description: z.string().optional(),
|
|
330
|
-
homebase_id: z.number().optional(),
|
|
331
|
-
ato: z.boolean().optional(),
|
|
332
|
-
year_of_construction: z.string().optional(),
|
|
333
|
-
span: z.string().optional(),
|
|
334
|
-
height: z.string().optional(),
|
|
335
|
-
length: z.string().optional(),
|
|
336
|
-
empty_weight: z.string().optional(),
|
|
337
|
-
max_takeoff_mass: z.string().optional(),
|
|
338
|
-
max_speed: z.string().optional(),
|
|
339
|
-
max_range: z.string().optional(),
|
|
340
|
-
power: z.string().optional(),
|
|
341
|
-
fuel_type: z.string().optional(),
|
|
342
|
-
oil_min: z.string().optional(),
|
|
343
|
-
oil_max: z.string().optional(),
|
|
344
|
-
oil_type_winter: z.string().optional(),
|
|
345
|
-
oil_type_summer: z.string().optional(),
|
|
346
|
-
minimumCrewCount: z.number().optional(),
|
|
347
|
-
VFR: z.boolean().optional(),
|
|
348
|
-
VFRNight: z.boolean().optional(),
|
|
349
|
-
IFR: z.boolean().optional(),
|
|
350
|
-
IFRKnownIcing: z.boolean().optional(),
|
|
351
|
-
equipment: z.array(z.any()).optional(),
|
|
352
392
|
contact: contactAttributeSchema.optional(),
|
|
353
393
|
hints: z
|
|
354
394
|
.object({
|
|
@@ -359,26 +399,16 @@ export const extendedAirplaneSchema = airplaneSchema.extend({
|
|
|
359
399
|
.optional(),
|
|
360
400
|
})
|
|
361
401
|
.optional(),
|
|
362
|
-
has_pre_paid_package: z.boolean().optional(),
|
|
363
|
-
fee_id: z.number().optional(),
|
|
364
|
-
booking_fee_id: z.number().optional(),
|
|
365
|
-
logging_required_from: z.string().optional(),
|
|
366
402
|
foreflight_profile_url: z.string().optional(),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
403
|
+
company: companySchema.optional(),
|
|
404
|
+
latestPosition: aircraftPositionSchema.nullable().optional(),
|
|
405
|
+
total_flight_time_minutes: z.number().nullable().optional(),
|
|
406
|
+
elapsed_time: z.number().nullable().optional(),
|
|
407
|
+
remaining_time: z.number().nullable().optional(),
|
|
408
|
+
completed_at: z.string().nullable().optional(),
|
|
409
|
+
flight_log_enabled: z.boolean().optional(),
|
|
410
|
+
latest_maintenance_event: maintenanceEventSchema.nullable().optional(),
|
|
375
411
|
master_media: mediaCollection.optional(),
|
|
376
|
-
can: z
|
|
377
|
-
.object({
|
|
378
|
-
update: zNullableBool,
|
|
379
|
-
viewMaintenanceEvents: zNullableBool,
|
|
380
|
-
})
|
|
381
|
-
.optional(),
|
|
382
412
|
});
|
|
383
413
|
|
|
384
414
|
export const availSchema = z.object({
|
|
@@ -415,6 +445,26 @@ export const bookingWaypointSchema = z.object({
|
|
|
415
445
|
.optional(),
|
|
416
446
|
});
|
|
417
447
|
|
|
448
|
+
/**
|
|
449
|
+
* Spatie activity-log row (ActivityResource) — audit trail entries loaded on
|
|
450
|
+
* booking/invoice/event show payloads (`activities` relation).
|
|
451
|
+
*/
|
|
452
|
+
export const activitySchema = z.object({
|
|
453
|
+
id: z.number(),
|
|
454
|
+
log_name: z.string().nullable().optional(),
|
|
455
|
+
description: z.string().optional(),
|
|
456
|
+
event: z.string().nullable().optional(),
|
|
457
|
+
subject_type: z.string().nullable().optional(),
|
|
458
|
+
subject_id: z.number().nullable().optional(),
|
|
459
|
+
causer_type: z.string().nullable().optional(),
|
|
460
|
+
causer_id: z.number().nullable().optional(),
|
|
461
|
+
causer: userSchema.nullable().optional(),
|
|
462
|
+
properties: z.record(z.string(), z.unknown()).optional(),
|
|
463
|
+
batch_uuid: z.string().nullable().optional(),
|
|
464
|
+
created_at: z.string().optional(),
|
|
465
|
+
updated_at: z.string().optional(),
|
|
466
|
+
});
|
|
467
|
+
|
|
418
468
|
export const bookingSchema = BaseModel.extend({
|
|
419
469
|
type: z.literal("booking"),
|
|
420
470
|
ifr: z.boolean().default(false),
|
|
@@ -467,11 +517,17 @@ export const bookingSchema = BaseModel.extend({
|
|
|
467
517
|
.optional(),
|
|
468
518
|
contact: zContactDTO.optional(),
|
|
469
519
|
remarks: z.string().optional(),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
520
|
+
ac_call: z.string().nullable().optional(),
|
|
521
|
+
ac_type: z.string().nullable().optional(),
|
|
522
|
+
// Audit trail (BookingResource `activities`, present when eager-loaded).
|
|
523
|
+
activities: z.array(activitySchema).optional(),
|
|
524
|
+
// Present when eager-loaded (BookingResource conditional appends). Lazy:
|
|
525
|
+
// both schemas are declared later in this file; there is no true cycle.
|
|
526
|
+
flight_logs: z.array(z.lazy(() => flightLogSchema)).optional(),
|
|
527
|
+
expense_items: z.array(z.lazy(() => expenseItemSchema)).optional(),
|
|
528
|
+
// Loose record on purpose: gates are policy-reflected server-side and
|
|
529
|
+
// grow over time — same convention as companySchema.
|
|
530
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
475
531
|
});
|
|
476
532
|
|
|
477
533
|
export const alertSchema = z.object({
|
|
@@ -684,6 +740,9 @@ export const flightLogSchema = z.object({
|
|
|
684
740
|
id: z.number(),
|
|
685
741
|
airplane_id: z.number(),
|
|
686
742
|
airplane: airplaneSchema.optional(),
|
|
743
|
+
// Present when eager-loaded (FlightLogResource, camelCase key). Lazy:
|
|
744
|
+
// expenseItemSchema is declared later in this file; there is no true cycle.
|
|
745
|
+
expenseItems: z.array(z.lazy(() => expenseItemSchema)).optional(),
|
|
687
746
|
ac_type: z.string().nullable().optional(),
|
|
688
747
|
ac_reg: z.string().nullable().optional(),
|
|
689
748
|
ac_call: z.string().nullable().optional(),
|
|
@@ -772,16 +831,30 @@ export const invoiceSchema = z.object({
|
|
|
772
831
|
issuer_city: z.string().nullable().optional(),
|
|
773
832
|
issuer_zip: z.string().nullable().optional(),
|
|
774
833
|
issuer_state: z.string().nullable().optional(),
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
834
|
+
issuer_bank_name: z.string().nullable().optional(),
|
|
835
|
+
issuer_bic: z.string().nullable().optional(),
|
|
836
|
+
issuer_iban: z.string().nullable().optional(),
|
|
837
|
+
issuer_email: z.string().nullable().optional(),
|
|
838
|
+
issuer_phone: z.string().nullable().optional(),
|
|
839
|
+
issuer_vat_id: z.string().nullable().optional(),
|
|
840
|
+
issuer_register_court: z.string().nullable().optional(),
|
|
841
|
+
issuer_register_number: z.string().nullable().optional(),
|
|
842
|
+
gross_total: zPhpMoneyObject.nullable().optional(),
|
|
843
|
+
net_total: zPhpMoneyObject.nullable().optional(),
|
|
844
|
+
// InvoiceResource media envelope: only the generated PDF.
|
|
845
|
+
media: z
|
|
778
846
|
.object({
|
|
779
|
-
|
|
780
|
-
delete: zNullableBool,
|
|
781
|
-
release: zNullableBool,
|
|
782
|
-
view: zNullableBool,
|
|
847
|
+
pdf: mediaSchema.nullable().optional(),
|
|
783
848
|
})
|
|
784
849
|
.optional(),
|
|
850
|
+
pdf: z.string().nullable().optional(),
|
|
851
|
+
// Audit trail (InvoiceResource `activities`, present when eager-loaded).
|
|
852
|
+
activities: z.array(activitySchema).optional(),
|
|
853
|
+
created_at: z.string(),
|
|
854
|
+
updated_at: z.string(),
|
|
855
|
+
// Loose record on purpose: gates are policy-reflected server-side and
|
|
856
|
+
// grow over time — same convention as companySchema.
|
|
857
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
785
858
|
});
|
|
786
859
|
|
|
787
860
|
export const scheduledFlightSchema = z.object({
|
|
@@ -843,15 +916,6 @@ export const tagSchema = z.object({
|
|
|
843
916
|
color: z.string().nullable().optional(),
|
|
844
917
|
});
|
|
845
918
|
|
|
846
|
-
// Slim attached progress-check sheet (course_check_syllabi pivot),
|
|
847
|
-
// serialized on course show/update payloads.
|
|
848
|
-
export const courseCheckSyllabusSchema = z.object({
|
|
849
|
-
id: z.number(),
|
|
850
|
-
name: z.string(),
|
|
851
|
-
version: z.number(),
|
|
852
|
-
kind: z.enum(["regular", "progress_check"]).default("regular"),
|
|
853
|
-
});
|
|
854
|
-
|
|
855
919
|
export const courseSchema = z.object({
|
|
856
920
|
type: z.literal("course"),
|
|
857
921
|
id: z.number(),
|
|
@@ -882,11 +946,19 @@ export const courseSchema = z.object({
|
|
|
882
946
|
// Present only when the backend eager-loaded `checkSyllabi`.
|
|
883
947
|
check_syllabi: z.array(courseCheckSyllabusSchema).optional(),
|
|
884
948
|
tags: z.array(tagSchema).optional(),
|
|
949
|
+
// Attached fees (feeables pivot) + fees derived from them, when loaded.
|
|
950
|
+
fees: z.array(courseFeeSchema).optional(),
|
|
951
|
+
derived_fees: z.array(feeSchema).optional(),
|
|
952
|
+
fees_count: z.number().optional(),
|
|
953
|
+
is_public: z.boolean().optional(),
|
|
954
|
+
kind: z.string().optional(),
|
|
955
|
+
version: z.number().optional(),
|
|
956
|
+
media: mediaCollection,
|
|
885
957
|
created_at: z.string(),
|
|
886
958
|
updated_at: z.string(),
|
|
887
959
|
// Loose record on purpose: gates are policy-reflected server-side and
|
|
888
960
|
// grow over time (useAssistant, …) — same convention as companySchema.
|
|
889
|
-
can: z.record(z.string(),
|
|
961
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
890
962
|
});
|
|
891
963
|
|
|
892
964
|
/**
|
|
@@ -929,11 +1001,44 @@ export const courseEnrollmentSchema = z.object({
|
|
|
929
1001
|
course: courseSchema.optional(),
|
|
930
1002
|
membership: membershipSchema.optional(),
|
|
931
1003
|
mentor: userSchema.optional(),
|
|
1004
|
+
// Present when eager-loaded (BaseCourseEnrollmentResource). Lazy: both
|
|
1005
|
+
// schemas are declared later in this file; there is no true cycle.
|
|
1006
|
+
expense_items: z.array(z.lazy(() => expenseItemSchema)).optional(),
|
|
1007
|
+
bookings: z.array(bookingSchema).optional(),
|
|
932
1008
|
// Loose record on purpose: gates are policy-reflected server-side and
|
|
933
1009
|
// grow over time (updateTraining, manageInitialPayment, …).
|
|
934
|
-
can: z.record(z.string(),
|
|
1010
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
1011
|
+
});
|
|
1012
|
+
|
|
1013
|
+
/**
|
|
1014
|
+
* Attendee row on an event (MembershipSignupResource — `event.signups`,
|
|
1015
|
+
* present when the relation is eager-loaded).
|
|
1016
|
+
*/
|
|
1017
|
+
export const membershipSignupSchema = z.object({
|
|
1018
|
+
id: z.number(),
|
|
1019
|
+
membership_id: z.number(),
|
|
1020
|
+
created_at: z.string().optional(),
|
|
1021
|
+
membership: z
|
|
1022
|
+
.object({
|
|
1023
|
+
id: z.number(),
|
|
1024
|
+
user_id: z.number().nullable().optional(),
|
|
1025
|
+
name: z.string(),
|
|
1026
|
+
user: z
|
|
1027
|
+
.object({
|
|
1028
|
+
name: z.string(),
|
|
1029
|
+
firstname: z.string().nullable().optional(),
|
|
1030
|
+
lastname: z.string().nullable().optional(),
|
|
1031
|
+
email: z.string().nullable().optional(),
|
|
1032
|
+
})
|
|
1033
|
+
.nullable()
|
|
1034
|
+
.optional(),
|
|
1035
|
+
})
|
|
1036
|
+
.nullable()
|
|
1037
|
+
.optional(),
|
|
935
1038
|
});
|
|
936
1039
|
|
|
1040
|
+
// Mirrors EventResource — company events with signups, media, and a contact
|
|
1041
|
+
// block; times render in the company timezone (UTC fallback).
|
|
937
1042
|
export const eventSchema = z.object({
|
|
938
1043
|
type: z.literal("event"),
|
|
939
1044
|
id: z.number(),
|
|
@@ -941,22 +1046,18 @@ export const eventSchema = z.object({
|
|
|
941
1046
|
company: companySchema.optional(),
|
|
942
1047
|
title: z.string(),
|
|
943
1048
|
description: z.string().nullable().optional(),
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
delete: zNullableBool,
|
|
957
|
-
attend: zNullableBool,
|
|
958
|
-
})
|
|
959
|
-
.optional(),
|
|
1049
|
+
media: mediaCollection,
|
|
1050
|
+
signups: z.array(membershipSignupSchema).optional(),
|
|
1051
|
+
signups_count: z.number().optional(),
|
|
1052
|
+
is_public: z.boolean(),
|
|
1053
|
+
contact: zContactDTO.nullable().optional(),
|
|
1054
|
+
start: z.string(),
|
|
1055
|
+
end: z.string().nullable().optional(),
|
|
1056
|
+
registrationDeadline: z.string().nullable().optional(),
|
|
1057
|
+
registrationIsBinding: z.boolean(),
|
|
1058
|
+
// Loose record on purpose: gates are policy-reflected server-side and
|
|
1059
|
+
// grow over time — same convention as companySchema.
|
|
1060
|
+
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
960
1061
|
});
|
|
961
1062
|
|
|
962
1063
|
export const addressSchema = z.object({
|