@updraft-solutions/mcrit-sdk 0.19.2 → 0.20.0
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.js +9 -9
- package/dist/types/index.d.cts +89 -1
- package/dist/types/index.d.ts +89 -1
- package/package.json +1 -1
- package/src/types/ai.ts +90 -0
package/dist/index.cjs
CHANGED
|
@@ -301,13 +301,13 @@ var _chunkIVMOR5SWcjs = require('./chunk-IVMOR5SW.cjs');
|
|
|
301
301
|
|
|
302
302
|
|
|
303
303
|
|
|
304
|
+
var _chunk2DRKSYW4cjs = require('./chunk-2DRKSYW4.cjs');
|
|
304
305
|
|
|
305
306
|
|
|
306
307
|
|
|
307
308
|
|
|
308
309
|
|
|
309
310
|
|
|
310
|
-
var _chunkJRVRIKNMcjs = require('./chunk-JRVRIKNM.cjs');
|
|
311
311
|
|
|
312
312
|
|
|
313
313
|
|
|
@@ -316,7 +316,7 @@ var _chunkJRVRIKNMcjs = require('./chunk-JRVRIKNM.cjs');
|
|
|
316
316
|
|
|
317
317
|
|
|
318
318
|
|
|
319
|
-
var
|
|
319
|
+
var _chunkJRVRIKNMcjs = require('./chunk-JRVRIKNM.cjs');
|
|
320
320
|
|
|
321
321
|
|
|
322
322
|
var _chunkHQSF3WGFcjs = require('./chunk-HQSF3WGF.cjs');
|
package/dist/index.js
CHANGED
|
@@ -293,6 +293,15 @@ import {
|
|
|
293
293
|
timeUntil,
|
|
294
294
|
yearString
|
|
295
295
|
} from "./chunk-KIMCBEY7.js";
|
|
296
|
+
import {
|
|
297
|
+
displayFee,
|
|
298
|
+
formatToEuroString,
|
|
299
|
+
fromCents,
|
|
300
|
+
money,
|
|
301
|
+
moneyFormatted,
|
|
302
|
+
parseFee,
|
|
303
|
+
parsePrice
|
|
304
|
+
} from "./chunk-JGIAOBZI.js";
|
|
296
305
|
import {
|
|
297
306
|
AvatarConversion,
|
|
298
307
|
DocumentConversion,
|
|
@@ -308,15 +317,6 @@ import {
|
|
|
308
317
|
getMediaType,
|
|
309
318
|
mapMediaConversions
|
|
310
319
|
} from "./chunk-VYT5KQWF.js";
|
|
311
|
-
import {
|
|
312
|
-
displayFee,
|
|
313
|
-
formatToEuroString,
|
|
314
|
-
fromCents,
|
|
315
|
-
money,
|
|
316
|
-
moneyFormatted,
|
|
317
|
-
parseFee,
|
|
318
|
-
parsePrice
|
|
319
|
-
} from "./chunk-JGIAOBZI.js";
|
|
320
320
|
import {
|
|
321
321
|
paginationMeta
|
|
322
322
|
} from "./chunk-NQV2D3FJ.js";
|
package/dist/types/index.d.cts
CHANGED
|
@@ -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
|
@@ -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.0",
|
|
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/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
|
+
}
|