@updraft-solutions/mcrit-sdk 0.3.1 → 0.5.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/chunk-AKLFMP7G.cjs +2525 -0
- package/dist/{chunk-MF7G76QS.cjs → chunk-IVMOR5SW.cjs} +26 -1
- package/dist/{chunk-D5DUVW34.js → chunk-KIMCBEY7.js} +26 -1
- package/dist/chunk-YCIXOVEC.js +2525 -0
- package/dist/format/index.cjs +2 -2
- package/dist/format/index.d.cts +13 -4
- package/dist/format/index.d.ts +13 -4
- package/dist/format/index.js +1 -1
- package/dist/index.cjs +201 -5
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +208 -12
- package/dist/schemas/index.cjs +198 -2
- package/dist/schemas/index.d.cts +3157 -128
- package/dist/schemas/index.d.ts +3157 -128
- package/dist/schemas/index.js +201 -5
- package/dist/{models-BWmpcfR8.d.cts → training-Der1DPU-.d.cts} +23757 -6528
- package/dist/{models-BWmpcfR8.d.ts → training-Der1DPU-.d.ts} +23757 -6528
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.d.cts +277 -6
- package/dist/types/index.d.ts +277 -6
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/src/format/index.ts +51 -5
- package/src/index.ts +39 -0
- package/src/schemas/common.ts +37 -0
- package/src/schemas/course-milestone.ts +78 -0
- package/src/schemas/equipment.ts +27 -0
- package/src/schemas/form-template.ts +413 -0
- package/src/schemas/index.ts +7 -1
- package/src/schemas/location-map.ts +175 -0
- package/src/schemas/models.ts +110 -28
- package/src/schemas/newsletter.ts +362 -0
- package/src/schemas/todo.ts +46 -0
- package/src/schemas/training.ts +500 -0
- package/src/types/ai.ts +85 -0
- package/src/types/aircraft-block.ts +23 -0
- package/src/types/api.ts +3 -1
- package/src/types/background-task.ts +28 -0
- package/src/types/compliance.ts +27 -3
- package/src/types/index.ts +5 -0
- package/src/types/landing-fee.ts +92 -0
- package/src/types/models.ts +44 -0
- package/src/types/roles.ts +26 -0
- package/dist/chunk-7QF3OJ45.cjs +0 -1325
- package/dist/chunk-FS5I4MBG.js +0 -1325
- package/src/schemas/fee.ts +0 -37
- /package/dist/{chunk-LXNCAKJZ.js → chunk-2WJHTRIE.js} +0 -0
- /package/dist/{chunk-MOOGM3DW.cjs → chunk-DCEOET63.cjs} +0 -0
package/dist/types/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('../chunk-
|
|
1
|
+
"use strict";require('../chunk-DCEOET63.cjs');
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { aA as addressSchema, aB as aircraftRatingSchema, aG as airplaneSchema, aF as airplanePermissionSchema, aH as airplaneShareInviteSchema, aI as airportSchema, aJ as alertSchema, aK as allowedDocumentTypeSchema, aL as approachTypeSchema, aM as availSchema, aN as baseMembershipSchema, aO as bookingSchema, aQ as commentSchema, aR as companySchema, aX as courseSchema, aV as courseEnrollmentSchema, aW as courseFeeSchema, aD as airplaneIssueSeverityEnum, b1 as documentSchema, aZ as documentComplianceStatus, a_ as documentRequirement, a$ as documentRequirementGroup, b0 as documentRequirementGroupAssignment, b2 as documentShareSchema, b3 as documentType, b5 as eventSchema, b7 as expenseSchema, b6 as expenseItemSchema, b8 as extendedAirplaneSchema, ba as feeSchema, b9 as feeCategoryOptionsSchema, bb as flightLogSchema, bh as invoiceSchema, bj as landingSchema, bi as landingFeeSchema, bl as maintenanceEventSchema, bk as maintenanceEventEstimationSchema, bm as maintenanceStatusSchema, bn as mediaCollection, bp as membershipSchema, bq as postSchema, br as prePaidPackageSchema, bs as priceSchema, bt as qualificationSchema, bu as recurringFlightSchema, bv as roleSchema, bw as runwaySchema, bx as scheduledFlightSchema, by as settingSchema, bz as specialFlightSchema, bG as tagSchema, bH as ticketSchema, bR as userSchema, bP as userAircraftRatingSchema, bQ as userQualificationSchema, bS as waypointSchema, aC as airplaneIssueSchema, aE as airplaneIssueStatusEnum, B as BaseModel$1, aT as courseCheckSyllabusSchema, aU as courseEnrollmentMetricsSchema, bo as mediaSchema, l as FormSubmission } from '../training-Der1DPU-.cjs';
|
|
3
3
|
|
|
4
4
|
type BaseModel = z.infer<typeof BaseModel$1>;
|
|
5
5
|
type User = z.infer<typeof userSchema>;
|
|
@@ -20,6 +20,9 @@ type Airport = z.infer<typeof airportSchema>;
|
|
|
20
20
|
type RecurringFlight = z.infer<typeof recurringFlightSchema>;
|
|
21
21
|
type Fee = z.infer<typeof feeSchema>;
|
|
22
22
|
type CourseFee = z.infer<typeof courseFeeSchema>;
|
|
23
|
+
type FeeCategoryOptions = z.infer<typeof feeCategoryOptionsSchema>;
|
|
24
|
+
type Tag = z.infer<typeof tagSchema>;
|
|
25
|
+
type CourseCheckSyllabus = z.infer<typeof courseCheckSyllabusSchema>;
|
|
23
26
|
type Price = z.infer<typeof priceSchema>;
|
|
24
27
|
type MaintenanceEvent = z.infer<typeof maintenanceEventSchema>;
|
|
25
28
|
type MaintenanceStatus = z.infer<typeof maintenanceStatusSchema>;
|
|
@@ -55,6 +58,37 @@ type AirplaneIssueStatus = z.infer<typeof airplaneIssueStatusEnum>;
|
|
|
55
58
|
type Event = z.infer<typeof eventSchema>;
|
|
56
59
|
type Ticket = z.infer<typeof ticketSchema>;
|
|
57
60
|
type Post = z.infer<typeof postSchema>;
|
|
61
|
+
interface CreatePostInput {
|
|
62
|
+
title?: string | null;
|
|
63
|
+
content: string;
|
|
64
|
+
sticky?: boolean;
|
|
65
|
+
public?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface UpdatePostInput {
|
|
68
|
+
title?: string | null;
|
|
69
|
+
content: string;
|
|
70
|
+
sticky?: boolean;
|
|
71
|
+
public?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface CreateAirplaneIssueInput {
|
|
74
|
+
title?: string | null;
|
|
75
|
+
body: string;
|
|
76
|
+
severity?: AirplaneIssueSeverity;
|
|
77
|
+
ata_chapter?: string | null;
|
|
78
|
+
}
|
|
79
|
+
interface UpdateAirplaneIssueInput {
|
|
80
|
+
title?: string | null;
|
|
81
|
+
body?: string;
|
|
82
|
+
severity?: AirplaneIssueSeverity;
|
|
83
|
+
ata_chapter?: string | null;
|
|
84
|
+
}
|
|
85
|
+
interface ResolveAirplaneIssueInput {
|
|
86
|
+
resolution_notes?: string | null;
|
|
87
|
+
}
|
|
88
|
+
interface DeferAirplaneIssueInput {
|
|
89
|
+
deferred_until?: string | null;
|
|
90
|
+
deferral_notes?: string | null;
|
|
91
|
+
}
|
|
58
92
|
type Comment = z.infer<typeof commentSchema>;
|
|
59
93
|
interface CreateCommentInput {
|
|
60
94
|
body: string;
|
|
@@ -79,7 +113,8 @@ interface DataWrappedResponse<T, M = undefined> {
|
|
|
79
113
|
data: T;
|
|
80
114
|
meta?: M;
|
|
81
115
|
}
|
|
82
|
-
|
|
116
|
+
type ApiResponse<T> = DataWrappedResponse<T>;
|
|
117
|
+
interface PaginatedResponse<T = unknown> {
|
|
83
118
|
data: T[];
|
|
84
119
|
meta: {
|
|
85
120
|
current_page: number;
|
|
@@ -107,11 +142,12 @@ interface ToggleFavoriteResponse {
|
|
|
107
142
|
|
|
108
143
|
interface ComplianceRequirement {
|
|
109
144
|
requirement_id: number;
|
|
110
|
-
|
|
111
|
-
|
|
145
|
+
form_template_id: number;
|
|
146
|
+
form_template_name: string;
|
|
112
147
|
logical_group: string;
|
|
113
148
|
is_satisfied: boolean;
|
|
114
|
-
|
|
149
|
+
awaiting_countersignature?: boolean;
|
|
150
|
+
submission: FormSubmission | null;
|
|
115
151
|
}
|
|
116
152
|
interface ComplianceRequirementGroup {
|
|
117
153
|
group_name: string;
|
|
@@ -119,11 +155,22 @@ interface ComplianceRequirementGroup {
|
|
|
119
155
|
group_satisfied: boolean;
|
|
120
156
|
requirements: ComplianceRequirement[];
|
|
121
157
|
}
|
|
158
|
+
type ComplianceGroupSource = {
|
|
159
|
+
type: "direct";
|
|
160
|
+
} | {
|
|
161
|
+
type: "role";
|
|
162
|
+
role: string;
|
|
163
|
+
} | {
|
|
164
|
+
type: "airplane";
|
|
165
|
+
airplane_id: number;
|
|
166
|
+
registration: string;
|
|
167
|
+
};
|
|
122
168
|
interface ComplianceGroup {
|
|
123
169
|
group_id: number;
|
|
124
170
|
group_name: string;
|
|
125
171
|
overall_satisfied: boolean;
|
|
126
172
|
requirement_groups: ComplianceRequirementGroup[];
|
|
173
|
+
sources?: ComplianceGroupSource[];
|
|
127
174
|
}
|
|
128
175
|
interface ComplianceSummary {
|
|
129
176
|
total_groups: number;
|
|
@@ -145,4 +192,228 @@ interface ComplianceResponse {
|
|
|
145
192
|
};
|
|
146
193
|
}
|
|
147
194
|
|
|
148
|
-
|
|
195
|
+
type AircraftBlockReason = "general" | "ferry" | "weather" | "private" | "aog" | "other";
|
|
196
|
+
interface AircraftBlock {
|
|
197
|
+
type: "aircraftBlock";
|
|
198
|
+
id: number;
|
|
199
|
+
airplane_id: number;
|
|
200
|
+
company_id: number;
|
|
201
|
+
starts_at: string;
|
|
202
|
+
ends_at: string;
|
|
203
|
+
reason: AircraftBlockReason;
|
|
204
|
+
note: string | null;
|
|
205
|
+
is_maintenance: boolean;
|
|
206
|
+
maintenance_event_id: number | null;
|
|
207
|
+
created_at: string;
|
|
208
|
+
updated_at: string;
|
|
209
|
+
can?: Record<string, boolean | null>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
type BackgroundTaskStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
|
|
213
|
+
interface BackgroundTask<TResult = unknown> {
|
|
214
|
+
type: "background_task";
|
|
215
|
+
/** Store key — mirrors `uuid` (the API has no client-facing integer id). */
|
|
216
|
+
id: string;
|
|
217
|
+
uuid: string;
|
|
218
|
+
task_type: string;
|
|
219
|
+
status: BackgroundTaskStatus;
|
|
220
|
+
progress: number | null;
|
|
221
|
+
progress_label: string | null;
|
|
222
|
+
company_id: number | null;
|
|
223
|
+
user_id: number | null;
|
|
224
|
+
result: TResult | null;
|
|
225
|
+
error: string | null;
|
|
226
|
+
started_at: string | null;
|
|
227
|
+
finished_at: string | null;
|
|
228
|
+
created_at: string | null;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type AiSuggestionStatus = "pending" | "ready" | "applied" | "dismissed" | "failed";
|
|
232
|
+
interface AiSuggestion<TPayload = unknown> {
|
|
233
|
+
type: "ai_suggestion";
|
|
234
|
+
id: number;
|
|
235
|
+
subject_type: string;
|
|
236
|
+
subject_id: number;
|
|
237
|
+
company_id: number | null;
|
|
238
|
+
suggestion_type: string;
|
|
239
|
+
locale: string;
|
|
240
|
+
payload: TPayload;
|
|
241
|
+
meta?: unknown;
|
|
242
|
+
status: AiSuggestionStatus;
|
|
243
|
+
requested_by: number | null;
|
|
244
|
+
applied_at: string | null;
|
|
245
|
+
dismissed_at: string | null;
|
|
246
|
+
created_at: string;
|
|
247
|
+
}
|
|
248
|
+
interface AiSuggestedMilestone {
|
|
249
|
+
name: string;
|
|
250
|
+
description?: string | null;
|
|
251
|
+
kind: "progress" | "prerequisite" | "solo" | "cross_country";
|
|
252
|
+
is_prerequisite: boolean;
|
|
253
|
+
sort_order: number;
|
|
254
|
+
}
|
|
255
|
+
interface CourseDescriptionSuggestionPayload {
|
|
256
|
+
title: string;
|
|
257
|
+
subtitle: string;
|
|
258
|
+
summary: string;
|
|
259
|
+
html: string;
|
|
260
|
+
milestones: AiSuggestedMilestone[];
|
|
261
|
+
}
|
|
262
|
+
interface LogbookFlightLogPayload {
|
|
263
|
+
etdZ: string | null;
|
|
264
|
+
etaZ: string | null;
|
|
265
|
+
departure_airport_id: number | null;
|
|
266
|
+
destination_airport_id: number | null;
|
|
267
|
+
departure_airport_icao: string | null;
|
|
268
|
+
destination_airport_icao: string | null;
|
|
269
|
+
full_stop_landings: number;
|
|
270
|
+
touch_and_gos: number;
|
|
271
|
+
low_approaches: number;
|
|
272
|
+
crew_assignments: {
|
|
273
|
+
membership_id: number;
|
|
274
|
+
role: string;
|
|
275
|
+
}[];
|
|
276
|
+
membership_id: number | null;
|
|
277
|
+
}
|
|
278
|
+
interface LogbookSuggestionMeta {
|
|
279
|
+
flags?: string[];
|
|
280
|
+
match?: {
|
|
281
|
+
confidence: string;
|
|
282
|
+
reasoning: string;
|
|
283
|
+
};
|
|
284
|
+
extraction?: {
|
|
285
|
+
valid: boolean | null;
|
|
286
|
+
discrepancy_minutes: number | null;
|
|
287
|
+
};
|
|
288
|
+
crew_text?: string | null;
|
|
289
|
+
}
|
|
290
|
+
type LogbookSuggestion = AiSuggestion<LogbookFlightLogPayload> & {
|
|
291
|
+
meta?: LogbookSuggestionMeta;
|
|
292
|
+
};
|
|
293
|
+
interface DiscardedRow {
|
|
294
|
+
reason: string;
|
|
295
|
+
flight: Record<string, unknown>;
|
|
296
|
+
}
|
|
297
|
+
interface LogbookStageResult {
|
|
298
|
+
booking_id: number;
|
|
299
|
+
suggestion_ids: number[];
|
|
300
|
+
staged: number;
|
|
301
|
+
routed: Record<string, number> | number[];
|
|
302
|
+
discarded: DiscardedRow[];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
interface RoleListItem {
|
|
306
|
+
id: number;
|
|
307
|
+
name: string;
|
|
308
|
+
description: string | null;
|
|
309
|
+
is_system: boolean;
|
|
310
|
+
has_duties: boolean;
|
|
311
|
+
company_id: number | null;
|
|
312
|
+
permissions_count: number;
|
|
313
|
+
}
|
|
314
|
+
interface PermissionItem {
|
|
315
|
+
id: number;
|
|
316
|
+
name: string;
|
|
317
|
+
description: string | null;
|
|
318
|
+
group: string;
|
|
319
|
+
}
|
|
320
|
+
interface RoleDetail extends Omit<RoleListItem, "permissions_count"> {
|
|
321
|
+
permissions: PermissionItem[];
|
|
322
|
+
}
|
|
323
|
+
interface GroupedPermissions {
|
|
324
|
+
[group: string]: PermissionItem[];
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
interface LandingFeeTemplateParams {
|
|
328
|
+
landing_type: "FULLSTOP" | "TOUCHANDGO" | "LOWAPPROACH";
|
|
329
|
+
net_gross: "net" | "gross";
|
|
330
|
+
valid_from: string;
|
|
331
|
+
tax_percentage?: number;
|
|
332
|
+
approach_type_id?: number;
|
|
333
|
+
}
|
|
334
|
+
interface LandingFeeImportResult {
|
|
335
|
+
created: number;
|
|
336
|
+
updated: number;
|
|
337
|
+
unchanged: number;
|
|
338
|
+
prices_added: number;
|
|
339
|
+
skipped: number;
|
|
340
|
+
issues: string[];
|
|
341
|
+
preview: Array<[
|
|
342
|
+
string,
|
|
343
|
+
string,
|
|
344
|
+
string,
|
|
345
|
+
string,
|
|
346
|
+
string,
|
|
347
|
+
"new" | "update" | "unchanged"
|
|
348
|
+
]>;
|
|
349
|
+
meta: {
|
|
350
|
+
landing_type: string;
|
|
351
|
+
approach_type_id: number;
|
|
352
|
+
net_gross: string;
|
|
353
|
+
tax_percentage: number;
|
|
354
|
+
valid_from: string;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
interface LandingFeeInvoicePreviewRow {
|
|
358
|
+
registration: string;
|
|
359
|
+
airplane_id: number | null;
|
|
360
|
+
fee_type: string;
|
|
361
|
+
landing_type: string | null;
|
|
362
|
+
unit_price: number;
|
|
363
|
+
price_basis: "net" | "gross";
|
|
364
|
+
vat_rate: number | null;
|
|
365
|
+
net_total: number | null;
|
|
366
|
+
gross_total: number | null;
|
|
367
|
+
current_price: number | null;
|
|
368
|
+
current_net_total: number | null;
|
|
369
|
+
current_gross_total: number | null;
|
|
370
|
+
date: string | null;
|
|
371
|
+
start_time: string | null;
|
|
372
|
+
landing_time: string | null;
|
|
373
|
+
status: "new" | "changed" | "unchanged" | "unmatched-aircraft" | "unmapped-fee-type" | "airport-unknown";
|
|
374
|
+
}
|
|
375
|
+
interface LandingFeeInvoicePreview {
|
|
376
|
+
rejected: boolean;
|
|
377
|
+
message: string | null;
|
|
378
|
+
company_id: number;
|
|
379
|
+
airport: {
|
|
380
|
+
id: number;
|
|
381
|
+
ident: string;
|
|
382
|
+
name: string;
|
|
383
|
+
} | null;
|
|
384
|
+
invoice: {
|
|
385
|
+
number: string | null;
|
|
386
|
+
date: string | null;
|
|
387
|
+
currency: string | null;
|
|
388
|
+
issuing_airport_name: string | null;
|
|
389
|
+
suggested_airport_icao_ident: string | null;
|
|
390
|
+
};
|
|
391
|
+
landing_fee_rows: LandingFeeInvoicePreviewRow[];
|
|
392
|
+
other_fees: Array<Record<string, unknown>>;
|
|
393
|
+
warnings: Array<{
|
|
394
|
+
type: string;
|
|
395
|
+
message: string;
|
|
396
|
+
}>;
|
|
397
|
+
}
|
|
398
|
+
interface LandingFeeInvoiceApplyPayload {
|
|
399
|
+
airport_id: number;
|
|
400
|
+
valid_from: string;
|
|
401
|
+
tax_percentage: number;
|
|
402
|
+
approach_type_id: number;
|
|
403
|
+
rows: Array<{
|
|
404
|
+
airplane_id: number;
|
|
405
|
+
landing_type: string;
|
|
406
|
+
unit_price: number;
|
|
407
|
+
price_basis: "net" | "gross";
|
|
408
|
+
vat_rate: number | null;
|
|
409
|
+
}>;
|
|
410
|
+
}
|
|
411
|
+
interface LandingFeeInvoiceApplyResult {
|
|
412
|
+
created: number;
|
|
413
|
+
updated: number;
|
|
414
|
+
unchanged: number;
|
|
415
|
+
prices_added: number;
|
|
416
|
+
issues: string[];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export type { Address, AiSuggestedMilestone, AiSuggestion, AiSuggestionStatus, AircraftBlock, AircraftBlockReason, AircraftRating, Airplane, AirplaneIssue, AirplaneIssueSeverity, AirplaneIssueStatus, AirplanePermission, AirplaneShareInvite, Airport, Alert, AllowedDocumentType, ApiResponse, ApproachType, Avail, BackgroundTask, BackgroundTaskStatus, BaseMembership, BaseModel, Booking, Comment, Company, ComplianceData, ComplianceGroup, ComplianceGroupSource, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Course, CourseCheckSyllabus, CourseDescriptionSuggestionPayload, CourseEnrollment, CourseEnrollmentMetrics, CourseFee, CreateAirplaneIssueInput, CreateCommentInput, CreatePostInput, DataWrappedResponse, DeferAirplaneIssueInput, DiscardedRow, Document, DocumentComplianceStatus, DocumentRequirement, DocumentRequirementGroup, DocumentRequirementGroupAssignment, DocumentShare, DocumentType, Event, Expense, ExpenseItem, ExtendedAirplane, Fee, FeeCategoryOptions, FlightLog, GroupedPermissions, Invoice, Landing, LandingFee, LandingFeeImportResult, LandingFeeInvoiceApplyPayload, LandingFeeInvoiceApplyResult, LandingFeeInvoicePreview, LandingFeeInvoicePreviewRow, LandingFeeTemplateParams, LogbookFlightLogPayload, LogbookStageResult, LogbookSuggestion, LogbookSuggestionMeta, MaintenanceEvent, MaintenanceEventEstimation, MaintenanceStatus, Media, MediaCollection, Membership, PaginatedResponse, PermissionItem, Post, PrePaidPackage, Price, Qualification, RecurringFlight, ResolveAirplaneIssueInput, Resource, Role, RoleDetail, RoleListItem, Runway, ScheduledFlight, Setting, SpecialFlight, Tag, Ticket, ToggleFavoriteResponse, UpdateAirplaneIssueInput, UpdateCommentInput, UpdatePostInput, User, UserAircraftRating, UserQualification, Waypoint };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { aA as addressSchema, aB as aircraftRatingSchema, aG as airplaneSchema, aF as airplanePermissionSchema, aH as airplaneShareInviteSchema, aI as airportSchema, aJ as alertSchema, aK as allowedDocumentTypeSchema, aL as approachTypeSchema, aM as availSchema, aN as baseMembershipSchema, aO as bookingSchema, aQ as commentSchema, aR as companySchema, aX as courseSchema, aV as courseEnrollmentSchema, aW as courseFeeSchema, aD as airplaneIssueSeverityEnum, b1 as documentSchema, aZ as documentComplianceStatus, a_ as documentRequirement, a$ as documentRequirementGroup, b0 as documentRequirementGroupAssignment, b2 as documentShareSchema, b3 as documentType, b5 as eventSchema, b7 as expenseSchema, b6 as expenseItemSchema, b8 as extendedAirplaneSchema, ba as feeSchema, b9 as feeCategoryOptionsSchema, bb as flightLogSchema, bh as invoiceSchema, bj as landingSchema, bi as landingFeeSchema, bl as maintenanceEventSchema, bk as maintenanceEventEstimationSchema, bm as maintenanceStatusSchema, bn as mediaCollection, bp as membershipSchema, bq as postSchema, br as prePaidPackageSchema, bs as priceSchema, bt as qualificationSchema, bu as recurringFlightSchema, bv as roleSchema, bw as runwaySchema, bx as scheduledFlightSchema, by as settingSchema, bz as specialFlightSchema, bG as tagSchema, bH as ticketSchema, bR as userSchema, bP as userAircraftRatingSchema, bQ as userQualificationSchema, bS as waypointSchema, aC as airplaneIssueSchema, aE as airplaneIssueStatusEnum, B as BaseModel$1, aT as courseCheckSyllabusSchema, aU as courseEnrollmentMetricsSchema, bo as mediaSchema, l as FormSubmission } from '../training-Der1DPU-.js';
|
|
3
3
|
|
|
4
4
|
type BaseModel = z.infer<typeof BaseModel$1>;
|
|
5
5
|
type User = z.infer<typeof userSchema>;
|
|
@@ -20,6 +20,9 @@ type Airport = z.infer<typeof airportSchema>;
|
|
|
20
20
|
type RecurringFlight = z.infer<typeof recurringFlightSchema>;
|
|
21
21
|
type Fee = z.infer<typeof feeSchema>;
|
|
22
22
|
type CourseFee = z.infer<typeof courseFeeSchema>;
|
|
23
|
+
type FeeCategoryOptions = z.infer<typeof feeCategoryOptionsSchema>;
|
|
24
|
+
type Tag = z.infer<typeof tagSchema>;
|
|
25
|
+
type CourseCheckSyllabus = z.infer<typeof courseCheckSyllabusSchema>;
|
|
23
26
|
type Price = z.infer<typeof priceSchema>;
|
|
24
27
|
type MaintenanceEvent = z.infer<typeof maintenanceEventSchema>;
|
|
25
28
|
type MaintenanceStatus = z.infer<typeof maintenanceStatusSchema>;
|
|
@@ -55,6 +58,37 @@ type AirplaneIssueStatus = z.infer<typeof airplaneIssueStatusEnum>;
|
|
|
55
58
|
type Event = z.infer<typeof eventSchema>;
|
|
56
59
|
type Ticket = z.infer<typeof ticketSchema>;
|
|
57
60
|
type Post = z.infer<typeof postSchema>;
|
|
61
|
+
interface CreatePostInput {
|
|
62
|
+
title?: string | null;
|
|
63
|
+
content: string;
|
|
64
|
+
sticky?: boolean;
|
|
65
|
+
public?: boolean;
|
|
66
|
+
}
|
|
67
|
+
interface UpdatePostInput {
|
|
68
|
+
title?: string | null;
|
|
69
|
+
content: string;
|
|
70
|
+
sticky?: boolean;
|
|
71
|
+
public?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface CreateAirplaneIssueInput {
|
|
74
|
+
title?: string | null;
|
|
75
|
+
body: string;
|
|
76
|
+
severity?: AirplaneIssueSeverity;
|
|
77
|
+
ata_chapter?: string | null;
|
|
78
|
+
}
|
|
79
|
+
interface UpdateAirplaneIssueInput {
|
|
80
|
+
title?: string | null;
|
|
81
|
+
body?: string;
|
|
82
|
+
severity?: AirplaneIssueSeverity;
|
|
83
|
+
ata_chapter?: string | null;
|
|
84
|
+
}
|
|
85
|
+
interface ResolveAirplaneIssueInput {
|
|
86
|
+
resolution_notes?: string | null;
|
|
87
|
+
}
|
|
88
|
+
interface DeferAirplaneIssueInput {
|
|
89
|
+
deferred_until?: string | null;
|
|
90
|
+
deferral_notes?: string | null;
|
|
91
|
+
}
|
|
58
92
|
type Comment = z.infer<typeof commentSchema>;
|
|
59
93
|
interface CreateCommentInput {
|
|
60
94
|
body: string;
|
|
@@ -79,7 +113,8 @@ interface DataWrappedResponse<T, M = undefined> {
|
|
|
79
113
|
data: T;
|
|
80
114
|
meta?: M;
|
|
81
115
|
}
|
|
82
|
-
|
|
116
|
+
type ApiResponse<T> = DataWrappedResponse<T>;
|
|
117
|
+
interface PaginatedResponse<T = unknown> {
|
|
83
118
|
data: T[];
|
|
84
119
|
meta: {
|
|
85
120
|
current_page: number;
|
|
@@ -107,11 +142,12 @@ interface ToggleFavoriteResponse {
|
|
|
107
142
|
|
|
108
143
|
interface ComplianceRequirement {
|
|
109
144
|
requirement_id: number;
|
|
110
|
-
|
|
111
|
-
|
|
145
|
+
form_template_id: number;
|
|
146
|
+
form_template_name: string;
|
|
112
147
|
logical_group: string;
|
|
113
148
|
is_satisfied: boolean;
|
|
114
|
-
|
|
149
|
+
awaiting_countersignature?: boolean;
|
|
150
|
+
submission: FormSubmission | null;
|
|
115
151
|
}
|
|
116
152
|
interface ComplianceRequirementGroup {
|
|
117
153
|
group_name: string;
|
|
@@ -119,11 +155,22 @@ interface ComplianceRequirementGroup {
|
|
|
119
155
|
group_satisfied: boolean;
|
|
120
156
|
requirements: ComplianceRequirement[];
|
|
121
157
|
}
|
|
158
|
+
type ComplianceGroupSource = {
|
|
159
|
+
type: "direct";
|
|
160
|
+
} | {
|
|
161
|
+
type: "role";
|
|
162
|
+
role: string;
|
|
163
|
+
} | {
|
|
164
|
+
type: "airplane";
|
|
165
|
+
airplane_id: number;
|
|
166
|
+
registration: string;
|
|
167
|
+
};
|
|
122
168
|
interface ComplianceGroup {
|
|
123
169
|
group_id: number;
|
|
124
170
|
group_name: string;
|
|
125
171
|
overall_satisfied: boolean;
|
|
126
172
|
requirement_groups: ComplianceRequirementGroup[];
|
|
173
|
+
sources?: ComplianceGroupSource[];
|
|
127
174
|
}
|
|
128
175
|
interface ComplianceSummary {
|
|
129
176
|
total_groups: number;
|
|
@@ -145,4 +192,228 @@ interface ComplianceResponse {
|
|
|
145
192
|
};
|
|
146
193
|
}
|
|
147
194
|
|
|
148
|
-
|
|
195
|
+
type AircraftBlockReason = "general" | "ferry" | "weather" | "private" | "aog" | "other";
|
|
196
|
+
interface AircraftBlock {
|
|
197
|
+
type: "aircraftBlock";
|
|
198
|
+
id: number;
|
|
199
|
+
airplane_id: number;
|
|
200
|
+
company_id: number;
|
|
201
|
+
starts_at: string;
|
|
202
|
+
ends_at: string;
|
|
203
|
+
reason: AircraftBlockReason;
|
|
204
|
+
note: string | null;
|
|
205
|
+
is_maintenance: boolean;
|
|
206
|
+
maintenance_event_id: number | null;
|
|
207
|
+
created_at: string;
|
|
208
|
+
updated_at: string;
|
|
209
|
+
can?: Record<string, boolean | null>;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
type BackgroundTaskStatus = "queued" | "processing" | "completed" | "failed" | "canceled";
|
|
213
|
+
interface BackgroundTask<TResult = unknown> {
|
|
214
|
+
type: "background_task";
|
|
215
|
+
/** Store key — mirrors `uuid` (the API has no client-facing integer id). */
|
|
216
|
+
id: string;
|
|
217
|
+
uuid: string;
|
|
218
|
+
task_type: string;
|
|
219
|
+
status: BackgroundTaskStatus;
|
|
220
|
+
progress: number | null;
|
|
221
|
+
progress_label: string | null;
|
|
222
|
+
company_id: number | null;
|
|
223
|
+
user_id: number | null;
|
|
224
|
+
result: TResult | null;
|
|
225
|
+
error: string | null;
|
|
226
|
+
started_at: string | null;
|
|
227
|
+
finished_at: string | null;
|
|
228
|
+
created_at: string | null;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
type AiSuggestionStatus = "pending" | "ready" | "applied" | "dismissed" | "failed";
|
|
232
|
+
interface AiSuggestion<TPayload = unknown> {
|
|
233
|
+
type: "ai_suggestion";
|
|
234
|
+
id: number;
|
|
235
|
+
subject_type: string;
|
|
236
|
+
subject_id: number;
|
|
237
|
+
company_id: number | null;
|
|
238
|
+
suggestion_type: string;
|
|
239
|
+
locale: string;
|
|
240
|
+
payload: TPayload;
|
|
241
|
+
meta?: unknown;
|
|
242
|
+
status: AiSuggestionStatus;
|
|
243
|
+
requested_by: number | null;
|
|
244
|
+
applied_at: string | null;
|
|
245
|
+
dismissed_at: string | null;
|
|
246
|
+
created_at: string;
|
|
247
|
+
}
|
|
248
|
+
interface AiSuggestedMilestone {
|
|
249
|
+
name: string;
|
|
250
|
+
description?: string | null;
|
|
251
|
+
kind: "progress" | "prerequisite" | "solo" | "cross_country";
|
|
252
|
+
is_prerequisite: boolean;
|
|
253
|
+
sort_order: number;
|
|
254
|
+
}
|
|
255
|
+
interface CourseDescriptionSuggestionPayload {
|
|
256
|
+
title: string;
|
|
257
|
+
subtitle: string;
|
|
258
|
+
summary: string;
|
|
259
|
+
html: string;
|
|
260
|
+
milestones: AiSuggestedMilestone[];
|
|
261
|
+
}
|
|
262
|
+
interface LogbookFlightLogPayload {
|
|
263
|
+
etdZ: string | null;
|
|
264
|
+
etaZ: string | null;
|
|
265
|
+
departure_airport_id: number | null;
|
|
266
|
+
destination_airport_id: number | null;
|
|
267
|
+
departure_airport_icao: string | null;
|
|
268
|
+
destination_airport_icao: string | null;
|
|
269
|
+
full_stop_landings: number;
|
|
270
|
+
touch_and_gos: number;
|
|
271
|
+
low_approaches: number;
|
|
272
|
+
crew_assignments: {
|
|
273
|
+
membership_id: number;
|
|
274
|
+
role: string;
|
|
275
|
+
}[];
|
|
276
|
+
membership_id: number | null;
|
|
277
|
+
}
|
|
278
|
+
interface LogbookSuggestionMeta {
|
|
279
|
+
flags?: string[];
|
|
280
|
+
match?: {
|
|
281
|
+
confidence: string;
|
|
282
|
+
reasoning: string;
|
|
283
|
+
};
|
|
284
|
+
extraction?: {
|
|
285
|
+
valid: boolean | null;
|
|
286
|
+
discrepancy_minutes: number | null;
|
|
287
|
+
};
|
|
288
|
+
crew_text?: string | null;
|
|
289
|
+
}
|
|
290
|
+
type LogbookSuggestion = AiSuggestion<LogbookFlightLogPayload> & {
|
|
291
|
+
meta?: LogbookSuggestionMeta;
|
|
292
|
+
};
|
|
293
|
+
interface DiscardedRow {
|
|
294
|
+
reason: string;
|
|
295
|
+
flight: Record<string, unknown>;
|
|
296
|
+
}
|
|
297
|
+
interface LogbookStageResult {
|
|
298
|
+
booking_id: number;
|
|
299
|
+
suggestion_ids: number[];
|
|
300
|
+
staged: number;
|
|
301
|
+
routed: Record<string, number> | number[];
|
|
302
|
+
discarded: DiscardedRow[];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
interface RoleListItem {
|
|
306
|
+
id: number;
|
|
307
|
+
name: string;
|
|
308
|
+
description: string | null;
|
|
309
|
+
is_system: boolean;
|
|
310
|
+
has_duties: boolean;
|
|
311
|
+
company_id: number | null;
|
|
312
|
+
permissions_count: number;
|
|
313
|
+
}
|
|
314
|
+
interface PermissionItem {
|
|
315
|
+
id: number;
|
|
316
|
+
name: string;
|
|
317
|
+
description: string | null;
|
|
318
|
+
group: string;
|
|
319
|
+
}
|
|
320
|
+
interface RoleDetail extends Omit<RoleListItem, "permissions_count"> {
|
|
321
|
+
permissions: PermissionItem[];
|
|
322
|
+
}
|
|
323
|
+
interface GroupedPermissions {
|
|
324
|
+
[group: string]: PermissionItem[];
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
interface LandingFeeTemplateParams {
|
|
328
|
+
landing_type: "FULLSTOP" | "TOUCHANDGO" | "LOWAPPROACH";
|
|
329
|
+
net_gross: "net" | "gross";
|
|
330
|
+
valid_from: string;
|
|
331
|
+
tax_percentage?: number;
|
|
332
|
+
approach_type_id?: number;
|
|
333
|
+
}
|
|
334
|
+
interface LandingFeeImportResult {
|
|
335
|
+
created: number;
|
|
336
|
+
updated: number;
|
|
337
|
+
unchanged: number;
|
|
338
|
+
prices_added: number;
|
|
339
|
+
skipped: number;
|
|
340
|
+
issues: string[];
|
|
341
|
+
preview: Array<[
|
|
342
|
+
string,
|
|
343
|
+
string,
|
|
344
|
+
string,
|
|
345
|
+
string,
|
|
346
|
+
string,
|
|
347
|
+
"new" | "update" | "unchanged"
|
|
348
|
+
]>;
|
|
349
|
+
meta: {
|
|
350
|
+
landing_type: string;
|
|
351
|
+
approach_type_id: number;
|
|
352
|
+
net_gross: string;
|
|
353
|
+
tax_percentage: number;
|
|
354
|
+
valid_from: string;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
interface LandingFeeInvoicePreviewRow {
|
|
358
|
+
registration: string;
|
|
359
|
+
airplane_id: number | null;
|
|
360
|
+
fee_type: string;
|
|
361
|
+
landing_type: string | null;
|
|
362
|
+
unit_price: number;
|
|
363
|
+
price_basis: "net" | "gross";
|
|
364
|
+
vat_rate: number | null;
|
|
365
|
+
net_total: number | null;
|
|
366
|
+
gross_total: number | null;
|
|
367
|
+
current_price: number | null;
|
|
368
|
+
current_net_total: number | null;
|
|
369
|
+
current_gross_total: number | null;
|
|
370
|
+
date: string | null;
|
|
371
|
+
start_time: string | null;
|
|
372
|
+
landing_time: string | null;
|
|
373
|
+
status: "new" | "changed" | "unchanged" | "unmatched-aircraft" | "unmapped-fee-type" | "airport-unknown";
|
|
374
|
+
}
|
|
375
|
+
interface LandingFeeInvoicePreview {
|
|
376
|
+
rejected: boolean;
|
|
377
|
+
message: string | null;
|
|
378
|
+
company_id: number;
|
|
379
|
+
airport: {
|
|
380
|
+
id: number;
|
|
381
|
+
ident: string;
|
|
382
|
+
name: string;
|
|
383
|
+
} | null;
|
|
384
|
+
invoice: {
|
|
385
|
+
number: string | null;
|
|
386
|
+
date: string | null;
|
|
387
|
+
currency: string | null;
|
|
388
|
+
issuing_airport_name: string | null;
|
|
389
|
+
suggested_airport_icao_ident: string | null;
|
|
390
|
+
};
|
|
391
|
+
landing_fee_rows: LandingFeeInvoicePreviewRow[];
|
|
392
|
+
other_fees: Array<Record<string, unknown>>;
|
|
393
|
+
warnings: Array<{
|
|
394
|
+
type: string;
|
|
395
|
+
message: string;
|
|
396
|
+
}>;
|
|
397
|
+
}
|
|
398
|
+
interface LandingFeeInvoiceApplyPayload {
|
|
399
|
+
airport_id: number;
|
|
400
|
+
valid_from: string;
|
|
401
|
+
tax_percentage: number;
|
|
402
|
+
approach_type_id: number;
|
|
403
|
+
rows: Array<{
|
|
404
|
+
airplane_id: number;
|
|
405
|
+
landing_type: string;
|
|
406
|
+
unit_price: number;
|
|
407
|
+
price_basis: "net" | "gross";
|
|
408
|
+
vat_rate: number | null;
|
|
409
|
+
}>;
|
|
410
|
+
}
|
|
411
|
+
interface LandingFeeInvoiceApplyResult {
|
|
412
|
+
created: number;
|
|
413
|
+
updated: number;
|
|
414
|
+
unchanged: number;
|
|
415
|
+
prices_added: number;
|
|
416
|
+
issues: string[];
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
export type { Address, AiSuggestedMilestone, AiSuggestion, AiSuggestionStatus, AircraftBlock, AircraftBlockReason, AircraftRating, Airplane, AirplaneIssue, AirplaneIssueSeverity, AirplaneIssueStatus, AirplanePermission, AirplaneShareInvite, Airport, Alert, AllowedDocumentType, ApiResponse, ApproachType, Avail, BackgroundTask, BackgroundTaskStatus, BaseMembership, BaseModel, Booking, Comment, Company, ComplianceData, ComplianceGroup, ComplianceGroupSource, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Course, CourseCheckSyllabus, CourseDescriptionSuggestionPayload, CourseEnrollment, CourseEnrollmentMetrics, CourseFee, CreateAirplaneIssueInput, CreateCommentInput, CreatePostInput, DataWrappedResponse, DeferAirplaneIssueInput, DiscardedRow, Document, DocumentComplianceStatus, DocumentRequirement, DocumentRequirementGroup, DocumentRequirementGroupAssignment, DocumentShare, DocumentType, Event, Expense, ExpenseItem, ExtendedAirplane, Fee, FeeCategoryOptions, FlightLog, GroupedPermissions, Invoice, Landing, LandingFee, LandingFeeImportResult, LandingFeeInvoiceApplyPayload, LandingFeeInvoiceApplyResult, LandingFeeInvoicePreview, LandingFeeInvoicePreviewRow, LandingFeeTemplateParams, LogbookFlightLogPayload, LogbookStageResult, LogbookSuggestion, LogbookSuggestionMeta, MaintenanceEvent, MaintenanceEventEstimation, MaintenanceStatus, Media, MediaCollection, Membership, PaginatedResponse, PermissionItem, Post, PrePaidPackage, Price, Qualification, RecurringFlight, ResolveAirplaneIssueInput, Resource, Role, RoleDetail, RoleListItem, Runway, ScheduledFlight, Setting, SpecialFlight, Tag, Ticket, ToggleFavoriteResponse, UpdateAirplaneIssueInput, UpdateCommentInput, UpdatePostInput, User, UserAircraftRating, UserQualification, Waypoint };
|
package/dist/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-2WJHTRIE.js";
|