@updraft-solutions/mcrit-sdk 0.10.0 → 0.11.1
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/README.md +11 -25
- package/dist/{chunk-IDEPTVFF.cjs → chunk-HHQ7PFX2.cjs} +40 -28
- package/dist/{chunk-ZKXYKICY.js → chunk-VFCUI2TH.js} +40 -28
- package/dist/crew/index.d.cts +1 -1
- package/dist/crew/index.d.ts +1 -1
- package/dist/index.cjs +9 -5
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +25 -21
- package/dist/media/index.d.cts +2 -2
- package/dist/media/index.d.ts +2 -2
- package/dist/money/index.d.cts +5 -5
- package/dist/money/index.d.ts +5 -5
- package/dist/sanitize/index.d.cts +1 -1
- package/dist/sanitize/index.d.ts +1 -1
- package/dist/schemas/index.cjs +6 -2
- package/dist/schemas/index.d.cts +122 -123
- package/dist/schemas/index.d.ts +122 -123
- package/dist/schemas/index.js +9 -5
- package/dist/{training-DRuphnSP.d.cts → training-BNAGw2Te.d.cts} +17671 -17657
- package/dist/{training-DRuphnSP.d.ts → training-BNAGw2Te.d.ts} +17671 -17657
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +137 -2
- package/dist/types/index.d.ts +137 -2
- package/dist/types/index.js +1 -1
- package/package.json +3 -2
- package/src/crew/index.ts +1 -1
- package/src/index.ts +18 -0
- package/src/media/index.ts +2 -2
- package/src/money/index.ts +4 -4
- package/src/sanitize/index.ts +1 -1
- package/src/schemas/common.ts +1 -1
- package/src/schemas/equipment.ts +1 -2
- package/src/schemas/form-template.ts +1 -1
- package/src/schemas/models.ts +51 -33
- package/src/schemas/training.ts +2 -2
- package/src/types/compliance.ts +1 -1
- package/src/types/index.ts +1 -0
- package/src/types/models.ts +1 -0
- package/src/types/operating-hours.ts +163 -0
- /package/dist/{chunk-2WJHTRIE.js → chunk-UV5JLKAL.js} +0 -0
- /package/dist/{chunk-DCEOET63.cjs → chunk-YVC6Q3YU.cjs} +0 -0
package/README.md
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
# `@updraft-solutions/mcrit-sdk`
|
|
2
2
|
|
|
3
3
|
Shared TypeScript types, Zod schemas, and pure helpers for the MCRIT
|
|
4
|
-
aviation fleet management platform
|
|
5
|
-
|
|
6
|
-
and apply the same business logic.
|
|
4
|
+
aviation fleet management platform, so every client speaks the same API
|
|
5
|
+
contract and applies the same business logic.
|
|
7
6
|
|
|
8
|
-
The SDK is **runtime-agnostic and side-effect free**: no
|
|
9
|
-
|
|
10
|
-
resource shapes returned by the
|
|
7
|
+
The SDK is **runtime-agnostic and side-effect free**: no framework
|
|
8
|
+
imports, no HTTP client. Just types and pure functions that operate on
|
|
9
|
+
the resource shapes returned by the MCRIT API.
|
|
11
10
|
|
|
12
11
|
---
|
|
13
12
|
|
|
@@ -28,7 +27,7 @@ want German or another non-English label output, also import the matching
|
|
|
28
27
|
moment locale **once** at your app entry:
|
|
29
28
|
|
|
30
29
|
```ts
|
|
31
|
-
//
|
|
30
|
+
// once at your app entry
|
|
32
31
|
import "moment/locale/de";
|
|
33
32
|
```
|
|
34
33
|
|
|
@@ -48,7 +47,7 @@ or from the root if you want everything in one place.
|
|
|
48
47
|
| `@updraft-solutions/mcrit-sdk/courses` | Course variant and total-cost logic |
|
|
49
48
|
| `@updraft-solutions/mcrit-sdk/format` | Date, time, percentage, byte, membership formatters |
|
|
50
49
|
| `@updraft-solutions/mcrit-sdk/crew` | Crew-role constants, predicates, membership helpers |
|
|
51
|
-
| `@updraft-solutions/mcrit-sdk/media` | MIME-type classification +
|
|
50
|
+
| `@updraft-solutions/mcrit-sdk/media` | MIME-type classification + media payload mappers |
|
|
52
51
|
| `@updraft-solutions/mcrit-sdk/pagination` | Pagination meta math |
|
|
53
52
|
|
|
54
53
|
---
|
|
@@ -127,8 +126,8 @@ isInstructorClassRole("authorizing_instructor"); // true
|
|
|
127
126
|
defaultCrewRoleForMembership(membership); // "student" | "instructor" | "pilot"
|
|
128
127
|
```
|
|
129
128
|
|
|
130
|
-
|
|
131
|
-
`
|
|
129
|
+
Role metadata mirrors the server crew configuration served via
|
|
130
|
+
`GET /meta/crew`.
|
|
132
131
|
|
|
133
132
|
### Media
|
|
134
133
|
|
|
@@ -189,17 +188,8 @@ pnpm build # tsup → dist/{esm,cjs,d.ts}
|
|
|
189
188
|
pnpm dev # tsup --watch
|
|
190
189
|
```
|
|
191
190
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
The MCRIT working folder (`mcrit-app`, `inflight-homepage-nuxt-3`, and
|
|
195
|
-
this repo as sibling git checkouts) uses a pnpm workspace at the parent
|
|
196
|
-
folder. With `workspace:*` (or any matching version range) in the
|
|
197
|
-
consuming app's `package.json`, pnpm symlinks this directory into the
|
|
198
|
-
consumer's `node_modules` — edits show up immediately, no publish loop.
|
|
199
|
-
|
|
200
|
-
If consumers use the `source` export condition (Vite via
|
|
201
|
-
`resolve.conditions: ['source']`), they read `src/*.ts` directly and skip
|
|
202
|
-
the `tsup` build entirely during dev.
|
|
191
|
+
Consumers that enable the `source` export condition read `src/*.ts`
|
|
192
|
+
directly and skip the `tsup` build entirely during dev.
|
|
203
193
|
|
|
204
194
|
### Adding a new helper
|
|
205
195
|
|
|
@@ -228,10 +218,6 @@ git push && git push --tags
|
|
|
228
218
|
The workflow verifies the tag matches `package.json`, runs
|
|
229
219
|
`pnpm typecheck && pnpm build`, then publishes to npm with provenance.
|
|
230
220
|
|
|
231
|
-
The `NPM_TOKEN` GitHub repository secret must be configured (an
|
|
232
|
-
"Automation" or "Granular" token from npmjs.com with publish rights to
|
|
233
|
-
`@updraft-solutions/mcrit-sdk`).
|
|
234
|
-
|
|
235
221
|
---
|
|
236
222
|
|
|
237
223
|
## License
|
|
@@ -9,7 +9,7 @@ var zContactDTO = _zod.z.object({
|
|
|
9
9
|
company: _zod.z.string().nullable().optional(),
|
|
10
10
|
fax: _zod.z.string().nullable().optional()
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var zMoneyObject = _zod.z.object({
|
|
13
13
|
amount: _zod.z.number(),
|
|
14
14
|
currency: _zod.z.string(),
|
|
15
15
|
formatted: _zod.z.string()
|
|
@@ -537,8 +537,8 @@ var documentType = _zod.z.object({
|
|
|
537
537
|
});
|
|
538
538
|
var priceSchema = _zod.z.object({
|
|
539
539
|
id: _zod.z.number(),
|
|
540
|
-
gross_total:
|
|
541
|
-
net_total:
|
|
540
|
+
gross_total: zMoneyObject,
|
|
541
|
+
net_total: zMoneyObject,
|
|
542
542
|
tax_percentage: _zod.z.number(),
|
|
543
543
|
valid_from: _zod.z.string(),
|
|
544
544
|
created_at: _zod.z.string(),
|
|
@@ -602,6 +602,7 @@ var courseFeeSchema = feeSchema.extend({
|
|
|
602
602
|
is_optional: _zod.z.boolean().optional(),
|
|
603
603
|
is_initial_payment: _zod.z.boolean().optional()
|
|
604
604
|
});
|
|
605
|
+
var fuelUnitSchema = _zod.z.enum(["l", "usgal", "kg", "lb"]);
|
|
605
606
|
var airplaneSchema = BaseModel.extend({
|
|
606
607
|
type: _zod.z.literal("airplane"),
|
|
607
608
|
id: _zod.z.number(),
|
|
@@ -637,9 +638,6 @@ var airplaneSchema = BaseModel.extend({
|
|
|
637
638
|
shared_companies: _zod.z.array(_zod.z.object({ id: _zod.z.number(), name: _zod.z.string() })).optional(),
|
|
638
639
|
is_simulator: _zod.z.boolean().optional(),
|
|
639
640
|
category: _zod.z.string().nullable().optional(),
|
|
640
|
-
averageFuelConsumption: _zod.z.string().nullable().optional(),
|
|
641
|
-
weightUnitString: _zod.z.string().optional(),
|
|
642
|
-
fuelUnitString: _zod.z.string().optional(),
|
|
643
641
|
isoCountryCodeFromRegistration: _zod.z.string().optional(),
|
|
644
642
|
registrationWithoutSpecialChars: _zod.z.string().nullable().optional(),
|
|
645
643
|
equipmentCodes: _zod.z.array(_zod.z.string()).nullable().optional(),
|
|
@@ -669,6 +667,9 @@ var airplaneSchema = BaseModel.extend({
|
|
|
669
667
|
max_takeoff_mass: _zod.z.string().optional(),
|
|
670
668
|
max_speed: _zod.z.string().optional(),
|
|
671
669
|
max_range: _zod.z.string().optional(),
|
|
670
|
+
// Cruise fuel-flow baseline (~75 % power / ISA; POH authoritative).
|
|
671
|
+
cruise_fuel_flow: _zod.z.number().nullable().optional(),
|
|
672
|
+
cruise_fuel_flow_unit: fuelUnitSchema.nullable().optional(),
|
|
672
673
|
equipment: _zod.z.array(equipmentSchema).optional(),
|
|
673
674
|
has_pre_paid_package: _zod.z.boolean().optional(),
|
|
674
675
|
logging_required_from: _zod.z.string().optional(),
|
|
@@ -1169,8 +1170,8 @@ var flightLogSchema = _zod.z.object({
|
|
|
1169
1170
|
arr_airport: airportSchema.optional(),
|
|
1170
1171
|
from: _zod.z.string().nullable().optional(),
|
|
1171
1172
|
to: _zod.z.string().nullable().optional(),
|
|
1172
|
-
costs:
|
|
1173
|
-
charge:
|
|
1173
|
+
costs: zMoneyObject.nullable().optional(),
|
|
1174
|
+
charge: zMoneyObject.nullable().optional(),
|
|
1174
1175
|
remarks: _zod.z.string().nullable().optional(),
|
|
1175
1176
|
created_at: _zod.z.string(),
|
|
1176
1177
|
updated_at: _zod.z.string(),
|
|
@@ -1185,7 +1186,7 @@ var invoiceSchema = _zod.z.object({
|
|
|
1185
1186
|
title: _zod.z.string(),
|
|
1186
1187
|
membership_id: _zod.z.number(),
|
|
1187
1188
|
membership: baseMembershipSchema.optional(),
|
|
1188
|
-
// InvoiceResource
|
|
1189
|
+
// InvoiceResource always emits `billing_profile_id` (non-optional key,
|
|
1189
1190
|
// nullable FK value). `billingProfile` is a `whenLoaded('billingProfile')`
|
|
1190
1191
|
// relation, so it stays optional. (Fix round 1: as of the original Task 16
|
|
1191
1192
|
// commit, InvoiceResource hadn't gained `billing_profile_id` yet — it was
|
|
@@ -1201,10 +1202,10 @@ var invoiceSchema = _zod.z.object({
|
|
|
1201
1202
|
due_date: _zod.z.string().nullable().optional(),
|
|
1202
1203
|
status: _zod.z.string().nullable().optional(),
|
|
1203
1204
|
paid_status: _zod.z.string().nullable().optional(),
|
|
1204
|
-
total:
|
|
1205
|
-
subtotal:
|
|
1206
|
-
tax_amount:
|
|
1207
|
-
discount_amount:
|
|
1205
|
+
total: zMoneyObject.nullable().optional(),
|
|
1206
|
+
subtotal: zMoneyObject.nullable().optional(),
|
|
1207
|
+
tax_amount: zMoneyObject.nullable().optional(),
|
|
1208
|
+
discount_amount: zMoneyObject.nullable().optional(),
|
|
1208
1209
|
paid_at: _zod.z.string().nullable().optional(),
|
|
1209
1210
|
released_at: _zod.z.string().nullable().optional(),
|
|
1210
1211
|
sent: _zod.z.number().default(0),
|
|
@@ -1237,8 +1238,8 @@ var invoiceSchema = _zod.z.object({
|
|
|
1237
1238
|
issuer_vat_id: _zod.z.string().nullable().optional(),
|
|
1238
1239
|
issuer_register_court: _zod.z.string().nullable().optional(),
|
|
1239
1240
|
issuer_register_number: _zod.z.string().nullable().optional(),
|
|
1240
|
-
gross_total:
|
|
1241
|
-
net_total:
|
|
1241
|
+
gross_total: zMoneyObject.nullable().optional(),
|
|
1242
|
+
net_total: zMoneyObject.nullable().optional(),
|
|
1242
1243
|
// InvoiceResource media envelope: only the generated PDF.
|
|
1243
1244
|
media: _zod.z.object({
|
|
1244
1245
|
pdf: mediaSchema.nullable().optional()
|
|
@@ -1285,7 +1286,7 @@ var expenseSchema = _zod.z.object({
|
|
|
1285
1286
|
membership: baseMembershipSchema.optional(),
|
|
1286
1287
|
title: _zod.z.string(),
|
|
1287
1288
|
description: _zod.z.string().nullable().optional(),
|
|
1288
|
-
amount:
|
|
1289
|
+
amount: zMoneyObject,
|
|
1289
1290
|
status: _zod.z.string().nullable().optional(),
|
|
1290
1291
|
expense_date: _zod.z.string().nullable().optional(),
|
|
1291
1292
|
invoice_id: _zod.z.number().nullable().optional(),
|
|
@@ -1313,7 +1314,7 @@ var courseSchema = _zod.z.object({
|
|
|
1313
1314
|
start_date: _zod.z.string().nullable().optional(),
|
|
1314
1315
|
end_date: _zod.z.string().nullable().optional(),
|
|
1315
1316
|
max_participants: _zod.z.number().nullable().optional(),
|
|
1316
|
-
price:
|
|
1317
|
+
price: zMoneyObject.nullable().optional(),
|
|
1317
1318
|
instructor_id: _zod.z.number().nullable().optional(),
|
|
1318
1319
|
instructor: userSchema.optional(),
|
|
1319
1320
|
aircraft_required: _zod.z.boolean().default(false),
|
|
@@ -1369,8 +1370,7 @@ var courseEnrollmentSchema = _zod.z.object({
|
|
|
1369
1370
|
comments: _zod.z.string().nullable().optional(),
|
|
1370
1371
|
initial_payment_generated: _zod.z.boolean().optional(),
|
|
1371
1372
|
initial_payment_removable: _zod.z.boolean().optional(),
|
|
1372
|
-
// Element-driven training progress
|
|
1373
|
-
// docs/features/training-tracking.md).
|
|
1373
|
+
// Element-driven training progress.
|
|
1374
1374
|
tracked_training_elements_count: _zod.z.number().optional(),
|
|
1375
1375
|
progress_source: _zod.z.enum(["training_elements", "milestones"]).optional(),
|
|
1376
1376
|
metrics: courseEnrollmentMetricsSchema.optional(),
|
|
@@ -1459,7 +1459,7 @@ var landingSchema = _zod.z.object({
|
|
|
1459
1459
|
airport: airportSchema.optional(),
|
|
1460
1460
|
landing_fee_id: _zod.z.number().nullable().optional(),
|
|
1461
1461
|
landing_time: _zod.z.string(),
|
|
1462
|
-
price:
|
|
1462
|
+
price: zMoneyObject.nullable().optional(),
|
|
1463
1463
|
created_at: _zod.z.string(),
|
|
1464
1464
|
updated_at: _zod.z.string()
|
|
1465
1465
|
});
|
|
@@ -1511,12 +1511,18 @@ var settingSchema = _zod.z.object({
|
|
|
1511
1511
|
created_at: _zod.z.string(),
|
|
1512
1512
|
updated_at: _zod.z.string()
|
|
1513
1513
|
});
|
|
1514
|
+
var postSubjectSchema = _zod.z.object({
|
|
1515
|
+
type: _zod.z.enum(["airplane", "course"]),
|
|
1516
|
+
id: _zod.z.number(),
|
|
1517
|
+
label: _zod.z.string()
|
|
1518
|
+
});
|
|
1514
1519
|
var postSchema = _zod.z.object({
|
|
1515
1520
|
type: _zod.z.literal("post"),
|
|
1516
1521
|
id: _zod.z.number(),
|
|
1517
1522
|
company_id: _zod.z.number(),
|
|
1518
1523
|
postable_type: _zod.z.string().nullable().optional(),
|
|
1519
1524
|
postable_id: _zod.z.number().nullable().optional(),
|
|
1525
|
+
postable: postSubjectSchema.nullable().optional(),
|
|
1520
1526
|
author_id: _zod.z.number(),
|
|
1521
1527
|
author: userSchema.optional(),
|
|
1522
1528
|
title: _zod.z.string().nullable().optional(),
|
|
@@ -1524,12 +1530,16 @@ var postSchema = _zod.z.object({
|
|
|
1524
1530
|
sticky: _zod.z.boolean().default(false),
|
|
1525
1531
|
public: _zod.z.boolean().default(false),
|
|
1526
1532
|
comments_disabled: _zod.z.boolean().default(false),
|
|
1533
|
+
/** Present when the endpoint counts comments (listings + show). */
|
|
1534
|
+
comments_count: _zod.z.number().nullable().optional(),
|
|
1527
1535
|
tags: _zod.z.array(tagSchema).optional(),
|
|
1528
1536
|
media: mediaCollection.optional(),
|
|
1529
1537
|
created_at: _zod.z.string(),
|
|
1530
1538
|
updated_at: _zod.z.string(),
|
|
1531
1539
|
can: _zod.z.object({
|
|
1532
1540
|
view: zNullableBool,
|
|
1541
|
+
viewComments: zNullableBool,
|
|
1542
|
+
createComments: zNullableBool,
|
|
1533
1543
|
update: zNullableBool,
|
|
1534
1544
|
delete: zNullableBool,
|
|
1535
1545
|
setFlags: zNullableBool,
|
|
@@ -1613,8 +1623,8 @@ var prePaidPackageSchema = _zod.z.object({
|
|
|
1613
1623
|
company: companySchema.optional(),
|
|
1614
1624
|
name: _zod.z.string(),
|
|
1615
1625
|
description: _zod.z.string().nullable().optional(),
|
|
1616
|
-
balance:
|
|
1617
|
-
initial_amount:
|
|
1626
|
+
balance: zMoneyObject,
|
|
1627
|
+
initial_amount: zMoneyObject,
|
|
1618
1628
|
discount_percentage: _zod.z.number().nullable().optional(),
|
|
1619
1629
|
valid_until: _zod.z.string().nullable().optional(),
|
|
1620
1630
|
created_at: _zod.z.string(),
|
|
@@ -1630,7 +1640,7 @@ var prePaidPackageAssignmentSchema = _zod.z.object({
|
|
|
1630
1640
|
flight_log_id: _zod.z.number().nullable().optional(),
|
|
1631
1641
|
expense_item_id: _zod.z.number().nullable().optional(),
|
|
1632
1642
|
pre_paid_package_id: _zod.z.number().nullable().optional(),
|
|
1633
|
-
gross_total:
|
|
1643
|
+
gross_total: zMoneyObject.nullable().optional(),
|
|
1634
1644
|
created_at: _zod.z.string().nullable().optional(),
|
|
1635
1645
|
updated_at: _zod.z.string().nullable().optional()
|
|
1636
1646
|
});
|
|
@@ -1662,10 +1672,10 @@ var expenseItemSchema = _zod.z.object({
|
|
|
1662
1672
|
company_id: _zod.z.number(),
|
|
1663
1673
|
membership_id: _zod.z.number(),
|
|
1664
1674
|
billing_profile_id: _zod.z.number().nullable(),
|
|
1665
|
-
gross_total_before_vouchers:
|
|
1666
|
-
gross_total:
|
|
1667
|
-
net_total:
|
|
1668
|
-
tax_total:
|
|
1675
|
+
gross_total_before_vouchers: zMoneyObject,
|
|
1676
|
+
gross_total: zMoneyObject,
|
|
1677
|
+
net_total: zMoneyObject,
|
|
1678
|
+
tax_total: zMoneyObject,
|
|
1669
1679
|
// number_format(…, 2) string, not a number.
|
|
1670
1680
|
tax_percentage: _zod.z.string(),
|
|
1671
1681
|
billable: _zod.z.boolean(),
|
|
@@ -2744,4 +2754,6 @@ var TodoSchema = _zod.z.object({
|
|
|
2744
2754
|
|
|
2745
2755
|
|
|
2746
2756
|
|
|
2747
|
-
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.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.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.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;
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
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;
|
|
@@ -9,7 +9,7 @@ var zContactDTO = z.object({
|
|
|
9
9
|
company: z.string().nullable().optional(),
|
|
10
10
|
fax: z.string().nullable().optional()
|
|
11
11
|
});
|
|
12
|
-
var
|
|
12
|
+
var zMoneyObject = z.object({
|
|
13
13
|
amount: z.number(),
|
|
14
14
|
currency: z.string(),
|
|
15
15
|
formatted: z.string()
|
|
@@ -537,8 +537,8 @@ var documentType = z4.object({
|
|
|
537
537
|
});
|
|
538
538
|
var priceSchema = z4.object({
|
|
539
539
|
id: z4.number(),
|
|
540
|
-
gross_total:
|
|
541
|
-
net_total:
|
|
540
|
+
gross_total: zMoneyObject,
|
|
541
|
+
net_total: zMoneyObject,
|
|
542
542
|
tax_percentage: z4.number(),
|
|
543
543
|
valid_from: z4.string(),
|
|
544
544
|
created_at: z4.string(),
|
|
@@ -602,6 +602,7 @@ var courseFeeSchema = feeSchema.extend({
|
|
|
602
602
|
is_optional: z4.boolean().optional(),
|
|
603
603
|
is_initial_payment: z4.boolean().optional()
|
|
604
604
|
});
|
|
605
|
+
var fuelUnitSchema = z4.enum(["l", "usgal", "kg", "lb"]);
|
|
605
606
|
var airplaneSchema = BaseModel.extend({
|
|
606
607
|
type: z4.literal("airplane"),
|
|
607
608
|
id: z4.number(),
|
|
@@ -637,9 +638,6 @@ var airplaneSchema = BaseModel.extend({
|
|
|
637
638
|
shared_companies: z4.array(z4.object({ id: z4.number(), name: z4.string() })).optional(),
|
|
638
639
|
is_simulator: z4.boolean().optional(),
|
|
639
640
|
category: z4.string().nullable().optional(),
|
|
640
|
-
averageFuelConsumption: z4.string().nullable().optional(),
|
|
641
|
-
weightUnitString: z4.string().optional(),
|
|
642
|
-
fuelUnitString: z4.string().optional(),
|
|
643
641
|
isoCountryCodeFromRegistration: z4.string().optional(),
|
|
644
642
|
registrationWithoutSpecialChars: z4.string().nullable().optional(),
|
|
645
643
|
equipmentCodes: z4.array(z4.string()).nullable().optional(),
|
|
@@ -669,6 +667,9 @@ var airplaneSchema = BaseModel.extend({
|
|
|
669
667
|
max_takeoff_mass: z4.string().optional(),
|
|
670
668
|
max_speed: z4.string().optional(),
|
|
671
669
|
max_range: z4.string().optional(),
|
|
670
|
+
// Cruise fuel-flow baseline (~75 % power / ISA; POH authoritative).
|
|
671
|
+
cruise_fuel_flow: z4.number().nullable().optional(),
|
|
672
|
+
cruise_fuel_flow_unit: fuelUnitSchema.nullable().optional(),
|
|
672
673
|
equipment: z4.array(equipmentSchema).optional(),
|
|
673
674
|
has_pre_paid_package: z4.boolean().optional(),
|
|
674
675
|
logging_required_from: z4.string().optional(),
|
|
@@ -1169,8 +1170,8 @@ var flightLogSchema = z4.object({
|
|
|
1169
1170
|
arr_airport: airportSchema.optional(),
|
|
1170
1171
|
from: z4.string().nullable().optional(),
|
|
1171
1172
|
to: z4.string().nullable().optional(),
|
|
1172
|
-
costs:
|
|
1173
|
-
charge:
|
|
1173
|
+
costs: zMoneyObject.nullable().optional(),
|
|
1174
|
+
charge: zMoneyObject.nullable().optional(),
|
|
1174
1175
|
remarks: z4.string().nullable().optional(),
|
|
1175
1176
|
created_at: z4.string(),
|
|
1176
1177
|
updated_at: z4.string(),
|
|
@@ -1185,7 +1186,7 @@ var invoiceSchema = z4.object({
|
|
|
1185
1186
|
title: z4.string(),
|
|
1186
1187
|
membership_id: z4.number(),
|
|
1187
1188
|
membership: baseMembershipSchema.optional(),
|
|
1188
|
-
// InvoiceResource
|
|
1189
|
+
// InvoiceResource always emits `billing_profile_id` (non-optional key,
|
|
1189
1190
|
// nullable FK value). `billingProfile` is a `whenLoaded('billingProfile')`
|
|
1190
1191
|
// relation, so it stays optional. (Fix round 1: as of the original Task 16
|
|
1191
1192
|
// commit, InvoiceResource hadn't gained `billing_profile_id` yet — it was
|
|
@@ -1201,10 +1202,10 @@ var invoiceSchema = z4.object({
|
|
|
1201
1202
|
due_date: z4.string().nullable().optional(),
|
|
1202
1203
|
status: z4.string().nullable().optional(),
|
|
1203
1204
|
paid_status: z4.string().nullable().optional(),
|
|
1204
|
-
total:
|
|
1205
|
-
subtotal:
|
|
1206
|
-
tax_amount:
|
|
1207
|
-
discount_amount:
|
|
1205
|
+
total: zMoneyObject.nullable().optional(),
|
|
1206
|
+
subtotal: zMoneyObject.nullable().optional(),
|
|
1207
|
+
tax_amount: zMoneyObject.nullable().optional(),
|
|
1208
|
+
discount_amount: zMoneyObject.nullable().optional(),
|
|
1208
1209
|
paid_at: z4.string().nullable().optional(),
|
|
1209
1210
|
released_at: z4.string().nullable().optional(),
|
|
1210
1211
|
sent: z4.number().default(0),
|
|
@@ -1237,8 +1238,8 @@ var invoiceSchema = z4.object({
|
|
|
1237
1238
|
issuer_vat_id: z4.string().nullable().optional(),
|
|
1238
1239
|
issuer_register_court: z4.string().nullable().optional(),
|
|
1239
1240
|
issuer_register_number: z4.string().nullable().optional(),
|
|
1240
|
-
gross_total:
|
|
1241
|
-
net_total:
|
|
1241
|
+
gross_total: zMoneyObject.nullable().optional(),
|
|
1242
|
+
net_total: zMoneyObject.nullable().optional(),
|
|
1242
1243
|
// InvoiceResource media envelope: only the generated PDF.
|
|
1243
1244
|
media: z4.object({
|
|
1244
1245
|
pdf: mediaSchema.nullable().optional()
|
|
@@ -1285,7 +1286,7 @@ var expenseSchema = z4.object({
|
|
|
1285
1286
|
membership: baseMembershipSchema.optional(),
|
|
1286
1287
|
title: z4.string(),
|
|
1287
1288
|
description: z4.string().nullable().optional(),
|
|
1288
|
-
amount:
|
|
1289
|
+
amount: zMoneyObject,
|
|
1289
1290
|
status: z4.string().nullable().optional(),
|
|
1290
1291
|
expense_date: z4.string().nullable().optional(),
|
|
1291
1292
|
invoice_id: z4.number().nullable().optional(),
|
|
@@ -1313,7 +1314,7 @@ var courseSchema = z4.object({
|
|
|
1313
1314
|
start_date: z4.string().nullable().optional(),
|
|
1314
1315
|
end_date: z4.string().nullable().optional(),
|
|
1315
1316
|
max_participants: z4.number().nullable().optional(),
|
|
1316
|
-
price:
|
|
1317
|
+
price: zMoneyObject.nullable().optional(),
|
|
1317
1318
|
instructor_id: z4.number().nullable().optional(),
|
|
1318
1319
|
instructor: userSchema.optional(),
|
|
1319
1320
|
aircraft_required: z4.boolean().default(false),
|
|
@@ -1369,8 +1370,7 @@ var courseEnrollmentSchema = z4.object({
|
|
|
1369
1370
|
comments: z4.string().nullable().optional(),
|
|
1370
1371
|
initial_payment_generated: z4.boolean().optional(),
|
|
1371
1372
|
initial_payment_removable: z4.boolean().optional(),
|
|
1372
|
-
// Element-driven training progress
|
|
1373
|
-
// docs/features/training-tracking.md).
|
|
1373
|
+
// Element-driven training progress.
|
|
1374
1374
|
tracked_training_elements_count: z4.number().optional(),
|
|
1375
1375
|
progress_source: z4.enum(["training_elements", "milestones"]).optional(),
|
|
1376
1376
|
metrics: courseEnrollmentMetricsSchema.optional(),
|
|
@@ -1459,7 +1459,7 @@ var landingSchema = z4.object({
|
|
|
1459
1459
|
airport: airportSchema.optional(),
|
|
1460
1460
|
landing_fee_id: z4.number().nullable().optional(),
|
|
1461
1461
|
landing_time: z4.string(),
|
|
1462
|
-
price:
|
|
1462
|
+
price: zMoneyObject.nullable().optional(),
|
|
1463
1463
|
created_at: z4.string(),
|
|
1464
1464
|
updated_at: z4.string()
|
|
1465
1465
|
});
|
|
@@ -1511,12 +1511,18 @@ var settingSchema = z4.object({
|
|
|
1511
1511
|
created_at: z4.string(),
|
|
1512
1512
|
updated_at: z4.string()
|
|
1513
1513
|
});
|
|
1514
|
+
var postSubjectSchema = z4.object({
|
|
1515
|
+
type: z4.enum(["airplane", "course"]),
|
|
1516
|
+
id: z4.number(),
|
|
1517
|
+
label: z4.string()
|
|
1518
|
+
});
|
|
1514
1519
|
var postSchema = z4.object({
|
|
1515
1520
|
type: z4.literal("post"),
|
|
1516
1521
|
id: z4.number(),
|
|
1517
1522
|
company_id: z4.number(),
|
|
1518
1523
|
postable_type: z4.string().nullable().optional(),
|
|
1519
1524
|
postable_id: z4.number().nullable().optional(),
|
|
1525
|
+
postable: postSubjectSchema.nullable().optional(),
|
|
1520
1526
|
author_id: z4.number(),
|
|
1521
1527
|
author: userSchema.optional(),
|
|
1522
1528
|
title: z4.string().nullable().optional(),
|
|
@@ -1524,12 +1530,16 @@ var postSchema = z4.object({
|
|
|
1524
1530
|
sticky: z4.boolean().default(false),
|
|
1525
1531
|
public: z4.boolean().default(false),
|
|
1526
1532
|
comments_disabled: z4.boolean().default(false),
|
|
1533
|
+
/** Present when the endpoint counts comments (listings + show). */
|
|
1534
|
+
comments_count: z4.number().nullable().optional(),
|
|
1527
1535
|
tags: z4.array(tagSchema).optional(),
|
|
1528
1536
|
media: mediaCollection.optional(),
|
|
1529
1537
|
created_at: z4.string(),
|
|
1530
1538
|
updated_at: z4.string(),
|
|
1531
1539
|
can: z4.object({
|
|
1532
1540
|
view: zNullableBool,
|
|
1541
|
+
viewComments: zNullableBool,
|
|
1542
|
+
createComments: zNullableBool,
|
|
1533
1543
|
update: zNullableBool,
|
|
1534
1544
|
delete: zNullableBool,
|
|
1535
1545
|
setFlags: zNullableBool,
|
|
@@ -1613,8 +1623,8 @@ var prePaidPackageSchema = z4.object({
|
|
|
1613
1623
|
company: companySchema.optional(),
|
|
1614
1624
|
name: z4.string(),
|
|
1615
1625
|
description: z4.string().nullable().optional(),
|
|
1616
|
-
balance:
|
|
1617
|
-
initial_amount:
|
|
1626
|
+
balance: zMoneyObject,
|
|
1627
|
+
initial_amount: zMoneyObject,
|
|
1618
1628
|
discount_percentage: z4.number().nullable().optional(),
|
|
1619
1629
|
valid_until: z4.string().nullable().optional(),
|
|
1620
1630
|
created_at: z4.string(),
|
|
@@ -1630,7 +1640,7 @@ var prePaidPackageAssignmentSchema = z4.object({
|
|
|
1630
1640
|
flight_log_id: z4.number().nullable().optional(),
|
|
1631
1641
|
expense_item_id: z4.number().nullable().optional(),
|
|
1632
1642
|
pre_paid_package_id: z4.number().nullable().optional(),
|
|
1633
|
-
gross_total:
|
|
1643
|
+
gross_total: zMoneyObject.nullable().optional(),
|
|
1634
1644
|
created_at: z4.string().nullable().optional(),
|
|
1635
1645
|
updated_at: z4.string().nullable().optional()
|
|
1636
1646
|
});
|
|
@@ -1662,10 +1672,10 @@ var expenseItemSchema = z4.object({
|
|
|
1662
1672
|
company_id: z4.number(),
|
|
1663
1673
|
membership_id: z4.number(),
|
|
1664
1674
|
billing_profile_id: z4.number().nullable(),
|
|
1665
|
-
gross_total_before_vouchers:
|
|
1666
|
-
gross_total:
|
|
1667
|
-
net_total:
|
|
1668
|
-
tax_total:
|
|
1675
|
+
gross_total_before_vouchers: zMoneyObject,
|
|
1676
|
+
gross_total: zMoneyObject,
|
|
1677
|
+
net_total: zMoneyObject,
|
|
1678
|
+
tax_total: zMoneyObject,
|
|
1669
1679
|
// number_format(…, 2) string, not a number.
|
|
1670
1680
|
tax_percentage: z4.string(),
|
|
1671
1681
|
billable: z4.boolean(),
|
|
@@ -2561,7 +2571,7 @@ export {
|
|
|
2561
2571
|
zNullableBool,
|
|
2562
2572
|
zNetGross,
|
|
2563
2573
|
zContactDTO,
|
|
2564
|
-
|
|
2574
|
+
zMoneyObject,
|
|
2565
2575
|
contactAttributeSchema,
|
|
2566
2576
|
BaseModel,
|
|
2567
2577
|
mediaSchema,
|
|
@@ -2613,6 +2623,7 @@ export {
|
|
|
2613
2623
|
feeSchema,
|
|
2614
2624
|
feeCategoryOptionsSchema,
|
|
2615
2625
|
courseFeeSchema,
|
|
2626
|
+
fuelUnitSchema,
|
|
2616
2627
|
airplaneSchema,
|
|
2617
2628
|
aircraftPositionSchema,
|
|
2618
2629
|
airplaneShareInviteSchema,
|
|
@@ -2657,6 +2668,7 @@ export {
|
|
|
2657
2668
|
ticketSchema,
|
|
2658
2669
|
runwaySchema,
|
|
2659
2670
|
settingSchema,
|
|
2671
|
+
postSubjectSchema,
|
|
2660
2672
|
postSchema,
|
|
2661
2673
|
commentSchema,
|
|
2662
2674
|
airplaneIssueSeverityEnum,
|
package/dist/crew/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Crew configuration consumer for the MCRIT SDK.
|
|
3
3
|
*
|
|
4
4
|
* No crew-role data lives in this module — the canonical source is the
|
|
5
|
-
*
|
|
5
|
+
* server crew configuration, served via `GET /meta/crew`.
|
|
6
6
|
* Apps fetch the config once at boot, hand it to `createCrewValidator`,
|
|
7
7
|
* and use the returned validator to drive UI feedback on a live crew
|
|
8
8
|
* list.
|
package/dist/crew/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Crew configuration consumer for the MCRIT SDK.
|
|
3
3
|
*
|
|
4
4
|
* No crew-role data lives in this module — the canonical source is the
|
|
5
|
-
*
|
|
5
|
+
* server crew configuration, served via `GET /meta/crew`.
|
|
6
6
|
* Apps fetch the config once at boot, hand it to `createCrewValidator`,
|
|
7
7
|
* and use the returned validator to drive UI feedback on a live crew
|
|
8
8
|
* list.
|