@updraft-solutions/mcrit-sdk 0.14.5 → 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.
@@ -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,25 +137,39 @@ 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,
142
146
  fboDecisionInputSchema,
143
147
  fboDecisionSchema,
148
+ fboDutyAffectedSchema,
144
149
  fboDutySchema,
150
+ fboDutySeriesResponseSchema,
145
151
  fboFlightCanSchema,
146
152
  fboFlightSchema,
147
153
  fboFlightStatusSchema,
148
154
  fboFlightTypeSchema,
149
155
  fboGroundServicesSchema,
156
+ fboLandingsSummarySchema,
157
+ fboMaterialiseResultSchema,
158
+ fboNextDutySchema,
150
159
  fboOccupationSchema,
160
+ fboOperationsSchema,
161
+ fboRecurrenceSchema,
162
+ fboRecurrenceTypeSchema,
163
+ fboRecurringFlightSchema,
151
164
  fboRoleSchema,
152
165
  fboRowCanSchema,
166
+ fboStatisticsSchema,
153
167
  fboSystemRoleSchema,
154
168
  fboTrafficRowSchema,
155
169
  fboTrafficRowTypeSchema,
156
170
  fboTrafficSourceSchema,
157
171
  fboVisibilitySchema,
172
+ fboWeeklyLandingSchema,
158
173
  feeCategoryOptionsSchema,
159
174
  feeSchema,
160
175
  flightLogSchema,
