@updraft-solutions/mcrit-sdk 0.14.4 → 0.14.6
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-JLIYDBW4.cjs → chunk-4S6QG75Y.cjs} +30 -1
- package/dist/{chunk-CDLXKNMA.js → chunk-RC7DU3ED.js} +29 -0
- package/dist/{fbo-CbJQnC91.d.cts → fbo-BNakExWI.d.cts} +393 -101
- package/dist/{fbo-CbJQnC91.d.ts → fbo-BNakExWI.d.ts} +393 -101
- package/dist/index.cjs +16 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -10
- package/dist/{operating-hours-B_S7kQ98.d.cts → operating-hours-Q2bwqbwy.d.cts} +1 -1
- package/dist/{operating-hours-mt1E3mkW.d.ts → operating-hours-RI1V-uup.d.ts} +1 -1
- package/dist/schemas/index.cjs +12 -2
- package/dist/schemas/index.d.cts +3 -3
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +11 -1
- package/dist/types/index.d.cts +7 -3
- package/dist/types/index.d.ts +7 -3
- package/package.json +1 -1
- package/src/schemas/fbo.spec.ts +77 -5
- package/src/schemas/fbo.ts +41 -2
- package/src/types/fbo.ts +4 -0
package/dist/schemas/index.js
CHANGED
|
@@ -141,17 +141,22 @@ import {
|
|
|
141
141
|
fboDecisionAxisSchema,
|
|
142
142
|
fboDecisionInputSchema,
|
|
143
143
|
fboDecisionSchema,
|
|
144
|
+
fboDutyAffectedSchema,
|
|
144
145
|
fboDutySchema,
|
|
146
|
+
fboDutySeriesResponseSchema,
|
|
145
147
|
fboFlightCanSchema,
|
|
146
148
|
fboFlightSchema,
|
|
147
149
|
fboFlightStatusSchema,
|
|
148
150
|
fboFlightTypeSchema,
|
|
149
151
|
fboGroundServicesSchema,
|
|
150
152
|
fboOccupationSchema,
|
|
153
|
+
fboRecurrenceSchema,
|
|
154
|
+
fboRecurrenceTypeSchema,
|
|
151
155
|
fboRoleSchema,
|
|
152
156
|
fboRowCanSchema,
|
|
153
157
|
fboSystemRoleSchema,
|
|
154
158
|
fboTrafficRowSchema,
|
|
159
|
+
fboTrafficRowTypeSchema,
|
|
155
160
|
fboTrafficSourceSchema,
|
|
156
161
|
fboVisibilitySchema,
|
|
157
162
|
feeCategoryOptionsSchema,
|
|
@@ -211,7 +216,7 @@ import {
|
|
|
211
216
|
zMoneyObject,
|
|
212
217
|
zNetGross,
|
|
213
218
|
zNullableBool
|
|
214
|
-
} from "../chunk-
|
|
219
|
+
} from "../chunk-RC7DU3ED.js";
|
|
215
220
|
export {
|
|
216
221
|
ALLOWED_GEOMETRY_TYPES,
|
|
217
222
|
ALLOWED_NEWSLETTER_VARIABLES,
|
|
@@ -355,17 +360,22 @@ export {
|
|
|
355
360
|
fboDecisionAxisSchema,
|
|
356
361
|
fboDecisionInputSchema,
|
|
357
362
|
fboDecisionSchema,
|
|
363
|
+
fboDutyAffectedSchema,
|
|
358
364
|
fboDutySchema,
|
|
365
|
+
fboDutySeriesResponseSchema,
|
|
359
366
|
fboFlightCanSchema,
|
|
360
367
|
fboFlightSchema,
|
|
361
368
|
fboFlightStatusSchema,
|
|
362
369
|
fboFlightTypeSchema,
|
|
363
370
|
fboGroundServicesSchema,
|
|
364
371
|
fboOccupationSchema,
|
|
372
|
+
fboRecurrenceSchema,
|
|
373
|
+
fboRecurrenceTypeSchema,
|
|
365
374
|
fboRoleSchema,
|
|
366
375
|
fboRowCanSchema,
|
|
367
376
|
fboSystemRoleSchema,
|
|
368
377
|
fboTrafficRowSchema,
|
|
378
|
+
fboTrafficRowTypeSchema,
|
|
369
379
|
fboTrafficSourceSchema,
|
|
370
380
|
fboVisibilitySchema,
|
|
371
381
|
feeCategoryOptionsSchema,
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-Q2bwqbwy.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,
|
|
3
|
+
import { bg as fboAcceptanceAxisSchema, bh as fboAcceptanceStatusSchema, bi as fboCompanyMemberSchema, bj as fboCompanyProfileSchema, bm as fboDecisionSchema, bk as fboDecisionAxisSchema, bl as fboDecisionInputSchema, bo as fboDutySchema, bn as fboDutyAffectedSchema, bp as fboDutySeriesResponseSchema, br as fboFlightSchema, bs as fboFlightStatusSchema, bt as fboFlightTypeSchema, bu as fboGroundServicesSchema, bv as fboOccupationSchema, bw as fboRecurrenceSchema, bx as fboRecurrenceTypeSchema, by as fboRoleSchema, bA as fboSystemRoleSchema, bB as fboTrafficRowSchema, bD as fboTrafficSourceSchema, bE as fboVisibilitySchema } from '../fbo-BNakExWI.cjs';
|
|
4
4
|
|
|
5
5
|
type FboAcceptanceAxis = z.infer<typeof fboAcceptanceAxisSchema>;
|
|
6
6
|
type FboAcceptanceStatus = z.infer<typeof fboAcceptanceStatusSchema>;
|
|
@@ -10,6 +10,10 @@ type FboFlightStatus = z.infer<typeof fboFlightStatusSchema>;
|
|
|
10
10
|
type FboFlight = z.infer<typeof fboFlightSchema>;
|
|
11
11
|
type FboOccupation = z.infer<typeof fboOccupationSchema>;
|
|
12
12
|
type FboDuty = z.infer<typeof fboDutySchema>;
|
|
13
|
+
type FboRecurrenceType = z.infer<typeof fboRecurrenceTypeSchema>;
|
|
14
|
+
type FboRecurrence = z.infer<typeof fboRecurrenceSchema>;
|
|
15
|
+
type FboDutyAffected = z.infer<typeof fboDutyAffectedSchema>;
|
|
16
|
+
type FboDutySeriesResponse = z.infer<typeof fboDutySeriesResponseSchema>;
|
|
13
17
|
type FboRole = z.infer<typeof fboRoleSchema>;
|
|
14
18
|
type FboCompanyProfile = z.infer<typeof fboCompanyProfileSchema>;
|
|
15
19
|
type FboDecisionAxis = z.infer<typeof fboDecisionAxisSchema>;
|
|
@@ -21,4 +25,4 @@ type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
|
|
|
21
25
|
type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
|
|
22
26
|
type FboCompanyMember = z.infer<typeof fboCompanyMemberSchema>;
|
|
23
27
|
|
|
24
|
-
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, FboRole, FboSystemRole, FboTrafficRow, FboTrafficSource, FboVisibility };
|
|
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 };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-RI1V-uup.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,
|
|
3
|
+
import { bg as fboAcceptanceAxisSchema, bh as fboAcceptanceStatusSchema, bi as fboCompanyMemberSchema, bj as fboCompanyProfileSchema, bm as fboDecisionSchema, bk as fboDecisionAxisSchema, bl as fboDecisionInputSchema, bo as fboDutySchema, bn as fboDutyAffectedSchema, bp as fboDutySeriesResponseSchema, br as fboFlightSchema, bs as fboFlightStatusSchema, bt as fboFlightTypeSchema, bu as fboGroundServicesSchema, bv as fboOccupationSchema, bw as fboRecurrenceSchema, bx as fboRecurrenceTypeSchema, by as fboRoleSchema, bA as fboSystemRoleSchema, bB as fboTrafficRowSchema, bD as fboTrafficSourceSchema, bE as fboVisibilitySchema } from '../fbo-BNakExWI.js';
|
|
4
4
|
|
|
5
5
|
type FboAcceptanceAxis = z.infer<typeof fboAcceptanceAxisSchema>;
|
|
6
6
|
type FboAcceptanceStatus = z.infer<typeof fboAcceptanceStatusSchema>;
|
|
@@ -10,6 +10,10 @@ type FboFlightStatus = z.infer<typeof fboFlightStatusSchema>;
|
|
|
10
10
|
type FboFlight = z.infer<typeof fboFlightSchema>;
|
|
11
11
|
type FboOccupation = z.infer<typeof fboOccupationSchema>;
|
|
12
12
|
type FboDuty = z.infer<typeof fboDutySchema>;
|
|
13
|
+
type FboRecurrenceType = z.infer<typeof fboRecurrenceTypeSchema>;
|
|
14
|
+
type FboRecurrence = z.infer<typeof fboRecurrenceSchema>;
|
|
15
|
+
type FboDutyAffected = z.infer<typeof fboDutyAffectedSchema>;
|
|
16
|
+
type FboDutySeriesResponse = z.infer<typeof fboDutySeriesResponseSchema>;
|
|
13
17
|
type FboRole = z.infer<typeof fboRoleSchema>;
|
|
14
18
|
type FboCompanyProfile = z.infer<typeof fboCompanyProfileSchema>;
|
|
15
19
|
type FboDecisionAxis = z.infer<typeof fboDecisionAxisSchema>;
|
|
@@ -21,4 +25,4 @@ type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
|
|
|
21
25
|
type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
|
|
22
26
|
type FboCompanyMember = z.infer<typeof fboCompanyMemberSchema>;
|
|
23
27
|
|
|
24
|
-
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, FboRole, FboSystemRole, FboTrafficRow, FboTrafficSource, FboVisibility };
|
|
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 };
|
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.6",
|
|
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,10 +1,13 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
2
|
import {
|
|
3
3
|
fboCompanyMemberSchema,
|
|
4
|
+
fboDutyAffectedSchema,
|
|
4
5
|
fboDutySchema,
|
|
6
|
+
fboDutySeriesResponseSchema,
|
|
5
7
|
fboFlightSchema,
|
|
6
8
|
fboFlightStatusSchema,
|
|
7
9
|
fboOccupationSchema,
|
|
10
|
+
fboRecurrenceSchema,
|
|
8
11
|
fboSystemRoleSchema,
|
|
9
12
|
fboTrafficRowSchema,
|
|
10
13
|
} from "./fbo";
|
|
@@ -46,13 +49,65 @@ describe("fboFlightSchema", () => {
|
|
|
46
49
|
});
|
|
47
50
|
});
|
|
48
51
|
|
|
52
|
+
const dutyPayload = {
|
|
53
|
+
id: 1, company_id: 35, user_id: null, author_id: null, occupation_id: null, scheduled_flight_id: null,
|
|
54
|
+
start: "2026-09-01T18:00:00.000000Z", end: "2026-09-01T23:00:00.000000Z", all_day: false, remarks: null,
|
|
55
|
+
batch_uuid: null,
|
|
56
|
+
created_at: null, updated_at: null,
|
|
57
|
+
};
|
|
58
|
+
|
|
49
59
|
describe("fboDutySchema", () => {
|
|
50
60
|
it("accepts a userless, occupation-less duty — 27% of the migrated roster has no user", () => {
|
|
51
|
-
expect(fboDutySchema.parse(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
expect(fboDutySchema.parse(dutyPayload).user_id).toBeNull();
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("parses a duty with batch_uuid: null — the API always sends the key", () => {
|
|
65
|
+
expect(fboDutySchema.parse(dutyPayload).batch_uuid).toBeNull();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("parses a duty with a real batch_uuid", () => {
|
|
69
|
+
const withBatch = { ...dutyPayload, batch_uuid: "0f1b3d5e-0000-4000-8000-000000000009" };
|
|
70
|
+
expect(fboDutySchema.parse(withBatch).batch_uuid).toBe("0f1b3d5e-0000-4000-8000-000000000009");
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe("fboRecurrenceSchema", () => {
|
|
75
|
+
it("parses a valid recurrence", () => {
|
|
76
|
+
const recurrence = { type: "weekly", until: "2026-12-01", timezone: "Europe/Berlin" };
|
|
77
|
+
expect(fboRecurrenceSchema.parse(recurrence).type).toBe("weekly");
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it("rejects a type outside daily/weekly/monthly", () => {
|
|
81
|
+
expect(fboRecurrenceSchema.safeParse({ type: "yearly", until: "2026-12-01", timezone: "Europe/Berlin" }).success).toBe(false);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
describe("fboDutyAffectedSchema", () => {
|
|
86
|
+
it("accepts single/future/all", () => {
|
|
87
|
+
expect(fboDutyAffectedSchema.safeParse("single").success).toBe(true);
|
|
88
|
+
expect(fboDutyAffectedSchema.safeParse("future").success).toBe(true);
|
|
89
|
+
expect(fboDutyAffectedSchema.safeParse("all").success).toBe(true);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it("rejects anything else", () => {
|
|
93
|
+
expect(fboDutyAffectedSchema.safeParse("some").success).toBe(false);
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
describe("fboDutySeriesResponseSchema", () => {
|
|
98
|
+
it("parses a series response", () => {
|
|
99
|
+
const response = {
|
|
100
|
+
data: dutyPayload,
|
|
101
|
+
series: { batch_uuid: "0f1b3d5e-0000-4000-8000-000000000009", count: 4 },
|
|
102
|
+
};
|
|
103
|
+
const parsed = fboDutySeriesResponseSchema.parse(response);
|
|
104
|
+
expect(parsed.series.count).toBe(4);
|
|
105
|
+
expect(parsed.data.id).toBe(1);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
it("parses a series response for a single, non-recurring duty (batch_uuid null, count 1)", () => {
|
|
109
|
+
const response = { data: dutyPayload, series: { batch_uuid: null, count: 1 } };
|
|
110
|
+
expect(fboDutySeriesResponseSchema.parse(response).series.batch_uuid).toBeNull();
|
|
56
111
|
});
|
|
57
112
|
});
|
|
58
113
|
|
|
@@ -105,6 +160,23 @@ describe("fboTrafficRowSchema", () => {
|
|
|
105
160
|
it("rejects a visibility outside the own/details/limited vocabulary", () => {
|
|
106
161
|
expect(fboTrafficRowSchema.safeParse({ id: 1, visibility: "secret", source: "movement", flight_status: "active" }).success).toBe(false);
|
|
107
162
|
});
|
|
163
|
+
|
|
164
|
+
it("parses an assigned-company booking row — type widens to 'booking', company_id nulled", () => {
|
|
165
|
+
const bookingRow = {
|
|
166
|
+
id: 900,
|
|
167
|
+
type: "booking",
|
|
168
|
+
source: "booking",
|
|
169
|
+
visibility: "limited",
|
|
170
|
+
flight_status: "active",
|
|
171
|
+
company_id: null,
|
|
172
|
+
etdZ: "2026-09-01T08:00:00.000000Z",
|
|
173
|
+
etaZ: "2026-09-01T09:00:00.000000Z",
|
|
174
|
+
departure_airport_id: 2753,
|
|
175
|
+
};
|
|
176
|
+
const parsed = fboTrafficRowSchema.parse(bookingRow);
|
|
177
|
+
expect(parsed.type).toBe("booking");
|
|
178
|
+
expect(parsed.company_id).toBeNull();
|
|
179
|
+
});
|
|
108
180
|
});
|
|
109
181
|
|
|
110
182
|
describe("fboCompanyMemberSchema", () => {
|
package/src/schemas/fbo.ts
CHANGED
|
@@ -112,6 +112,17 @@ export const fboOccupationSchema = z.object({
|
|
|
112
112
|
can: fboRowCanSchema.optional(),
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
+
/** `POST`/`PATCH duties` recurrence input — `ExpandRecurrence::run(...)`'s shape. */
|
|
116
|
+
export const fboRecurrenceTypeSchema = z.enum(["daily", "weekly", "monthly"]);
|
|
117
|
+
export const fboRecurrenceSchema = z.object({
|
|
118
|
+
type: fboRecurrenceTypeSchema,
|
|
119
|
+
until: z.string(),
|
|
120
|
+
timezone: z.string(),
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/** `DELETE duties/{id}?affected=…` — how much of a batch_uuid series to remove. */
|
|
124
|
+
export const fboDutyAffectedSchema = z.enum(["single", "future", "all"]);
|
|
125
|
+
|
|
115
126
|
export const fboDutySchema = z.object({
|
|
116
127
|
id: z.number(),
|
|
117
128
|
company_id: z.number().nullable(),
|
|
@@ -126,11 +137,27 @@ export const fboDutySchema = z.object({
|
|
|
126
137
|
end: z.string(),
|
|
127
138
|
all_day: z.boolean(),
|
|
128
139
|
remarks: z.string().nullable(),
|
|
140
|
+
/**
|
|
141
|
+
* Ties duties created together via a recurrence expansion so they can be
|
|
142
|
+
* edited/cancelled as a series; nulled on a row once it's edited directly
|
|
143
|
+
* (detached). `.nullable().optional()` for forward-compat, though the API
|
|
144
|
+
* always sends the key.
|
|
145
|
+
*/
|
|
146
|
+
batch_uuid: z.string().nullable().optional(),
|
|
129
147
|
created_at: z.string().nullable(),
|
|
130
148
|
updated_at: z.string().nullable(),
|
|
131
149
|
can: fboRowCanSchema.optional(),
|
|
132
150
|
});
|
|
133
151
|
|
|
152
|
+
/** `POST duties` response when a recurrence expands into multiple rows: the first duty plus the series it belongs to. */
|
|
153
|
+
export const fboDutySeriesResponseSchema = z.object({
|
|
154
|
+
data: fboDutySchema,
|
|
155
|
+
series: z.object({
|
|
156
|
+
batch_uuid: z.string().nullable(),
|
|
157
|
+
count: z.number(),
|
|
158
|
+
}),
|
|
159
|
+
});
|
|
160
|
+
|
|
134
161
|
/** Served by `GET companies/{id}/fbo/meta` so no client hardcodes the list. */
|
|
135
162
|
export const fboRoleSchema = z.enum(["fbo", "atc", "wx", "customs", "handling", "fuel", "operator"]);
|
|
136
163
|
|
|
@@ -165,14 +192,26 @@ export const fboVisibilitySchema = z.enum(["own", "details", "limited"]);
|
|
|
165
192
|
*/
|
|
166
193
|
export const fboTrafficSourceSchema = z.enum(["movement", "booking"]);
|
|
167
194
|
|
|
195
|
+
/**
|
|
196
|
+
* A traffic-board row's `type`: an FBO-filed movement (`scheduledFlight`,
|
|
197
|
+
* `ppr` — `fboFlightTypeSchema`'s own set) or, when `source` is `booking`, a
|
|
198
|
+
* flight-school booking rendered in the same shape (`AssignedFlightResource`
|
|
199
|
+
* always sends `type: "booking"`).
|
|
200
|
+
*/
|
|
201
|
+
export const fboTrafficRowTypeSchema = z.enum(["scheduledFlight", "ppr", "booking"]);
|
|
202
|
+
|
|
168
203
|
/**
|
|
169
204
|
* One row of the FBO traffic board. `.partial()` because `details`/`limited`
|
|
170
205
|
* rows omit keys the viewer isn't entitled to (e.g. no `ac_call`, `contact`,
|
|
171
|
-
* `author_id` on `limited` rows
|
|
172
|
-
*
|
|
206
|
+
* `author_id` on `limited` rows) — only `own` rows carry the full
|
|
207
|
+
* `fboFlightSchema` payload plus `can`. `company_id` is explicitly nullable
|
|
208
|
+
* (sent as `null`, not omitted, on every `details`/`limited` row) and `type`
|
|
209
|
+
* widens `fboFlightSchema`'s own two-value set to also allow `"booking"`.
|
|
173
210
|
*/
|
|
174
211
|
export const fboTrafficRowSchema = fboFlightSchema.partial().extend({
|
|
175
212
|
id: z.number(),
|
|
213
|
+
type: fboTrafficRowTypeSchema.optional(),
|
|
214
|
+
company_id: z.number().nullable().optional(),
|
|
176
215
|
visibility: fboVisibilitySchema,
|
|
177
216
|
source: fboTrafficSourceSchema,
|
|
178
217
|
flight_status: fboFlightStatusSchema,
|
package/src/types/fbo.ts
CHANGED
|
@@ -9,6 +9,10 @@ export type FboFlightStatus = z.infer<typeof Fbo.fboFlightStatusSchema>;
|
|
|
9
9
|
export type FboFlight = z.infer<typeof Fbo.fboFlightSchema>;
|
|
10
10
|
export type FboOccupation = z.infer<typeof Fbo.fboOccupationSchema>;
|
|
11
11
|
export type FboDuty = z.infer<typeof Fbo.fboDutySchema>;
|
|
12
|
+
export type FboRecurrenceType = z.infer<typeof Fbo.fboRecurrenceTypeSchema>;
|
|
13
|
+
export type FboRecurrence = z.infer<typeof Fbo.fboRecurrenceSchema>;
|
|
14
|
+
export type FboDutyAffected = z.infer<typeof Fbo.fboDutyAffectedSchema>;
|
|
15
|
+
export type FboDutySeriesResponse = z.infer<typeof Fbo.fboDutySeriesResponseSchema>;
|
|
12
16
|
export type FboRole = z.infer<typeof Fbo.fboRoleSchema>;
|
|
13
17
|
export type FboCompanyProfile = z.infer<typeof Fbo.fboCompanyProfileSchema>;
|
|
14
18
|
export type FboDecisionAxis = z.infer<typeof Fbo.fboDecisionAxisSchema>;
|