@updraft-solutions/mcrit-sdk 0.20.5 → 0.21.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/{chunk-2ANGTHWL.js → chunk-6R74TAPA.js} +19 -0
- package/dist/{chunk-IF42MXAB.cjs → chunk-PG6PFY6X.cjs} +20 -1
- package/dist/{conversation-Be76HoQk.d.cts → conversation-Dv61PrcQ.d.cts} +3085 -1703
- package/dist/{conversation-Be76HoQk.d.ts → conversation-Dv61PrcQ.d.ts} +3085 -1703
- package/dist/index.cjs +6 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -1
- package/dist/schemas/index.cjs +6 -2
- package/dist/schemas/index.d.cts +16 -16
- package/dist/schemas/index.d.ts +16 -16
- package/dist/schemas/index.js +5 -1
- package/dist/types/index.d.cts +18 -2
- package/dist/types/index.d.ts +18 -2
- package/package.json +1 -1
- package/src/schemas/models.ts +20 -0
- package/src/schemas/provisionRule.spec.ts +47 -0
- package/src/types/ai.ts +4 -0
- package/src/types/models.ts +2 -0
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { k as AttachSyllabusElementForm, l as AttachSyllabusElementFormSchema, n as BaseModel, r as CourseCheckSyllabus, w as CreateFormSubmissionInput, x as CreateFormTemplateAssignmentInput, y as CreateFormTemplateInput, D as CreateSyllabusFromTemplateForm, E as CreateSyllabusFromTemplateFormSchema, F as CreateSyllabusFromTemplateResult, O as EnrollmentTrainingElement, P as EnrollmentTrainingStatus, Q as EnrollmentTrainingStatusEnum, V as FBO_OPERATING_DAYS, W as FBO_SYSTEM_ROLES, Z as FieldLabel, _ as FieldLabelSchema, a9 as FormSubmission, aa as FormSubmissionSchema, ab as FormSubmissionShare, ac as FormSubmissionShareBase, ad as FormSubmissionShareBaseSchema, ae as FormSubmissionShareSchema, ah as FormTemplate, ai as FormTemplateAssignment, aj as FormTemplateAssignmentSchema, ak as FormTemplateSchema, al as FuelUnit, am as GradeHistoryItem, an as GradingScale, ao as GradingScaleForm, ap as GradingScaleFormSchema, aq as GradingScalePoint, ar as ImpersonationParticipant, as as ImpersonationState, at as InvalidateTrainingRecordResponse, aJ as ReorderSyllabusElementItem, aK as ReorderSyllabusElementItemSchema, aL as RequiredForm, aM as RequiredFormSchema, aN as RequiredFormVia, aO as RequiredFormViaCrew, aP as RequiredFormViaCrewSchema, aQ as RequiredFormViaSchema, aS as ReviewFormSubmissionInput, aW as SchemaField, aX as SchemaFieldSchema, aY as SchemaSection, aZ as SchemaSectionSchema, a$ as ShowWhen, b0 as ShowWhenSchema, b1 as SignOffTrainingElementForm, b2 as SignOffTrainingElementFormSchema, b3 as Signature, b4 as SignatureSchema, b6 as StoreSyllabusForm, b7 as StoreSyllabusFormSchema, b8 as SubmissionFile, b9 as SubmissionFileSchema, ba as Syllabus, bb as SyllabusElement, bc as SyllabusElementMutationResult, bd as SyllabusKind, be as SyllabusKindEnum, bf as SyllabusRolloutResult, bg as SyllabusRolloutResultItem, bh as SyllabusRolloutSkippedItem, bk as TemplateSchema, bl as TemplateSchemaSchema, bn as TrainingElement, bo as TrainingElementForm, bp as TrainingElementFormSchema, bq as TrainingElementKind, br as TrainingElementKindEnum, bs as TrainingRecord, bt as TrainingRecordEntry, bu as TrainingRecordEntryInput, bv as TrainingRecordResult, bw as TrainingRecordResultEnum, bx as TrainingRecordStatus, by as TrainingRecordStatusEnum, bz as TrainingSignature, bA as TrainingTemplatePack, bD as UpdateFormTemplateInput, bF as UpdateSyllabusElementForm, bG as UpdateSyllabusElementFormSchema, bH as UpdateSyllabusForm, bI as UpdateSyllabusFormSchema, bJ as UpsertTrainingRecordForm, bK as UpsertTrainingRecordFormSchema, bL as UsedByCourse, bQ as activitySchema, bR as addressSchema, bS as aircraftPositionSchema, bT as aircraftRatingSchema, bU as airplaneIssueSchema, bV as airplaneIssueSeverityEnum, bW as airplaneIssueStatusEnum, bX as airplanePermissionSchema, bY as airplaneSchema, bZ as airplaneShareInviteSchema, b_ as airportSchema, b$ as alertSchema, c0 as allowedDocumentTypeSchema, c1 as approachTypeSchema, c2 as availSchema, c3 as baseMembershipSchema, c4 as billingProfileSchema, c5 as bookingSchema, c6 as bookingWaypointSchema, c7 as commentSchema, c8 as companyIdentitySchema, c9 as companySchema, ca as contactAttributeSchema, cb as conversationKindSchema, cc as conversationMessageSchema, cd as conversationMessageSentEventSchema, ce as conversationParticipantSchema, cf as conversationReadEventSchema, cg as conversationRecipientSchema, ch as conversationSchema, ci as conversationUnreadSummarySchema, cj as courseCheckSyllabusSchema, ck as courseEnrollmentMetricsSchema, cl as courseEnrollmentSchema, cm as courseFeeSchema, cn as courseSchema, co as createSyllabusFromTemplateResultSchema, cp as documentComplianceStatus, cq as documentRequirement, cr as documentRequirementGroup, cs as documentRequirementGroupAssignment, ct as documentSchema, cu as documentShareSchema, cv as documentType, cw as enrollmentTrainingElementSchema, cx as eventSchema, cy as expenseItemSchema, cz as expenseSchema, cA as extendedAirplaneSchema, cB as fboAcceptanceAxisSchema, cC as fboAcceptanceStatusSchema, cD as fboActivityCauserSchema, cE as fboActivityChangesSchema, cF as fboActivitySchema, cG as fboCompanyGrantInputSchema, cH as fboCompanyGrantSchema, cI as fboCompanyMemberSchema, cJ as fboCompanyProfileSchema, cK as fboCompanySchema, cL as fboDecisionAxisSchema, cM as fboDecisionInputSchema, cN as fboDecisionSchema, cO as fboDutyAffectedSchema, cP as fboDutySchema, cQ as fboDutySeriesResponseSchema, cR as fboFlightCanSchema, cS as fboFlightDocumentSchema, cT as fboFlightSchema, cU as fboFlightStatusSchema, cV as fboFlightTypeSchema, cW as fboGrantAbilityOptionSchema, cX as fboGrantAbilitySchema, 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, da as fboRowCanSchema, db as fboStatisticsSchema, dc as fboSystemRoleSchema, dd as fboTrafficLayerInputSchema, de as fboTrafficRowSchema, df as fboTrafficRowTypeSchema, dg as fboTrafficSourceSchema, dh as fboVisibilitySchema, di as fboWeeklyLandingSchema, dj as feeCategoryOptionsSchema, dk as feeSchema, dl as flightLogSchema, dm as flightRequestAvailabilitySchema, dn as flightRequestBusyIntervalSchema, dp as flightRequestResponseSchema, dq as flightRequestResponseStatusSchema, dr as flightRequestSchema, ds as flightRequestSeatSchema, dt as flightRequestStatusSchema, du as flightRequestWindowSchema, dv as fuelUnitSchema, dw as gradeHistoryItemSchema, dx as gradingScalePointSchema, dy as gradingScaleSchema, dz as impersonationParticipantSchema, dA as impersonationStateSchema, dB as invalidateTrainingRecordResponseSchema, dC as
|
|
1
|
+
import { eo as Media, a8 as FormFieldType, ag as FormSubmissionStatus, af as FormSubmissionSource } from '../conversation-Dv61PrcQ.js';
|
|
2
|
+
export { k as AttachSyllabusElementForm, l as AttachSyllabusElementFormSchema, n as BaseModel, r as CourseCheckSyllabus, w as CreateFormSubmissionInput, x as CreateFormTemplateAssignmentInput, y as CreateFormTemplateInput, D as CreateSyllabusFromTemplateForm, E as CreateSyllabusFromTemplateFormSchema, F as CreateSyllabusFromTemplateResult, O as EnrollmentTrainingElement, P as EnrollmentTrainingStatus, Q as EnrollmentTrainingStatusEnum, V as FBO_OPERATING_DAYS, W as FBO_SYSTEM_ROLES, Z as FieldLabel, _ as FieldLabelSchema, a9 as FormSubmission, aa as FormSubmissionSchema, ab as FormSubmissionShare, ac as FormSubmissionShareBase, ad as FormSubmissionShareBaseSchema, ae as FormSubmissionShareSchema, ah as FormTemplate, ai as FormTemplateAssignment, aj as FormTemplateAssignmentSchema, ak as FormTemplateSchema, al as FuelUnit, am as GradeHistoryItem, an as GradingScale, ao as GradingScaleForm, ap as GradingScaleFormSchema, aq as GradingScalePoint, ar as ImpersonationParticipant, as as ImpersonationState, at as InvalidateTrainingRecordResponse, aJ as ReorderSyllabusElementItem, aK as ReorderSyllabusElementItemSchema, aL as RequiredForm, aM as RequiredFormSchema, aN as RequiredFormVia, aO as RequiredFormViaCrew, aP as RequiredFormViaCrewSchema, aQ as RequiredFormViaSchema, aS as ReviewFormSubmissionInput, aW as SchemaField, aX as SchemaFieldSchema, aY as SchemaSection, aZ as SchemaSectionSchema, a$ as ShowWhen, b0 as ShowWhenSchema, b1 as SignOffTrainingElementForm, b2 as SignOffTrainingElementFormSchema, b3 as Signature, b4 as SignatureSchema, b6 as StoreSyllabusForm, b7 as StoreSyllabusFormSchema, b8 as SubmissionFile, b9 as SubmissionFileSchema, ba as Syllabus, bb as SyllabusElement, bc as SyllabusElementMutationResult, bd as SyllabusKind, be as SyllabusKindEnum, bf as SyllabusRolloutResult, bg as SyllabusRolloutResultItem, bh as SyllabusRolloutSkippedItem, bk as TemplateSchema, bl as TemplateSchemaSchema, bn as TrainingElement, bo as TrainingElementForm, bp as TrainingElementFormSchema, bq as TrainingElementKind, br as TrainingElementKindEnum, bs as TrainingRecord, bt as TrainingRecordEntry, bu as TrainingRecordEntryInput, bv as TrainingRecordResult, bw as TrainingRecordResultEnum, bx as TrainingRecordStatus, by as TrainingRecordStatusEnum, bz as TrainingSignature, bA as TrainingTemplatePack, bD as UpdateFormTemplateInput, bF as UpdateSyllabusElementForm, bG as UpdateSyllabusElementFormSchema, bH as UpdateSyllabusForm, bI as UpdateSyllabusFormSchema, bJ as UpsertTrainingRecordForm, bK as UpsertTrainingRecordFormSchema, bL as UsedByCourse, bQ as activitySchema, bR as addressSchema, bS as aircraftPositionSchema, bT as aircraftRatingSchema, bU as airplaneIssueSchema, bV as airplaneIssueSeverityEnum, bW as airplaneIssueStatusEnum, bX as airplanePermissionSchema, bY as airplaneSchema, bZ as airplaneShareInviteSchema, b_ as airportSchema, b$ as alertSchema, c0 as allowedDocumentTypeSchema, c1 as approachTypeSchema, c2 as availSchema, c3 as baseMembershipSchema, c4 as billingProfileSchema, c5 as bookingSchema, c6 as bookingWaypointSchema, c7 as commentSchema, c8 as companyIdentitySchema, c9 as companySchema, ca as contactAttributeSchema, cb as conversationKindSchema, cc as conversationMessageSchema, cd as conversationMessageSentEventSchema, ce as conversationParticipantSchema, cf as conversationReadEventSchema, cg as conversationRecipientSchema, ch as conversationSchema, ci as conversationUnreadSummarySchema, cj as courseCheckSyllabusSchema, ck as courseEnrollmentMetricsSchema, cl as courseEnrollmentSchema, cm as courseFeeSchema, cn as courseSchema, co as createSyllabusFromTemplateResultSchema, cp as documentComplianceStatus, cq as documentRequirement, cr as documentRequirementGroup, cs as documentRequirementGroupAssignment, ct as documentSchema, cu as documentShareSchema, cv as documentType, cw as enrollmentTrainingElementSchema, cx as eventSchema, cy as expenseItemSchema, cz as expenseSchema, cA as extendedAirplaneSchema, cB as fboAcceptanceAxisSchema, cC as fboAcceptanceStatusSchema, cD as fboActivityCauserSchema, cE as fboActivityChangesSchema, cF as fboActivitySchema, cG as fboCompanyGrantInputSchema, cH as fboCompanyGrantSchema, cI as fboCompanyMemberSchema, cJ as fboCompanyProfileSchema, cK as fboCompanySchema, cL as fboDecisionAxisSchema, cM as fboDecisionInputSchema, cN as fboDecisionSchema, cO as fboDutyAffectedSchema, cP as fboDutySchema, cQ as fboDutySeriesResponseSchema, cR as fboFlightCanSchema, cS as fboFlightDocumentSchema, cT as fboFlightSchema, cU as fboFlightStatusSchema, cV as fboFlightTypeSchema, cW as fboGrantAbilityOptionSchema, cX as fboGrantAbilitySchema, 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, da as fboRowCanSchema, db as fboStatisticsSchema, dc as fboSystemRoleSchema, dd as fboTrafficLayerInputSchema, de as fboTrafficRowSchema, df as fboTrafficRowTypeSchema, dg as fboTrafficSourceSchema, dh as fboVisibilitySchema, di as fboWeeklyLandingSchema, dj as feeCategoryOptionsSchema, dk as feeSchema, dl as flightLogSchema, dm as flightRequestAvailabilitySchema, dn as flightRequestBusyIntervalSchema, dp as flightRequestResponseSchema, dq as flightRequestResponseStatusSchema, dr as flightRequestSchema, ds as flightRequestSeatSchema, dt as flightRequestStatusSchema, du as flightRequestWindowSchema, dv as fuelUnitSchema, dw as gradeHistoryItemSchema, dx as gradingScalePointSchema, dy as gradingScaleSchema, dz as impersonationParticipantSchema, dA as impersonationStateSchema, dB as invalidateTrainingRecordResponseSchema, dC as invoiceKindSchema, dD as invoiceSchema, dE as landingFeeSchema, dF as landingSchema, dG as maintenanceEventEstimationSchema, dH as maintenanceEventSchema, dI as maintenanceStatusSchema, dJ as mediaCollection, dK as mediaSchema, dL as membershipIdentitySchema, dM as membershipSchema, dN as membershipSignupSchema, dO as nestedMembershipSchema, dP as postSchema, dQ as postSubjectSchema, dR as prePaidPackageAssignmentSchema, dS as prePaidPackageSchema, dT as priceSchema, dU as provisionRuleSchema, dV as qualificationSchema, dW as recurringFlightSchema, dX as roleSchema, dY as runwaySchema, dZ as scheduledFlightSchema, d_ as settingSchema, d$ as specialFlightSchema, e0 as syllabusElementMutationResultSchema, e1 as syllabusElementSchema, e2 as syllabusRolloutResultItemSchema, e3 as syllabusRolloutResultSchema, e4 as syllabusRolloutSkippedItemSchema, e5 as syllabusSchema, e6 as tagSchema, e7 as teachingPermissionSchema, e8 as ticketSchema, e9 as trainingElementSchema, ea as trainingRecordEntryInputSchema, eb as trainingRecordEntrySchema, ec as trainingRecordSchema, ed as trainingSignatureSchema, ee as trainingTemplatePackSchema, ef as usedByCourseSchema, eg as userAircraftRatingSchema, eh as userQualificationSchema, ei as userSchema, ej as waypointSchema, ek as zContactDTO, el as zMoneyObject, em as zNetGross, en as zNullableBool } from '../conversation-Dv61PrcQ.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
declare enum FaqStatus {
|
|
@@ -889,9 +889,9 @@ declare const courseMilestoneSchema: z.ZodObject<{
|
|
|
889
889
|
delete?: boolean | null | undefined;
|
|
890
890
|
}>>;
|
|
891
891
|
}, "strip", z.ZodTypeAny, {
|
|
892
|
+
kind: string;
|
|
892
893
|
name: string;
|
|
893
894
|
id: number;
|
|
894
|
-
kind: string;
|
|
895
895
|
sort_order: number;
|
|
896
896
|
course_id: number;
|
|
897
897
|
is_prerequisite: boolean;
|
|
@@ -910,9 +910,9 @@ declare const courseMilestoneSchema: z.ZodObject<{
|
|
|
910
910
|
} | null | undefined;
|
|
911
911
|
completion_rule?: Record<string, unknown> | null | undefined;
|
|
912
912
|
}, {
|
|
913
|
+
kind: string;
|
|
913
914
|
name: string;
|
|
914
915
|
id: number;
|
|
915
|
-
kind: string;
|
|
916
916
|
sort_order: number;
|
|
917
917
|
course_id: number;
|
|
918
918
|
is_prerequisite: boolean;
|
|
@@ -941,8 +941,8 @@ declare const CourseMilestoneFormSchema: z.ZodObject<{
|
|
|
941
941
|
completion_rule: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
942
942
|
sort_order: z.ZodOptional<z.ZodNumber>;
|
|
943
943
|
}, "strip", z.ZodTypeAny, {
|
|
944
|
-
name: string;
|
|
945
944
|
kind: string;
|
|
945
|
+
name: string;
|
|
946
946
|
is_prerequisite: boolean;
|
|
947
947
|
description?: string | null | undefined;
|
|
948
948
|
sort_order?: number | undefined;
|
|
@@ -950,8 +950,8 @@ declare const CourseMilestoneFormSchema: z.ZodObject<{
|
|
|
950
950
|
completion_rule?: Record<string, unknown> | null | undefined;
|
|
951
951
|
}, {
|
|
952
952
|
name: string;
|
|
953
|
-
description?: string | null | undefined;
|
|
954
953
|
kind?: string | undefined;
|
|
954
|
+
description?: string | null | undefined;
|
|
955
955
|
sort_order?: number | undefined;
|
|
956
956
|
is_prerequisite?: boolean | undefined;
|
|
957
957
|
requires_form_template_id?: number | null | undefined;
|
|
@@ -997,9 +997,9 @@ declare const courseEnrollmentMilestoneSchema: z.ZodObject<{
|
|
|
997
997
|
delete?: boolean | null | undefined;
|
|
998
998
|
}>>;
|
|
999
999
|
}, "strip", z.ZodTypeAny, {
|
|
1000
|
+
kind: string;
|
|
1000
1001
|
name: string;
|
|
1001
1002
|
id: number;
|
|
1002
|
-
kind: string;
|
|
1003
1003
|
sort_order: number;
|
|
1004
1004
|
course_id: number;
|
|
1005
1005
|
is_prerequisite: boolean;
|
|
@@ -1018,9 +1018,9 @@ declare const courseEnrollmentMilestoneSchema: z.ZodObject<{
|
|
|
1018
1018
|
} | null | undefined;
|
|
1019
1019
|
completion_rule?: Record<string, unknown> | null | undefined;
|
|
1020
1020
|
}, {
|
|
1021
|
+
kind: string;
|
|
1021
1022
|
name: string;
|
|
1022
1023
|
id: number;
|
|
1023
|
-
kind: string;
|
|
1024
1024
|
sort_order: number;
|
|
1025
1025
|
course_id: number;
|
|
1026
1026
|
is_prerequisite: boolean;
|
|
@@ -1087,9 +1087,9 @@ declare const courseEnrollmentMilestoneSchema: z.ZodObject<{
|
|
|
1087
1087
|
} | undefined;
|
|
1088
1088
|
notes?: string | null | undefined;
|
|
1089
1089
|
milestone?: {
|
|
1090
|
+
kind: string;
|
|
1090
1091
|
name: string;
|
|
1091
1092
|
id: number;
|
|
1092
|
-
kind: string;
|
|
1093
1093
|
sort_order: number;
|
|
1094
1094
|
course_id: number;
|
|
1095
1095
|
is_prerequisite: boolean;
|
|
@@ -1129,9 +1129,9 @@ declare const courseEnrollmentMilestoneSchema: z.ZodObject<{
|
|
|
1129
1129
|
} | undefined;
|
|
1130
1130
|
notes?: string | null | undefined;
|
|
1131
1131
|
milestone?: {
|
|
1132
|
+
kind: string;
|
|
1132
1133
|
name: string;
|
|
1133
1134
|
id: number;
|
|
1134
|
-
kind: string;
|
|
1135
1135
|
sort_order: number;
|
|
1136
1136
|
course_id: number;
|
|
1137
1137
|
is_prerequisite: boolean;
|
|
@@ -3725,8 +3725,8 @@ declare const CreateLocationMapSchema: z.ZodObject<{
|
|
|
3725
3725
|
is_active: z.ZodOptional<z.ZodBoolean>;
|
|
3726
3726
|
}, "strip", z.ZodTypeAny, {
|
|
3727
3727
|
name: string;
|
|
3728
|
-
description?: string | null | undefined;
|
|
3729
3728
|
kind?: string | undefined;
|
|
3729
|
+
description?: string | null | undefined;
|
|
3730
3730
|
is_active?: boolean | undefined;
|
|
3731
3731
|
slug?: string | undefined;
|
|
3732
3732
|
default_viewport?: {
|
|
@@ -3738,8 +3738,8 @@ declare const CreateLocationMapSchema: z.ZodObject<{
|
|
|
3738
3738
|
} | null | undefined;
|
|
3739
3739
|
}, {
|
|
3740
3740
|
name: string;
|
|
3741
|
-
description?: string | null | undefined;
|
|
3742
3741
|
kind?: string | undefined;
|
|
3742
|
+
description?: string | null | undefined;
|
|
3743
3743
|
is_active?: boolean | undefined;
|
|
3744
3744
|
slug?: string | undefined;
|
|
3745
3745
|
default_viewport?: {
|
|
@@ -3777,9 +3777,9 @@ declare const UpdateLocationMapSchema: z.ZodObject<{
|
|
|
3777
3777
|
}>>>>;
|
|
3778
3778
|
is_active: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
3779
3779
|
}, "strip", z.ZodTypeAny, {
|
|
3780
|
+
kind?: string | undefined;
|
|
3780
3781
|
name?: string | undefined;
|
|
3781
3782
|
description?: string | null | undefined;
|
|
3782
|
-
kind?: string | undefined;
|
|
3783
3783
|
is_active?: boolean | undefined;
|
|
3784
3784
|
slug?: string | undefined;
|
|
3785
3785
|
default_viewport?: {
|
|
@@ -3790,9 +3790,9 @@ declare const UpdateLocationMapSchema: z.ZodObject<{
|
|
|
3790
3790
|
bearing?: number | undefined;
|
|
3791
3791
|
} | null | undefined;
|
|
3792
3792
|
}, {
|
|
3793
|
+
kind?: string | undefined;
|
|
3793
3794
|
name?: string | undefined;
|
|
3794
3795
|
description?: string | null | undefined;
|
|
3795
|
-
kind?: string | undefined;
|
|
3796
3796
|
is_active?: boolean | undefined;
|
|
3797
3797
|
slug?: string | undefined;
|
|
3798
3798
|
default_viewport?: {
|
|
@@ -3874,8 +3874,8 @@ declare const UpdateLocationMapFeatureSchema: z.ZodObject<{
|
|
|
3874
3874
|
coordinates: unknown[];
|
|
3875
3875
|
}>>;
|
|
3876
3876
|
}, "strip", z.ZodTypeAny, {
|
|
3877
|
-
name?: string | null | undefined;
|
|
3878
3877
|
kind?: string | undefined;
|
|
3878
|
+
name?: string | null | undefined;
|
|
3879
3879
|
properties?: Record<string, unknown> | null | undefined;
|
|
3880
3880
|
visibility?: LocationFeatureVisibility | undefined;
|
|
3881
3881
|
geometry?: {
|
|
@@ -3884,8 +3884,8 @@ declare const UpdateLocationMapFeatureSchema: z.ZodObject<{
|
|
|
3884
3884
|
} | undefined;
|
|
3885
3885
|
display_order?: number | undefined;
|
|
3886
3886
|
}, {
|
|
3887
|
-
name?: string | null | undefined;
|
|
3888
3887
|
kind?: string | undefined;
|
|
3888
|
+
name?: string | null | undefined;
|
|
3889
3889
|
properties?: Record<string, unknown> | null | undefined;
|
|
3890
3890
|
visibility?: LocationFeatureVisibility | undefined;
|
|
3891
3891
|
geometry?: {
|
package/dist/schemas/index.js
CHANGED
|
@@ -213,6 +213,7 @@ import {
|
|
|
213
213
|
impersonationParticipantSchema,
|
|
214
214
|
impersonationStateSchema,
|
|
215
215
|
invalidateTrainingRecordResponseSchema,
|
|
216
|
+
invoiceKindSchema,
|
|
216
217
|
invoiceSchema,
|
|
217
218
|
landingFeeSchema,
|
|
218
219
|
landingSchema,
|
|
@@ -230,6 +231,7 @@ import {
|
|
|
230
231
|
prePaidPackageAssignmentSchema,
|
|
231
232
|
prePaidPackageSchema,
|
|
232
233
|
priceSchema,
|
|
234
|
+
provisionRuleSchema,
|
|
233
235
|
qualificationSchema,
|
|
234
236
|
recurringFlightSchema,
|
|
235
237
|
roleSchema,
|
|
@@ -261,7 +263,7 @@ import {
|
|
|
261
263
|
zMoneyObject,
|
|
262
264
|
zNetGross,
|
|
263
265
|
zNullableBool
|
|
264
|
-
} from "../chunk-
|
|
266
|
+
} from "../chunk-6R74TAPA.js";
|
|
265
267
|
export {
|
|
266
268
|
ALLOWED_GEOMETRY_TYPES,
|
|
267
269
|
ALLOWED_NEWSLETTER_VARIABLES,
|
|
@@ -477,6 +479,7 @@ export {
|
|
|
477
479
|
impersonationParticipantSchema,
|
|
478
480
|
impersonationStateSchema,
|
|
479
481
|
invalidateTrainingRecordResponseSchema,
|
|
482
|
+
invoiceKindSchema,
|
|
480
483
|
invoiceSchema,
|
|
481
484
|
landingFeeSchema,
|
|
482
485
|
landingSchema,
|
|
@@ -494,6 +497,7 @@ export {
|
|
|
494
497
|
prePaidPackageAssignmentSchema,
|
|
495
498
|
prePaidPackageSchema,
|
|
496
499
|
priceSchema,
|
|
500
|
+
provisionRuleSchema,
|
|
497
501
|
qualificationSchema,
|
|
498
502
|
recurringFlightSchema,
|
|
499
503
|
roleSchema,
|
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,
|
|
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-Dv61PrcQ.cjs';
|
|
2
|
+
export { A as Activity, a as Address, b as AircraftPosition, c as AircraftRating, d as Airplane, ep as AirplaneIssue, eq as AirplaneIssueSeverity, er 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, es as BaseModel, o as Booking, C as Comment, p as Company, q as Course, et as CourseCheckSyllabus, s as CourseEnrollment, eu 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, ev as InvoiceKind, av as Landing, aw as LandingFee, ax as MaintenanceEvent, ay as MaintenanceEventEstimation, az as MaintenanceStatus, eo as Media, aA as MediaCollection, aB as Membership, aC as MembershipSignup, aD as Post, aE as PostSubject, aF as PrePaidPackage, aG as Price, ew as ProvisionRule, 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, ex 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-Dv61PrcQ.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -238,6 +238,12 @@ interface AircraftLogbookRowMeta extends LogbookSuggestionMeta {
|
|
|
238
238
|
} | null;
|
|
239
239
|
/** Payload fields the admin corrected by hand (score recomputed from the corrected values). */
|
|
240
240
|
corrected?: string[];
|
|
241
|
+
/** People the Bordbuch names who are not in the crew copied from the booking (attached rows; informational). */
|
|
242
|
+
crew_hint?: {
|
|
243
|
+
membership_id: number;
|
|
244
|
+
name: string;
|
|
245
|
+
score: number;
|
|
246
|
+
}[];
|
|
241
247
|
}
|
|
242
248
|
type AircraftLogbookRow = AiSuggestion<LogbookFlightLogPayload> & {
|
|
243
249
|
meta?: AircraftLogbookRowMeta;
|
|
@@ -274,6 +280,16 @@ interface LogbookImportBatch {
|
|
|
274
280
|
page: number | null;
|
|
275
281
|
reason: string;
|
|
276
282
|
}[];
|
|
283
|
+
/** Per page index: how the page fared (prerotated/rotated in clockwise degrees). */
|
|
284
|
+
page_results?: Record<string, {
|
|
285
|
+
status: "pending" | "read" | "failed";
|
|
286
|
+
file?: string;
|
|
287
|
+
prerotated?: number;
|
|
288
|
+
rotated?: number;
|
|
289
|
+
rows?: number;
|
|
290
|
+
logged?: number;
|
|
291
|
+
duplicates?: number;
|
|
292
|
+
}> | null;
|
|
277
293
|
task_uuid: string | null;
|
|
278
294
|
requested_by: number | null;
|
|
279
295
|
created_at: string;
|
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,
|
|
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-Dv61PrcQ.js';
|
|
2
|
+
export { A as Activity, a as Address, b as AircraftPosition, c as AircraftRating, d as Airplane, ep as AirplaneIssue, eq as AirplaneIssueSeverity, er 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, es as BaseModel, o as Booking, C as Comment, p as Company, q as Course, et as CourseCheckSyllabus, s as CourseEnrollment, eu 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, ev as InvoiceKind, av as Landing, aw as LandingFee, ax as MaintenanceEvent, ay as MaintenanceEventEstimation, az as MaintenanceStatus, eo as Media, aA as MediaCollection, aB as Membership, aC as MembershipSignup, aD as Post, aE as PostSubject, aF as PrePaidPackage, aG as Price, ew as ProvisionRule, 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, ex 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-Dv61PrcQ.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -238,6 +238,12 @@ interface AircraftLogbookRowMeta extends LogbookSuggestionMeta {
|
|
|
238
238
|
} | null;
|
|
239
239
|
/** Payload fields the admin corrected by hand (score recomputed from the corrected values). */
|
|
240
240
|
corrected?: string[];
|
|
241
|
+
/** People the Bordbuch names who are not in the crew copied from the booking (attached rows; informational). */
|
|
242
|
+
crew_hint?: {
|
|
243
|
+
membership_id: number;
|
|
244
|
+
name: string;
|
|
245
|
+
score: number;
|
|
246
|
+
}[];
|
|
241
247
|
}
|
|
242
248
|
type AircraftLogbookRow = AiSuggestion<LogbookFlightLogPayload> & {
|
|
243
249
|
meta?: AircraftLogbookRowMeta;
|
|
@@ -274,6 +280,16 @@ interface LogbookImportBatch {
|
|
|
274
280
|
page: number | null;
|
|
275
281
|
reason: string;
|
|
276
282
|
}[];
|
|
283
|
+
/** Per page index: how the page fared (prerotated/rotated in clockwise degrees). */
|
|
284
|
+
page_results?: Record<string, {
|
|
285
|
+
status: "pending" | "read" | "failed";
|
|
286
|
+
file?: string;
|
|
287
|
+
prerotated?: number;
|
|
288
|
+
rotated?: number;
|
|
289
|
+
rows?: number;
|
|
290
|
+
logged?: number;
|
|
291
|
+
duplicates?: number;
|
|
292
|
+
}> | null;
|
|
277
293
|
task_uuid: string | null;
|
|
278
294
|
requested_by: number | null;
|
|
279
295
|
created_at: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@updraft-solutions/mcrit-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.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/schemas/models.ts
CHANGED
|
@@ -162,6 +162,17 @@ export const feeSchema = BaseModel.extend({
|
|
|
162
162
|
valid_from: z.string(),
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
+
export const provisionRuleSchema = z.object({
|
|
166
|
+
type: z.literal("provisionRule"),
|
|
167
|
+
id: z.number(),
|
|
168
|
+
company_id: z.number(),
|
|
169
|
+
crew_role: z.string(),
|
|
170
|
+
fee_id: z.number(),
|
|
171
|
+
fee: feeSchema.optional(),
|
|
172
|
+
created_at: z.string().nullable().optional(),
|
|
173
|
+
updated_at: z.string().nullable().optional(),
|
|
174
|
+
});
|
|
175
|
+
|
|
165
176
|
export const feeCategoryOptionsSchema = z.object({
|
|
166
177
|
categories: z.array(z.string()),
|
|
167
178
|
subcategories: z.record(z.string(), z.array(z.string())),
|
|
@@ -964,6 +975,9 @@ export const billingProfileSchema = z.object({
|
|
|
964
975
|
updated_at: z.string(),
|
|
965
976
|
});
|
|
966
977
|
|
|
978
|
+
/** Which draft an expense item may join; provision = a company charging its instructors. */
|
|
979
|
+
export const invoiceKindSchema = z.enum(["standard", "provision"]);
|
|
980
|
+
|
|
967
981
|
export const flightLogSchema = z.object({
|
|
968
982
|
type: z.literal("flightLog"),
|
|
969
983
|
id: z.number(),
|
|
@@ -1011,6 +1025,9 @@ export const flightLogSchema = z.object({
|
|
|
1011
1025
|
to: z.string().nullable().optional(),
|
|
1012
1026
|
costs: zMoneyObject.nullable().optional(),
|
|
1013
1027
|
charge: zMoneyObject.nullable().optional(),
|
|
1028
|
+
// Which invoice kinds among this log's items are released (single payload only;
|
|
1029
|
+
// absent on list rows and on rows cached before the field existed).
|
|
1030
|
+
released_invoice_kinds: z.array(invoiceKindSchema).optional(),
|
|
1014
1031
|
remarks: z.string().nullable().optional(),
|
|
1015
1032
|
created_at: z.string(),
|
|
1016
1033
|
updated_at: z.string(),
|
|
@@ -1025,6 +1042,8 @@ export const flightLogSchema = z.object({
|
|
|
1025
1042
|
export const invoiceSchema = z.object({
|
|
1026
1043
|
type: z.literal("invoice"),
|
|
1027
1044
|
id: z.number(),
|
|
1045
|
+
// Optional: rows cached offline before this field existed must still parse.
|
|
1046
|
+
kind: invoiceKindSchema.optional(),
|
|
1028
1047
|
title: z.string(),
|
|
1029
1048
|
membership_id: z.number(),
|
|
1030
1049
|
// List rows (InvoiceListResource) carry the identity-only membership; the
|
|
@@ -1571,6 +1590,7 @@ export const expenseItemSchema = z.object({
|
|
|
1571
1590
|
model_id: z.number(),
|
|
1572
1591
|
model_type: z.string(),
|
|
1573
1592
|
identifier: z.string().nullable(),
|
|
1593
|
+
kind: invoiceKindSchema.optional(),
|
|
1574
1594
|
// Provenance: the `prices` row this item was generated from. `price_id` is
|
|
1575
1595
|
// always present (nullable FK); `price` only when the relation is
|
|
1576
1596
|
// eager-loaded.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { expenseItemSchema, flightLogSchema, invoiceSchema, provisionRuleSchema } from "./models";
|
|
3
|
+
|
|
4
|
+
describe("invoice kinds", () => {
|
|
5
|
+
it("accepts the two kinds and tolerates a missing kind on cached rows", () => {
|
|
6
|
+
const base = {
|
|
7
|
+
type: "invoice",
|
|
8
|
+
id: 1,
|
|
9
|
+
title: "INVOICE",
|
|
10
|
+
membership_id: 2,
|
|
11
|
+
billing_profile_id: null,
|
|
12
|
+
created_at: "2026-10-13T10:00:00Z",
|
|
13
|
+
updated_at: "2026-10-13T10:00:00Z",
|
|
14
|
+
};
|
|
15
|
+
expect(invoiceSchema.safeParse({ ...base, kind: "provision" }).success).toBe(true);
|
|
16
|
+
expect(invoiceSchema.safeParse({ ...base }).success).toBe(true);
|
|
17
|
+
expect(invoiceSchema.safeParse({ ...base, kind: "other" }).success).toBe(false);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("parses a provision rule with its embedded fee", () => {
|
|
21
|
+
const parsed = provisionRuleSchema.parse({
|
|
22
|
+
type: "provisionRule",
|
|
23
|
+
id: 1,
|
|
24
|
+
company_id: 3,
|
|
25
|
+
crew_role: "instructor",
|
|
26
|
+
fee_id: 9,
|
|
27
|
+
created_at: "2026-10-13T10:00:00Z",
|
|
28
|
+
updated_at: "2026-10-13T10:00:00Z",
|
|
29
|
+
});
|
|
30
|
+
expect(parsed.crew_role).toBe("instructor");
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it("carries kind on expense items", () => {
|
|
34
|
+
const item = expenseItemSchema.shape.kind;
|
|
35
|
+
expect(item.safeParse("provision").success).toBe(true);
|
|
36
|
+
expect(item.safeParse(undefined).success).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
describe("flight log released_invoice_kinds", () => {
|
|
41
|
+
it("accepts kinds and undefined, rejects unknown kinds", () => {
|
|
42
|
+
const f = flightLogSchema.shape.released_invoice_kinds;
|
|
43
|
+
expect(f.safeParse(["provision"]).success).toBe(true);
|
|
44
|
+
expect(f.safeParse(undefined).success).toBe(true);
|
|
45
|
+
expect(f.safeParse(["other"]).success).toBe(false);
|
|
46
|
+
});
|
|
47
|
+
});
|
package/src/types/ai.ts
CHANGED
|
@@ -133,6 +133,8 @@ export interface AircraftLogbookRowMeta extends LogbookSuggestionMeta {
|
|
|
133
133
|
row_band?: { top: number; bottom: number } | null;
|
|
134
134
|
/** Payload fields the admin corrected by hand (score recomputed from the corrected values). */
|
|
135
135
|
corrected?: string[];
|
|
136
|
+
/** People the Bordbuch names who are not in the crew copied from the booking (attached rows; informational). */
|
|
137
|
+
crew_hint?: { membership_id: number; name: string; score: number }[];
|
|
136
138
|
}
|
|
137
139
|
|
|
138
140
|
export type AircraftLogbookRow = AiSuggestion<LogbookFlightLogPayload> & {
|
|
@@ -159,6 +161,8 @@ export interface LogbookImportBatch {
|
|
|
159
161
|
unmatched_count: number;
|
|
160
162
|
duplicate_count: number;
|
|
161
163
|
failed_pages: { file: string; page: number | null; reason: string }[];
|
|
164
|
+
/** Per page index: how the page fared (prerotated/rotated in clockwise degrees). */
|
|
165
|
+
page_results?: Record<string, { status: "pending" | "read" | "failed"; file?: string; prerotated?: number; rotated?: number; rows?: number; logged?: number; duplicates?: number }> | null;
|
|
162
166
|
task_uuid: string | null;
|
|
163
167
|
requested_by: number | null;
|
|
164
168
|
created_at: string;
|
package/src/types/models.ts
CHANGED
|
@@ -120,6 +120,8 @@ export type ApproachType = z.infer<typeof ModelSchemas.approachTypeSchema>;
|
|
|
120
120
|
export type Waypoint = z.infer<typeof ModelSchemas.waypointSchema>;
|
|
121
121
|
|
|
122
122
|
// Financial Types
|
|
123
|
+
export type InvoiceKind = z.infer<typeof ModelSchemas.invoiceKindSchema>;
|
|
124
|
+
export type ProvisionRule = z.infer<typeof ModelSchemas.provisionRuleSchema>;
|
|
123
125
|
export type Invoice = z.infer<typeof ModelSchemas.invoiceSchema>;
|
|
124
126
|
export type Expense = z.infer<typeof ModelSchemas.expenseSchema>;
|
|
125
127
|
export type ExpenseItem = z.infer<typeof ModelSchemas.expenseItemSchema>;
|