@updraft-solutions/mcrit-sdk 0.14.5 → 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-T5TZOYMX.cjs → chunk-4S6QG75Y.cjs} +26 -1
- package/dist/{chunk-H7MQ5MU2.js → chunk-RC7DU3ED.js} +25 -0
- package/dist/{fbo-CnEGeGWC.d.cts → fbo-BNakExWI.d.cts} +376 -93
- package/dist/{fbo-CnEGeGWC.d.ts → fbo-BNakExWI.d.ts} +376 -93
- package/dist/index.cjs +15 -7
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -10
- package/dist/{operating-hours-2BXhi8-P.d.cts → operating-hours-Q2bwqbwy.d.cts} +1 -1
- package/dist/{operating-hours-CEPrzkGr.d.ts → operating-hours-RI1V-uup.d.ts} +1 -1
- package/dist/schemas/index.cjs +10 -2
- package/dist/schemas/index.d.cts +3 -3
- package/dist/schemas/index.d.ts +3 -3
- package/dist/schemas/index.js +9 -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 +60 -5
- package/src/schemas/fbo.ts +27 -0
- package/src/types/fbo.ts +4 -0
package/dist/schemas/index.js
CHANGED
|
@@ -141,13 +141,17 @@ 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,
|
|
@@ -212,7 +216,7 @@ import {
|
|
|
212
216
|
zMoneyObject,
|
|
213
217
|
zNetGross,
|
|
214
218
|
zNullableBool
|
|
215
|
-
} from "../chunk-
|
|
219
|
+
} from "../chunk-RC7DU3ED.js";
|
|
216
220
|
export {
|
|
217
221
|
ALLOWED_GEOMETRY_TYPES,
|
|
218
222
|
ALLOWED_NEWSLETTER_VARIABLES,
|
|
@@ -356,13 +360,17 @@ export {
|
|
|
356
360
|
fboDecisionAxisSchema,
|
|
357
361
|
fboDecisionInputSchema,
|
|
358
362
|
fboDecisionSchema,
|
|
363
|
+
fboDutyAffectedSchema,
|
|
359
364
|
fboDutySchema,
|
|
365
|
+
fboDutySeriesResponseSchema,
|
|
360
366
|
fboFlightCanSchema,
|
|
361
367
|
fboFlightSchema,
|
|
362
368
|
fboFlightStatusSchema,
|
|
363
369
|
fboFlightTypeSchema,
|
|
364
370
|
fboGroundServicesSchema,
|
|
365
371
|
fboOccupationSchema,
|
|
372
|
+
fboRecurrenceSchema,
|
|
373
|
+
fboRecurrenceTypeSchema,
|
|
366
374
|
fboRoleSchema,
|
|
367
375
|
fboRowCanSchema,
|
|
368
376
|
fboSystemRoleSchema,
|
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
|
|
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
|
|
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>;
|