@@ -212,7 +227,7 @@ import {
212
227
  zMoneyObject,
213
228
  zNetGross,
214
229
  zNullableBool
215
- } from "../chunk-H7MQ5MU2.js";
230
+ } from "../chunk-7BDZMKTO.js";
216
231
  export {
217
232
  ALLOWED_GEOMETRY_TYPES,
218
233
  ALLOWED_NEWSLETTER_VARIABLES,
@@ -232,6 +247,7 @@ export {
232
247
  CreateSyllabusFromTemplateFormSchema,
233
248
  DividerBlockSchema,
234
249
  EnrollmentTrainingStatusEnum,
250
+ FBO_OPERATING_DAYS,
235
251
  FBO_SYSTEM_ROLES,
236
252
  FaqSchema,
237
253
  FaqStatus,
@@ -351,25 +367,39 @@ export {
351
367
  extendedAirplaneSchema,
352
368
  fboAcceptanceAxisSchema,
353
369
  fboAcceptanceStatusSchema,
370
+ fboActivityCauserSchema,
371
+ fboActivityChangesSchema,
372
+ fboActivitySchema,
354
373
  fboCompanyMemberSchema,
355
374
  fboCompanyProfileSchema,
356
375
  fboDecisionAxisSchema,
357
376
  fboDecisionInputSchema,
358
377
  fboDecisionSchema,
378
+ fboDutyAffectedSchema,
359
379
  fboDutySchema,
380
+ fboDutySeriesResponseSchema,
360
381
  fboFlightCanSchema,
361
382
  fboFlightSchema,
362
383
  fboFlightStatusSchema,
363
384
  fboFlightTypeSchema,
364
385
  fboGroundServicesSchema,
386
+ fboLandingsSummarySchema,
387
+ fboMaterialiseResultSchema,
388
+ fboNextDutySchema,
365
389
  fboOccupationSchema,
390
+ fboOperationsSchema,
391
+ fboRecurrenceSchema,
392
+ fboRecurrenceTypeSchema,
393
+ fboRecurringFlightSchema,
366
394
  fboRoleSchema,
367
395
  fboRowCanSchema,
396
+ fboStatisticsSchema,
368
397
  fboSystemRoleSchema,
369
398
  fboTrafficRowSchema,
370
399
  fboTrafficRowTypeSchema,
371
400
  fboTrafficSourceSchema,
372
401
  fboVisibilitySchema,
402
+ fboWeeklyLandingSchema,
373
403
  feeCategoryOptionsSchema,
374
404
  feeSchema,
375
405
  flightLogSchema,
@@ -1,15 +1,20 @@
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-2BXhi8-P.cjs';
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 { bg as fboAcceptanceAxisSchema, bh as fboAcceptanceStatusSchema, bi as fboCompanyMemberSchema, bj as fboCompanyProfileSchema, bm as fboDecisionSchema, bk as fboDecisionAxisSchema, bl as fboDecisionInputSchema, bn as fboDutySchema, bp as fboFlightSchema, bq as fboFlightStatusSchema, br as fboFlightTypeSchema, bs as fboGroundServicesSchema, bt as fboOccupationSchema, bu as fboRoleSchema, bw as fboSystemRoleSchema, bx as fboTrafficRowSchema, bz as fboTrafficSourceSchema, bA as fboVisibilitySchema } from '../fbo-CnEGeGWC.cjs';
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>;
14
+ type FboRecurrenceType = z.infer<typeof fboRecurrenceTypeSchema>;
15
+ type FboRecurrence = z.infer<typeof fboRecurrenceSchema>;
16
+ type FboDutyAffected = z.infer<typeof fboDutyAffectedSchema>;
17
+ type FboDutySeriesResponse = z.infer<typeof fboDutySeriesResponseSchema>;
13
18
  type FboRole = z.infer<typeof fboRoleSchema>;
14
19
  type FboCompanyProfile = z.infer<typeof fboCompanyProfileSchema>;
15
20
  type FboDecisionAxis = z.infer<typeof fboDecisionAxisSchema>;
@@ -20,5 +25,14 @@ type FboTrafficSource = z.infer<typeof fboTrafficSourceSchema>;
20
25
  type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
21
26
  type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
22
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>;
23
37
 
24
- export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, 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 };
@@ -1,15 +1,20 @@
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-CEPrzkGr.js';
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 { bg as fboAcceptanceAxisSchema, bh as fboAcceptanceStatusSchema, bi as fboCompanyMemberSchema, bj as fboCompanyProfileSchema, bm as fboDecisionSchema, bk as fboDecisionAxisSchema, bl as fboDecisionInputSchema, bn as fboDutySchema, bp as fboFlightSchema, bq as fboFlightStatusSchema, br as fboFlightTypeSchema, bs as fboGroundServicesSchema, bt as fboOccupationSchema, bu as fboRoleSchema, bw as fboSystemRoleSchema, bx as fboTrafficRowSchema, bz as fboTrafficSourceSchema, bA as fboVisibilitySchema } from '../fbo-CnEGeGWC.js';
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>;
14
+ type FboRecurrenceType = z.infer<typeof fboRecurrenceTypeSchema>;
15
+ type FboRecurrence = z.infer<typeof fboRecurrenceSchema>;
16
+ type FboDutyAffected = z.infer<typeof fboDutyAffectedSchema>;
17
+ type FboDutySeriesResponse = z.infer<typeof fboDutySeriesResponseSchema>;
13
18
  type FboRole = z.infer<typeof fboRoleSchema>;
14
19
  type FboCompanyProfile = z.infer<typeof fboCompanyProfileSchema>;
15
20
  type FboDecisionAxis = z.infer<typeof fboDecisionAxisSchema>;
@@ -20,5 +25,14 @@ type FboTrafficSource = z.infer<typeof fboTrafficSourceSchema>;
20
25
  type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
21
26
  type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
22
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>;
23
37
 
24
- export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, 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.5",
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": {
@@ -1,10 +1,18 @@
1
1
  import { describe, expect, it } from "vitest";
2
2
  import {
3
+ fboActivitySchema,
3
4
  fboCompanyMemberSchema,
5
+ fboDutyAffectedSchema,
4
6
  fboDutySchema,
7
+ fboDutySeriesResponseSchema,
5
8
  fboFlightSchema,
6
9
  fboFlightStatusSchema,
10
+ fboMaterialiseResultSchema,
7
11
  fboOccupationSchema,
12
+ fboOperationsSchema,
13
+ fboRecurrenceSchema,
14
+ fboRecurringFlightSchema,
15
+ fboStatisticsSchema,
8
16
  fboSystemRoleSchema,
9
17
  fboTrafficRowSchema,
10
18
  } from "./fbo";
@@ -28,6 +36,9 @@ const flightPayload = {
28
36
  airport: { status: "unknown", is_required: false, decided_by_id: null, updated_at: null },
29
37
  customs: { status: "unknown", is_required: false, decided_by_id: null, updated_at: null },
30
38
  },
39
+ operations: null,
40
+ batch_uuid: null,
41
+ legs_count: 1,
31
42
  created_at: "2026-08-26T10:00:00.000000Z", updated_at: "2026-08-26T10:00:00.000000Z",
32
43
  };
33
44
 
@@ -46,13 +57,65 @@ describe("fboFlightSchema", () => {
46
57
  });
47
58
  });
48
59
 
