@updraft-solutions/mcrit-sdk 0.11.2 → 0.13.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-5AUKIEY3.cjs → chunk-OPJ4YGN2.cjs} +153 -12
- package/dist/{chunk-JUAGKQGN.js → chunk-SW6VWDVT.js} +153 -12
- package/dist/{training-D3dneyB8.d.cts → fbo-yr7LUerk.d.cts} +4284 -9699
- package/dist/{training-D3dneyB8.d.ts → fbo-yr7LUerk.d.ts} +4284 -9699
- package/dist/index.cjs +39 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +48 -16
- package/dist/operating-hours-CRZMz4E5.d.cts +574 -0
- package/dist/operating-hours-DqN2V6Jq.d.ts +574 -0
- package/dist/schemas/index.cjs +34 -2
- package/dist/schemas/index.d.cts +15 -15
- package/dist/schemas/index.d.ts +15 -15
- package/dist/schemas/index.js +33 -1
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +18 -573
- package/dist/types/index.d.ts +18 -573
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/src/schemas/common.ts +23 -0
- package/src/schemas/fbo.spec.ts +49 -0
- package/src/schemas/fbo.ts +126 -0
- package/src/schemas/index.ts +1 -0
- package/src/schemas/models.ts +43 -10
- package/src/types/fbo.ts +16 -0
- package/src/types/index.ts +1 -0
- /package/dist/{chunk-UV5JLKAL.js → chunk-ASPK4M5R.js} +0 -0
- /package/dist/{chunk-YVC6Q3YU.cjs → chunk-CJHCF4FW.cjs} +0 -0
|
@@ -77,11 +77,23 @@ var userSchema = _zod.z.object({
|
|
|
77
77
|
// impersonation session is active.
|
|
78
78
|
impersonation: impersonationStateSchema.optional()
|
|
79
79
|
});
|
|
80
|
+
var companyIdentitySchema = _zod.z.object({
|
|
81
|
+
type: _zod.z.literal("company"),
|
|
82
|
+
id: _zod.z.number(),
|
|
83
|
+
name: _zod.z.string(),
|
|
84
|
+
icao: _zod.z.string().nullable().optional(),
|
|
85
|
+
airport_id: _zod.z.number().nullable().optional(),
|
|
86
|
+
media: mediaCollection
|
|
87
|
+
});
|
|
80
88
|
var companySchema = _zod.z.object({
|
|
81
89
|
type: _zod.z.literal("company"),
|
|
82
90
|
id: _zod.z.number(),
|
|
83
91
|
name: _zod.z.string(),
|
|
84
92
|
media: mediaCollection,
|
|
93
|
+
// Server-evaluated policy decisions for this instance. Only the gates the
|
|
94
|
+
// request asked for (`permissions[<model>]=…`, or every gate on a
|
|
95
|
+
// POST/PATCH) are present — an absent key means "not evaluated", which
|
|
96
|
+
// callers must treat exactly like an explicit null.
|
|
85
97
|
can: _zod.z.record(_zod.z.string(), _zod.z.boolean().nullable()).optional(),
|
|
86
98
|
permissions: _zod.z.array(_zod.z.string()).optional(),
|
|
87
99
|
// Company display timezone (companies.timezone, default Europe/Berlin
|
|
@@ -487,14 +499,19 @@ var createSyllabusFromTemplateResultSchema = _zod.z.object({
|
|
|
487
499
|
});
|
|
488
500
|
|
|
489
501
|
// src/schemas/models.ts
|
|
490
|
-
var
|
|
502
|
+
var membershipIdentitySchema = _zod.z.object({
|
|
491
503
|
type: _zod.z.literal("membership"),
|
|
492
504
|
id: _zod.z.number(),
|
|
493
505
|
user_id: _zod.z.number(),
|
|
494
506
|
user: userSchema.optional(),
|
|
495
507
|
company_id: _zod.z.number(),
|
|
496
|
-
|
|
497
|
-
|
|
508
|
+
name: _zod.z.string()
|
|
509
|
+
});
|
|
510
|
+
var nestedMembershipSchema = membershipIdentitySchema.extend({
|
|
511
|
+
company: companyIdentitySchema.nullable().optional()
|
|
512
|
+
});
|
|
513
|
+
var baseMembershipSchema = membershipIdentitySchema.extend({
|
|
514
|
+
company: companyIdentitySchema.nullable().optional(),
|
|
498
515
|
phone: _zod.z.string().nullable().optional(),
|
|
499
516
|
status: _zod.z.string(),
|
|
500
517
|
instructor: _zod.z.boolean(),
|
|
@@ -553,7 +570,7 @@ var feeSchema = BaseModel.extend({
|
|
|
553
570
|
prices: _zod.z.array(priceSchema).optional(),
|
|
554
571
|
provider: _zod.z.string().nullable().optional(),
|
|
555
572
|
company_id: _zod.z.number().optional(),
|
|
556
|
-
company:
|
|
573
|
+
company: companyIdentitySchema.optional(),
|
|
557
574
|
ident: _zod.z.string().optional(),
|
|
558
575
|
category: _zod.z.string().optional(),
|
|
559
576
|
subcategory: _zod.z.string().nullable().optional(),
|
|
@@ -708,7 +725,7 @@ var airplanePermissionSchema = _zod.z.object({
|
|
|
708
725
|
airplane_id: _zod.z.number(),
|
|
709
726
|
airplane: airplaneSchema.optional(),
|
|
710
727
|
membership_id: _zod.z.number(),
|
|
711
|
-
membership:
|
|
728
|
+
membership: nestedMembershipSchema.optional(),
|
|
712
729
|
notes: _zod.z.string().nullable().optional(),
|
|
713
730
|
conditions: _zod.z.string().nullable().optional(),
|
|
714
731
|
expires_at: _zod.z.string().nullable().optional(),
|
|
@@ -818,7 +835,7 @@ var extendedAirplaneSchema = airplaneSchema.extend({
|
|
|
818
835
|
}).optional()
|
|
819
836
|
}).optional(),
|
|
820
837
|
foreflight_profile_url: _zod.z.string().optional(),
|
|
821
|
-
company:
|
|
838
|
+
company: companyIdentitySchema.optional(),
|
|
822
839
|
latestPosition: aircraftPositionSchema.nullable().optional(),
|
|
823
840
|
total_flight_time_minutes: _zod.z.number().nullable().optional(),
|
|
824
841
|
elapsed_time: _zod.z.number().nullable().optional(),
|
|
@@ -874,6 +891,9 @@ var bookingSchema = BaseModel.extend({
|
|
|
874
891
|
author: userSchema.optional(),
|
|
875
892
|
company_id: _zod.z.number(),
|
|
876
893
|
company_name: _zod.z.string().nullable().optional(),
|
|
894
|
+
// Single-booking payloads only (BookingDetailResource): the dialog gates
|
|
895
|
+
// on this company, which a shared aircraft can make a partner company.
|
|
896
|
+
// List rows never carry it.
|
|
877
897
|
company: companySchema.optional(),
|
|
878
898
|
airplane: airplaneSchema.optional(),
|
|
879
899
|
etdZ: _zod.z.string(),
|
|
@@ -889,6 +909,9 @@ var bookingSchema = BaseModel.extend({
|
|
|
889
909
|
// Slim per-booking training-record status, present when the backend
|
|
890
910
|
// eager-loaded `trainingRecord` (enrollment bookings surfaces).
|
|
891
911
|
training_record_status: _zod.z.enum(["draft", "awaiting_signatures", "signed"]).nullable().optional(),
|
|
912
|
+
// Single-booking payloads only (BookingDetailResource): neighbour lookups
|
|
913
|
+
// cost two queries per booking and only the dialog's prev/next navigation
|
|
914
|
+
// uses them.
|
|
892
915
|
next_booking_id: _zod.z.number().nullable().optional(),
|
|
893
916
|
previous_booking_id: _zod.z.number().nullable().optional(),
|
|
894
917
|
maintenance: _zod.z.number().optional(),
|
|
@@ -1140,7 +1163,7 @@ var flightLogSchema = _zod.z.object({
|
|
|
1140
1163
|
ac_call: _zod.z.string().nullable().optional(),
|
|
1141
1164
|
booking_id: _zod.z.number().nullable().optional(),
|
|
1142
1165
|
membership_id: _zod.z.number().nullable().optional(),
|
|
1143
|
-
membership:
|
|
1166
|
+
membership: nestedMembershipSchema.optional(),
|
|
1144
1167
|
billing_profile_id: _zod.z.number().nullable().optional(),
|
|
1145
1168
|
author_id: _zod.z.number(),
|
|
1146
1169
|
author: userSchema.optional(),
|
|
@@ -1185,7 +1208,10 @@ var invoiceSchema = _zod.z.object({
|
|
|
1185
1208
|
id: _zod.z.number(),
|
|
1186
1209
|
title: _zod.z.string(),
|
|
1187
1210
|
membership_id: _zod.z.number(),
|
|
1188
|
-
|
|
1211
|
+
// List rows (InvoiceListResource) carry the identity-only membership; the
|
|
1212
|
+
// single-invoice payload carries the full one. Typed as the identity shape —
|
|
1213
|
+
// the guaranteed part — with the rest passed through.
|
|
1214
|
+
membership: nestedMembershipSchema.optional(),
|
|
1189
1215
|
// InvoiceResource always emits `billing_profile_id` (non-optional key,
|
|
1190
1216
|
// nullable FK value). `billingProfile` is a `whenLoaded('billingProfile')`
|
|
1191
1217
|
// relation, so it stays optional. (Fix round 1: as of the original Task 16
|
|
@@ -1196,7 +1222,12 @@ var invoiceSchema = _zod.z.object({
|
|
|
1196
1222
|
billingProfile: billingProfileSchema.optional(),
|
|
1197
1223
|
company_id: _zod.z.number().optional(),
|
|
1198
1224
|
company: companySchema.optional(),
|
|
1225
|
+
// Numbering: invoices are numbered in `sequence_number`, receipts in
|
|
1226
|
+
// `receipt_number`. `document_number` is whichever applies — render that.
|
|
1227
|
+
document_type: _zod.z.string().nullable().optional(),
|
|
1199
1228
|
sequence_number: _zod.z.string().nullable().optional(),
|
|
1229
|
+
receipt_number: _zod.z.string().nullable().optional(),
|
|
1230
|
+
document_number: _zod.z.string().nullable().optional(),
|
|
1200
1231
|
order_number: _zod.z.string().nullable().optional(),
|
|
1201
1232
|
invoice_date: _zod.z.string().nullable().optional(),
|
|
1202
1233
|
due_date: _zod.z.string().nullable().optional(),
|
|
@@ -1377,7 +1408,7 @@ var courseEnrollmentSchema = _zod.z.object({
|
|
|
1377
1408
|
created_at: _zod.z.string(),
|
|
1378
1409
|
updated_at: _zod.z.string(),
|
|
1379
1410
|
course: courseSchema.optional(),
|
|
1380
|
-
membership:
|
|
1411
|
+
membership: nestedMembershipSchema.optional(),
|
|
1381
1412
|
mentor: userSchema.optional(),
|
|
1382
1413
|
// Present when eager-loaded (BaseCourseEnrollmentResource). Lazy: both
|
|
1383
1414
|
// schemas are declared later in this file; there is no true cycle.
|
|
@@ -1407,7 +1438,7 @@ var eventSchema = _zod.z.object({
|
|
|
1407
1438
|
type: _zod.z.literal("event"),
|
|
1408
1439
|
id: _zod.z.number(),
|
|
1409
1440
|
company_id: _zod.z.number(),
|
|
1410
|
-
company:
|
|
1441
|
+
company: companyIdentitySchema.optional(),
|
|
1411
1442
|
title: _zod.z.string(),
|
|
1412
1443
|
description: _zod.z.string().nullable().optional(),
|
|
1413
1444
|
media: mediaCollection,
|
|
@@ -1694,7 +1725,7 @@ var expenseItemSchema = _zod.z.object({
|
|
|
1694
1725
|
// maximum length"). No true cycle: invoiceSchema does not reference
|
|
1695
1726
|
// expenseItemSchema back.
|
|
1696
1727
|
invoice: _zod.z.lazy(() => invoiceSchema).optional(),
|
|
1697
|
-
membership:
|
|
1728
|
+
membership: nestedMembershipSchema.optional(),
|
|
1698
1729
|
prePaidPackageAssignments: _zod.z.array(prePaidPackageAssignmentSchema).optional(),
|
|
1699
1730
|
// Loose record on purpose: gates are policy-reflected server-side and grow
|
|
1700
1731
|
// over time — same convention as companySchema/invoiceSchema.
|
|
@@ -2577,6 +2608,116 @@ var TodoSchema = _zod.z.object({
|
|
|
2577
2608
|
meta: _zod.z.record(_zod.z.any()).optional()
|
|
2578
2609
|
});
|
|
2579
2610
|
|
|
2611
|
+
// src/schemas/fbo.ts
|
|
2612
|
+
|
|
2613
|
+
var fboAcceptanceAxisSchema = _zod.z.object({
|
|
2614
|
+
status: _zod.z.enum(["pending", "accepted", "rejected", "unknown"]),
|
|
2615
|
+
is_required: _zod.z.boolean(),
|
|
2616
|
+
decided_by_id: _zod.z.number().nullable(),
|
|
2617
|
+
updated_at: _zod.z.string().nullable()
|
|
2618
|
+
});
|
|
2619
|
+
var fboAcceptanceStatusSchema = _zod.z.object({
|
|
2620
|
+
fbo: fboAcceptanceAxisSchema,
|
|
2621
|
+
airport: fboAcceptanceAxisSchema,
|
|
2622
|
+
customs: fboAcceptanceAxisSchema
|
|
2623
|
+
});
|
|
2624
|
+
var fboGroundServicesSchema = _zod.z.object({
|
|
2625
|
+
stairs: _zod.z.boolean(),
|
|
2626
|
+
hangar: _zod.z.boolean(),
|
|
2627
|
+
car_access: _zod.z.boolean(),
|
|
2628
|
+
lifter: _zod.z.boolean(),
|
|
2629
|
+
rental_car: _zod.z.boolean(),
|
|
2630
|
+
refueling: _zod.z.boolean(),
|
|
2631
|
+
gpu: _zod.z.boolean()
|
|
2632
|
+
});
|
|
2633
|
+
var fboFlightTypeSchema = _zod.z.enum(["scheduledFlight", "ppr"]);
|
|
2634
|
+
var fboFlightStatusSchema = _zod.z.enum(["active", "pending", "cancelled"]);
|
|
2635
|
+
var fboFlightSchema = _zod.z.object({
|
|
2636
|
+
id: _zod.z.number(),
|
|
2637
|
+
type: fboFlightTypeSchema,
|
|
2638
|
+
uuid: _zod.z.string(),
|
|
2639
|
+
flight_status: fboFlightStatusSchema,
|
|
2640
|
+
company_id: _zod.z.number(),
|
|
2641
|
+
author_id: _zod.z.number().nullable(),
|
|
2642
|
+
ac_call: _zod.z.string().nullable(),
|
|
2643
|
+
ac_reg: _zod.z.string().nullable(),
|
|
2644
|
+
ac_type: _zod.z.string().nullable(),
|
|
2645
|
+
operator: _zod.z.string().nullable(),
|
|
2646
|
+
etdZ: _zod.z.string().nullable(),
|
|
2647
|
+
/** The filer gave a date but no time; `etdZ` then holds a placeholder midnight. */
|
|
2648
|
+
etdZ_no_time: _zod.z.boolean(),
|
|
2649
|
+
etaZ: _zod.z.string().nullable(),
|
|
2650
|
+
etaZ_no_time: _zod.z.boolean(),
|
|
2651
|
+
departure_airport_id: _zod.z.number().nullable(),
|
|
2652
|
+
departure_airport: airportSchema.optional(),
|
|
2653
|
+
destination_airport_id: _zod.z.number().nullable(),
|
|
2654
|
+
destination_airport: airportSchema.optional(),
|
|
2655
|
+
ifr: _zod.z.boolean(),
|
|
2656
|
+
wx: _zod.z.boolean(),
|
|
2657
|
+
landings: _zod.z.number().nullable(),
|
|
2658
|
+
remarks: _zod.z.string().nullable(),
|
|
2659
|
+
contact: zContactDTO,
|
|
2660
|
+
ground_services: fboGroundServicesSchema,
|
|
2661
|
+
acceptance_status: fboAcceptanceStatusSchema,
|
|
2662
|
+
created_at: _zod.z.string(),
|
|
2663
|
+
updated_at: _zod.z.string()
|
|
2664
|
+
});
|
|
2665
|
+
var fboOccupationSchema = _zod.z.object({
|
|
2666
|
+
id: _zod.z.number(),
|
|
2667
|
+
company_id: _zod.z.number(),
|
|
2668
|
+
author_id: _zod.z.number().nullable(),
|
|
2669
|
+
title: _zod.z.string(),
|
|
2670
|
+
description: _zod.z.string().nullable(),
|
|
2671
|
+
is_absence: _zod.z.boolean(),
|
|
2672
|
+
created_at: _zod.z.string().nullable(),
|
|
2673
|
+
updated_at: _zod.z.string().nullable()
|
|
2674
|
+
});
|
|
2675
|
+
var fboDutySchema = _zod.z.object({
|
|
2676
|
+
id: _zod.z.number(),
|
|
2677
|
+
company_id: _zod.z.number().nullable(),
|
|
2678
|
+
user_id: _zod.z.number().nullable(),
|
|
2679
|
+
author_id: _zod.z.number().nullable(),
|
|
2680
|
+
occupation_id: _zod.z.number().nullable(),
|
|
2681
|
+
occupation: fboOccupationSchema.optional(),
|
|
2682
|
+
scheduled_flight_id: _zod.z.number().nullable(),
|
|
2683
|
+
start: _zod.z.string(),
|
|
2684
|
+
end: _zod.z.string(),
|
|
2685
|
+
all_day: _zod.z.boolean(),
|
|
2686
|
+
remarks: _zod.z.string().nullable(),
|
|
2687
|
+
created_at: _zod.z.string().nullable(),
|
|
2688
|
+
updated_at: _zod.z.string().nullable()
|
|
2689
|
+
});
|
|
2690
|
+
var fboRoleSchema = _zod.z.enum(["fbo", "atc", "wx", "customs", "handling", "fuel", "operator"]);
|
|
2691
|
+
var fboCompanyProfileSchema = _zod.z.object({
|
|
2692
|
+
role: fboRoleSchema,
|
|
2693
|
+
flights_require_approval: _zod.z.boolean(),
|
|
2694
|
+
notify_on_movement: _zod.z.boolean(),
|
|
2695
|
+
has_duties: _zod.z.boolean(),
|
|
2696
|
+
has_airplanes: _zod.z.boolean()
|
|
2697
|
+
});
|
|
2698
|
+
var fboDecisionAxisSchema = _zod.z.enum(["fbo", "airport", "customs"]);
|
|
2699
|
+
var fboDecisionSchema = _zod.z.enum(["accepted", "rejected"]);
|
|
2700
|
+
var fboDecisionInputSchema = _zod.z.object({
|
|
2701
|
+
axis: fboDecisionAxisSchema,
|
|
2702
|
+
status: fboDecisionSchema
|
|
2703
|
+
});
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
|
|
2712
|
+
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
|
|
2719
|
+
|
|
2720
|
+
|
|
2580
2721
|
|
|
2581
2722
|
|
|
2582
2723
|
|
|
@@ -2766,4 +2907,4 @@ var TodoSchema = _zod.z.object({
|
|
|
2766
2907
|
|
|
2767
2908
|
|
|
2768
2909
|
|
|
2769
|
-
exports.zNullableBool = zNullableBool; exports.zNetGross = zNetGross; exports.zContactDTO = zContactDTO; exports.zMoneyObject = zMoneyObject; 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.invalidateTrainingRecordResponseSchema = invalidateTrainingRecordResponseSchema; 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.fuelUnitSchema = fuelUnitSchema; exports.airplaneSchema = airplaneSchema; exports.aircraftPositionSchema = aircraftPositionSchema; 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.activitySchema = activitySchema; 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.billingProfileSchema = billingProfileSchema; 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.membershipSignupSchema = membershipSignupSchema; exports.eventSchema = eventSchema; exports.addressSchema = addressSchema; exports.roleSchema = roleSchema; exports.landingSchema = landingSchema; exports.ticketSchema = ticketSchema; exports.runwaySchema = runwaySchema; exports.settingSchema = settingSchema; exports.postSubjectSchema = postSubjectSchema; exports.postSchema = postSchema; exports.commentSchema = commentSchema; exports.airplaneIssueSeverityEnum = airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = airplaneIssueStatusEnum; exports.airplaneIssueSchema = airplaneIssueSchema; exports.specialFlightSchema = specialFlightSchema; exports.prePaidPackageSchema = prePaidPackageSchema; exports.prePaidPackageAssignmentSchema = prePaidPackageAssignmentSchema; 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;
|
|
2910
|
+
exports.zNullableBool = zNullableBool; exports.zNetGross = zNetGross; exports.zContactDTO = zContactDTO; exports.zMoneyObject = zMoneyObject; exports.contactAttributeSchema = contactAttributeSchema; exports.BaseModel = BaseModel; exports.mediaSchema = mediaSchema; exports.mediaCollection = mediaCollection; exports.impersonationParticipantSchema = impersonationParticipantSchema; exports.impersonationStateSchema = impersonationStateSchema; exports.userSchema = userSchema; exports.companyIdentitySchema = companyIdentitySchema; 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.invalidateTrainingRecordResponseSchema = invalidateTrainingRecordResponseSchema; exports.trainingTemplatePackSchema = trainingTemplatePackSchema; exports.CreateSyllabusFromTemplateFormSchema = CreateSyllabusFromTemplateFormSchema; exports.createSyllabusFromTemplateResultSchema = createSyllabusFromTemplateResultSchema; exports.membershipIdentitySchema = membershipIdentitySchema; exports.nestedMembershipSchema = nestedMembershipSchema; exports.baseMembershipSchema = baseMembershipSchema; exports.membershipSchema = membershipSchema; exports.documentType = documentType; exports.priceSchema = priceSchema; exports.feeSchema = feeSchema; exports.feeCategoryOptionsSchema = feeCategoryOptionsSchema; exports.courseFeeSchema = courseFeeSchema; exports.fuelUnitSchema = fuelUnitSchema; exports.airplaneSchema = airplaneSchema; exports.aircraftPositionSchema = aircraftPositionSchema; 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.activitySchema = activitySchema; 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.billingProfileSchema = billingProfileSchema; 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.membershipSignupSchema = membershipSignupSchema; exports.eventSchema = eventSchema; exports.addressSchema = addressSchema; exports.roleSchema = roleSchema; exports.landingSchema = landingSchema; exports.ticketSchema = ticketSchema; exports.runwaySchema = runwaySchema; exports.settingSchema = settingSchema; exports.postSubjectSchema = postSubjectSchema; exports.postSchema = postSchema; exports.commentSchema = commentSchema; exports.airplaneIssueSeverityEnum = airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = airplaneIssueStatusEnum; exports.airplaneIssueSchema = airplaneIssueSchema; exports.specialFlightSchema = specialFlightSchema; exports.prePaidPackageSchema = prePaidPackageSchema; exports.prePaidPackageAssignmentSchema = prePaidPackageAssignmentSchema; 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; exports.fboAcceptanceAxisSchema = fboAcceptanceAxisSchema; exports.fboAcceptanceStatusSchema = fboAcceptanceStatusSchema; exports.fboGroundServicesSchema = fboGroundServicesSchema; exports.fboFlightTypeSchema = fboFlightTypeSchema; exports.fboFlightStatusSchema = fboFlightStatusSchema; exports.fboFlightSchema = fboFlightSchema; exports.fboOccupationSchema = fboOccupationSchema; exports.fboDutySchema = fboDutySchema; exports.fboRoleSchema = fboRoleSchema; exports.fboCompanyProfileSchema = fboCompanyProfileSchema; exports.fboDecisionAxisSchema = fboDecisionAxisSchema; exports.fboDecisionSchema = fboDecisionSchema; exports.fboDecisionInputSchema = fboDecisionInputSchema;
|
|
@@ -77,11 +77,23 @@ var userSchema = z.object({
|
|
|
77
77
|
// impersonation session is active.
|
|
78
78
|
impersonation: impersonationStateSchema.optional()
|
|
79
79
|
});
|
|
80
|
+
var companyIdentitySchema = z.object({
|
|
81
|
+
type: z.literal("company"),
|
|
82
|
+
id: z.number(),
|
|
83
|
+
name: z.string(),
|
|
84
|
+
icao: z.string().nullable().optional(),
|
|
85
|
+
airport_id: z.number().nullable().optional(),
|
|
86
|
+
media: mediaCollection
|
|
87
|
+
});
|
|
80
88
|
var companySchema = z.object({
|
|
81
89
|
type: z.literal("company"),
|
|
82
90
|
id: z.number(),
|
|
83
91
|
name: z.string(),
|
|
84
92
|
media: mediaCollection,
|
|
93
|
+
// Server-evaluated policy decisions for this instance. Only the gates the
|
|
94
|
+
// request asked for (`permissions[<model>]=…`, or every gate on a
|
|
95
|
+
// POST/PATCH) are present — an absent key means "not evaluated", which
|
|
96
|
+
// callers must treat exactly like an explicit null.
|
|
85
97
|
can: z.record(z.string(), z.boolean().nullable()).optional(),
|
|
86
98
|
permissions: z.array(z.string()).optional(),
|
|
87
99
|
// Company display timezone (companies.timezone, default Europe/Berlin
|
|
@@ -487,14 +499,19 @@ var createSyllabusFromTemplateResultSchema = z3.object({
|
|
|
487
499
|
});
|
|
488
500
|
|
|
489
501
|
// src/schemas/models.ts
|
|
490
|
-
var
|
|
502
|
+
var membershipIdentitySchema = z4.object({
|
|
491
503
|
type: z4.literal("membership"),
|
|
492
504
|
id: z4.number(),
|
|
493
505
|
user_id: z4.number(),
|
|
494
506
|
user: userSchema.optional(),
|
|
495
507
|
company_id: z4.number(),
|
|
496
|
-
|
|
497
|
-
|
|
508
|
+
name: z4.string()
|
|
509
|
+
});
|
|
510
|
+
var nestedMembershipSchema = membershipIdentitySchema.extend({
|
|
511
|
+
company: companyIdentitySchema.nullable().optional()
|
|
512
|
+
});
|
|
513
|
+
var baseMembershipSchema = membershipIdentitySchema.extend({
|
|
514
|
+
company: companyIdentitySchema.nullable().optional(),
|
|
498
515
|
phone: z4.string().nullable().optional(),
|
|
499
516
|
status: z4.string(),
|
|
500
517
|
instructor: z4.boolean(),
|
|
@@ -553,7 +570,7 @@ var feeSchema = BaseModel.extend({
|
|
|
553
570
|
prices: z4.array(priceSchema).optional(),
|
|
554
571
|
provider: z4.string().nullable().optional(),
|
|
555
572
|
company_id: z4.number().optional(),
|
|
556
|
-
company:
|
|
573
|
+
company: companyIdentitySchema.optional(),
|
|
557
574
|
ident: z4.string().optional(),
|
|
558
575
|
category: z4.string().optional(),
|
|
559
576
|
subcategory: z4.string().nullable().optional(),
|
|
@@ -708,7 +725,7 @@ var airplanePermissionSchema = z4.object({
|
|
|
708
725
|
airplane_id: z4.number(),
|
|
709
726
|
airplane: airplaneSchema.optional(),
|
|
710
727
|
membership_id: z4.number(),
|
|
711
|
-
membership:
|
|
728
|
+
membership: nestedMembershipSchema.optional(),
|
|
712
729
|
notes: z4.string().nullable().optional(),
|
|
713
730
|
conditions: z4.string().nullable().optional(),
|
|
714
731
|
expires_at: z4.string().nullable().optional(),
|
|
@@ -818,7 +835,7 @@ var extendedAirplaneSchema = airplaneSchema.extend({
|
|
|
818
835
|
}).optional()
|
|
819
836
|
}).optional(),
|
|
820
837
|
foreflight_profile_url: z4.string().optional(),
|
|
821
|
-
company:
|
|
838
|
+
company: companyIdentitySchema.optional(),
|
|
822
839
|
latestPosition: aircraftPositionSchema.nullable().optional(),
|
|
823
840
|
total_flight_time_minutes: z4.number().nullable().optional(),
|
|
824
841
|
elapsed_time: z4.number().nullable().optional(),
|
|
@@ -874,6 +891,9 @@ var bookingSchema = BaseModel.extend({
|
|
|
874
891
|
author: userSchema.optional(),
|
|
875
892
|
company_id: z4.number(),
|
|
876
893
|
company_name: z4.string().nullable().optional(),
|
|
894
|
+
// Single-booking payloads only (BookingDetailResource): the dialog gates
|
|
895
|
+
// on this company, which a shared aircraft can make a partner company.
|
|
896
|
+
// List rows never carry it.
|
|
877
897
|
company: companySchema.optional(),
|
|
878
898
|
airplane: airplaneSchema.optional(),
|
|
879
899
|
etdZ: z4.string(),
|
|
@@ -889,6 +909,9 @@ var bookingSchema = BaseModel.extend({
|
|
|
889
909
|
// Slim per-booking training-record status, present when the backend
|
|
890
910
|
// eager-loaded `trainingRecord` (enrollment bookings surfaces).
|
|
891
911
|
training_record_status: z4.enum(["draft", "awaiting_signatures", "signed"]).nullable().optional(),
|
|
912
|
+
// Single-booking payloads only (BookingDetailResource): neighbour lookups
|
|
913
|
+
// cost two queries per booking and only the dialog's prev/next navigation
|
|
914
|
+
// uses them.
|
|
892
915
|
next_booking_id: z4.number().nullable().optional(),
|
|
893
916
|
previous_booking_id: z4.number().nullable().optional(),
|
|
894
917
|
maintenance: z4.number().optional(),
|
|
@@ -1140,7 +1163,7 @@ var flightLogSchema = z4.object({
|
|
|
1140
1163
|
ac_call: z4.string().nullable().optional(),
|
|
1141
1164
|
booking_id: z4.number().nullable().optional(),
|
|
1142
1165
|
membership_id: z4.number().nullable().optional(),
|
|
1143
|
-
membership:
|
|
1166
|
+
membership: nestedMembershipSchema.optional(),
|
|
1144
1167
|
billing_profile_id: z4.number().nullable().optional(),
|
|
1145
1168
|
author_id: z4.number(),
|
|
1146
1169
|
author: userSchema.optional(),
|
|
@@ -1185,7 +1208,10 @@ var invoiceSchema = z4.object({
|
|
|
1185
1208
|
id: z4.number(),
|
|
1186
1209
|
title: z4.string(),
|
|
1187
1210
|
membership_id: z4.number(),
|
|
1188
|
-
|
|
1211
|
+
// List rows (InvoiceListResource) carry the identity-only membership; the
|
|
1212
|
+
// single-invoice payload carries the full one. Typed as the identity shape —
|
|
1213
|
+
// the guaranteed part — with the rest passed through.
|
|
1214
|
+
membership: nestedMembershipSchema.optional(),
|
|
1189
1215
|
// InvoiceResource always emits `billing_profile_id` (non-optional key,
|
|
1190
1216
|
// nullable FK value). `billingProfile` is a `whenLoaded('billingProfile')`
|
|
1191
1217
|
// relation, so it stays optional. (Fix round 1: as of the original Task 16
|
|
@@ -1196,7 +1222,12 @@ var invoiceSchema = z4.object({
|
|
|
1196
1222
|
billingProfile: billingProfileSchema.optional(),
|
|
1197
1223
|
company_id: z4.number().optional(),
|
|
1198
1224
|
company: companySchema.optional(),
|
|
1225
|
+
// Numbering: invoices are numbered in `sequence_number`, receipts in
|
|
1226
|
+
// `receipt_number`. `document_number` is whichever applies — render that.
|
|
1227
|
+
document_type: z4.string().nullable().optional(),
|
|
1199
1228
|
sequence_number: z4.string().nullable().optional(),
|
|
1229
|
+
receipt_number: z4.string().nullable().optional(),
|
|
1230
|
+
document_number: z4.string().nullable().optional(),
|
|
1200
1231
|
order_number: z4.string().nullable().optional(),
|
|
1201
1232
|
invoice_date: z4.string().nullable().optional(),
|
|
1202
1233
|
due_date: z4.string().nullable().optional(),
|
|
@@ -1377,7 +1408,7 @@ var courseEnrollmentSchema = z4.object({
|
|
|
1377
1408
|
created_at: z4.string(),
|
|
1378
1409
|
updated_at: z4.string(),
|
|
1379
1410
|
course: courseSchema.optional(),
|
|
1380
|
-
membership:
|
|
1411
|
+
membership: nestedMembershipSchema.optional(),
|
|
1381
1412
|
mentor: userSchema.optional(),
|
|
1382
1413
|
// Present when eager-loaded (BaseCourseEnrollmentResource). Lazy: both
|
|
1383
1414
|
// schemas are declared later in this file; there is no true cycle.
|
|
@@ -1407,7 +1438,7 @@ var eventSchema = z4.object({
|
|
|
1407
1438
|
type: z4.literal("event"),
|
|
1408
1439
|
id: z4.number(),
|
|
1409
1440
|
company_id: z4.number(),
|
|
1410
|
-
company:
|
|
1441
|
+
company: companyIdentitySchema.optional(),
|
|
1411
1442
|
title: z4.string(),
|
|
1412
1443
|
description: z4.string().nullable().optional(),
|
|
1413
1444
|
media: mediaCollection,
|
|
@@ -1694,7 +1725,7 @@ var expenseItemSchema = z4.object({
|
|
|
1694
1725
|
// maximum length"). No true cycle: invoiceSchema does not reference
|
|
1695
1726
|
// expenseItemSchema back.
|
|
1696
1727
|
invoice: z4.lazy(() => invoiceSchema).optional(),
|
|
1697
|
-
membership:
|
|
1728
|
+
membership: nestedMembershipSchema.optional(),
|
|
1698
1729
|
prePaidPackageAssignments: z4.array(prePaidPackageAssignmentSchema).optional(),
|
|
1699
1730
|
// Loose record on purpose: gates are policy-reflected server-side and grow
|
|
1700
1731
|
// over time — same convention as companySchema/invoiceSchema.
|
|
@@ -2577,6 +2608,100 @@ var TodoSchema = z11.object({
|
|
|
2577
2608
|
meta: z11.record(z11.any()).optional()
|
|
2578
2609
|
});
|
|
2579
2610
|
|
|
2611
|
+
// src/schemas/fbo.ts
|
|
2612
|
+
import { z as z12 } from "zod";
|
|
2613
|
+
var fboAcceptanceAxisSchema = z12.object({
|
|
2614
|
+
status: z12.enum(["pending", "accepted", "rejected", "unknown"]),
|
|
2615
|
+
is_required: z12.boolean(),
|
|
2616
|
+
decided_by_id: z12.number().nullable(),
|
|
2617
|
+
updated_at: z12.string().nullable()
|
|
2618
|
+
});
|
|
2619
|
+
var fboAcceptanceStatusSchema = z12.object({
|
|
2620
|
+
fbo: fboAcceptanceAxisSchema,
|
|
2621
|
+
airport: fboAcceptanceAxisSchema,
|
|
2622
|
+
customs: fboAcceptanceAxisSchema
|
|
2623
|
+
});
|
|
2624
|
+
var fboGroundServicesSchema = z12.object({
|
|
2625
|
+
stairs: z12.boolean(),
|
|
2626
|
+
hangar: z12.boolean(),
|
|
2627
|
+
car_access: z12.boolean(),
|
|
2628
|
+
lifter: z12.boolean(),
|
|
2629
|
+
rental_car: z12.boolean(),
|
|
2630
|
+
refueling: z12.boolean(),
|
|
2631
|
+
gpu: z12.boolean()
|
|
2632
|
+
});
|
|
2633
|
+
var fboFlightTypeSchema = z12.enum(["scheduledFlight", "ppr"]);
|
|
2634
|
+
var fboFlightStatusSchema = z12.enum(["active", "pending", "cancelled"]);
|
|
2635
|
+
var fboFlightSchema = z12.object({
|
|
2636
|
+
id: z12.number(),
|
|
2637
|
+
type: fboFlightTypeSchema,
|
|
2638
|
+
uuid: z12.string(),
|
|
2639
|
+
flight_status: fboFlightStatusSchema,
|
|
2640
|
+
company_id: z12.number(),
|
|
2641
|
+
author_id: z12.number().nullable(),
|
|
2642
|
+
ac_call: z12.string().nullable(),
|
|
2643
|
+
ac_reg: z12.string().nullable(),
|
|
2644
|
+
ac_type: z12.string().nullable(),
|
|
2645
|
+
operator: z12.string().nullable(),
|
|
2646
|
+
etdZ: z12.string().nullable(),
|
|
2647
|
+
/** The filer gave a date but no time; `etdZ` then holds a placeholder midnight. */
|
|
2648
|
+
etdZ_no_time: z12.boolean(),
|
|
2649
|
+
etaZ: z12.string().nullable(),
|
|
2650
|
+
etaZ_no_time: z12.boolean(),
|
|
2651
|
+
departure_airport_id: z12.number().nullable(),
|
|
2652
|
+
departure_airport: airportSchema.optional(),
|
|
2653
|
+
destination_airport_id: z12.number().nullable(),
|
|
2654
|
+
destination_airport: airportSchema.optional(),
|
|
2655
|
+
ifr: z12.boolean(),
|
|
2656
|
+
wx: z12.boolean(),
|
|
2657
|
+
landings: z12.number().nullable(),
|
|
2658
|
+
remarks: z12.string().nullable(),
|
|
2659
|
+
contact: zContactDTO,
|
|
2660
|
+
ground_services: fboGroundServicesSchema,
|
|
2661
|
+
acceptance_status: fboAcceptanceStatusSchema,
|
|
2662
|
+
created_at: z12.string(),
|
|
2663
|
+
updated_at: z12.string()
|
|
2664
|
+
});
|
|
2665
|
+
var fboOccupationSchema = z12.object({
|
|
2666
|
+
id: z12.number(),
|
|
2667
|
+
company_id: z12.number(),
|
|
2668
|
+
author_id: z12.number().nullable(),
|
|
2669
|
+
title: z12.string(),
|
|
2670
|
+
description: z12.string().nullable(),
|
|
2671
|
+
is_absence: z12.boolean(),
|
|
2672
|
+
created_at: z12.string().nullable(),
|
|
2673
|
+
updated_at: z12.string().nullable()
|
|
2674
|
+
});
|
|
2675
|
+
var fboDutySchema = z12.object({
|
|
2676
|
+
id: z12.number(),
|
|
2677
|
+
company_id: z12.number().nullable(),
|
|
2678
|
+
user_id: z12.number().nullable(),
|
|
2679
|
+
author_id: z12.number().nullable(),
|
|
2680
|
+
occupation_id: z12.number().nullable(),
|
|
2681
|
+
occupation: fboOccupationSchema.optional(),
|
|
2682
|
+
scheduled_flight_id: z12.number().nullable(),
|
|
2683
|
+
start: z12.string(),
|
|
2684
|
+
end: z12.string(),
|
|
2685
|
+
all_day: z12.boolean(),
|
|
2686
|
+
remarks: z12.string().nullable(),
|
|
2687
|
+
created_at: z12.string().nullable(),
|
|
2688
|
+
updated_at: z12.string().nullable()
|
|
2689
|
+
});
|
|
2690
|
+
var fboRoleSchema = z12.enum(["fbo", "atc", "wx", "customs", "handling", "fuel", "operator"]);
|
|
2691
|
+
var fboCompanyProfileSchema = z12.object({
|
|
2692
|
+
role: fboRoleSchema,
|
|
2693
|
+
flights_require_approval: z12.boolean(),
|
|
2694
|
+
notify_on_movement: z12.boolean(),
|
|
2695
|
+
has_duties: z12.boolean(),
|
|
2696
|
+
has_airplanes: z12.boolean()
|
|
2697
|
+
});
|
|
2698
|
+
var fboDecisionAxisSchema = z12.enum(["fbo", "airport", "customs"]);
|
|
2699
|
+
var fboDecisionSchema = z12.enum(["accepted", "rejected"]);
|
|
2700
|
+
var fboDecisionInputSchema = z12.object({
|
|
2701
|
+
axis: fboDecisionAxisSchema,
|
|
2702
|
+
status: fboDecisionSchema
|
|
2703
|
+
});
|
|
2704
|
+
|
|
2580
2705
|
export {
|
|
2581
2706
|
zNullableBool,
|
|
2582
2707
|
zNetGross,
|
|
@@ -2589,6 +2714,7 @@ export {
|
|
|
2589
2714
|
impersonationParticipantSchema,
|
|
2590
2715
|
impersonationStateSchema,
|
|
2591
2716
|
userSchema,
|
|
2717
|
+
companyIdentitySchema,
|
|
2592
2718
|
companySchema,
|
|
2593
2719
|
equipmentSchema,
|
|
2594
2720
|
gradingScalePointSchema,
|
|
@@ -2626,6 +2752,8 @@ export {
|
|
|
2626
2752
|
trainingTemplatePackSchema,
|
|
2627
2753
|
CreateSyllabusFromTemplateFormSchema,
|
|
2628
2754
|
createSyllabusFromTemplateResultSchema,
|
|
2755
|
+
membershipIdentitySchema,
|
|
2756
|
+
nestedMembershipSchema,
|
|
2629
2757
|
baseMembershipSchema,
|
|
2630
2758
|
membershipSchema,
|
|
2631
2759
|
documentType,
|
|
@@ -2765,5 +2893,18 @@ export {
|
|
|
2765
2893
|
ImportFeaturesSchema,
|
|
2766
2894
|
TodoActionSchema,
|
|
2767
2895
|
TodoKey,
|
|
2768
|
-
TodoSchema
|
|
2896
|
+
TodoSchema,
|
|
2897
|
+
fboAcceptanceAxisSchema,
|
|
2898
|
+
fboAcceptanceStatusSchema,
|
|
2899
|
+
fboGroundServicesSchema,
|
|
2900
|
+
fboFlightTypeSchema,
|
|
2901
|
+
fboFlightStatusSchema,
|
|
2902
|
+
fboFlightSchema,
|
|
2903
|
+
fboOccupationSchema,
|
|
2904
|
+
fboDutySchema,
|
|
2905
|
+
fboRoleSchema,
|
|
2906
|
+
fboCompanyProfileSchema,
|
|
2907
|
+
fboDecisionAxisSchema,
|
|
2908
|
+
fboDecisionSchema,
|
|
2909
|
+
fboDecisionInputSchema
|
|
2769
2910
|
};
|