@updraft-solutions/mcrit-sdk 0.14.6 → 0.14.9
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-RC7DU3ED.js → chunk-7BDZMKTO.js} +97 -1
- package/dist/{chunk-4S6QG75Y.cjs → chunk-HNDGMWM5.cjs} +97 -1
- package/dist/{fbo-BNakExWI.d.cts → fbo-BYdFXRZn.d.cts} +17252 -16751
- package/dist/{fbo-BNakExWI.d.ts → fbo-BYdFXRZn.d.ts} +17252 -16751
- package/dist/index.cjs +28 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -10
- package/dist/{operating-hours-Q2bwqbwy.d.cts → operating-hours-CSwAonXW.d.cts} +1 -1
- package/dist/{operating-hours-RI1V-uup.d.ts → operating-hours-DBu1OrvF.d.ts} +1 -1
- package/dist/schemas/index.cjs +24 -2
- package/dist/schemas/index.d.cts +121 -121
- package/dist/schemas/index.d.ts +121 -121
- package/dist/schemas/index.js +23 -1
- package/dist/types/index.d.cts +13 -3
- package/dist/types/index.d.ts +13 -3
- package/package.json +1 -1
- package/src/schemas/fbo.spec.ts +157 -0
- package/src/schemas/fbo.ts +126 -0
- package/src/types/fbo.ts +10 -0
package/dist/schemas/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
CreateSyllabusFromTemplateFormSchema,
|
|
18
18
|
DividerBlockSchema,
|
|
19
19
|
EnrollmentTrainingStatusEnum,
|
|
20
|
+
FBO_OPERATING_DAYS,
|
|
20
21
|
FBO_SYSTEM_ROLES,
|
|
21
22
|
FaqSchema,
|
|
22
23
|
FaqStatus,
|
|
@@ -136,6 +137,9 @@ import {
|
|
|
136
137
|
extendedAirplaneSchema,
|
|
137
138
|
fboAcceptanceAxisSchema,
|
|
138
139
|
fboAcceptanceStatusSchema,
|
|
140
|
+
fboActivityCauserSchema,
|
|
141
|
+
fboActivityChangesSchema,
|
|
142
|
+
fboActivitySchema,
|
|
139
143
|
fboCompanyMemberSchema,
|
|
140
144
|
fboCompanyProfileSchema,
|
|
141
145
|
fboDecisionAxisSchema,
|
|
@@ -149,16 +153,23 @@ import {
|
|
|
149
153
|
fboFlightStatusSchema,
|
|
150
154
|
fboFlightTypeSchema,
|
|
151
155
|
fboGroundServicesSchema,
|
|
156
|
+
fboLandingsSummarySchema,
|
|
157
|
+
fboMaterialiseResultSchema,
|
|
158
|
+
fboNextDutySchema,
|
|
152
159
|
fboOccupationSchema,
|
|
160
|
+
fboOperationsSchema,
|
|
153
161
|
fboRecurrenceSchema,
|
|
154
162
|
fboRecurrenceTypeSchema,
|
|
163
|
+
fboRecurringFlightSchema,
|
|
155
164
|
fboRoleSchema,
|
|
156
165
|
fboRowCanSchema,
|
|
166
|
+
fboStatisticsSchema,
|
|
157
167
|
fboSystemRoleSchema,
|
|
158
168
|
fboTrafficRowSchema,
|
|
159
169
|
fboTrafficRowTypeSchema,
|
|
160
170
|
fboTrafficSourceSchema,
|
|
161
171
|
fboVisibilitySchema,
|
|
172
|
+
fboWeeklyLandingSchema,
|
|
162
173
|
feeCategoryOptionsSchema,
|
|
163
174
|
feeSchema,
|
|
164
175
|
flightLogSchema,
|
|
@@ -216,7 +227,7 @@ import {
|
|
|
216
227
|
zMoneyObject,
|
|
217
228
|
zNetGross,
|
|
218
229
|
zNullableBool
|
|
219
|
-
} from "../chunk-
|
|
230
|
+
} from "../chunk-7BDZMKTO.js";
|
|
220
231
|
export {
|
|
221
232
|
ALLOWED_GEOMETRY_TYPES,
|
|
222
233
|
ALLOWED_NEWSLETTER_VARIABLES,
|
|
@@ -236,6 +247,7 @@ export {
|
|
|
236
247
|
CreateSyllabusFromTemplateFormSchema,
|
|
237
248
|
DividerBlockSchema,
|
|
238
249
|
EnrollmentTrainingStatusEnum,
|
|
250
|
+
FBO_OPERATING_DAYS,
|
|
239
251
|
FBO_SYSTEM_ROLES,
|
|
240
252
|
FaqSchema,
|
|
241
253
|
FaqStatus,
|
|
@@ -355,6 +367,9 @@ export {
|
|
|
355
367
|
extendedAirplaneSchema,
|
|
356
368
|
fboAcceptanceAxisSchema,
|
|
357
369
|
fboAcceptanceStatusSchema,
|
|
370
|
+
fboActivityCauserSchema,
|
|
371
|
+
fboActivityChangesSchema,
|
|
372
|
+
fboActivitySchema,
|
|
358
373
|
fboCompanyMemberSchema,
|
|
359
374
|
fboCompanyProfileSchema,
|
|
360
375
|
fboDecisionAxisSchema,
|
|
@@ -368,16 +383,23 @@ export {
|
|
|
368
383
|
fboFlightStatusSchema,
|
|
369
384
|
fboFlightTypeSchema,
|
|
370
385
|
fboGroundServicesSchema,
|
|
386
|
+
fboLandingsSummarySchema,
|
|
387
|
+
fboMaterialiseResultSchema,
|
|
388
|
+
fboNextDutySchema,
|
|
371
389
|
fboOccupationSchema,
|
|
390
|
+
fboOperationsSchema,
|
|
372
391
|
fboRecurrenceSchema,
|
|
373
392
|
fboRecurrenceTypeSchema,
|
|
393
|
+
fboRecurringFlightSchema,
|
|
374
394
|
fboRoleSchema,
|
|
375
395
|
fboRowCanSchema,
|
|
396
|
+
fboStatisticsSchema,
|
|
376
397
|
fboSystemRoleSchema,
|
|
377
398
|
fboTrafficRowSchema,
|
|
378
399
|
fboTrafficRowTypeSchema,
|
|
379
400
|
fboTrafficSourceSchema,
|
|
380
401
|
fboVisibilitySchema,
|
|
402
|
+
fboWeeklyLandingSchema,
|
|
381
403
|
feeCategoryOptionsSchema,
|
|
382
404
|
feeSchema,
|
|
383
405
|
flightLogSchema,
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { A as Activity, a as Address, b as AiSuggestedMilestone, c as AiSuggestion, d as AiSuggestionStatus, e as AircraftBlock, f as AircraftBlockReason, g as AircraftPosition, h as AircraftRating, i as Airplane, b0 as AirplaneIssue, b1 as AirplaneIssueSeverity, b2 as AirplaneIssueStatus, j as AirplanePermission, k as AirplaneShareInvite, l as Airport, m as Alert, n as AllowedDocumentType, o as ApiResponse, p as ApproachType, q as Avail, B as BackgroundTask, r as BackgroundTaskStatus, s as BaseMembership, b3 as BaseModel, t as Booking, C as Comment, u as Company, v as ComplianceData, w as ComplianceGroup, x as ComplianceGroupSource, y as ComplianceRequirement, z as ComplianceRequirementGroup, D as ComplianceResponse, E as ComplianceSummary, F as Course, b4 as CourseCheckSyllabus, G as CourseDescriptionSuggestionPayload, H as CourseEnrollment, b5 as CourseEnrollmentMetrics, I as CourseFee, J as CreateAirplaneIssueInput, K as CreateCommentInput, L as CreatePostInput, M as DataWrappedResponse, N as DeferAirplaneIssueInput, O as DiscardedRow, P as Document, Q as DocumentComplianceStatus, R as DocumentRequirement, S as DocumentRequirementGroup, T as DocumentRequirementGroupAssignment, U as DocumentShare, V as DocumentType, W as Event, X as Expense, Y as ExpenseItem, Z as ExtendedAirplane, _ as Fee, $ as FeeCategoryOptions, a0 as FlightLog, a1 as GroupedPermissions, a2 as Invoice, a3 as Landing, a4 as LandingFee, a5 as LandingFeeImportResult, a6 as LandingFeeInvoiceApplyPayload, a7 as LandingFeeInvoiceApplyResult, a8 as LandingFeeInvoicePreview, a9 as LandingFeeInvoicePreviewRow, aa as LandingFeeTemplateParams, ab as LogbookFlightLogPayload, ac as LogbookStageResult, ad as LogbookSuggestion, ae as LogbookSuggestionMeta, af as MaintenanceEvent, ag as MaintenanceEventEstimation, ah as MaintenanceStatus, b6 as Media, ai as MediaCollection, aj as Membership, ak as MembershipSignup, al as OperatingHourDay, am as OperatingHourException, an as OperatingHourExceptionInput, ao as OperatingHourInterval, ap as OperatingHourKind, aq as OperatingHourResolvedDate, ar as OperatingHourSchedule, as as OperatingHourScheduleInput, at as OperatingHourStatusEntry, au as OperatingHourWindow, av as OperatingHoursMeta, aw as OperatingHoursNextOpenEntry, ax as OperatingHoursNextOpenResponse, ay as OperatingHoursStatusResponse, az as OperatingStatusValue, aA as PaginatedResponse, aB as PermissionItem, aC as Post, aD as PostSubject, aE as PrePaidPackage, aF as Price, aG as Qualification, aH as RecurringFlight, aI as ResolveAirplaneIssueInput, aJ as Resource, aK as Role, aL as RoleDetail, aM as RoleListItem, aN as Runway, aO as ScheduledFlight, aP as Setting, aQ as SpecialFlight, aR as Tag, b7 as TagSyncEntry, aS as Ticket, aT as TimeAnchor, aU as ToggleFavoriteResponse, aV as UpdateAirplaneIssueInput, aW as UpdateCommentInput, aX as UpdatePostInput, aY as User, aZ as UserAircraftRating, a_ as UserQualification, a$ as Waypoint } from '../operating-hours-
|
|
1
|
+
export { A as Activity, a as Address, b as AiSuggestedMilestone, c as AiSuggestion, d as AiSuggestionStatus, e as AircraftBlock, f as AircraftBlockReason, g as AircraftPosition, h as AircraftRating, i as Airplane, b0 as AirplaneIssue, b1 as AirplaneIssueSeverity, b2 as AirplaneIssueStatus, j as AirplanePermission, k as AirplaneShareInvite, l as Airport, m as Alert, n as AllowedDocumentType, o as ApiResponse, p as ApproachType, q as Avail, B as BackgroundTask, r as BackgroundTaskStatus, s as BaseMembership, b3 as BaseModel, t as Booking, C as Comment, u as Company, v as ComplianceData, w as ComplianceGroup, x as ComplianceGroupSource, y as ComplianceRequirement, z as ComplianceRequirementGroup, D as ComplianceResponse, E as ComplianceSummary, F as Course, b4 as CourseCheckSyllabus, G as CourseDescriptionSuggestionPayload, H as CourseEnrollment, b5 as CourseEnrollmentMetrics, I as CourseFee, J as CreateAirplaneIssueInput, K as CreateCommentInput, L as CreatePostInput, M as DataWrappedResponse, N as DeferAirplaneIssueInput, O as DiscardedRow, P as Document, Q as DocumentComplianceStatus, R as DocumentRequirement, S as DocumentRequirementGroup, T as DocumentRequirementGroupAssignment, U as DocumentShare, V as DocumentType, W as Event, X as Expense, Y as ExpenseItem, Z as ExtendedAirplane, _ as Fee, $ as FeeCategoryOptions, a0 as FlightLog, a1 as GroupedPermissions, a2 as Invoice, a3 as Landing, a4 as LandingFee, a5 as LandingFeeImportResult, a6 as LandingFeeInvoiceApplyPayload, a7 as LandingFeeInvoiceApplyResult, a8 as LandingFeeInvoicePreview, a9 as LandingFeeInvoicePreviewRow, aa as LandingFeeTemplateParams, ab as LogbookFlightLogPayload, ac as LogbookStageResult, ad as LogbookSuggestion, ae as LogbookSuggestionMeta, af as MaintenanceEvent, ag as MaintenanceEventEstimation, ah as MaintenanceStatus, b6 as Media, ai as MediaCollection, aj as Membership, ak as MembershipSignup, al as OperatingHourDay, am as OperatingHourException, an as OperatingHourExceptionInput, ao as OperatingHourInterval, ap as OperatingHourKind, aq as OperatingHourResolvedDate, ar as OperatingHourSchedule, as as OperatingHourScheduleInput, at as OperatingHourStatusEntry, au as OperatingHourWindow, av as OperatingHoursMeta, aw as OperatingHoursNextOpenEntry, ax as OperatingHoursNextOpenResponse, ay as OperatingHoursStatusResponse, az as OperatingStatusValue, aA as PaginatedResponse, aB as PermissionItem, aC as Post, aD as PostSubject, aE as PrePaidPackage, aF as Price, aG as Qualification, aH as RecurringFlight, aI as ResolveAirplaneIssueInput, aJ as Resource, aK as Role, aL as RoleDetail, aM as RoleListItem, aN as Runway, aO as ScheduledFlight, aP as Setting, aQ as SpecialFlight, aR as Tag, b7 as TagSyncEntry, aS as Ticket, aT as TimeAnchor, aU as ToggleFavoriteResponse, aV as UpdateAirplaneIssueInput, aW as UpdateCommentInput, aX as UpdatePostInput, aY as User, aZ as UserAircraftRating, a_ as UserQualification, a$ as Waypoint } from '../operating-hours-CSwAonXW.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { bh as fboAcceptanceAxisSchema, bi as fboAcceptanceStatusSchema, bl as fboActivitySchema, bj as fboActivityCauserSchema, bk as fboActivityChangesSchema, bm as fboCompanyMemberSchema, bn as fboCompanyProfileSchema, bq as fboDecisionSchema, bo as fboDecisionAxisSchema, bp as fboDecisionInputSchema, bs as fboDutySchema, br as fboDutyAffectedSchema, bt as fboDutySeriesResponseSchema, bv as fboFlightSchema, bw as fboFlightStatusSchema, bx as fboFlightTypeSchema, by as fboGroundServicesSchema, bz as fboLandingsSummarySchema, bA as fboMaterialiseResultSchema, bB as fboNextDutySchema, bC as fboOccupationSchema, bD as fboOperationsSchema, bE as fboRecurrenceSchema, bF as fboRecurrenceTypeSchema, bG as fboRecurringFlightSchema, bH as fboRoleSchema, bJ as fboStatisticsSchema, bK as fboSystemRoleSchema, bL as fboTrafficRowSchema, bN as fboTrafficSourceSchema, bO as fboVisibilitySchema, bP as fboWeeklyLandingSchema } from '../fbo-BYdFXRZn.cjs';
|
|
4
4
|
|
|
5
5
|
type FboAcceptanceAxis = z.infer<typeof fboAcceptanceAxisSchema>;
|
|
6
6
|
type FboAcceptanceStatus = z.infer<typeof fboAcceptanceStatusSchema>;
|
|
7
7
|
type FboGroundServices = z.infer<typeof fboGroundServicesSchema>;
|
|
8
8
|
type FboFlightType = z.infer<typeof fboFlightTypeSchema>;
|
|
9
9
|
type FboFlightStatus = z.infer<typeof fboFlightStatusSchema>;
|
|
10
|
+
type FboOperations = z.infer<typeof fboOperationsSchema>;
|
|
10
11
|
type FboFlight = z.infer<typeof fboFlightSchema>;
|
|
11
12
|
type FboOccupation = z.infer<typeof fboOccupationSchema>;
|
|
12
13
|
type FboDuty = z.infer<typeof fboDutySchema>;
|
|
@@ -24,5 +25,14 @@ type FboTrafficSource = z.infer<typeof fboTrafficSourceSchema>;
|
|
|
24
25
|
type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
|
|
25
26
|
type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
|
|
26
27
|
type FboCompanyMember = z.infer<typeof fboCompanyMemberSchema>;
|
|
28
|
+
type FboNextDuty = z.infer<typeof fboNextDutySchema>;
|
|
29
|
+
type FboWeeklyLanding = z.infer<typeof fboWeeklyLandingSchema>;
|
|
30
|
+
type FboLandingsSummary = z.infer<typeof fboLandingsSummarySchema>;
|
|
31
|
+
type FboStatistics = z.infer<typeof fboStatisticsSchema>;
|
|
32
|
+
type FboActivityCauser = z.infer<typeof fboActivityCauserSchema>;
|
|
33
|
+
type FboActivityChanges = z.infer<typeof fboActivityChangesSchema>;
|
|
34
|
+
type FboActivity = z.infer<typeof fboActivitySchema>;
|
|
35
|
+
type FboRecurringFlight = z.infer<typeof fboRecurringFlightSchema>;
|
|
36
|
+
type FboMaterialiseResult = z.infer<typeof fboMaterialiseResultSchema>;
|
|
27
37
|
|
|
28
|
-
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, FboRecurrence, FboRecurrenceType, FboRole, FboSystemRole, FboTrafficRow, FboTrafficSource, FboVisibility };
|
|
38
|
+
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboActivity, FboActivityCauser, FboActivityChanges, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboLandingsSummary, FboMaterialiseResult, FboNextDuty, FboOccupation, FboOperations, FboRecurrence, FboRecurrenceType, FboRecurringFlight, FboRole, FboStatistics, FboSystemRole, FboTrafficRow, FboTrafficSource, FboVisibility, FboWeeklyLanding };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export { A as Activity, a as Address, b as AiSuggestedMilestone, c as AiSuggestion, d as AiSuggestionStatus, e as AircraftBlock, f as AircraftBlockReason, g as AircraftPosition, h as AircraftRating, i as Airplane, b0 as AirplaneIssue, b1 as AirplaneIssueSeverity, b2 as AirplaneIssueStatus, j as AirplanePermission, k as AirplaneShareInvite, l as Airport, m as Alert, n as AllowedDocumentType, o as ApiResponse, p as ApproachType, q as Avail, B as BackgroundTask, r as BackgroundTaskStatus, s as BaseMembership, b3 as BaseModel, t as Booking, C as Comment, u as Company, v as ComplianceData, w as ComplianceGroup, x as ComplianceGroupSource, y as ComplianceRequirement, z as ComplianceRequirementGroup, D as ComplianceResponse, E as ComplianceSummary, F as Course, b4 as CourseCheckSyllabus, G as CourseDescriptionSuggestionPayload, H as CourseEnrollment, b5 as CourseEnrollmentMetrics, I as CourseFee, J as CreateAirplaneIssueInput, K as CreateCommentInput, L as CreatePostInput, M as DataWrappedResponse, N as DeferAirplaneIssueInput, O as DiscardedRow, P as Document, Q as DocumentComplianceStatus, R as DocumentRequirement, S as DocumentRequirementGroup, T as DocumentRequirementGroupAssignment, U as DocumentShare, V as DocumentType, W as Event, X as Expense, Y as ExpenseItem, Z as ExtendedAirplane, _ as Fee, $ as FeeCategoryOptions, a0 as FlightLog, a1 as GroupedPermissions, a2 as Invoice, a3 as Landing, a4 as LandingFee, a5 as LandingFeeImportResult, a6 as LandingFeeInvoiceApplyPayload, a7 as LandingFeeInvoiceApplyResult, a8 as LandingFeeInvoicePreview, a9 as LandingFeeInvoicePreviewRow, aa as LandingFeeTemplateParams, ab as LogbookFlightLogPayload, ac as LogbookStageResult, ad as LogbookSuggestion, ae as LogbookSuggestionMeta, af as MaintenanceEvent, ag as MaintenanceEventEstimation, ah as MaintenanceStatus, b6 as Media, ai as MediaCollection, aj as Membership, ak as MembershipSignup, al as OperatingHourDay, am as OperatingHourException, an as OperatingHourExceptionInput, ao as OperatingHourInterval, ap as OperatingHourKind, aq as OperatingHourResolvedDate, ar as OperatingHourSchedule, as as OperatingHourScheduleInput, at as OperatingHourStatusEntry, au as OperatingHourWindow, av as OperatingHoursMeta, aw as OperatingHoursNextOpenEntry, ax as OperatingHoursNextOpenResponse, ay as OperatingHoursStatusResponse, az as OperatingStatusValue, aA as PaginatedResponse, aB as PermissionItem, aC as Post, aD as PostSubject, aE as PrePaidPackage, aF as Price, aG as Qualification, aH as RecurringFlight, aI as ResolveAirplaneIssueInput, aJ as Resource, aK as Role, aL as RoleDetail, aM as RoleListItem, aN as Runway, aO as ScheduledFlight, aP as Setting, aQ as SpecialFlight, aR as Tag, b7 as TagSyncEntry, aS as Ticket, aT as TimeAnchor, aU as ToggleFavoriteResponse, aV as UpdateAirplaneIssueInput, aW as UpdateCommentInput, aX as UpdatePostInput, aY as User, aZ as UserAircraftRating, a_ as UserQualification, a$ as Waypoint } from '../operating-hours-
|
|
1
|
+
export { A as Activity, a as Address, b as AiSuggestedMilestone, c as AiSuggestion, d as AiSuggestionStatus, e as AircraftBlock, f as AircraftBlockReason, g as AircraftPosition, h as AircraftRating, i as Airplane, b0 as AirplaneIssue, b1 as AirplaneIssueSeverity, b2 as AirplaneIssueStatus, j as AirplanePermission, k as AirplaneShareInvite, l as Airport, m as Alert, n as AllowedDocumentType, o as ApiResponse, p as ApproachType, q as Avail, B as BackgroundTask, r as BackgroundTaskStatus, s as BaseMembership, b3 as BaseModel, t as Booking, C as Comment, u as Company, v as ComplianceData, w as ComplianceGroup, x as ComplianceGroupSource, y as ComplianceRequirement, z as ComplianceRequirementGroup, D as ComplianceResponse, E as ComplianceSummary, F as Course, b4 as CourseCheckSyllabus, G as CourseDescriptionSuggestionPayload, H as CourseEnrollment, b5 as CourseEnrollmentMetrics, I as CourseFee, J as CreateAirplaneIssueInput, K as CreateCommentInput, L as CreatePostInput, M as DataWrappedResponse, N as DeferAirplaneIssueInput, O as DiscardedRow, P as Document, Q as DocumentComplianceStatus, R as DocumentRequirement, S as DocumentRequirementGroup, T as DocumentRequirementGroupAssignment, U as DocumentShare, V as DocumentType, W as Event, X as Expense, Y as ExpenseItem, Z as ExtendedAirplane, _ as Fee, $ as FeeCategoryOptions, a0 as FlightLog, a1 as GroupedPermissions, a2 as Invoice, a3 as Landing, a4 as LandingFee, a5 as LandingFeeImportResult, a6 as LandingFeeInvoiceApplyPayload, a7 as LandingFeeInvoiceApplyResult, a8 as LandingFeeInvoicePreview, a9 as LandingFeeInvoicePreviewRow, aa as LandingFeeTemplateParams, ab as LogbookFlightLogPayload, ac as LogbookStageResult, ad as LogbookSuggestion, ae as LogbookSuggestionMeta, af as MaintenanceEvent, ag as MaintenanceEventEstimation, ah as MaintenanceStatus, b6 as Media, ai as MediaCollection, aj as Membership, ak as MembershipSignup, al as OperatingHourDay, am as OperatingHourException, an as OperatingHourExceptionInput, ao as OperatingHourInterval, ap as OperatingHourKind, aq as OperatingHourResolvedDate, ar as OperatingHourSchedule, as as OperatingHourScheduleInput, at as OperatingHourStatusEntry, au as OperatingHourWindow, av as OperatingHoursMeta, aw as OperatingHoursNextOpenEntry, ax as OperatingHoursNextOpenResponse, ay as OperatingHoursStatusResponse, az as OperatingStatusValue, aA as PaginatedResponse, aB as PermissionItem, aC as Post, aD as PostSubject, aE as PrePaidPackage, aF as Price, aG as Qualification, aH as RecurringFlight, aI as ResolveAirplaneIssueInput, aJ as Resource, aK as Role, aL as RoleDetail, aM as RoleListItem, aN as Runway, aO as ScheduledFlight, aP as Setting, aQ as SpecialFlight, aR as Tag, b7 as TagSyncEntry, aS as Ticket, aT as TimeAnchor, aU as ToggleFavoriteResponse, aV as UpdateAirplaneIssueInput, aW as UpdateCommentInput, aX as UpdatePostInput, aY as User, aZ as UserAircraftRating, a_ as UserQualification, a$ as Waypoint } from '../operating-hours-DBu1OrvF.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { bh as fboAcceptanceAxisSchema, bi as fboAcceptanceStatusSchema, bl as fboActivitySchema, bj as fboActivityCauserSchema, bk as fboActivityChangesSchema, bm as fboCompanyMemberSchema, bn as fboCompanyProfileSchema, bq as fboDecisionSchema, bo as fboDecisionAxisSchema, bp as fboDecisionInputSchema, bs as fboDutySchema, br as fboDutyAffectedSchema, bt as fboDutySeriesResponseSchema, bv as fboFlightSchema, bw as fboFlightStatusSchema, bx as fboFlightTypeSchema, by as fboGroundServicesSchema, bz as fboLandingsSummarySchema, bA as fboMaterialiseResultSchema, bB as fboNextDutySchema, bC as fboOccupationSchema, bD as fboOperationsSchema, bE as fboRecurrenceSchema, bF as fboRecurrenceTypeSchema, bG as fboRecurringFlightSchema, bH as fboRoleSchema, bJ as fboStatisticsSchema, bK as fboSystemRoleSchema, bL as fboTrafficRowSchema, bN as fboTrafficSourceSchema, bO as fboVisibilitySchema, bP as fboWeeklyLandingSchema } from '../fbo-BYdFXRZn.js';
|
|
4
4
|
|
|
5
5
|
type FboAcceptanceAxis = z.infer<typeof fboAcceptanceAxisSchema>;
|
|
6
6
|
type FboAcceptanceStatus = z.infer<typeof fboAcceptanceStatusSchema>;
|
|
7
7
|
type FboGroundServices = z.infer<typeof fboGroundServicesSchema>;
|
|
8
8
|
type FboFlightType = z.infer<typeof fboFlightTypeSchema>;
|
|
9
9
|
type FboFlightStatus = z.infer<typeof fboFlightStatusSchema>;
|
|
10
|
+
type FboOperations = z.infer<typeof fboOperationsSchema>;
|
|
10
11
|
type FboFlight = z.infer<typeof fboFlightSchema>;
|
|
11
12
|
type FboOccupation = z.infer<typeof fboOccupationSchema>;
|
|
12
13
|
type FboDuty = z.infer<typeof fboDutySchema>;
|
|
@@ -24,5 +25,14 @@ type FboTrafficSource = z.infer<typeof fboTrafficSourceSchema>;
|
|
|
24
25
|
type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
|
|
25
26
|
type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
|
|
26
27
|
type FboCompanyMember = z.infer<typeof fboCompanyMemberSchema>;
|
|
28
|
+
type FboNextDuty = z.infer<typeof fboNextDutySchema>;
|
|
29
|
+
type FboWeeklyLanding = z.infer<typeof fboWeeklyLandingSchema>;
|
|
30
|
+
type FboLandingsSummary = z.infer<typeof fboLandingsSummarySchema>;
|
|
31
|
+
type FboStatistics = z.infer<typeof fboStatisticsSchema>;
|
|
32
|
+
type FboActivityCauser = z.infer<typeof fboActivityCauserSchema>;
|
|
33
|
+
type FboActivityChanges = z.infer<typeof fboActivityChangesSchema>;
|
|
34
|
+
type FboActivity = z.infer<typeof fboActivitySchema>;
|
|
35
|
+
type FboRecurringFlight = z.infer<typeof fboRecurringFlightSchema>;
|
|
36
|
+
type FboMaterialiseResult = z.infer<typeof fboMaterialiseResultSchema>;
|
|
27
37
|
|
|
28
|
-
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, FboRecurrence, FboRecurrenceType, FboRole, FboSystemRole, FboTrafficRow, FboTrafficSource, FboVisibility };
|
|
38
|
+
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboActivity, FboActivityCauser, FboActivityChanges, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboLandingsSummary, FboMaterialiseResult, FboNextDuty, FboOccupation, FboOperations, FboRecurrence, FboRecurrenceType, FboRecurringFlight, FboRole, FboStatistics, FboSystemRole, FboTrafficRow, FboTrafficSource, FboVisibility, FboWeeklyLanding };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@updraft-solutions/mcrit-sdk",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.9",
|
|
4
4
|
"description": "Shared TypeScript types, Zod schemas, and pure helpers for the MCRIT aviation fleet management platform",
|
|
5
5
|
"homepage": "https://github.com/updraft-solutions/mcrit-sdk#readme",
|
|
6
6
|
"bugs": {
|
package/src/schemas/fbo.spec.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import {
|
|
3
|
+
fboActivitySchema,
|
|
3
4
|
fboCompanyMemberSchema,
|
|
4
5
|
fboDutyAffectedSchema,
|
|
5
6
|
fboDutySchema,
|
|
6
7
|
fboDutySeriesResponseSchema,
|
|
7
8
|
fboFlightSchema,
|
|
8
9
|
fboFlightStatusSchema,
|
|
10
|
+
fboMaterialiseResultSchema,
|
|
9
11
|
fboOccupationSchema,
|
|
12
|
+
fboOperationsSchema,
|
|
10
13
|
fboRecurrenceSchema,
|
|
14
|
+
fboRecurringFlightSchema,
|
|
15
|
+
fboStatisticsSchema,
|
|
11
16
|
fboSystemRoleSchema,
|
|
12
17
|
fboTrafficRowSchema,
|
|
13
18
|
} from "./fbo";
|
|
@@ -31,6 +36,9 @@ const flightPayload = {
|
|
|
31
36
|
airport: { status: "unknown", is_required: false, decided_by_id: null, updated_at: null },
|
|
32
37
|
customs: { status: "unknown", is_required: false, decided_by_id: null, updated_at: null },
|
|
33
38
|
},
|
|
39
|
+
operations: null,
|
|
40
|
+
batch_uuid: null,
|
|
41
|
+
legs_count: 1,
|
|
34
42
|
created_at: "2026-08-26T10:00:00.000000Z", updated_at: "2026-08-26T10:00:00.000000Z",
|
|
35
43
|
};
|
|
36
44
|
|
|
@@ -194,3 +202,152 @@ describe("fboSystemRoleSchema", () => {
|
|
|
194
202
|
expect(fboSystemRoleSchema.safeParse("admin").success).toBe(false);
|
|
195
203
|
});
|
|
196
204
|
});
|
|
205
|
+
|
|
206
|
+
const weekly = [
|
|
207
|
+
{ date: "2026-08-24", count: 2 },
|
|
208
|
+
{ date: "2026-08-25", count: 0 },
|
|
209
|
+
{ date: "2026-08-26", count: 5 },
|
|
210
|
+
{ date: "2026-08-27", count: 1 },
|
|
211
|
+
{ date: "2026-08-28", count: 3 },
|
|
212
|
+
{ date: "2026-08-29", count: 0 },
|
|
213
|
+
{ date: "2026-08-30", count: 4 },
|
|
214
|
+
];
|
|
215
|
+
|
|
216
|
+
describe("fboStatisticsSchema", () => {
|
|
217
|
+
it("parses statistics with a next duty", () => {
|
|
218
|
+
const payload = {
|
|
219
|
+
landings: { today: 3, this_year: 120, last_year: 98 },
|
|
220
|
+
next_duty: { start: "2026-08-28T18:00:00.000000Z", end: "2026-08-28T23:00:00.000000Z", occupation: "Tower" },
|
|
221
|
+
weekly,
|
|
222
|
+
};
|
|
223
|
+
const parsed = fboStatisticsSchema.parse(payload);
|
|
224
|
+
expect(parsed.next_duty?.occupation).toBe("Tower");
|
|
225
|
+
expect(parsed.weekly).toHaveLength(7);
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it("parses statistics with next_duty: null — no upcoming duty in the subtree", () => {
|
|
229
|
+
const payload = {
|
|
230
|
+
landings: { today: 0, this_year: 0, last_year: 0 },
|
|
231
|
+
next_duty: null,
|
|
232
|
+
weekly,
|
|
233
|
+
};
|
|
234
|
+
expect(fboStatisticsSchema.parse(payload).next_duty).toBeNull();
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
describe("fboActivitySchema", () => {
|
|
239
|
+
it("parses an activity row with a causer", () => {
|
|
240
|
+
const payload = {
|
|
241
|
+
id: 1,
|
|
242
|
+
description: "updated",
|
|
243
|
+
event: "updated",
|
|
244
|
+
causer: { id: 7, name: "Erika Muster" },
|
|
245
|
+
subject_type: "ScheduledFlight",
|
|
246
|
+
subject_id: 44796,
|
|
247
|
+
changes: { attributes: { flight_status: "active" }, old: { flight_status: "pending" } },
|
|
248
|
+
created_at: "2026-08-26T10:00:00.000000Z",
|
|
249
|
+
};
|
|
250
|
+
const parsed = fboActivitySchema.parse(payload);
|
|
251
|
+
expect(parsed.causer?.name).toBe("Erika Muster");
|
|
252
|
+
expect(parsed.changes.old.flight_status).toBe("pending");
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it("parses an activity row with causer: null — a system-caused change", () => {
|
|
256
|
+
const payload = {
|
|
257
|
+
id: 2,
|
|
258
|
+
description: "created",
|
|
259
|
+
event: "created",
|
|
260
|
+
causer: null,
|
|
261
|
+
subject_type: "Duty",
|
|
262
|
+
subject_id: 12,
|
|
263
|
+
changes: { attributes: { start: "2026-08-28T18:00:00.000000Z" }, old: {} },
|
|
264
|
+
created_at: "2026-08-26T10:00:00.000000Z",
|
|
265
|
+
};
|
|
266
|
+
expect(fboActivitySchema.parse(payload).causer).toBeNull();
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
describe("fboOperationsSchema", () => {
|
|
271
|
+
it("parses a dropzone window with an apron note", () => {
|
|
272
|
+
const payload = { dz_start: "2026-09-01T09:00:00.000000Z", dz_end: "2026-09-01T09:20:00.000000Z", apron: "North apron" };
|
|
273
|
+
expect(fboOperationsSchema.parse(payload).apron).toBe("North apron");
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
it("parses all-null operations", () => {
|
|
277
|
+
const payload = { dz_start: null, dz_end: null, apron: null };
|
|
278
|
+
expect(fboOperationsSchema.parse(payload).dz_start).toBeNull();
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
describe("fboFlightSchema — operations, batch, legs, and decider-only fields", () => {
|
|
283
|
+
it("parses a flight with a dropzone window", () => {
|
|
284
|
+
const withOps = { ...flightPayload, operations: { dz_start: "2026-09-01T09:00:00.000000Z", dz_end: null, apron: "Apron 3" } };
|
|
285
|
+
expect(fboFlightSchema.parse(withOps).operations?.apron).toBe("Apron 3");
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
it("parses a flight that is one leg of a batch", () => {
|
|
289
|
+
const leg = { ...flightPayload, batch_uuid: "0f1b3d5e-0000-4000-8000-000000000099", legs_count: 3 };
|
|
290
|
+
const parsed = fboFlightSchema.parse(leg);
|
|
291
|
+
expect(parsed.batch_uuid).toBe("0f1b3d5e-0000-4000-8000-000000000099");
|
|
292
|
+
expect(parsed.legs_count).toBe(3);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
it("omits fbo_notes and assigned_user_ids for a non-decider — the API leaves the keys out entirely", () => {
|
|
296
|
+
const parsed = fboFlightSchema.parse(flightPayload);
|
|
297
|
+
expect(parsed.fbo_notes).toBeUndefined();
|
|
298
|
+
expect(parsed.assigned_user_ids).toBeUndefined();
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
it("parses fbo_notes and assigned_user_ids when the requester is a decider", () => {
|
|
302
|
+
const decided = { ...flightPayload, fbo_notes: "Fuel truck delayed", assigned_user_ids: [7, 12] };
|
|
303
|
+
const parsed = fboFlightSchema.parse(decided);
|
|
304
|
+
expect(parsed.fbo_notes).toBe("Fuel truck delayed");
|
|
305
|
+
expect(parsed.assigned_user_ids).toEqual([7, 12]);
|
|
306
|
+
});
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
const recurringFlightPayload = {
|
|
310
|
+
id: 5,
|
|
311
|
+
company_id: 34,
|
|
312
|
+
ac_call: "DEABC",
|
|
313
|
+
ac_reg: null,
|
|
314
|
+
ac_type: "C172",
|
|
315
|
+
operator: "PrivateWings",
|
|
316
|
+
departure_airport_id: 2753,
|
|
317
|
+
destination_airport_id: null,
|
|
318
|
+
dep_time: "08:00",
|
|
319
|
+
arr_time: null,
|
|
320
|
+
operating_days: [1, 3, 5],
|
|
321
|
+
timezone: "Europe/Berlin",
|
|
322
|
+
ifr: false,
|
|
323
|
+
wx: false,
|
|
324
|
+
landings: 1,
|
|
325
|
+
remarks: null,
|
|
326
|
+
author_id: 3,
|
|
327
|
+
created_at: "2026-08-26T10:00:00.000000Z",
|
|
328
|
+
updated_at: "2026-08-26T10:00:00.000000Z",
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
describe("fboRecurringFlightSchema", () => {
|
|
332
|
+
it("parses a Mon/Wed/Fri template", () => {
|
|
333
|
+
const parsed = fboRecurringFlightSchema.parse(recurringFlightPayload);
|
|
334
|
+
expect(parsed.operating_days).toEqual([1, 3, 5]);
|
|
335
|
+
expect(parsed.dep_time).toBe("08:00");
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
it("parses a template with can{}", () => {
|
|
339
|
+
const withCan = { ...recurringFlightPayload, can: { update: true, delete: false } };
|
|
340
|
+
expect(fboRecurringFlightSchema.parse(withCan).can).toEqual({ update: true, delete: false });
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
it("rejects an operating day outside 1..7 shape being a string", () => {
|
|
344
|
+
expect(fboRecurringFlightSchema.safeParse({ ...recurringFlightPayload, operating_days: "135" }).success).toBe(false);
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
describe("fboMaterialiseResultSchema", () => {
|
|
349
|
+
it("parses a materialise-week response", () => {
|
|
350
|
+
const payload = { created: 3, skipped_existing: 0, skipped_closed: 1 };
|
|
351
|
+
expect(fboMaterialiseResultSchema.parse(payload)).toEqual(payload);
|
|
352
|
+
});
|
|
353
|
+
});
|
package/src/schemas/fbo.ts
CHANGED
|
@@ -40,6 +40,17 @@ export const fboGroundServicesSchema = z.object({
|
|
|
40
40
|
export const fboFlightTypeSchema = z.enum(["scheduledFlight", "ppr"]);
|
|
41
41
|
export const fboFlightStatusSchema = z.enum(["active", "pending", "rejected", "cancelled"]);
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Dropzone window and apron note — `OperationsData`'s shape, a schemaless
|
|
45
|
+
* attribute on the flight. Own/details tiers only (`TrafficMovementResource::DETAILS_KEYS`);
|
|
46
|
+
* `limited` traffic rows never carry it. `dz_start`/`dz_end` are ISO UTC.
|
|
47
|
+
*/
|
|
48
|
+
export const fboOperationsSchema = z.object({
|
|
49
|
+
dz_start: z.string().nullable(),
|
|
50
|
+
dz_end: z.string().nullable(),
|
|
51
|
+
apron: z.string().nullable(),
|
|
52
|
+
});
|
|
53
|
+
|
|
43
54
|
/** Per-row action gates on a flight. Optional for forward-compat; every current FBO row sends it. */
|
|
44
55
|
export const fboFlightCanSchema = z.object({
|
|
45
56
|
update: z.boolean(),
|
|
@@ -87,6 +98,20 @@ export const fboFlightSchema = z.object({
|
|
|
87
98
|
ground_services: fboGroundServicesSchema.nullable(),
|
|
88
99
|
acceptance_status: fboAcceptanceStatusSchema,
|
|
89
100
|
|
|
101
|
+
/** Own/details tier. `null` when neither dropzone window nor apron is set. */
|
|
102
|
+
operations: fboOperationsSchema.nullable(),
|
|
103
|
+
/** Ties every leg of a multi-leg PPR (or a materialised recurring batch) together; `null` on a standalone flight. */
|
|
104
|
+
batch_uuid: z.string().nullable(),
|
|
105
|
+
/** Count of live rows sharing `batch_uuid`; `1` when `batch_uuid` is null. */
|
|
106
|
+
legs_count: z.number(),
|
|
107
|
+
/**
|
|
108
|
+
* Root tier — present only when the requesting user holds `fbo.flight.decide`
|
|
109
|
+
* for the row's company; absent (key omitted) for everyone else, including
|
|
110
|
+
* traffic-board `details`/`limited` viewers. Writable only by deciders.
|
|
111
|
+
*/
|
|
112
|
+
fbo_notes: z.string().nullable().optional(),
|
|
113
|
+
assigned_user_ids: z.array(z.number()).optional(),
|
|
114
|
+
|
|
90
115
|
/**
|
|
91
116
|
* Where the row comes from: the FBO's own filing (`fbo`, default) or a
|
|
92
117
|
* flight-school booking of a company assigned to the FBO (`booking`) —
|
|
@@ -239,3 +264,104 @@ export const fboCompanyMemberSchema = z.object({
|
|
|
239
264
|
roles: z.array(z.string()),
|
|
240
265
|
can: fboRowCanSchema.optional(),
|
|
241
266
|
});
|
|
267
|
+
|
|
268
|
+
/** The caller's next duty (from now) in the subtree — `GET fbo/statistics`'s `next_duty`. */
|
|
269
|
+
export const fboNextDutySchema = z.object({
|
|
270
|
+
start: z.string(),
|
|
271
|
+
end: z.string(),
|
|
272
|
+
occupation: z.string().nullable(),
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
/** One day's landing count in `GET fbo/statistics`'s `weekly` (ISO week of the queried date, 7 entries). */
|
|
276
|
+
export const fboWeeklyLandingSchema = z.object({
|
|
277
|
+
date: z.string(),
|
|
278
|
+
count: z.number(),
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
/** `GET fbo/statistics`'s `landings` block — home-side landings in the root's timezone. */
|
|
282
|
+
export const fboLandingsSummarySchema = z.object({
|
|
283
|
+
today: z.number(),
|
|
284
|
+
this_year: z.number(),
|
|
285
|
+
last_year: z.number(),
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* `GET companies/{id}/fbo/statistics?date=`. `next_duty` is `null` when the
|
|
290
|
+
* caller has no upcoming duty in the subtree.
|
|
291
|
+
*/
|
|
292
|
+
export const fboStatisticsSchema = z.object({
|
|
293
|
+
landings: fboLandingsSummarySchema,
|
|
294
|
+
next_duty: fboNextDutySchema.nullable(),
|
|
295
|
+
weekly: z.array(fboWeeklyLandingSchema),
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
/** Identity tier only — `ActivityResource`'s `causer` block. */
|
|
299
|
+
export const fboActivityCauserSchema = z.object({
|
|
300
|
+
id: z.number(),
|
|
301
|
+
name: z.string(),
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
/** Logged attribute diff — only the keys `LogOptions` actually recorded (never `pobs`/`contact`/`fbo_notes`). */
|
|
305
|
+
export const fboActivityChangesSchema = z.object({
|
|
306
|
+
attributes: z.record(z.string(), z.unknown()),
|
|
307
|
+
old: z.record(z.string(), z.unknown()),
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* One activity-log row over an FBO model (`ScheduledFlight`, `Duty`,
|
|
312
|
+
* `Occupation`, `CompanyProfile`) — `GET fbo/flights/{id}?include=activities`
|
|
313
|
+
* and `GET fbo/activities`. Distinct from the generic `activitySchema` in
|
|
314
|
+
* `models.ts`: this shape carries `changes` (attributes/old) instead of
|
|
315
|
+
* `properties`, and a trimmed `{id, name}` `causer` instead of a full user.
|
|
316
|
+
*/
|
|
317
|
+
export const fboActivitySchema = z.object({
|
|
318
|
+
id: z.number(),
|
|
319
|
+
description: z.string(),
|
|
320
|
+
event: z.string().nullable(),
|
|
321
|
+
causer: fboActivityCauserSchema.nullable(),
|
|
322
|
+
subject_type: z.string(),
|
|
323
|
+
subject_id: z.number(),
|
|
324
|
+
changes: fboActivityChangesSchema,
|
|
325
|
+
created_at: z.string(),
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
/** ISO weekday numbering (1 = Monday … 7 = Sunday) used by `RecurringFlight.operating_days`. */
|
|
329
|
+
export const FBO_OPERATING_DAYS = [1, 2, 3, 4, 5, 6, 7] as const;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* A per-tenant recurring flight template (the generalised PrivateWings
|
|
333
|
+
* timetable) — `RecurringFlightResource`. `dep_time`/`arr_time` are local
|
|
334
|
+
* `HH:MM` in `timezone`; `POST …/recurring-flights/materialise` expands a
|
|
335
|
+
* template's `operating_days` (ISO 1..7) over an ISO week into real flights.
|
|
336
|
+
*/
|
|
337
|
+
export const fboRecurringFlightSchema = z.object({
|
|
338
|
+
id: z.number(),
|
|
339
|
+
company_id: z.number(),
|
|
340
|
+
ac_call: z.string().nullable(),
|
|
341
|
+
ac_reg: z.string().nullable(),
|
|
342
|
+
ac_type: z.string().nullable(),
|
|
343
|
+
operator: z.string().nullable(),
|
|
344
|
+
departure_airport_id: z.number().nullable(),
|
|
345
|
+
departure_airport: airportSchema.optional(),
|
|
346
|
+
destination_airport_id: z.number().nullable(),
|
|
347
|
+
destination_airport: airportSchema.optional(),
|
|
348
|
+
dep_time: z.string().nullable(),
|
|
349
|
+
arr_time: z.string().nullable(),
|
|
350
|
+
operating_days: z.array(z.number()),
|
|
351
|
+
timezone: z.string(),
|
|
352
|
+
ifr: z.boolean(),
|
|
353
|
+
wx: z.boolean(),
|
|
354
|
+
landings: z.number().nullable(),
|
|
355
|
+
remarks: z.string().nullable(),
|
|
356
|
+
author_id: z.number().nullable(),
|
|
357
|
+
created_at: z.string(),
|
|
358
|
+
updated_at: z.string(),
|
|
359
|
+
can: fboRowCanSchema.optional(),
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
/** `POST …/recurring-flights/materialise` response — counts over the requested week. */
|
|
363
|
+
export const fboMaterialiseResultSchema = z.object({
|
|
364
|
+
created: z.number(),
|
|
365
|
+
skipped_existing: z.number(),
|
|
366
|
+
skipped_closed: z.number(),
|
|
367
|
+
});
|
package/src/types/fbo.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type FboAcceptanceStatus = z.infer<typeof Fbo.fboAcceptanceStatusSchema>;
|
|
|
6
6
|
export type FboGroundServices = z.infer<typeof Fbo.fboGroundServicesSchema>;
|
|
7
7
|
export type FboFlightType = z.infer<typeof Fbo.fboFlightTypeSchema>;
|
|
8
8
|
export type FboFlightStatus = z.infer<typeof Fbo.fboFlightStatusSchema>;
|
|
9
|
+
export type FboOperations = z.infer<typeof Fbo.fboOperationsSchema>;
|
|
9
10
|
export type FboFlight = z.infer<typeof Fbo.fboFlightSchema>;
|
|
10
11
|
export type FboOccupation = z.infer<typeof Fbo.fboOccupationSchema>;
|
|
11
12
|
export type FboDuty = z.infer<typeof Fbo.fboDutySchema>;
|
|
@@ -23,3 +24,12 @@ export type FboTrafficSource = z.infer<typeof Fbo.fboTrafficSourceSchema>;
|
|
|
23
24
|
export type FboTrafficRow = z.infer<typeof Fbo.fboTrafficRowSchema>;
|
|
24
25
|
export type FboSystemRole = z.infer<typeof Fbo.fboSystemRoleSchema>;
|
|
25
26
|
export type FboCompanyMember = z.infer<typeof Fbo.fboCompanyMemberSchema>;
|
|
27
|
+
export type FboNextDuty = z.infer<typeof Fbo.fboNextDutySchema>;
|
|
28
|
+
export type FboWeeklyLanding = z.infer<typeof Fbo.fboWeeklyLandingSchema>;
|
|
29
|
+
export type FboLandingsSummary = z.infer<typeof Fbo.fboLandingsSummarySchema>;
|
|
30
|
+
export type FboStatistics = z.infer<typeof Fbo.fboStatisticsSchema>;
|
|
31
|
+
export type FboActivityCauser = z.infer<typeof Fbo.fboActivityCauserSchema>;
|
|
32
|
+
export type FboActivityChanges = z.infer<typeof Fbo.fboActivityChangesSchema>;
|
|
33
|
+
export type FboActivity = z.infer<typeof Fbo.fboActivitySchema>;
|
|
34
|
+
export type FboRecurringFlight = z.infer<typeof Fbo.fboRecurringFlightSchema>;
|
|
35
|
+
export type FboMaterialiseResult = z.infer<typeof Fbo.fboMaterialiseResultSchema>;
|