@updraft-solutions/mcrit-sdk 0.19.2 → 0.20.1
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/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -15
- package/dist/schemas/index.d.cts +196 -196
- package/dist/schemas/index.d.ts +196 -196
- package/dist/types/index.d.cts +91 -3
- package/dist/types/index.d.ts +91 -3
- package/package.json +1 -1
- package/src/index.ts +10 -0
- package/src/types/ai.ts +90 -0
- package/dist/{conversation-Be76HoQk.d.cts → conversation-JmrIujrU.d.cts} +21342 -21342
- package/dist/{conversation-Be76HoQk.d.ts → conversation-JmrIujrU.d.ts} +21342 -21342
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a9 as FormSubmission, cB as fboAcceptanceAxisSchema, cC as fboAcceptanceStatusSchema, cF as fboActivitySchema, cD as fboActivityCauserSchema, cE as fboActivityChangesSchema, cK as fboCompanySchema, cH as fboCompanyGrantSchema, cG as fboCompanyGrantInputSchema, cI as fboCompanyMemberSchema, cJ as fboCompanyProfileSchema, cN as fboDecisionSchema, cL as fboDecisionAxisSchema, cM as fboDecisionInputSchema, cP as fboDutySchema, cO as fboDutyAffectedSchema, cQ as fboDutySeriesResponseSchema, cT as fboFlightSchema, cS as fboFlightDocumentSchema, cU as fboFlightStatusSchema, cV as fboFlightTypeSchema, cX as fboGrantAbilitySchema, cW as fboGrantAbilityOptionSchema, cY as fboGrantCompanyRefSchema, cZ as fboGroundServicesSchema, c_ as fboLandingsSummarySchema, c$ as fboMaterialiseResultSchema, d0 as fboMetaSchema, d1 as fboNextDutySchema, d2 as fboOccupationSchema, d3 as fboOperationsSchema, d4 as fboPersonSchema, d5 as fboPobSchema, d6 as fboRecurrenceSchema, d7 as fboRecurrenceTypeSchema, d8 as fboRecurringFlightSchema, d9 as fboRoleSchema, db as fboStatisticsSchema, dc as fboSystemRoleSchema, dd as fboTrafficLayerInputSchema, de as fboTrafficRowSchema, dg as fboTrafficSourceSchema, dh as fboVisibilitySchema, di as fboWeeklyLandingSchema, ch as conversationSchema, cb as conversationKindSchema, cc as conversationMessageSchema, cd as conversationMessageSentEventSchema, ce as conversationParticipantSchema, cf as conversationReadEventSchema, cg as conversationRecipientSchema, ci as conversationUnreadSummarySchema } from '../conversation-
|
|
2
|
-
export { A as Activity, a as Address, b as AircraftPosition, c as AircraftRating, d as Airplane, en as AirplaneIssue, eo as AirplaneIssueSeverity, ep as AirplaneIssueStatus, e as AirplanePermission, f as AirplaneShareInvite, g as Airport, h as Alert, i as AllowedDocumentType, j as ApproachType, m as Avail, B as BaseMembership, eq as BaseModel, o as Booking, C as Comment, p as Company, q as Course, er as CourseCheckSyllabus, s as CourseEnrollment, es as CourseEnrollmentMetrics, t as CourseFee, u as CreateAirplaneIssueInput, v as CreateCommentInput, z as CreatePostInput, G as DeferAirplaneIssueInput, H as Document, I as DocumentComplianceStatus, J as DocumentRequirement, K as DocumentRequirementGroup, L as DocumentRequirementGroupAssignment, M as DocumentShare, N as DocumentType, R as Event, S as Expense, T as ExpenseItem, U as ExtendedAirplane, X as Fee, Y as FeeCategoryOptions, $ as FlightLog, a0 as FlightRequest, a1 as FlightRequestAvailability, a2 as FlightRequestBusyInterval, a3 as FlightRequestResponse, a4 as FlightRequestResponseStatus, a5 as FlightRequestSeat, a6 as FlightRequestStatus, a7 as FlightRequestWindow, au as Invoice, av as Landing, aw as LandingFee, ax as MaintenanceEvent, ay as MaintenanceEventEstimation, az as MaintenanceStatus, em as Media, aA as MediaCollection, aB as Membership, aC as MembershipSignup, aD as Post, aE as PostSubject, aF as PrePaidPackage, aG as Price, aH as Qualification, aI as RecurringFlight, aR as ResolveAirplaneIssueInput, aT as Role, aU as Runway, aV as ScheduledFlight, a_ as Setting, b5 as SpecialFlight, bi as Tag, et as TagSyncEntry, bj as TeachingPermission, bm as Ticket, bB as UpdateAirplaneIssueInput, bC as UpdateCommentInput, bE as UpdatePostInput, bM as User, bN as UserAircraftRating, bO as UserQualification, bP as Waypoint } from '../conversation-
|
|
1
|
+
import { a9 as FormSubmission, cB as fboAcceptanceAxisSchema, cC as fboAcceptanceStatusSchema, cF as fboActivitySchema, cD as fboActivityCauserSchema, cE as fboActivityChangesSchema, cK as fboCompanySchema, cH as fboCompanyGrantSchema, cG as fboCompanyGrantInputSchema, cI as fboCompanyMemberSchema, cJ as fboCompanyProfileSchema, cN as fboDecisionSchema, cL as fboDecisionAxisSchema, cM as fboDecisionInputSchema, cP as fboDutySchema, cO as fboDutyAffectedSchema, cQ as fboDutySeriesResponseSchema, cT as fboFlightSchema, cS as fboFlightDocumentSchema, cU as fboFlightStatusSchema, cV as fboFlightTypeSchema, cX as fboGrantAbilitySchema, cW as fboGrantAbilityOptionSchema, cY as fboGrantCompanyRefSchema, cZ as fboGroundServicesSchema, c_ as fboLandingsSummarySchema, c$ as fboMaterialiseResultSchema, d0 as fboMetaSchema, d1 as fboNextDutySchema, d2 as fboOccupationSchema, d3 as fboOperationsSchema, d4 as fboPersonSchema, d5 as fboPobSchema, d6 as fboRecurrenceSchema, d7 as fboRecurrenceTypeSchema, d8 as fboRecurringFlightSchema, d9 as fboRoleSchema, db as fboStatisticsSchema, dc as fboSystemRoleSchema, dd as fboTrafficLayerInputSchema, de as fboTrafficRowSchema, dg as fboTrafficSourceSchema, dh as fboVisibilitySchema, di as fboWeeklyLandingSchema, ch as conversationSchema, cb as conversationKindSchema, cc as conversationMessageSchema, cd as conversationMessageSentEventSchema, ce as conversationParticipantSchema, cf as conversationReadEventSchema, cg as conversationRecipientSchema, ci as conversationUnreadSummarySchema } from '../conversation-JmrIujrU.cjs';
|
|
2
|
+
export { A as Activity, a as Address, b as AircraftPosition, c as AircraftRating, d as Airplane, en as AirplaneIssue, eo as AirplaneIssueSeverity, ep as AirplaneIssueStatus, e as AirplanePermission, f as AirplaneShareInvite, g as Airport, h as Alert, i as AllowedDocumentType, j as ApproachType, m as Avail, B as BaseMembership, eq as BaseModel, o as Booking, C as Comment, p as Company, q as Course, er as CourseCheckSyllabus, s as CourseEnrollment, es as CourseEnrollmentMetrics, t as CourseFee, u as CreateAirplaneIssueInput, v as CreateCommentInput, z as CreatePostInput, G as DeferAirplaneIssueInput, H as Document, I as DocumentComplianceStatus, J as DocumentRequirement, K as DocumentRequirementGroup, L as DocumentRequirementGroupAssignment, M as DocumentShare, N as DocumentType, R as Event, S as Expense, T as ExpenseItem, U as ExtendedAirplane, X as Fee, Y as FeeCategoryOptions, $ as FlightLog, a0 as FlightRequest, a1 as FlightRequestAvailability, a2 as FlightRequestBusyInterval, a3 as FlightRequestResponse, a4 as FlightRequestResponseStatus, a5 as FlightRequestSeat, a6 as FlightRequestStatus, a7 as FlightRequestWindow, au as Invoice, av as Landing, aw as LandingFee, ax as MaintenanceEvent, ay as MaintenanceEventEstimation, az as MaintenanceStatus, em as Media, aA as MediaCollection, aB as Membership, aC as MembershipSignup, aD as Post, aE as PostSubject, aF as PrePaidPackage, aG as Price, aH as Qualification, aI as RecurringFlight, aR as ResolveAirplaneIssueInput, aT as Role, aU as Runway, aV as ScheduledFlight, a_ as Setting, b5 as SpecialFlight, bi as Tag, et as TagSyncEntry, bj as TeachingPermission, bm as Ticket, bB as UpdateAirplaneIssueInput, bC as UpdateCommentInput, bE as UpdatePostInput, bM as User, bN as UserAircraftRating, bO as UserQualification, bP as Waypoint } from '../conversation-JmrIujrU.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -201,6 +201,94 @@ interface LogbookStageResult {
|
|
|
201
201
|
routed: Record<string, number> | number[];
|
|
202
202
|
discarded: DiscardedRow[];
|
|
203
203
|
}
|
|
204
|
+
type AircraftLogbookScoreReason = "duration_mismatch" | "totals_mismatch" | "date_out_of_order" | "missing_airport" | "unreadable_time" | "match_low" | "match_none";
|
|
205
|
+
type AircraftLogbookUiStatus = "unmatched" | "matched" | "ready_with_gaps" | "logged" | "applied" | "dismissed";
|
|
206
|
+
interface AircraftLogbookDeviation {
|
|
207
|
+
field: "etdZ" | "etaZ" | "landings" | "departure" | "destination";
|
|
208
|
+
logbook: string | number | null;
|
|
209
|
+
flight_log: string | number | null;
|
|
210
|
+
}
|
|
211
|
+
interface AircraftLogbookRowMeta extends LogbookSuggestionMeta {
|
|
212
|
+
pic_text?: string | null;
|
|
213
|
+
crew_count?: number | null;
|
|
214
|
+
pax_count?: number | null;
|
|
215
|
+
block_minutes?: number | null;
|
|
216
|
+
page_index?: number;
|
|
217
|
+
row_index?: number;
|
|
218
|
+
leg_group?: string;
|
|
219
|
+
score?: number;
|
|
220
|
+
score_reasons?: AircraftLogbookScoreReason[];
|
|
221
|
+
reconciliation?: {
|
|
222
|
+
flight_log_id: number;
|
|
223
|
+
deviations: AircraftLogbookDeviation[];
|
|
224
|
+
} | null;
|
|
225
|
+
dismiss_reason?: "already_logged" | "unreadable" | "manual" | null;
|
|
226
|
+
}
|
|
227
|
+
type AircraftLogbookRow = AiSuggestion<LogbookFlightLogPayload> & {
|
|
228
|
+
meta?: AircraftLogbookRowMeta;
|
|
229
|
+
batch_id: number | null;
|
|
230
|
+
ui_status: AircraftLogbookUiStatus;
|
|
231
|
+
booking: {
|
|
232
|
+
id: number;
|
|
233
|
+
etdZ: string | null;
|
|
234
|
+
etaZ: string | null;
|
|
235
|
+
crew: string;
|
|
236
|
+
} | null;
|
|
237
|
+
flight_log: {
|
|
238
|
+
id: number;
|
|
239
|
+
etdZ: string | null;
|
|
240
|
+
etaZ: string | null;
|
|
241
|
+
} | null;
|
|
242
|
+
};
|
|
243
|
+
type LogbookImportBatchStatus = "queued" | "processing" | "completed" | "failed";
|
|
244
|
+
interface LogbookImportBatch {
|
|
245
|
+
type: "logbook_import_batch";
|
|
246
|
+
id: number;
|
|
247
|
+
airplane_id: number;
|
|
248
|
+
company_id: number;
|
|
249
|
+
status: LogbookImportBatchStatus;
|
|
250
|
+
year_hint: number;
|
|
251
|
+
page_count: number;
|
|
252
|
+
row_count: number;
|
|
253
|
+
logged_count: number;
|
|
254
|
+
matched_count: number;
|
|
255
|
+
unmatched_count: number;
|
|
256
|
+
duplicate_count: number;
|
|
257
|
+
failed_pages: {
|
|
258
|
+
file: string;
|
|
259
|
+
page: number | null;
|
|
260
|
+
reason: string;
|
|
261
|
+
}[];
|
|
262
|
+
task_uuid: string | null;
|
|
263
|
+
requested_by: number | null;
|
|
264
|
+
created_at: string;
|
|
265
|
+
}
|
|
266
|
+
interface AircraftLogbookImportResult {
|
|
267
|
+
batch_id: number;
|
|
268
|
+
pages: number;
|
|
269
|
+
rows: number;
|
|
270
|
+
logged: number;
|
|
271
|
+
duplicates: number;
|
|
272
|
+
attached: number;
|
|
273
|
+
unmatched: number;
|
|
274
|
+
failed_pages: {
|
|
275
|
+
file: string;
|
|
276
|
+
page: number | null;
|
|
277
|
+
reason: string;
|
|
278
|
+
}[];
|
|
279
|
+
}
|
|
280
|
+
interface AircraftLogbookCrewProposal {
|
|
281
|
+
membership_id: number;
|
|
282
|
+
name: string;
|
|
283
|
+
score: number;
|
|
284
|
+
}
|
|
285
|
+
interface AircraftLogbookBulkAcceptResult {
|
|
286
|
+
applied: number[];
|
|
287
|
+
failed: {
|
|
288
|
+
id: number;
|
|
289
|
+
errors: Record<string, string[]>;
|
|
290
|
+
}[];
|
|
291
|
+
}
|
|
204
292
|
|
|
205
293
|
interface RoleListItem {
|
|
206
294
|
id: number;
|
|
@@ -515,4 +603,4 @@ type ConversationUnreadSummary = z.infer<typeof conversationUnreadSummarySchema>
|
|
|
515
603
|
type ConversationMessageSentEvent = z.infer<typeof conversationMessageSentEventSchema>;
|
|
516
604
|
type ConversationReadEvent = z.infer<typeof conversationReadEventSchema>;
|
|
517
605
|
|
|
518
|
-
export type { AiSuggestedMilestone, AiSuggestion, AiSuggestionStatus, AircraftBlock, AircraftBlockReason, ApiResponse, BackgroundTask, BackgroundTaskStatus, ComplianceData, ComplianceGroup, ComplianceGroupSource, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Conversation, ConversationKind, ConversationMessage, ConversationMessageSentEvent, ConversationParticipant, ConversationReadEvent, ConversationRecipient, ConversationUnreadSummary, CourseDescriptionSuggestionPayload, DataWrappedResponse, DiscardedRow, FboAcceptanceAxis, FboAcceptanceStatus, FboActivity, FboActivityCauser, FboActivityChanges, FboCompany, FboCompanyGrant, FboCompanyGrantInput, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightDocument, FboFlightStatus, FboFlightType, FboGrantAbility, FboGrantAbilityOption, FboGrantCompanyRef, FboGroundServices, FboLandingsSummary, FboMaterialiseResult, FboMeta, FboNextDuty, FboOccupation, FboOperations, FboPerson, FboPob, FboRecurrence, FboRecurrenceType, FboRecurringFlight, FboRole, FboStatistics, FboSystemRole, FboTrafficLayerInput, FboTrafficRow, FboTrafficSource, FboVisibility, FboWeeklyLanding, GroupedPermissions, LandingFeeImportResult, LandingFeeInvoiceApplyPayload, LandingFeeInvoiceApplyResult, LandingFeeInvoicePreview, LandingFeeInvoicePreviewRow, LandingFeeTemplateParams, LogbookFlightLogPayload, LogbookStageResult, LogbookSuggestion, LogbookSuggestionMeta, OperatingHourDay, OperatingHourException, OperatingHourExceptionInput, OperatingHourInterval, OperatingHourKind, OperatingHourResolvedDate, OperatingHourSchedule, OperatingHourScheduleInput, OperatingHourStatusEntry, OperatingHourWindow, OperatingHoursMeta, OperatingHoursNextOpenEntry, OperatingHoursNextOpenResponse, OperatingHoursStatusResponse, OperatingStatusValue, PaginatedResponse, PermissionItem, Resource, RoleDetail, RoleListItem, TimeAnchor, ToggleFavoriteResponse };
|
|
606
|
+
export type { AiSuggestedMilestone, AiSuggestion, AiSuggestionStatus, AircraftBlock, AircraftBlockReason, AircraftLogbookBulkAcceptResult, AircraftLogbookCrewProposal, AircraftLogbookDeviation, AircraftLogbookImportResult, AircraftLogbookRow, AircraftLogbookRowMeta, AircraftLogbookScoreReason, AircraftLogbookUiStatus, ApiResponse, BackgroundTask, BackgroundTaskStatus, ComplianceData, ComplianceGroup, ComplianceGroupSource, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Conversation, ConversationKind, ConversationMessage, ConversationMessageSentEvent, ConversationParticipant, ConversationReadEvent, ConversationRecipient, ConversationUnreadSummary, CourseDescriptionSuggestionPayload, DataWrappedResponse, DiscardedRow, FboAcceptanceAxis, FboAcceptanceStatus, FboActivity, FboActivityCauser, FboActivityChanges, FboCompany, FboCompanyGrant, FboCompanyGrantInput, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightDocument, FboFlightStatus, FboFlightType, FboGrantAbility, FboGrantAbilityOption, FboGrantCompanyRef, FboGroundServices, FboLandingsSummary, FboMaterialiseResult, FboMeta, FboNextDuty, FboOccupation, FboOperations, FboPerson, FboPob, FboRecurrence, FboRecurrenceType, FboRecurringFlight, FboRole, FboStatistics, FboSystemRole, FboTrafficLayerInput, FboTrafficRow, FboTrafficSource, FboVisibility, FboWeeklyLanding, GroupedPermissions, LandingFeeImportResult, LandingFeeInvoiceApplyPayload, LandingFeeInvoiceApplyResult, LandingFeeInvoicePreview, LandingFeeInvoicePreviewRow, LandingFeeTemplateParams, LogbookFlightLogPayload, LogbookImportBatch, LogbookImportBatchStatus, LogbookStageResult, LogbookSuggestion, LogbookSuggestionMeta, OperatingHourDay, OperatingHourException, OperatingHourExceptionInput, OperatingHourInterval, OperatingHourKind, OperatingHourResolvedDate, OperatingHourSchedule, OperatingHourScheduleInput, OperatingHourStatusEntry, OperatingHourWindow, OperatingHoursMeta, OperatingHoursNextOpenEntry, OperatingHoursNextOpenResponse, OperatingHoursStatusResponse, OperatingStatusValue, PaginatedResponse, PermissionItem, Resource, RoleDetail, RoleListItem, TimeAnchor, ToggleFavoriteResponse };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a9 as FormSubmission, cB as fboAcceptanceAxisSchema, cC as fboAcceptanceStatusSchema, cF as fboActivitySchema, cD as fboActivityCauserSchema, cE as fboActivityChangesSchema, cK as fboCompanySchema, cH as fboCompanyGrantSchema, cG as fboCompanyGrantInputSchema, cI as fboCompanyMemberSchema, cJ as fboCompanyProfileSchema, cN as fboDecisionSchema, cL as fboDecisionAxisSchema, cM as fboDecisionInputSchema, cP as fboDutySchema, cO as fboDutyAffectedSchema, cQ as fboDutySeriesResponseSchema, cT as fboFlightSchema, cS as fboFlightDocumentSchema, cU as fboFlightStatusSchema, cV as fboFlightTypeSchema, cX as fboGrantAbilitySchema, cW as fboGrantAbilityOptionSchema, cY as fboGrantCompanyRefSchema, cZ as fboGroundServicesSchema, c_ as fboLandingsSummarySchema, c$ as fboMaterialiseResultSchema, d0 as fboMetaSchema, d1 as fboNextDutySchema, d2 as fboOccupationSchema, d3 as fboOperationsSchema, d4 as fboPersonSchema, d5 as fboPobSchema, d6 as fboRecurrenceSchema, d7 as fboRecurrenceTypeSchema, d8 as fboRecurringFlightSchema, d9 as fboRoleSchema, db as fboStatisticsSchema, dc as fboSystemRoleSchema, dd as fboTrafficLayerInputSchema, de as fboTrafficRowSchema, dg as fboTrafficSourceSchema, dh as fboVisibilitySchema, di as fboWeeklyLandingSchema, ch as conversationSchema, cb as conversationKindSchema, cc as conversationMessageSchema, cd as conversationMessageSentEventSchema, ce as conversationParticipantSchema, cf as conversationReadEventSchema, cg as conversationRecipientSchema, ci as conversationUnreadSummarySchema } from '../conversation-
|
|
2
|
-
export { A as Activity, a as Address, b as AircraftPosition, c as AircraftRating, d as Airplane, en as AirplaneIssue, eo as AirplaneIssueSeverity, ep as AirplaneIssueStatus, e as AirplanePermission, f as AirplaneShareInvite, g as Airport, h as Alert, i as AllowedDocumentType, j as ApproachType, m as Avail, B as BaseMembership, eq as BaseModel, o as Booking, C as Comment, p as Company, q as Course, er as CourseCheckSyllabus, s as CourseEnrollment, es as CourseEnrollmentMetrics, t as CourseFee, u as CreateAirplaneIssueInput, v as CreateCommentInput, z as CreatePostInput, G as DeferAirplaneIssueInput, H as Document, I as DocumentComplianceStatus, J as DocumentRequirement, K as DocumentRequirementGroup, L as DocumentRequirementGroupAssignment, M as DocumentShare, N as DocumentType, R as Event, S as Expense, T as ExpenseItem, U as ExtendedAirplane, X as Fee, Y as FeeCategoryOptions, $ as FlightLog, a0 as FlightRequest, a1 as FlightRequestAvailability, a2 as FlightRequestBusyInterval, a3 as FlightRequestResponse, a4 as FlightRequestResponseStatus, a5 as FlightRequestSeat, a6 as FlightRequestStatus, a7 as FlightRequestWindow, au as Invoice, av as Landing, aw as LandingFee, ax as MaintenanceEvent, ay as MaintenanceEventEstimation, az as MaintenanceStatus, em as Media, aA as MediaCollection, aB as Membership, aC as MembershipSignup, aD as Post, aE as PostSubject, aF as PrePaidPackage, aG as Price, aH as Qualification, aI as RecurringFlight, aR as ResolveAirplaneIssueInput, aT as Role, aU as Runway, aV as ScheduledFlight, a_ as Setting, b5 as SpecialFlight, bi as Tag, et as TagSyncEntry, bj as TeachingPermission, bm as Ticket, bB as UpdateAirplaneIssueInput, bC as UpdateCommentInput, bE as UpdatePostInput, bM as User, bN as UserAircraftRating, bO as UserQualification, bP as Waypoint } from '../conversation-
|
|
1
|
+
import { a9 as FormSubmission, cB as fboAcceptanceAxisSchema, cC as fboAcceptanceStatusSchema, cF as fboActivitySchema, cD as fboActivityCauserSchema, cE as fboActivityChangesSchema, cK as fboCompanySchema, cH as fboCompanyGrantSchema, cG as fboCompanyGrantInputSchema, cI as fboCompanyMemberSchema, cJ as fboCompanyProfileSchema, cN as fboDecisionSchema, cL as fboDecisionAxisSchema, cM as fboDecisionInputSchema, cP as fboDutySchema, cO as fboDutyAffectedSchema, cQ as fboDutySeriesResponseSchema, cT as fboFlightSchema, cS as fboFlightDocumentSchema, cU as fboFlightStatusSchema, cV as fboFlightTypeSchema, cX as fboGrantAbilitySchema, cW as fboGrantAbilityOptionSchema, cY as fboGrantCompanyRefSchema, cZ as fboGroundServicesSchema, c_ as fboLandingsSummarySchema, c$ as fboMaterialiseResultSchema, d0 as fboMetaSchema, d1 as fboNextDutySchema, d2 as fboOccupationSchema, d3 as fboOperationsSchema, d4 as fboPersonSchema, d5 as fboPobSchema, d6 as fboRecurrenceSchema, d7 as fboRecurrenceTypeSchema, d8 as fboRecurringFlightSchema, d9 as fboRoleSchema, db as fboStatisticsSchema, dc as fboSystemRoleSchema, dd as fboTrafficLayerInputSchema, de as fboTrafficRowSchema, dg as fboTrafficSourceSchema, dh as fboVisibilitySchema, di as fboWeeklyLandingSchema, ch as conversationSchema, cb as conversationKindSchema, cc as conversationMessageSchema, cd as conversationMessageSentEventSchema, ce as conversationParticipantSchema, cf as conversationReadEventSchema, cg as conversationRecipientSchema, ci as conversationUnreadSummarySchema } from '../conversation-JmrIujrU.js';
|
|
2
|
+
export { A as Activity, a as Address, b as AircraftPosition, c as AircraftRating, d as Airplane, en as AirplaneIssue, eo as AirplaneIssueSeverity, ep as AirplaneIssueStatus, e as AirplanePermission, f as AirplaneShareInvite, g as Airport, h as Alert, i as AllowedDocumentType, j as ApproachType, m as Avail, B as BaseMembership, eq as BaseModel, o as Booking, C as Comment, p as Company, q as Course, er as CourseCheckSyllabus, s as CourseEnrollment, es as CourseEnrollmentMetrics, t as CourseFee, u as CreateAirplaneIssueInput, v as CreateCommentInput, z as CreatePostInput, G as DeferAirplaneIssueInput, H as Document, I as DocumentComplianceStatus, J as DocumentRequirement, K as DocumentRequirementGroup, L as DocumentRequirementGroupAssignment, M as DocumentShare, N as DocumentType, R as Event, S as Expense, T as ExpenseItem, U as ExtendedAirplane, X as Fee, Y as FeeCategoryOptions, $ as FlightLog, a0 as FlightRequest, a1 as FlightRequestAvailability, a2 as FlightRequestBusyInterval, a3 as FlightRequestResponse, a4 as FlightRequestResponseStatus, a5 as FlightRequestSeat, a6 as FlightRequestStatus, a7 as FlightRequestWindow, au as Invoice, av as Landing, aw as LandingFee, ax as MaintenanceEvent, ay as MaintenanceEventEstimation, az as MaintenanceStatus, em as Media, aA as MediaCollection, aB as Membership, aC as MembershipSignup, aD as Post, aE as PostSubject, aF as PrePaidPackage, aG as Price, aH as Qualification, aI as RecurringFlight, aR as ResolveAirplaneIssueInput, aT as Role, aU as Runway, aV as ScheduledFlight, a_ as Setting, b5 as SpecialFlight, bi as Tag, et as TagSyncEntry, bj as TeachingPermission, bm as Ticket, bB as UpdateAirplaneIssueInput, bC as UpdateCommentInput, bE as UpdatePostInput, bM as User, bN as UserAircraftRating, bO as UserQualification, bP as Waypoint } from '../conversation-JmrIujrU.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -201,6 +201,94 @@ interface LogbookStageResult {
|
|
|
201
201
|
routed: Record<string, number> | number[];
|
|
202
202
|
discarded: DiscardedRow[];
|
|
203
203
|
}
|
|
204
|
+
type AircraftLogbookScoreReason = "duration_mismatch" | "totals_mismatch" | "date_out_of_order" | "missing_airport" | "unreadable_time" | "match_low" | "match_none";
|
|
205
|
+
type AircraftLogbookUiStatus = "unmatched" | "matched" | "ready_with_gaps" | "logged" | "applied" | "dismissed";
|
|
206
|
+
interface AircraftLogbookDeviation {
|
|
207
|
+
field: "etdZ" | "etaZ" | "landings" | "departure" | "destination";
|
|
208
|
+
logbook: string | number | null;
|
|
209
|
+
flight_log: string | number | null;
|
|
210
|
+
}
|
|
211
|
+
interface AircraftLogbookRowMeta extends LogbookSuggestionMeta {
|
|
212
|
+
pic_text?: string | null;
|
|
213
|
+
crew_count?: number | null;
|
|
214
|
+
pax_count?: number | null;
|
|
215
|
+
block_minutes?: number | null;
|
|
216
|
+
page_index?: number;
|
|
217
|
+
row_index?: number;
|
|
218
|
+
leg_group?: string;
|
|
219
|
+
score?: number;
|
|
220
|
+
score_reasons?: AircraftLogbookScoreReason[];
|
|
221
|
+
reconciliation?: {
|
|
222
|
+
flight_log_id: number;
|
|
223
|
+
deviations: AircraftLogbookDeviation[];
|
|
224
|
+
} | null;
|
|
225
|
+
dismiss_reason?: "already_logged" | "unreadable" | "manual" | null;
|
|
226
|
+
}
|
|
227
|
+
type AircraftLogbookRow = AiSuggestion<LogbookFlightLogPayload> & {
|
|
228
|
+
meta?: AircraftLogbookRowMeta;
|
|
229
|
+
batch_id: number | null;
|
|
230
|
+
ui_status: AircraftLogbookUiStatus;
|
|
231
|
+
booking: {
|
|
232
|
+
id: number;
|
|
233
|
+
etdZ: string | null;
|
|
234
|
+
etaZ: string | null;
|
|
235
|
+
crew: string;
|
|
236
|
+
} | null;
|
|
237
|
+
flight_log: {
|
|
238
|
+
id: number;
|
|
239
|
+
etdZ: string | null;
|
|
240
|
+
etaZ: string | null;
|
|
241
|
+
} | null;
|
|
242
|
+
};
|
|
243
|
+
type LogbookImportBatchStatus = "queued" | "processing" | "completed" | "failed";
|
|
244
|
+
interface LogbookImportBatch {
|
|
245
|
+
type: "logbook_import_batch";
|
|
246
|
+
id: number;
|
|
247
|
+
airplane_id: number;
|
|
248
|
+
company_id: number;
|
|
249
|
+
status: LogbookImportBatchStatus;
|
|
250
|
+
year_hint: number;
|
|
251
|
+
page_count: number;
|
|
252
|
+
row_count: number;
|
|
253
|
+
logged_count: number;
|
|
254
|
+
matched_count: number;
|
|
255
|
+
unmatched_count: number;
|
|
256
|
+
duplicate_count: number;
|
|
257
|
+
failed_pages: {
|
|
258
|
+
file: string;
|
|
259
|
+
page: number | null;
|
|
260
|
+
reason: string;
|
|
261
|
+
}[];
|
|
262
|
+
task_uuid: string | null;
|
|
263
|
+
requested_by: number | null;
|
|
264
|
+
created_at: string;
|
|
265
|
+
}
|
|
266
|
+
interface AircraftLogbookImportResult {
|
|
267
|
+
batch_id: number;
|
|
268
|
+
pages: number;
|
|
269
|
+
rows: number;
|
|
270
|
+
logged: number;
|
|
271
|
+
duplicates: number;
|
|
272
|
+
attached: number;
|
|
273
|
+
unmatched: number;
|
|
274
|
+
failed_pages: {
|
|
275
|
+
file: string;
|
|
276
|
+
page: number | null;
|
|
277
|
+
reason: string;
|
|
278
|
+
}[];
|
|
279
|
+
}
|
|
280
|
+
interface AircraftLogbookCrewProposal {
|
|
281
|
+
membership_id: number;
|
|
282
|
+
name: string;
|
|
283
|
+
score: number;
|
|
284
|
+
}
|
|
285
|
+
interface AircraftLogbookBulkAcceptResult {
|
|
286
|
+
applied: number[];
|
|
287
|
+
failed: {
|
|
288
|
+
id: number;
|
|
289
|
+
errors: Record<string, string[]>;
|
|
290
|
+
}[];
|
|
291
|
+
}
|
|
204
292
|
|
|
205
293
|
interface RoleListItem {
|
|
206
294
|
id: number;
|
|
@@ -515,4 +603,4 @@ type ConversationUnreadSummary = z.infer<typeof conversationUnreadSummarySchema>
|
|
|
515
603
|
type ConversationMessageSentEvent = z.infer<typeof conversationMessageSentEventSchema>;
|
|
516
604
|
type ConversationReadEvent = z.infer<typeof conversationReadEventSchema>;
|
|
517
605
|
|
|
518
|
-
export type { AiSuggestedMilestone, AiSuggestion, AiSuggestionStatus, AircraftBlock, AircraftBlockReason, ApiResponse, BackgroundTask, BackgroundTaskStatus, ComplianceData, ComplianceGroup, ComplianceGroupSource, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Conversation, ConversationKind, ConversationMessage, ConversationMessageSentEvent, ConversationParticipant, ConversationReadEvent, ConversationRecipient, ConversationUnreadSummary, CourseDescriptionSuggestionPayload, DataWrappedResponse, DiscardedRow, FboAcceptanceAxis, FboAcceptanceStatus, FboActivity, FboActivityCauser, FboActivityChanges, FboCompany, FboCompanyGrant, FboCompanyGrantInput, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightDocument, FboFlightStatus, FboFlightType, FboGrantAbility, FboGrantAbilityOption, FboGrantCompanyRef, FboGroundServices, FboLandingsSummary, FboMaterialiseResult, FboMeta, FboNextDuty, FboOccupation, FboOperations, FboPerson, FboPob, FboRecurrence, FboRecurrenceType, FboRecurringFlight, FboRole, FboStatistics, FboSystemRole, FboTrafficLayerInput, FboTrafficRow, FboTrafficSource, FboVisibility, FboWeeklyLanding, GroupedPermissions, LandingFeeImportResult, LandingFeeInvoiceApplyPayload, LandingFeeInvoiceApplyResult, LandingFeeInvoicePreview, LandingFeeInvoicePreviewRow, LandingFeeTemplateParams, LogbookFlightLogPayload, LogbookStageResult, LogbookSuggestion, LogbookSuggestionMeta, OperatingHourDay, OperatingHourException, OperatingHourExceptionInput, OperatingHourInterval, OperatingHourKind, OperatingHourResolvedDate, OperatingHourSchedule, OperatingHourScheduleInput, OperatingHourStatusEntry, OperatingHourWindow, OperatingHoursMeta, OperatingHoursNextOpenEntry, OperatingHoursNextOpenResponse, OperatingHoursStatusResponse, OperatingStatusValue, PaginatedResponse, PermissionItem, Resource, RoleDetail, RoleListItem, TimeAnchor, ToggleFavoriteResponse };
|
|
606
|
+
export type { AiSuggestedMilestone, AiSuggestion, AiSuggestionStatus, AircraftBlock, AircraftBlockReason, AircraftLogbookBulkAcceptResult, AircraftLogbookCrewProposal, AircraftLogbookDeviation, AircraftLogbookImportResult, AircraftLogbookRow, AircraftLogbookRowMeta, AircraftLogbookScoreReason, AircraftLogbookUiStatus, ApiResponse, BackgroundTask, BackgroundTaskStatus, ComplianceData, ComplianceGroup, ComplianceGroupSource, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Conversation, ConversationKind, ConversationMessage, ConversationMessageSentEvent, ConversationParticipant, ConversationReadEvent, ConversationRecipient, ConversationUnreadSummary, CourseDescriptionSuggestionPayload, DataWrappedResponse, DiscardedRow, FboAcceptanceAxis, FboAcceptanceStatus, FboActivity, FboActivityCauser, FboActivityChanges, FboCompany, FboCompanyGrant, FboCompanyGrantInput, FboCompanyMember, FboCompanyProfile, FboDecision, FboDecisionAxis, FboDecisionInput, FboDuty, FboDutyAffected, FboDutySeriesResponse, FboFlight, FboFlightDocument, FboFlightStatus, FboFlightType, FboGrantAbility, FboGrantAbilityOption, FboGrantCompanyRef, FboGroundServices, FboLandingsSummary, FboMaterialiseResult, FboMeta, FboNextDuty, FboOccupation, FboOperations, FboPerson, FboPob, FboRecurrence, FboRecurrenceType, FboRecurringFlight, FboRole, FboStatistics, FboSystemRole, FboTrafficLayerInput, FboTrafficRow, FboTrafficSource, FboVisibility, FboWeeklyLanding, GroupedPermissions, LandingFeeImportResult, LandingFeeInvoiceApplyPayload, LandingFeeInvoiceApplyResult, LandingFeeInvoicePreview, LandingFeeInvoicePreviewRow, LandingFeeTemplateParams, LogbookFlightLogPayload, LogbookImportBatch, LogbookImportBatchStatus, LogbookStageResult, LogbookSuggestion, LogbookSuggestionMeta, OperatingHourDay, OperatingHourException, OperatingHourExceptionInput, OperatingHourInterval, OperatingHourKind, OperatingHourResolvedDate, OperatingHourSchedule, OperatingHourScheduleInput, OperatingHourStatusEntry, OperatingHourWindow, OperatingHoursMeta, OperatingHoursNextOpenEntry, OperatingHoursNextOpenResponse, OperatingHoursStatusResponse, OperatingStatusValue, PaginatedResponse, PermissionItem, Resource, RoleDetail, RoleListItem, TimeAnchor, ToggleFavoriteResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@updraft-solutions/mcrit-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.1",
|
|
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/index.ts
CHANGED
|
@@ -107,6 +107,16 @@ export {
|
|
|
107
107
|
type LogbookSuggestion,
|
|
108
108
|
type DiscardedRow,
|
|
109
109
|
type LogbookStageResult,
|
|
110
|
+
type AircraftLogbookScoreReason,
|
|
111
|
+
type AircraftLogbookUiStatus,
|
|
112
|
+
type AircraftLogbookDeviation,
|
|
113
|
+
type AircraftLogbookRowMeta,
|
|
114
|
+
type AircraftLogbookRow,
|
|
115
|
+
type LogbookImportBatchStatus,
|
|
116
|
+
type LogbookImportBatch,
|
|
117
|
+
type AircraftLogbookImportResult,
|
|
118
|
+
type AircraftLogbookCrewProposal,
|
|
119
|
+
type AircraftLogbookBulkAcceptResult,
|
|
110
120
|
// types/roles.ts
|
|
111
121
|
type RoleListItem,
|
|
112
122
|
type PermissionItem,
|
package/src/types/ai.ts
CHANGED
|
@@ -84,3 +84,93 @@ export interface LogbookStageResult {
|
|
|
84
84
|
routed: Record<string, number> | number[];
|
|
85
85
|
discarded: DiscardedRow[];
|
|
86
86
|
}
|
|
87
|
+
|
|
88
|
+
// Aircraft logbook (Bordbuch) batch import — admin, airplane-scoped.
|
|
89
|
+
|
|
90
|
+
export type AircraftLogbookScoreReason =
|
|
91
|
+
| "duration_mismatch"
|
|
92
|
+
| "totals_mismatch"
|
|
93
|
+
| "date_out_of_order"
|
|
94
|
+
| "missing_airport"
|
|
95
|
+
| "unreadable_time"
|
|
96
|
+
| "match_low"
|
|
97
|
+
| "match_none";
|
|
98
|
+
|
|
99
|
+
export type AircraftLogbookUiStatus =
|
|
100
|
+
| "unmatched"
|
|
101
|
+
| "matched"
|
|
102
|
+
| "ready_with_gaps"
|
|
103
|
+
| "logged"
|
|
104
|
+
| "applied"
|
|
105
|
+
| "dismissed";
|
|
106
|
+
|
|
107
|
+
export interface AircraftLogbookDeviation {
|
|
108
|
+
field: "etdZ" | "etaZ" | "landings" | "departure" | "destination";
|
|
109
|
+
logbook: string | number | null;
|
|
110
|
+
flight_log: string | number | null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface AircraftLogbookRowMeta extends LogbookSuggestionMeta {
|
|
114
|
+
pic_text?: string | null;
|
|
115
|
+
crew_count?: number | null;
|
|
116
|
+
pax_count?: number | null;
|
|
117
|
+
block_minutes?: number | null;
|
|
118
|
+
page_index?: number;
|
|
119
|
+
row_index?: number;
|
|
120
|
+
leg_group?: string;
|
|
121
|
+
score?: number;
|
|
122
|
+
score_reasons?: AircraftLogbookScoreReason[];
|
|
123
|
+
reconciliation?: { flight_log_id: number; deviations: AircraftLogbookDeviation[] } | null;
|
|
124
|
+
dismiss_reason?: "already_logged" | "unreadable" | "manual" | null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type AircraftLogbookRow = AiSuggestion<LogbookFlightLogPayload> & {
|
|
128
|
+
meta?: AircraftLogbookRowMeta;
|
|
129
|
+
batch_id: number | null;
|
|
130
|
+
ui_status: AircraftLogbookUiStatus;
|
|
131
|
+
booking: { id: number; etdZ: string | null; etaZ: string | null; crew: string } | null;
|
|
132
|
+
flight_log: { id: number; etdZ: string | null; etaZ: string | null } | null;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export type LogbookImportBatchStatus = "queued" | "processing" | "completed" | "failed";
|
|
136
|
+
|
|
137
|
+
export interface LogbookImportBatch {
|
|
138
|
+
type: "logbook_import_batch";
|
|
139
|
+
id: number;
|
|
140
|
+
airplane_id: number;
|
|
141
|
+
company_id: number;
|
|
142
|
+
status: LogbookImportBatchStatus;
|
|
143
|
+
year_hint: number;
|
|
144
|
+
page_count: number;
|
|
145
|
+
row_count: number;
|
|
146
|
+
logged_count: number;
|
|
147
|
+
matched_count: number;
|
|
148
|
+
unmatched_count: number;
|
|
149
|
+
duplicate_count: number;
|
|
150
|
+
failed_pages: { file: string; page: number | null; reason: string }[];
|
|
151
|
+
task_uuid: string | null;
|
|
152
|
+
requested_by: number | null;
|
|
153
|
+
created_at: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface AircraftLogbookImportResult {
|
|
157
|
+
batch_id: number;
|
|
158
|
+
pages: number;
|
|
159
|
+
rows: number;
|
|
160
|
+
logged: number;
|
|
161
|
+
duplicates: number;
|
|
162
|
+
attached: number;
|
|
163
|
+
unmatched: number;
|
|
164
|
+
failed_pages: { file: string; page: number | null; reason: string }[];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface AircraftLogbookCrewProposal {
|
|
168
|
+
membership_id: number;
|
|
169
|
+
name: string;
|
|
170
|
+
score: number;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export interface AircraftLogbookBulkAcceptResult {
|
|
174
|
+
applied: number[];
|
|
175
|
+
failed: { id: number; errors: Record<string, string[]> }[];
|
|
176
|
+
}
|