@updraft-solutions/mcrit-sdk 0.14.3 → 0.14.5
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-S3FZQ66N.js → chunk-H7MQ5MU2.js} +38 -1
- package/dist/{chunk-562POFCT.cjs → chunk-T5TZOYMX.cjs} +38 -1
- package/dist/{fbo-CsOm51Z3.d.cts → fbo-CnEGeGWC.d.cts} +18190 -17692
- package/dist/{fbo-CsOm51Z3.d.ts → fbo-CnEGeGWC.d.ts} +18190 -17692
- package/dist/index.cjs +18 -4
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -6
- package/dist/{operating-hours-zg95Qlxz.d.cts → operating-hours-2BXhi8-P.d.cts} +1 -1
- package/dist/{operating-hours-c3SukLvt.d.ts → operating-hours-CEPrzkGr.d.ts} +1 -1
- package/dist/schemas/index.cjs +16 -2
- package/dist/schemas/index.d.cts +123 -123
- package/dist/schemas/index.d.ts +123 -123
- package/dist/schemas/index.js +15 -1
- package/dist/types/index.d.cts +8 -3
- package/dist/types/index.d.ts +8 -3
- package/package.json +1 -1
- package/src/schemas/fbo.spec.ts +78 -2
- package/src/schemas/fbo.ts +63 -2
- package/src/types/fbo.ts +5 -0
package/dist/schemas/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
CreateSyllabusFromTemplateFormSchema,
|
|
18
18
|
DividerBlockSchema,
|
|
19
19
|
EnrollmentTrainingStatusEnum,
|
|
20
|
+
FBO_SYSTEM_ROLES,
|
|
20
21
|
FaqSchema,
|
|
21
22
|
FaqStatus,
|
|
22
23
|
FieldLabelSchema,
|
|
@@ -135,6 +136,7 @@ import {
|
|
|
135
136
|
extendedAirplaneSchema,
|
|
136
137
|
fboAcceptanceAxisSchema,
|
|
137
138
|
fboAcceptanceStatusSchema,
|
|
139
|
+
fboCompanyMemberSchema,
|
|
138
140
|
fboCompanyProfileSchema,
|
|
139
141
|
fboDecisionAxisSchema,
|
|
140
142
|
fboDecisionInputSchema,
|
|
@@ -148,6 +150,11 @@ import {
|
|
|
148
150
|
fboOccupationSchema,
|
|
149
151
|
fboRoleSchema,
|
|
150
152
|
fboRowCanSchema,
|
|
153
|
+
fboSystemRoleSchema,
|
|
154
|
+
fboTrafficRowSchema,
|
|
155
|
+
fboTrafficRowTypeSchema,
|
|
156
|
+
fboTrafficSourceSchema,
|
|
157
|
+
fboVisibilitySchema,
|
|
151
158
|
feeCategoryOptionsSchema,
|
|
152
159
|
feeSchema,
|
|
153
160
|
flightLogSchema,
|
|
@@ -205,7 +212,7 @@ import {
|
|
|
205
212
|
zMoneyObject,
|
|
206
213
|
zNetGross,
|
|
207
214
|
zNullableBool
|
|
208
|
-
} from "../chunk-
|
|
215
|
+
} from "../chunk-H7MQ5MU2.js";
|
|
209
216
|
export {
|
|
210
217
|
ALLOWED_GEOMETRY_TYPES,
|
|
211
218
|
ALLOWED_NEWSLETTER_VARIABLES,
|
|
@@ -225,6 +232,7 @@ export {
|
|
|
225
232
|
CreateSyllabusFromTemplateFormSchema,
|
|
226
233
|
DividerBlockSchema,
|
|
227
234
|
EnrollmentTrainingStatusEnum,
|
|
235
|
+
FBO_SYSTEM_ROLES,
|
|
228
236
|
FaqSchema,
|
|
229
237
|
FaqStatus,
|
|
230
238
|
FieldLabelSchema,
|
|
@@ -343,6 +351,7 @@ export {
|
|
|
343
351
|
extendedAirplaneSchema,
|
|
344
352
|
fboAcceptanceAxisSchema,
|
|
345
353
|
fboAcceptanceStatusSchema,
|
|
354
|
+
fboCompanyMemberSchema,
|
|
346
355
|
fboCompanyProfileSchema,
|
|
347
356
|
fboDecisionAxisSchema,
|
|
348
357
|
fboDecisionInputSchema,
|
|
@@ -356,6 +365,11 @@ export {
|
|
|
356
365
|
fboOccupationSchema,
|
|
357
366
|
fboRoleSchema,
|
|
358
367
|
fboRowCanSchema,
|
|
368
|
+
fboSystemRoleSchema,
|
|
369
|
+
fboTrafficRowSchema,
|
|
370
|
+
fboTrafficRowTypeSchema,
|
|
371
|
+
fboTrafficSourceSchema,
|
|
372
|
+
fboVisibilitySchema,
|
|
359
373
|
feeCategoryOptionsSchema,
|
|
360
374
|
feeSchema,
|
|
361
375
|
flightLogSchema,
|
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-2BXhi8-P.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
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';
|
|
4
4
|
|
|
5
5
|
type FboAcceptanceAxis = z.infer<typeof fboAcceptanceAxisSchema>;
|
|
6
6
|
type FboAcceptanceStatus = z.infer<typeof fboAcceptanceStatusSchema>;
|
|
@@ -15,5 +15,10 @@ type FboCompanyProfile = z.infer<typeof fboCompanyProfileSchema>;
|
|
|
15
15
|
type FboDecisionAxis = z.infer<typeof fboDecisionAxisSchema>;
|
|
16
16
|
type FboDecision = z.infer<typeof fboDecisionSchema>;
|
|
17
17
|
type FboDecisionInput = z.infer<typeof fboDecisionInputSchema>;
|
|
18
|
+
type FboVisibility = z.infer<typeof fboVisibilitySchema>;
|
|
19
|
+
type FboTrafficSource = z.infer<typeof fboTrafficSourceSchema>;
|
|
20
|
+
type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
|
|
21
|
+
type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
|
|
22
|
+
type FboCompanyMember = z.infer<typeof fboCompanyMemberSchema>;
|
|
18
23
|
|
|
19
|
-
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, FboRole };
|
|
24
|
+
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, 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-CEPrzkGr.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
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';
|
|
4
4
|
|
|
5
5
|
type FboAcceptanceAxis = z.infer<typeof fboAcceptanceAxisSchema>;
|
|
6
6
|
type FboAcceptanceStatus = z.infer<typeof fboAcceptanceStatusSchema>;
|
|
@@ -15,5 +15,10 @@ type FboCompanyProfile = z.infer<typeof fboCompanyProfileSchema>;
|
|
|
15
15
|
type FboDecisionAxis = z.infer<typeof fboDecisionAxisSchema>;
|
|
16
16
|
type FboDecision = z.infer<typeof fboDecisionSchema>;
|
|
17
17
|
type FboDecisionInput = z.infer<typeof fboDecisionInputSchema>;
|
|
18
|
+
type FboVisibility = z.infer<typeof fboVisibilitySchema>;
|
|
19
|
+
type FboTrafficSource = z.infer<typeof fboTrafficSourceSchema>;
|
|
20
|
+
type FboTrafficRow = z.infer<typeof fboTrafficRowSchema>;
|
|
21
|
+
type FboSystemRole = z.infer<typeof fboSystemRoleSchema>;
|
|
22
|
+
type FboCompanyMember = z.infer<typeof fboCompanyMemberSchema>;
|
|
18
23
|
|
|
19
|
-
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, FboRole };
|
|
24
|
+
export type { FboAcceptanceAxis, FboAcceptanceStatus, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboFlight, FboFlightStatus, FboFlightType, FboGroundServices, FboOccupation, 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.5",
|
|
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,5 +1,13 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
fboCompanyMemberSchema,
|
|
4
|
+
fboDutySchema,
|
|
5
|
+
fboFlightSchema,
|
|
6
|
+
fboFlightStatusSchema,
|
|
7
|
+
fboOccupationSchema,
|
|
8
|
+
fboSystemRoleSchema,
|
|
9
|
+
fboTrafficRowSchema,
|
|
10
|
+
} from "./fbo";
|
|
3
11
|
|
|
4
12
|
/**
|
|
5
13
|
* Fixtures are copied from the API's FlightResource / DutyResource shapes, not
|
|
@@ -59,7 +67,75 @@ describe("fbo status/authorization additions", () => {
|
|
|
59
67
|
expect(fboOccupationSchema.shape.can).toBeDefined();
|
|
60
68
|
});
|
|
61
69
|
|
|
62
|
-
it("still parses a flight
|
|
70
|
+
it("still parses a flight without can (assigned-bookings feed sends none)", () => {
|
|
63
71
|
expect(fboFlightSchema.parse(flightPayload).can).toBeUndefined();
|
|
64
72
|
});
|
|
73
|
+
|
|
74
|
+
it("parses a flight with a keyed all-false can object unchanged", () => {
|
|
75
|
+
const withCan = { ...flightPayload, can: { update: false, delete: false, decide: false } };
|
|
76
|
+
expect(fboFlightSchema.parse(withCan).can).toEqual({ update: false, delete: false, decide: false });
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("rejects can as an array — the assigned-bookings feed must send a keyed object, not []", () => {
|
|
80
|
+
expect(fboFlightSchema.safeParse({ ...flightPayload, can: [] }).success).toBe(false);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
describe("fboTrafficRowSchema", () => {
|
|
85
|
+
it("parses a limited row — only routing/time survive the trim", () => {
|
|
86
|
+
const limited = {
|
|
87
|
+
id: 501,
|
|
88
|
+
visibility: "limited",
|
|
89
|
+
source: "movement",
|
|
90
|
+
flight_status: "active",
|
|
91
|
+
etdZ: "2026-09-01T20:00:00.000000Z",
|
|
92
|
+
etaZ_no_time: false,
|
|
93
|
+
departure_airport_id: null,
|
|
94
|
+
};
|
|
95
|
+
expect(fboTrafficRowSchema.parse(limited).visibility).toBe("limited");
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
it("parses an own row — the full flight payload plus visibility/source, keeping can", () => {
|
|
99
|
+
const own = { ...flightPayload, visibility: "own", source: "movement", can: { update: true, delete: true, decide: false } };
|
|
100
|
+
const parsed = fboTrafficRowSchema.parse(own);
|
|
101
|
+
expect(parsed.visibility).toBe("own");
|
|
102
|
+
expect(parsed.can).toEqual({ update: true, delete: true, decide: false });
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it("rejects a visibility outside the own/details/limited vocabulary", () => {
|
|
106
|
+
expect(fboTrafficRowSchema.safeParse({ id: 1, visibility: "secret", source: "movement", flight_status: "active" }).success).toBe(false);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it("parses an assigned-company booking row — type widens to 'booking', company_id nulled", () => {
|
|
110
|
+
const bookingRow = {
|
|
111
|
+
id: 900,
|
|
112
|
+
type: "booking",
|
|
113
|
+
source: "booking",
|
|
114
|
+
visibility: "limited",
|
|
115
|
+
flight_status: "active",
|
|
116
|
+
company_id: null,
|
|
117
|
+
etdZ: "2026-09-01T08:00:00.000000Z",
|
|
118
|
+
etaZ: "2026-09-01T09:00:00.000000Z",
|
|
119
|
+
departure_airport_id: 2753,
|
|
120
|
+
};
|
|
121
|
+
const parsed = fboTrafficRowSchema.parse(bookingRow);
|
|
122
|
+
expect(parsed.type).toBe("booking");
|
|
123
|
+
expect(parsed.company_id).toBeNull();
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
describe("fboCompanyMemberSchema", () => {
|
|
128
|
+
it("parses a member row with its assigned roles", () => {
|
|
129
|
+
const member = {
|
|
130
|
+
id: 12, user_id: 7, name: "Erika Muster", email: "erika@example.test", status: "active",
|
|
131
|
+
roles: ["fboOperator", "fboTrafficViewer"],
|
|
132
|
+
};
|
|
133
|
+
expect(fboCompanyMemberSchema.parse(member).roles).toEqual(["fboOperator", "fboTrafficViewer"]);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
describe("fboSystemRoleSchema", () => {
|
|
138
|
+
it("rejects a non-FBO role name", () => {
|
|
139
|
+
expect(fboSystemRoleSchema.safeParse("admin").success).toBe(false);
|
|
140
|
+
});
|
|
65
141
|
});
|
package/src/schemas/fbo.ts
CHANGED
|
@@ -40,14 +40,14 @@ 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
|
-
/** Per-row action gates on a flight.
|
|
43
|
+
/** Per-row action gates on a flight. Optional for forward-compat; every current FBO row sends it. */
|
|
44
44
|
export const fboFlightCanSchema = z.object({
|
|
45
45
|
update: z.boolean(),
|
|
46
46
|
delete: z.boolean(),
|
|
47
47
|
decide: z.boolean(),
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
/** Per-row action gates on a duty or occupation.
|
|
50
|
+
/** Per-row action gates on a duty or occupation. Optional for forward-compat; every current FBO row sends it. */
|
|
51
51
|
export const fboRowCanSchema = z.object({
|
|
52
52
|
update: z.boolean(),
|
|
53
53
|
delete: z.boolean(),
|
|
@@ -151,3 +151,64 @@ export const fboDecisionInputSchema = z.object({
|
|
|
151
151
|
axis: fboDecisionAxisSchema,
|
|
152
152
|
status: fboDecisionSchema,
|
|
153
153
|
});
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* How much of a traffic-board row the viewer is entitled to see: `own`
|
|
157
|
+
* (their company's flight, full payload), `details` (a partner's flight with
|
|
158
|
+
* contact/authorship trimmed), or `limited` (routing/time only).
|
|
159
|
+
*/
|
|
160
|
+
export const fboVisibilitySchema = z.enum(["own", "details", "limited"]);
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Where a traffic row originates: an FBO-filed `movement` (scheduled flight
|
|
164
|
+
* or PPR) or a flight-school `booking` surfaced on the board.
|
|
165
|
+
*/
|
|
166
|
+
export const fboTrafficSourceSchema = z.enum(["movement", "booking"]);
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* A traffic-board row's `type`: an FBO-filed movement (`scheduledFlight`,
|
|
170
|
+
* `ppr` — `fboFlightTypeSchema`'s own set) or, when `source` is `booking`, a
|
|
171
|
+
* flight-school booking rendered in the same shape (`AssignedFlightResource`
|
|
172
|
+
* always sends `type: "booking"`).
|
|
173
|
+
*/
|
|
174
|
+
export const fboTrafficRowTypeSchema = z.enum(["scheduledFlight", "ppr", "booking"]);
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* One row of the FBO traffic board. `.partial()` because `details`/`limited`
|
|
178
|
+
* rows omit keys the viewer isn't entitled to (e.g. no `ac_call`, `contact`,
|
|
179
|
+
* `author_id` on `limited` rows) — only `own` rows carry the full
|
|
180
|
+
* `fboFlightSchema` payload plus `can`. `company_id` is explicitly nullable
|
|
181
|
+
* (sent as `null`, not omitted, on every `details`/`limited` row) and `type`
|
|
182
|
+
* widens `fboFlightSchema`'s own two-value set to also allow `"booking"`.
|
|
183
|
+
*/
|
|
184
|
+
export const fboTrafficRowSchema = fboFlightSchema.partial().extend({
|
|
185
|
+
id: z.number(),
|
|
186
|
+
type: fboTrafficRowTypeSchema.optional(),
|
|
187
|
+
company_id: z.number().nullable().optional(),
|
|
188
|
+
visibility: fboVisibilitySchema,
|
|
189
|
+
source: fboTrafficSourceSchema,
|
|
190
|
+
flight_status: fboFlightStatusSchema,
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
/** System roles served by `GET companies/{id}/fbo/meta` for role-assignment UI. */
|
|
194
|
+
export const FBO_SYSTEM_ROLES = [
|
|
195
|
+
"fboOperator",
|
|
196
|
+
"fboFlightManager",
|
|
197
|
+
"fboDutyPlanner",
|
|
198
|
+
"fboDutyViewer",
|
|
199
|
+
"fboTrafficViewer",
|
|
200
|
+
"fboTrafficObserver",
|
|
201
|
+
"fboSelfApprover",
|
|
202
|
+
] as const;
|
|
203
|
+
export const fboSystemRoleSchema = z.enum(FBO_SYSTEM_ROLES);
|
|
204
|
+
|
|
205
|
+
/** One row of an FBO company's member roster, with its assigned system roles. */
|
|
206
|
+
export const fboCompanyMemberSchema = z.object({
|
|
207
|
+
id: z.number(),
|
|
208
|
+
user_id: z.number(),
|
|
209
|
+
name: z.string(),
|
|
210
|
+
email: z.string().nullable(),
|
|
211
|
+
status: z.string(),
|
|
212
|
+
roles: z.array(z.string()),
|
|
213
|
+
can: fboRowCanSchema.optional(),
|
|
214
|
+
});
|
package/src/types/fbo.ts
CHANGED
|
@@ -14,3 +14,8 @@ export type FboCompanyProfile = z.infer<typeof Fbo.fboCompanyProfileSchema>;
|
|
|
14
14
|
export type FboDecisionAxis = z.infer<typeof Fbo.fboDecisionAxisSchema>;
|
|
15
15
|
export type FboDecision = z.infer<typeof Fbo.fboDecisionSchema>;
|
|
16
16
|
export type FboDecisionInput = z.infer<typeof Fbo.fboDecisionInputSchema>;
|
|
17
|
+
export type FboVisibility = z.infer<typeof Fbo.fboVisibilitySchema>;
|
|
18
|
+
export type FboTrafficSource = z.infer<typeof Fbo.fboTrafficSourceSchema>;
|
|
19
|
+
export type FboTrafficRow = z.infer<typeof Fbo.fboTrafficRowSchema>;
|
|
20
|
+
export type FboSystemRole = z.infer<typeof Fbo.fboSystemRoleSchema>;
|
|
21
|
+
export type FboCompanyMember = z.infer<typeof Fbo.fboCompanyMemberSchema>;
|