60
+ const dutyPayload = {
61
+ id: 1, company_id: 35, user_id: null, author_id: null, occupation_id: null, scheduled_flight_id: null,
62
+ start: "2026-09-01T18:00:00.000000Z", end: "2026-09-01T23:00:00.000000Z", all_day: false, remarks: null,
63
+ batch_uuid: null,
64
+ created_at: null, updated_at: null,
65
+ };
66
+
49
67
  describe("fboDutySchema", () => {
50
68
  it("accepts a userless, occupation-less duty — 27% of the migrated roster has no user", () => {
51
- expect(fboDutySchema.parse({
52
- id: 1, company_id: 35, user_id: null, author_id: null, occupation_id: null, scheduled_flight_id: null,
53
- start: "2026-09-01T18:00:00.000000Z", end: "2026-09-01T23:00:00.000000Z", all_day: false, remarks: null,
54
- created_at: null, updated_at: null,
55
- }).user_id).toBeNull();
69
+ expect(fboDutySchema.parse(dutyPayload).user_id).toBeNull();
70
+ });
71
+
72
+ it("parses a duty with batch_uuid: null — the API always sends the key", () => {
73
+ expect(fboDutySchema.parse(dutyPayload).batch_uuid).toBeNull();
74
+ });
75
+
76
+ it("parses a duty with a real batch_uuid", () => {
77
+ const withBatch = { ...dutyPayload, batch_uuid: "0f1b3d5e-0000-4000-8000-000000000009" };
78
+ expect(fboDutySchema.parse(withBatch).batch_uuid).toBe("0f1b3d5e-0000-4000-8000-000000000009");
79
+ });
80
+ });
81
+
82
+ describe("fboRecurrenceSchema", () => {
83
+ it("parses a valid recurrence", () => {
84
+ const recurrence = { type: "weekly", until: "2026-12-01", timezone: "Europe/Berlin" };
85
+ expect(fboRecurrenceSchema.parse(recurrence).type).toBe("weekly");
86
+ });
87
+
88
+ it("rejects a type outside daily/weekly/monthly", () => {
89
+ expect(fboRecurrenceSchema.safeParse({ type: "yearly", until: "2026-12-01", timezone: "Europe/Berlin" }).success).toBe(false);
90
+ });
91
+ });
92
+
93
+ describe("fboDutyAffectedSchema", () => {
94
+ it("accepts single/future/all", () => {
95
+ expect(fboDutyAffectedSchema.safeParse("single").success).toBe(true);
96
+ expect(fboDutyAffectedSchema.safeParse("future").success).toBe(true);
97
+ expect(fboDutyAffectedSchema.safeParse("all").success).toBe(true);
98
+ });
99
+
100
+ it("rejects anything else", () => {
101
+ expect(fboDutyAffectedSchema.safeParse("some").success).toBe(false);
102
+ });
103
+ });
104
+
105
+ describe("fboDutySeriesResponseSchema", () => {
106
+ it("parses a series response", () => {
107
+ const response = {
108
+ data: dutyPayload,
109
+ series: { batch_uuid: "0f1b3d5e-0000-4000-8000-000000000009", count: 4 },
110
+ };
111
+ const parsed = fboDutySeriesResponseSchema.parse(response);
112
+ expect(parsed.series.count).toBe(4);
113
+ expect(parsed.data.id).toBe(1);
114
+ });
115
+
116
+ it("parses a series response for a single, non-recurring duty (batch_uuid null, count 1)", () => {
117
+ const response = { data: dutyPayload, series: { batch_uuid: null, count: 1 } };
118
+ expect(fboDutySeriesResponseSchema.parse(response).series.batch_uuid).toBeNull();
56
119
  });
57
120
  });
58
121
 
@@ -139,3 +202,152 @@ describe("fboSystemRoleSchema", () => {
139
202
  expect(fboSystemRoleSchema.safeParse("admin").success).toBe(false);
140
203
  });
141
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
+ });
@@ -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`) —
@@ -112,6 +137,17 @@ export const fboOccupationSchema = z.object({
112
137
  can: fboRowCanSchema.optional(),
113
138
  });
114
139
 
140
+ /** `POST`/`PATCH duties` recurrence input — `ExpandRecurrence::run(...)`'s shape. */
141
+ export const fboRecurrenceTypeSchema = z.enum(["daily", "weekly", "monthly"]);
142
+ export const fboRecurrenceSchema = z.object({
143
+ type: fboRecurrenceTypeSchema,
144
+ until: z.string(),
145
+ timezone: z.string(),
146
+ });
147
+
148
+ /** `DELETE duties/{id}?affected=…` — how much of a batch_uuid series to remove. */
149
+ export const fboDutyAffectedSchema = z.enum(["single", "future", "all"]);
150
+
115
151
  export const fboDutySchema = z.object({
116
152
  id: z.number(),
117
153
  company_id: z.number().nullable(),
@@ -126,11 +162,27 @@ export const fboDutySchema = z.object({
126
162
  end: z.string(),
127
163
  all_day: z.boolean(),
128
164
  remarks: z.string().nullable(),
165
+ /**
166
+ * Ties duties created together via a recurrence expansion so they can be
167
+ * edited/cancelled as a series; nulled on a row once it's edited directly
168
+ * (detached). `.nullable().optional()` for forward-compat, though the API
169
+ * always sends the key.
170
+ */
171
+ batch_uuid: z.string().nullable().optional(),
129
172
  created_at: z.string().nullable(),
130
173
  updated_at: z.string().nullable(),
131
174
  can: fboRowCanSchema.optional(),
132
175
  });
133
176
 
177
+ /** `POST duties` response when a recurrence expands into multiple rows: the first duty plus the series it belongs to. */
178
+ export const fboDutySeriesResponseSchema = z.object({
179
+ data: fboDutySchema,
180
+ series: z.object({
181
+ batch_uuid: z.string().nullable(),
182
+ count: z.number(),
183
+ }),
184
+ });
185
+
134
186
  /** Served by `GET companies/{id}/fbo/meta` so no client hardcodes the list. */
135
187
  export const fboRoleSchema = z.enum(["fbo", "atc", "wx", "customs", "handling", "fuel", "operator"]);
136
188
 
@@ -212,3 +264,104 @@ export const fboCompanyMemberSchema = z.object({
212
264
  roles: z.array(z.string()),
213
265
  can: fboRowCanSchema.optional(),
214
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
+ });