@updraft-solutions/mcrit-sdk 0.14.3 → 0.14.4
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-CDLXKNMA.js} +34 -1
- package/dist/{chunk-562POFCT.cjs → chunk-JLIYDBW4.cjs} +34 -1
- package/dist/{fbo-CsOm51Z3.d.cts → fbo-CbJQnC91.d.cts} +18181 -17692
- package/dist/{fbo-CsOm51Z3.d.ts → fbo-CbJQnC91.d.ts} +18181 -17692
- package/dist/index.cjs +18 -6
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +18 -6
- package/dist/{operating-hours-zg95Qlxz.d.cts → operating-hours-B_S7kQ98.d.cts} +1 -1
- package/dist/{operating-hours-c3SukLvt.d.ts → operating-hours-mt1E3mkW.d.ts} +1 -1
- package/dist/schemas/index.cjs +14 -2
- package/dist/schemas/index.d.cts +123 -123
- package/dist/schemas/index.d.ts +123 -123
- package/dist/schemas/index.js +13 -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 +61 -2
- package/src/schemas/fbo.ts +51 -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,10 @@ import {
|
|
|
148
150
|
fboOccupationSchema,
|
|
149
151
|
fboRoleSchema,
|
|
150
152
|
fboRowCanSchema,
|
|
153
|
+
fboSystemRoleSchema,
|
|
154
|
+
fboTrafficRowSchema,
|
|
155
|
+
fboTrafficSourceSchema,
|
|
156
|
+
fboVisibilitySchema,
|
|
151
157
|
feeCategoryOptionsSchema,
|
|
152
158
|
feeSchema,
|
|
153
159
|
flightLogSchema,
|
|
@@ -205,7 +211,7 @@ import {
|
|
|
205
211
|
zMoneyObject,
|
|
206
212
|
zNetGross,
|
|
207
213
|
zNullableBool
|
|
208
|
-
} from "../chunk-
|
|
214
|
+
} from "../chunk-CDLXKNMA.js";
|
|
209
215
|
export {
|
|
210
216
|
ALLOWED_GEOMETRY_TYPES,
|
|
211
217
|
ALLOWED_NEWSLETTER_VARIABLES,
|
|
@@ -225,6 +231,7 @@ export {
|
|
|
225
231
|
CreateSyllabusFromTemplateFormSchema,
|
|
226
232
|
DividerBlockSchema,
|
|
227
233
|
EnrollmentTrainingStatusEnum,
|
|
234
|
+
FBO_SYSTEM_ROLES,
|
|
228
235
|
FaqSchema,
|
|
229
236
|
FaqStatus,
|
|
230
237
|
FieldLabelSchema,
|
|
@@ -343,6 +350,7 @@ export {
|
|
|
343
350
|
extendedAirplaneSchema,
|
|
344
351
|
fboAcceptanceAxisSchema,
|
|
345
352
|
fboAcceptanceStatusSchema,
|
|
353
|
+
fboCompanyMemberSchema,
|
|
346
354
|
fboCompanyProfileSchema,
|
|
347
355
|
fboDecisionAxisSchema,
|
|
348
356
|
fboDecisionInputSchema,
|
|
@@ -356,6 +364,10 @@ export {
|
|
|
356
364
|
fboOccupationSchema,
|
|
357
365
|
fboRoleSchema,
|
|
358
366
|
fboRowCanSchema,
|
|
367
|
+
fboSystemRoleSchema,
|
|
368
|
+
fboTrafficRowSchema,
|
|
369
|
+
fboTrafficSourceSchema,
|
|
370
|
+
fboVisibilitySchema,
|
|
359
371
|
feeCategoryOptionsSchema,
|
|
360
372
|
feeSchema,
|
|
361
373
|
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-B_S7kQ98.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, by as fboTrafficSourceSchema, bz as fboVisibilitySchema } from '../fbo-CbJQnC91.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-mt1E3mkW.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, by as fboTrafficSourceSchema, bz as fboVisibilitySchema } from '../fbo-CbJQnC91.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.4",
|
|
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,58 @@ 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
|
+
|
|
110
|
+
describe("fboCompanyMemberSchema", () => {
|
|
111
|
+
it("parses a member row with its assigned roles", () => {
|
|
112
|
+
const member = {
|
|
113
|
+
id: 12, user_id: 7, name: "Erika Muster", email: "erika@example.test", status: "active",
|
|
114
|
+
roles: ["fboOperator", "fboTrafficViewer"],
|
|
115
|
+
};
|
|
116
|
+
expect(fboCompanyMemberSchema.parse(member).roles).toEqual(["fboOperator", "fboTrafficViewer"]);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
describe("fboSystemRoleSchema", () => {
|
|
121
|
+
it("rejects a non-FBO role name", () => {
|
|
122
|
+
expect(fboSystemRoleSchema.safeParse("admin").success).toBe(false);
|
|
123
|
+
});
|
|
65
124
|
});
|
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,52 @@ 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
|
+
* One row of the FBO traffic board. `.partial()` because `details`/`limited`
|
|
170
|
+
* rows omit keys the viewer isn't entitled to (e.g. no `ac_call`, `contact`,
|
|
171
|
+
* `author_id` on `limited` rows; `company_id` sent as null) — only `own` rows
|
|
172
|
+
* carry the full `fboFlightSchema` payload plus `can`.
|
|
173
|
+
*/
|
|
174
|
+
export const fboTrafficRowSchema = fboFlightSchema.partial().extend({
|
|
175
|
+
id: z.number(),
|
|
176
|
+
visibility: fboVisibilitySchema,
|
|
177
|
+
source: fboTrafficSourceSchema,
|
|
178
|
+
flight_status: fboFlightStatusSchema,
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
/** System roles served by `GET companies/{id}/fbo/meta` for role-assignment UI. */
|
|
182
|
+
export const FBO_SYSTEM_ROLES = [
|
|
183
|
+
"fboOperator",
|
|
184
|
+
"fboFlightManager",
|
|
185
|
+
"fboDutyPlanner",
|
|
186
|
+
"fboDutyViewer",
|
|
187
|
+
"fboTrafficViewer",
|
|
188
|
+
"fboTrafficObserver",
|
|
189
|
+
"fboSelfApprover",
|
|
190
|
+
] as const;
|
|
191
|
+
export const fboSystemRoleSchema = z.enum(FBO_SYSTEM_ROLES);
|
|
192
|
+
|
|
193
|
+
/** One row of an FBO company's member roster, with its assigned system roles. */
|
|
194
|
+
export const fboCompanyMemberSchema = z.object({
|
|
195
|
+
id: z.number(),
|
|
196
|
+
user_id: z.number(),
|
|
197
|
+
name: z.string(),
|
|
198
|
+
email: z.string().nullable(),
|
|
199
|
+
status: z.string(),
|
|
200
|
+
roles: z.array(z.string()),
|
|
201
|
+
can: fboRowCanSchema.optional(),
|
|
202
|
+
});
|
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>;
|