@updraft-solutions/mcrit-sdk 0.3.1 → 0.4.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.
@@ -109,11 +109,36 @@ function timeString(date, timezone = DEFAULT_TZ, includeTimezone = false) {
109
109
  }
110
110
  return formatted;
111
111
  }
112
+ var RELATIVE_TIME_UNITS = [
113
+ { unit: "year", ms: 365 * 24 * 60 * 60 * 1e3 },
114
+ { unit: "month", ms: 30 * 24 * 60 * 60 * 1e3 },
115
+ { unit: "day", ms: 24 * 60 * 60 * 1e3 },
116
+ { unit: "hour", ms: 60 * 60 * 1e3 },
117
+ { unit: "minute", ms: 60 * 1e3 }
118
+ ];
112
119
  function timeUntil(dateTime, locale = "de") {
113
120
  if (!dateTime) {
114
121
  return "";
115
122
  }
116
- return _momenttimezone2.default.call(void 0, dateTime).locale(locale).fromNow();
123
+ const target = dateTime instanceof Date ? dateTime.getTime() : Date.parse(dateTime);
124
+ if (Number.isNaN(target)) {
125
+ return "";
126
+ }
127
+ const diff = target - Date.now();
128
+ let resolved = "de";
129
+ try {
130
+ if (Intl.RelativeTimeFormat.supportedLocalesOf(locale).length > 0) {
131
+ resolved = locale;
132
+ }
133
+ } catch (e) {
134
+ }
135
+ const formatter = new Intl.RelativeTimeFormat(resolved, { numeric: "auto" });
136
+ for (const { unit, ms } of RELATIVE_TIME_UNITS) {
137
+ if (Math.abs(diff) >= ms) {
138
+ return formatter.format(Math.round(diff / ms), unit);
139
+ }
140
+ }
141
+ return formatter.format(Math.round(diff / 1e3), "second");
117
142
  }
118
143
  function minutesFormatted(minutes) {
119
144
  if (minutes == null) {
@@ -109,11 +109,36 @@ function timeString(date, timezone = DEFAULT_TZ, includeTimezone = false) {
109
109
  }
110
110
  return formatted;
111
111
  }
112
+ var RELATIVE_TIME_UNITS = [
113
+ { unit: "year", ms: 365 * 24 * 60 * 60 * 1e3 },
114
+ { unit: "month", ms: 30 * 24 * 60 * 60 * 1e3 },
115
+ { unit: "day", ms: 24 * 60 * 60 * 1e3 },
116
+ { unit: "hour", ms: 60 * 60 * 1e3 },
117
+ { unit: "minute", ms: 60 * 1e3 }
118
+ ];
112
119
  function timeUntil(dateTime, locale = "de") {
113
120
  if (!dateTime) {
114
121
  return "";
115
122
  }
116
- return moment(dateTime).locale(locale).fromNow();
123
+ const target = dateTime instanceof Date ? dateTime.getTime() : Date.parse(dateTime);
124
+ if (Number.isNaN(target)) {
125
+ return "";
126
+ }
127
+ const diff = target - Date.now();
128
+ let resolved = "de";
129
+ try {
130
+ if (Intl.RelativeTimeFormat.supportedLocalesOf(locale).length > 0) {
131
+ resolved = locale;
132
+ }
133
+ } catch {
134
+ }
135
+ const formatter = new Intl.RelativeTimeFormat(resolved, { numeric: "auto" });
136
+ for (const { unit, ms } of RELATIVE_TIME_UNITS) {
137
+ if (Math.abs(diff) >= ms) {
138
+ return formatter.format(Math.round(diff / ms), unit);
139
+ }
140
+ }
141
+ return formatter.format(Math.round(diff / 1e3), "second");
117
142
  }
118
143
  function minutesFormatted(minutes) {
119
144
  if (minutes == null) {
@@ -58,6 +58,10 @@ var companySchema = _zod.z.object({
58
58
  media: mediaCollection,
59
59
  can: _zod.z.record(_zod.z.string(), _zod.z.boolean().nullable()).optional(),
60
60
  permissions: _zod.z.array(_zod.z.string()).optional(),
61
+ // Company display timezone (companies.timezone, default Europe/Berlin
62
+ // server-side); booking/event surfaces render in this zone. Optional:
63
+ // slim company payloads may omit it.
64
+ timezone: _zod.z.string().optional(),
61
65
  ai_landing_fee_invoices_enabled: _zod.z.boolean().optional()
62
66
  });
63
67
 
@@ -284,11 +288,19 @@ var userQualificationSchema = _zod.z.object({
284
288
  updated_at: _zod.z.string()
285
289
  });
286
290
  var airportSchema = _zod.z.object({
287
- type: _zod.z.literal("airport"),
291
+ // Aligned with what AirportResource actually serializes: `type` and
292
+ // `country` are absent on minified payloads (e.g. booking waypoint
293
+ // airports); coordinates + municipality/iso_country ride along on the
294
+ // full shape.
295
+ type: _zod.z.literal("airport").optional(),
288
296
  id: _zod.z.number(),
289
297
  ident: _zod.z.string(),
290
298
  name: _zod.z.string(),
291
- country: _zod.z.string()
299
+ country: _zod.z.string().optional(),
300
+ municipality: _zod.z.string().nullable().optional(),
301
+ iso_country: _zod.z.string().nullable().optional(),
302
+ latitude_deg: _zod.z.number().nullable().optional(),
303
+ longitude_deg: _zod.z.number().nullable().optional()
292
304
  });
293
305
  var recurringFlightSchema = _zod.z.object({
294
306
  id: _zod.z.number(),
@@ -385,6 +397,19 @@ var availSchema = _zod.z.object({
385
397
  update: zNullableBool
386
398
  }).optional()
387
399
  });
400
+ var bookingWaypointSchema = _zod.z.object({
401
+ sequence: _zod.z.number(),
402
+ airport_id: _zod.z.number(),
403
+ airport: _zod.z.object({
404
+ id: _zod.z.number(),
405
+ ident: _zod.z.string(),
406
+ name: _zod.z.string(),
407
+ municipality: _zod.z.string().nullable().optional(),
408
+ iso_country: _zod.z.string().nullable().optional(),
409
+ latitude_deg: _zod.z.number().nullable().optional(),
410
+ longitude_deg: _zod.z.number().nullable().optional()
411
+ }).nullable().optional()
412
+ });
388
413
  var bookingSchema = BaseModel.extend({
389
414
  type: _zod.z.literal("booking"),
390
415
  ifr: _zod.z.boolean().default(false),
@@ -401,6 +426,12 @@ var bookingSchema = BaseModel.extend({
401
426
  destination_airport_id: _zod.z.number().optional(),
402
427
  departure_airport: airportSchema.optional(),
403
428
  destination_airport: airportSchema.optional(),
429
+ waypoints: _zod.z.array(bookingWaypointSchema).optional(),
430
+ // Flat, always-present home timezone on BookingResource.
431
+ company_timezone: _zod.z.string().nullable().optional(),
432
+ // Slim per-booking training-record status, present when the backend
433
+ // eager-loaded `trainingRecord` (enrollment bookings surfaces).
434
+ training_record_status: _zod.z.enum(["draft", "awaiting_signatures", "signed"]).nullable().optional(),
404
435
  next_booking_id: _zod.z.number().nullable().optional(),
405
436
  previous_booking_id: _zod.z.number().nullable().optional(),
406
437
  maintenance: _zod.z.number().optional(),
@@ -739,6 +770,18 @@ var expenseSchema = _zod.z.object({
739
770
  approve: zNullableBool
740
771
  }).optional()
741
772
  });
773
+ var tagSchema = _zod.z.object({
774
+ type: _zod.z.literal("tag").optional(),
775
+ id: _zod.z.number(),
776
+ name: _zod.z.string(),
777
+ color: _zod.z.string().nullable().optional()
778
+ });
779
+ var courseCheckSyllabusSchema = _zod.z.object({
780
+ id: _zod.z.number(),
781
+ name: _zod.z.string(),
782
+ version: _zod.z.number(),
783
+ kind: _zod.z.enum(["regular", "progress_check"]).default("regular")
784
+ });
742
785
  var courseSchema = _zod.z.object({
743
786
  type: _zod.z.literal("course"),
744
787
  id: _zod.z.number(),
@@ -755,13 +798,25 @@ var courseSchema = _zod.z.object({
755
798
  aircraft_required: _zod.z.boolean().default(false),
756
799
  qualification_id: _zod.z.number().nullable().optional(),
757
800
  qualification: qualificationSchema.optional(),
801
+ is_archived: _zod.z.boolean().optional(),
802
+ archived_at: _zod.z.string().nullable().optional(),
803
+ category: _zod.z.string().nullable().optional(),
804
+ title: _zod.z.string().nullable().optional(),
805
+ subtitle: _zod.z.string().nullable().optional(),
806
+ content: _zod.z.string().nullable().optional(),
807
+ footer: _zod.z.string().nullable().optional(),
808
+ // Syllabus assignment pointers: `syllabus_id` drives the Übersicht,
809
+ // `booking_form_syllabus_id` the per-flight Ausbildungsnachweis.
810
+ syllabus_id: _zod.z.number().nullable().optional(),
811
+ booking_form_syllabus_id: _zod.z.number().nullable().optional(),
812
+ // Present only when the backend eager-loaded `checkSyllabi`.
813
+ check_syllabi: _zod.z.array(courseCheckSyllabusSchema).optional(),
814
+ tags: _zod.z.array(tagSchema).optional(),
758
815
  created_at: _zod.z.string(),
759
816
  updated_at: _zod.z.string(),
760
- can: _zod.z.object({
761
- update: zNullableBool,
762
- delete: zNullableBool,
763
- enroll: zNullableBool
764
- }).optional()
817
+ // Loose record on purpose: gates are policy-reflected server-side and
818
+ // grow over time (useAssistant, …) — same convention as companySchema.
819
+ can: _zod.z.record(_zod.z.string(), zNullableBool).optional()
765
820
  });
766
821
  var courseEnrollmentMetricsSchema = _zod.z.object({
767
822
  last_flight_at: _zod.z.string().nullable(),
@@ -785,18 +840,19 @@ var courseEnrollmentSchema = _zod.z.object({
785
840
  comments: _zod.z.string().nullable().optional(),
786
841
  initial_payment_generated: _zod.z.boolean().optional(),
787
842
  initial_payment_removable: _zod.z.boolean().optional(),
843
+ // Element-driven training progress (see m-crit-api
844
+ // docs/features/training-tracking.md).
845
+ tracked_training_elements_count: _zod.z.number().optional(),
846
+ progress_source: _zod.z.enum(["training_elements", "milestones"]).optional(),
788
847
  metrics: courseEnrollmentMetricsSchema.optional(),
789
848
  created_at: _zod.z.string(),
790
849
  updated_at: _zod.z.string(),
791
850
  course: courseSchema.optional(),
792
851
  membership: membershipSchema.optional(),
793
852
  mentor: userSchema.optional(),
794
- can: _zod.z.object({
795
- view: zNullableBool,
796
- update: zNullableBool,
797
- delete: zNullableBool,
798
- complete: zNullableBool
799
- }).optional()
853
+ // Loose record on purpose: gates are policy-reflected server-side and
854
+ // grow over time (updateTraining, manageInitialPayment, …).
855
+ can: _zod.z.record(_zod.z.string(), zNullableBool).optional()
800
856
  });
801
857
  var eventSchema = _zod.z.object({
802
858
  type: _zod.z.literal("event"),
@@ -1322,4 +1378,7 @@ var SAFETY_REPORT_STATUS_COLORS = {
1322
1378
 
1323
1379
 
1324
1380
 
1325
- exports.zNullableBool = zNullableBool; exports.zNetGross = zNetGross; exports.zContactDTO = zContactDTO; exports.zPhpMoneyObject = zPhpMoneyObject; exports.contactAttributeSchema = contactAttributeSchema; exports.BaseModel = BaseModel; exports.mediaSchema = mediaSchema; exports.mediaCollection = mediaCollection; exports.userSchema = userSchema; exports.companySchema = companySchema; exports.baseMembershipSchema = baseMembershipSchema; exports.membershipSchema = membershipSchema; exports.documentType = documentType; exports.priceSchema = priceSchema; exports.feeSchema = feeSchema; exports.courseFeeSchema = courseFeeSchema; exports.airplaneSchema = airplaneSchema; exports.airplaneShareInviteSchema = airplaneShareInviteSchema; exports.airplanePermissionSchema = airplanePermissionSchema; exports.landingFeeSchema = landingFeeSchema; exports.aircraftRatingSchema = aircraftRatingSchema; exports.userAircraftRatingSchema = userAircraftRatingSchema; exports.userQualificationSchema = userQualificationSchema; exports.airportSchema = airportSchema; exports.recurringFlightSchema = recurringFlightSchema; exports.maintenanceEventSchema = maintenanceEventSchema; exports.maintenanceEventEstimationSchema = maintenanceEventEstimationSchema; exports.maintenanceStatusSchema = maintenanceStatusSchema; exports.extendedAirplaneSchema = extendedAirplaneSchema; exports.availSchema = availSchema; exports.bookingSchema = bookingSchema; exports.alertSchema = alertSchema; exports.documentSchema = documentSchema; exports.documentRequirement = documentRequirement; exports.documentRequirementGroup = documentRequirementGroup; exports.documentRequirementGroupAssignment = documentRequirementGroupAssignment; exports.documentComplianceStatus = documentComplianceStatus; exports.documentShareSchema = documentShareSchema; exports.allowedDocumentTypeSchema = allowedDocumentTypeSchema; exports.flightLogSchema = flightLogSchema; exports.invoiceSchema = invoiceSchema; exports.scheduledFlightSchema = scheduledFlightSchema; exports.qualificationSchema = qualificationSchema; exports.expenseSchema = expenseSchema; exports.courseSchema = courseSchema; exports.courseEnrollmentMetricsSchema = courseEnrollmentMetricsSchema; exports.courseEnrollmentSchema = courseEnrollmentSchema; exports.eventSchema = eventSchema; exports.addressSchema = addressSchema; exports.roleSchema = roleSchema; exports.landingSchema = landingSchema; exports.ticketSchema = ticketSchema; exports.runwaySchema = runwaySchema; exports.settingSchema = settingSchema; exports.postSchema = postSchema; exports.commentSchema = commentSchema; exports.airplaneIssueSeverityEnum = airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = airplaneIssueStatusEnum; exports.airplaneIssueSchema = airplaneIssueSchema; exports.specialFlightSchema = specialFlightSchema; exports.prePaidPackageSchema = prePaidPackageSchema; exports.expenseItemSchema = expenseItemSchema; exports.waypointSchema = waypointSchema; exports.approachTypeSchema = approachTypeSchema; exports.FaqStatus = FaqStatus; exports.FaqSchema = FaqSchema; exports.SubmitFaqQuestionSchema = SubmitFaqQuestionSchema; exports.ReviewFaqSchema = ReviewFaqSchema; exports.FeeSchema = FeeSchema; exports.FeeCategoryOptionsSchema = FeeCategoryOptionsSchema; exports.SafetyReportStatusEnum = SafetyReportStatusEnum; exports.SafetyReportCategorySchema = SafetyReportCategorySchema; exports.SafetyReportCategoryFormSchema = SafetyReportCategoryFormSchema; exports.SafetyReportMediaSchema = SafetyReportMediaSchema; exports.SafetyReportSchema = SafetyReportSchema; exports.SafetyReportListResponseSchema = SafetyReportListResponseSchema; exports.SafetyReportFormSchema = SafetyReportFormSchema; exports.SafetyReportUpdateSchema = SafetyReportUpdateSchema; exports.SafetyReportFilterSchema = SafetyReportFilterSchema; exports.SafetyReportSubmissionResponseSchema = SafetyReportSubmissionResponseSchema; exports.SAFETY_REPORT_STATUS_LABELS = SAFETY_REPORT_STATUS_LABELS; exports.SAFETY_REPORT_STATUS_COLORS = SAFETY_REPORT_STATUS_COLORS;
1381
+
1382
+
1383
+
1384
+ exports.zNullableBool = zNullableBool; exports.zNetGross = zNetGross; exports.zContactDTO = zContactDTO; exports.zPhpMoneyObject = zPhpMoneyObject; exports.contactAttributeSchema = contactAttributeSchema; exports.BaseModel = BaseModel; exports.mediaSchema = mediaSchema; exports.mediaCollection = mediaCollection; exports.userSchema = userSchema; exports.companySchema = companySchema; exports.baseMembershipSchema = baseMembershipSchema; exports.membershipSchema = membershipSchema; exports.documentType = documentType; exports.priceSchema = priceSchema; exports.feeSchema = feeSchema; exports.courseFeeSchema = courseFeeSchema; exports.airplaneSchema = airplaneSchema; exports.airplaneShareInviteSchema = airplaneShareInviteSchema; exports.airplanePermissionSchema = airplanePermissionSchema; exports.landingFeeSchema = landingFeeSchema; exports.aircraftRatingSchema = aircraftRatingSchema; exports.userAircraftRatingSchema = userAircraftRatingSchema; exports.userQualificationSchema = userQualificationSchema; exports.airportSchema = airportSchema; exports.recurringFlightSchema = recurringFlightSchema; exports.maintenanceEventSchema = maintenanceEventSchema; exports.maintenanceEventEstimationSchema = maintenanceEventEstimationSchema; exports.maintenanceStatusSchema = maintenanceStatusSchema; exports.extendedAirplaneSchema = extendedAirplaneSchema; exports.availSchema = availSchema; exports.bookingWaypointSchema = bookingWaypointSchema; exports.bookingSchema = bookingSchema; exports.alertSchema = alertSchema; exports.documentSchema = documentSchema; exports.documentRequirement = documentRequirement; exports.documentRequirementGroup = documentRequirementGroup; exports.documentRequirementGroupAssignment = documentRequirementGroupAssignment; exports.documentComplianceStatus = documentComplianceStatus; exports.documentShareSchema = documentShareSchema; exports.allowedDocumentTypeSchema = allowedDocumentTypeSchema; exports.flightLogSchema = flightLogSchema; exports.invoiceSchema = invoiceSchema; exports.scheduledFlightSchema = scheduledFlightSchema; exports.qualificationSchema = qualificationSchema; exports.expenseSchema = expenseSchema; exports.tagSchema = tagSchema; exports.courseCheckSyllabusSchema = courseCheckSyllabusSchema; exports.courseSchema = courseSchema; exports.courseEnrollmentMetricsSchema = courseEnrollmentMetricsSchema; exports.courseEnrollmentSchema = courseEnrollmentSchema; exports.eventSchema = eventSchema; exports.addressSchema = addressSchema; exports.roleSchema = roleSchema; exports.landingSchema = landingSchema; exports.ticketSchema = ticketSchema; exports.runwaySchema = runwaySchema; exports.settingSchema = settingSchema; exports.postSchema = postSchema; exports.commentSchema = commentSchema; exports.airplaneIssueSeverityEnum = airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = airplaneIssueStatusEnum; exports.airplaneIssueSchema = airplaneIssueSchema; exports.specialFlightSchema = specialFlightSchema; exports.prePaidPackageSchema = prePaidPackageSchema; exports.expenseItemSchema = expenseItemSchema; exports.waypointSchema = waypointSchema; exports.approachTypeSchema = approachTypeSchema; exports.FaqStatus = FaqStatus; exports.FaqSchema = FaqSchema; exports.SubmitFaqQuestionSchema = SubmitFaqQuestionSchema; exports.ReviewFaqSchema = ReviewFaqSchema; exports.FeeSchema = FeeSchema; exports.FeeCategoryOptionsSchema = FeeCategoryOptionsSchema; exports.SafetyReportStatusEnum = SafetyReportStatusEnum; exports.SafetyReportCategorySchema = SafetyReportCategorySchema; exports.SafetyReportCategoryFormSchema = SafetyReportCategoryFormSchema; exports.SafetyReportMediaSchema = SafetyReportMediaSchema; exports.SafetyReportSchema = SafetyReportSchema; exports.SafetyReportListResponseSchema = SafetyReportListResponseSchema; exports.SafetyReportFormSchema = SafetyReportFormSchema; exports.SafetyReportUpdateSchema = SafetyReportUpdateSchema; exports.SafetyReportFilterSchema = SafetyReportFilterSchema; exports.SafetyReportSubmissionResponseSchema = SafetyReportSubmissionResponseSchema; exports.SAFETY_REPORT_STATUS_LABELS = SAFETY_REPORT_STATUS_LABELS; exports.SAFETY_REPORT_STATUS_COLORS = SAFETY_REPORT_STATUS_COLORS;
@@ -58,6 +58,10 @@ var companySchema = z.object({
58
58
  media: mediaCollection,
59
59
  can: z.record(z.string(), z.boolean().nullable()).optional(),
60
60
  permissions: z.array(z.string()).optional(),
61
+ // Company display timezone (companies.timezone, default Europe/Berlin
62
+ // server-side); booking/event surfaces render in this zone. Optional:
63
+ // slim company payloads may omit it.
64
+ timezone: z.string().optional(),
61
65
  ai_landing_fee_invoices_enabled: z.boolean().optional()
62
66
  });
63
67
 
@@ -284,11 +288,19 @@ var userQualificationSchema = z2.object({
284
288
  updated_at: z2.string()
285
289
  });
286
290
  var airportSchema = z2.object({
287
- type: z2.literal("airport"),
291
+ // Aligned with what AirportResource actually serializes: `type` and
292
+ // `country` are absent on minified payloads (e.g. booking waypoint
293
+ // airports); coordinates + municipality/iso_country ride along on the
294
+ // full shape.
295
+ type: z2.literal("airport").optional(),
288
296
  id: z2.number(),
289
297
  ident: z2.string(),
290
298
  name: z2.string(),
291
- country: z2.string()
299
+ country: z2.string().optional(),
300
+ municipality: z2.string().nullable().optional(),
301
+ iso_country: z2.string().nullable().optional(),
302
+ latitude_deg: z2.number().nullable().optional(),
303
+ longitude_deg: z2.number().nullable().optional()
292
304
  });
293
305
  var recurringFlightSchema = z2.object({
294
306
  id: z2.number(),
@@ -385,6 +397,19 @@ var availSchema = z2.object({
385
397
  update: zNullableBool
386
398
  }).optional()
387
399
  });
400
+ var bookingWaypointSchema = z2.object({
401
+ sequence: z2.number(),
402
+ airport_id: z2.number(),
403
+ airport: z2.object({
404
+ id: z2.number(),
405
+ ident: z2.string(),
406
+ name: z2.string(),
407
+ municipality: z2.string().nullable().optional(),
408
+ iso_country: z2.string().nullable().optional(),
409
+ latitude_deg: z2.number().nullable().optional(),
410
+ longitude_deg: z2.number().nullable().optional()
411
+ }).nullable().optional()
412
+ });
388
413
  var bookingSchema = BaseModel.extend({
389
414
  type: z2.literal("booking"),
390
415
  ifr: z2.boolean().default(false),
@@ -401,6 +426,12 @@ var bookingSchema = BaseModel.extend({
401
426
  destination_airport_id: z2.number().optional(),
402
427
  departure_airport: airportSchema.optional(),
403
428
  destination_airport: airportSchema.optional(),
429
+ waypoints: z2.array(bookingWaypointSchema).optional(),
430
+ // Flat, always-present home timezone on BookingResource.
431
+ company_timezone: z2.string().nullable().optional(),
432
+ // Slim per-booking training-record status, present when the backend
433
+ // eager-loaded `trainingRecord` (enrollment bookings surfaces).
434
+ training_record_status: z2.enum(["draft", "awaiting_signatures", "signed"]).nullable().optional(),
404
435
  next_booking_id: z2.number().nullable().optional(),
405
436
  previous_booking_id: z2.number().nullable().optional(),
406
437
  maintenance: z2.number().optional(),
@@ -739,6 +770,18 @@ var expenseSchema = z2.object({
739
770
  approve: zNullableBool
740
771
  }).optional()
741
772
  });
773
+ var tagSchema = z2.object({
774
+ type: z2.literal("tag").optional(),
775
+ id: z2.number(),
776
+ name: z2.string(),
777
+ color: z2.string().nullable().optional()
778
+ });
779
+ var courseCheckSyllabusSchema = z2.object({
780
+ id: z2.number(),
781
+ name: z2.string(),
782
+ version: z2.number(),
783
+ kind: z2.enum(["regular", "progress_check"]).default("regular")
784
+ });
742
785
  var courseSchema = z2.object({
743
786
  type: z2.literal("course"),
744
787
  id: z2.number(),
@@ -755,13 +798,25 @@ var courseSchema = z2.object({
755
798
  aircraft_required: z2.boolean().default(false),
756
799
  qualification_id: z2.number().nullable().optional(),
757
800
  qualification: qualificationSchema.optional(),
801
+ is_archived: z2.boolean().optional(),
802
+ archived_at: z2.string().nullable().optional(),
803
+ category: z2.string().nullable().optional(),
804
+ title: z2.string().nullable().optional(),
805
+ subtitle: z2.string().nullable().optional(),
806
+ content: z2.string().nullable().optional(),
807
+ footer: z2.string().nullable().optional(),
808
+ // Syllabus assignment pointers: `syllabus_id` drives the Übersicht,
809
+ // `booking_form_syllabus_id` the per-flight Ausbildungsnachweis.
810
+ syllabus_id: z2.number().nullable().optional(),
811
+ booking_form_syllabus_id: z2.number().nullable().optional(),
812
+ // Present only when the backend eager-loaded `checkSyllabi`.
813
+ check_syllabi: z2.array(courseCheckSyllabusSchema).optional(),
814
+ tags: z2.array(tagSchema).optional(),
758
815
  created_at: z2.string(),
759
816
  updated_at: z2.string(),
760
- can: z2.object({
761
- update: zNullableBool,
762
- delete: zNullableBool,
763
- enroll: zNullableBool
764
- }).optional()
817
+ // Loose record on purpose: gates are policy-reflected server-side and
818
+ // grow over time (useAssistant, …) — same convention as companySchema.
819
+ can: z2.record(z2.string(), zNullableBool).optional()
765
820
  });
766
821
  var courseEnrollmentMetricsSchema = z2.object({
767
822
  last_flight_at: z2.string().nullable(),
@@ -785,18 +840,19 @@ var courseEnrollmentSchema = z2.object({
785
840
  comments: z2.string().nullable().optional(),
786
841
  initial_payment_generated: z2.boolean().optional(),
787
842
  initial_payment_removable: z2.boolean().optional(),
843
+ // Element-driven training progress (see m-crit-api
844
+ // docs/features/training-tracking.md).
845
+ tracked_training_elements_count: z2.number().optional(),
846
+ progress_source: z2.enum(["training_elements", "milestones"]).optional(),
788
847
  metrics: courseEnrollmentMetricsSchema.optional(),
789
848
  created_at: z2.string(),
790
849
  updated_at: z2.string(),
791
850
  course: courseSchema.optional(),
792
851
  membership: membershipSchema.optional(),
793
852
  mentor: userSchema.optional(),
794
- can: z2.object({
795
- view: zNullableBool,
796
- update: zNullableBool,
797
- delete: zNullableBool,
798
- complete: zNullableBool
799
- }).optional()
853
+ // Loose record on purpose: gates are policy-reflected server-side and
854
+ // grow over time (updateTraining, manageInitialPayment, …).
855
+ can: z2.record(z2.string(), zNullableBool).optional()
800
856
  });
801
857
  var eventSchema = z2.object({
802
858
  type: z2.literal("event"),
@@ -1270,6 +1326,7 @@ export {
1270
1326
  maintenanceStatusSchema,
1271
1327
  extendedAirplaneSchema,
1272
1328
  availSchema,
1329
+ bookingWaypointSchema,
1273
1330
  bookingSchema,
1274
1331
  alertSchema,
1275
1332
  documentSchema,
@@ -1284,6 +1341,8 @@ export {
1284
1341
  scheduledFlightSchema,
1285
1342
  qualificationSchema,
1286
1343
  expenseSchema,
1344
+ tagSchema,
1345
+ courseCheckSyllabusSchema,
1287
1346
  courseSchema,
1288
1347
  courseEnrollmentMetricsSchema,
1289
1348
  courseEnrollmentSchema,
@@ -19,7 +19,7 @@
19
19
 
20
20
 
21
21
 
22
- var _chunkMF7G76QScjs = require('../chunk-MF7G76QS.cjs');
22
+ var _chunkIVMOR5SWcjs = require('../chunk-IVMOR5SW.cjs');
23
23
 
24
24
 
25
25
 
@@ -41,4 +41,4 @@ var _chunkMF7G76QScjs = require('../chunk-MF7G76QS.cjs');
41
41
 
42
42
 
43
43
 
44
- exports.DATE_FORMATS = _chunkMF7G76QScjs.DATE_FORMATS; exports.TIME_FORMATS = _chunkMF7G76QScjs.TIME_FORMATS; exports.bookingDuration = _chunkMF7G76QScjs.bookingDuration; exports.bytesToHuman = _chunkMF7G76QScjs.bytesToHuman; exports.crewObjectToString = _chunkMF7G76QScjs.crewObjectToString; exports.dateString = _chunkMF7G76QScjs.dateString; exports.dateTimeString = _chunkMF7G76QScjs.dateTimeString; exports.dayString = _chunkMF7G76QScjs.dayString; exports.formatDate = _chunkMF7G76QScjs.formatDate; exports.formatDateTime = _chunkMF7G76QScjs.formatDateTime; exports.formatTime = _chunkMF7G76QScjs.formatTime; exports.getMonthFromDate = _chunkMF7G76QScjs.getMonthFromDate; exports.membershipStatus = _chunkMF7G76QScjs.membershipStatus; exports.minutesFormatted = _chunkMF7G76QScjs.minutesFormatted; exports.monthString = _chunkMF7G76QScjs.monthString; exports.percentage = _chunkMF7G76QScjs.percentage; exports.timeDiffInDays = _chunkMF7G76QScjs.timeDiffInDays; exports.timeString = _chunkMF7G76QScjs.timeString; exports.timeUntil = _chunkMF7G76QScjs.timeUntil; exports.yearString = _chunkMF7G76QScjs.yearString;
44
+ exports.DATE_FORMATS = _chunkIVMOR5SWcjs.DATE_FORMATS; exports.TIME_FORMATS = _chunkIVMOR5SWcjs.TIME_FORMATS; exports.bookingDuration = _chunkIVMOR5SWcjs.bookingDuration; exports.bytesToHuman = _chunkIVMOR5SWcjs.bytesToHuman; exports.crewObjectToString = _chunkIVMOR5SWcjs.crewObjectToString; exports.dateString = _chunkIVMOR5SWcjs.dateString; exports.dateTimeString = _chunkIVMOR5SWcjs.dateTimeString; exports.dayString = _chunkIVMOR5SWcjs.dayString; exports.formatDate = _chunkIVMOR5SWcjs.formatDate; exports.formatDateTime = _chunkIVMOR5SWcjs.formatDateTime; exports.formatTime = _chunkIVMOR5SWcjs.formatTime; exports.getMonthFromDate = _chunkIVMOR5SWcjs.getMonthFromDate; exports.membershipStatus = _chunkIVMOR5SWcjs.membershipStatus; exports.minutesFormatted = _chunkIVMOR5SWcjs.minutesFormatted; exports.monthString = _chunkIVMOR5SWcjs.monthString; exports.percentage = _chunkIVMOR5SWcjs.percentage; exports.timeDiffInDays = _chunkIVMOR5SWcjs.timeDiffInDays; exports.timeString = _chunkIVMOR5SWcjs.timeString; exports.timeUntil = _chunkIVMOR5SWcjs.timeUntil; exports.yearString = _chunkIVMOR5SWcjs.yearString;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Note on German locale: the SDK does not eagerly load `moment/locale/de`.
3
- * Consumers that want German formatting should import it once at their
4
- * app entry: `import "moment/locale/de"`. Otherwise `timeUntil` and other
5
- * locale-dependent functions will fall back to English.
2
+ * Locale note: `timeUntil` uses `Intl.RelativeTimeFormat` natively
3
+ * localized, no moment locale files required. The moment-based formatters
4
+ * below are locale-INdependent except for the `MMM` token
5
+ * (`DATE_FORMATS.MONTH_SHORT`), which renders English month abbreviations
6
+ * unless a consumer registers moment locale data itself.
6
7
  */
7
8
  /** Predefined moment format strings, frozen so callers can reference them safely. */
8
9
  declare const DATE_FORMATS: Readonly<{
@@ -50,6 +51,14 @@ declare function dayString(date: string | Date | null | undefined, timezone?: st
50
51
  declare function dateString(date: string | Date | null | undefined, timezone?: string): string;
51
52
  declare function dateTimeString(date: string | Date | null | undefined, timezone?: string, includeTimezone?: boolean): string | null;
52
53
  declare function timeString(date: string | Date | null | undefined, timezone?: string, includeTimezone?: boolean): string;
54
+ /**
55
+ * Relative time ("vor 3 Tagen" / "in 2 Stunden") via the browser-native
56
+ * `Intl.RelativeTimeFormat` — fully localized for any BCP 47 locale with
57
+ * zero locale files, and immune to the moment CJS/ESM dual-instance
58
+ * locale-registry pitfall that used to silently produce English output.
59
+ * `numeric: "auto"` yields natural wording for adjacent days
60
+ * ("gestern" / "morgen").
61
+ */
53
62
  declare function timeUntil(dateTime: string | Date | null | undefined, locale?: string): string;
54
63
  declare function minutesFormatted(minutes: number | null | undefined): string;
55
64
  interface CrewMember {
@@ -1,8 +1,9 @@
1
1
  /**
2
- * Note on German locale: the SDK does not eagerly load `moment/locale/de`.
3
- * Consumers that want German formatting should import it once at their
4
- * app entry: `import "moment/locale/de"`. Otherwise `timeUntil` and other
5
- * locale-dependent functions will fall back to English.
2
+ * Locale note: `timeUntil` uses `Intl.RelativeTimeFormat` natively
3
+ * localized, no moment locale files required. The moment-based formatters
4
+ * below are locale-INdependent except for the `MMM` token
5
+ * (`DATE_FORMATS.MONTH_SHORT`), which renders English month abbreviations
6
+ * unless a consumer registers moment locale data itself.
6
7
  */
7
8
  /** Predefined moment format strings, frozen so callers can reference them safely. */
8
9
  declare const DATE_FORMATS: Readonly<{
@@ -50,6 +51,14 @@ declare function dayString(date: string | Date | null | undefined, timezone?: st
50
51
  declare function dateString(date: string | Date | null | undefined, timezone?: string): string;
51
52
  declare function dateTimeString(date: string | Date | null | undefined, timezone?: string, includeTimezone?: boolean): string | null;
52
53
  declare function timeString(date: string | Date | null | undefined, timezone?: string, includeTimezone?: boolean): string;
54
+ /**
55
+ * Relative time ("vor 3 Tagen" / "in 2 Stunden") via the browser-native
56
+ * `Intl.RelativeTimeFormat` — fully localized for any BCP 47 locale with
57
+ * zero locale files, and immune to the moment CJS/ESM dual-instance
58
+ * locale-registry pitfall that used to silently produce English output.
59
+ * `numeric: "auto"` yields natural wording for adjacent days
60
+ * ("gestern" / "morgen").
61
+ */
53
62
  declare function timeUntil(dateTime: string | Date | null | undefined, locale?: string): string;
54
63
  declare function minutesFormatted(minutes: number | null | undefined): string;
55
64
  interface CrewMember {
@@ -19,7 +19,7 @@ import {
19
19
  timeString,
20
20
  timeUntil,
21
21
  yearString
22
- } from "../chunk-D5DUVW34.js";
22
+ } from "../chunk-KIMCBEY7.js";
23
23
  export {
24
24
  DATE_FORMATS,
25
25
  TIME_FORMATS,
package/dist/index.cjs CHANGED
@@ -81,7 +81,10 @@
81
81
 
82
82
 
83
83
 
84
- var _chunk7QF3OJ45cjs = require('./chunk-7QF3OJ45.cjs');
84
+
85
+
86
+
87
+ var _chunkRC2BBT6Hcjs = require('./chunk-RC2BBT6H.cjs');
85
88
  require('./chunk-MOOGM3DW.cjs');
86
89
 
87
90
 
@@ -90,6 +93,11 @@ var _chunkLVTDNDWEcjs = require('./chunk-LVTDNDWE.cjs');
90
93
 
91
94
 
92
95
 
96
+ var _chunkMI4YBENQcjs = require('./chunk-MI4YBENQ.cjs');
97
+
98
+
99
+
100
+
93
101
 
94
102
 
95
103
 
@@ -107,7 +115,7 @@ var _chunkLVTDNDWEcjs = require('./chunk-LVTDNDWE.cjs');
107
115
 
108
116
 
109
117
 
110
- var _chunkMF7G76QScjs = require('./chunk-MF7G76QS.cjs');
118
+ var _chunkIVMOR5SWcjs = require('./chunk-IVMOR5SW.cjs');
111
119
 
112
120
 
113
121
 
@@ -139,8 +147,6 @@ var _chunkHQSF3WGFcjs = require('./chunk-HQSF3WGF.cjs');
139
147
 
140
148
 
141
149
 
142
- var _chunkMI4YBENQcjs = require('./chunk-MI4YBENQ.cjs');
143
-
144
150
 
145
151
 
146
152
 
@@ -268,4 +274,4 @@ var _chunkMI4YBENQcjs = require('./chunk-MI4YBENQ.cjs');
268
274
 
269
275
 
270
276
 
271
- exports.AvatarConversion = _chunkJRVRIKNMcjs.AvatarConversion; exports.BaseModel = _chunk7QF3OJ45cjs.BaseModel; exports.DATE_FORMATS = _chunkMF7G76QScjs.DATE_FORMATS; exports.DocumentConversion = _chunkJRVRIKNMcjs.DocumentConversion; exports.FaqSchema = _chunk7QF3OJ45cjs.FaqSchema; exports.FaqStatus = _chunk7QF3OJ45cjs.FaqStatus; exports.FeeCategoryOptionsSchema = _chunk7QF3OJ45cjs.FeeCategoryOptionsSchema; exports.FeeSchema = _chunk7QF3OJ45cjs.FeeSchema; exports.HeaderConversion = _chunkJRVRIKNMcjs.HeaderConversion; exports.ImageConversion = _chunkJRVRIKNMcjs.ImageConversion; exports.MediaType = _chunkJRVRIKNMcjs.MediaType; exports.MimeTypes = _chunkJRVRIKNMcjs.MimeTypes; exports.ReviewFaqSchema = _chunk7QF3OJ45cjs.ReviewFaqSchema; exports.SAFETY_REPORT_STATUS_COLORS = _chunk7QF3OJ45cjs.SAFETY_REPORT_STATUS_COLORS; exports.SAFETY_REPORT_STATUS_LABELS = _chunk7QF3OJ45cjs.SAFETY_REPORT_STATUS_LABELS; exports.SafetyReportCategoryFormSchema = _chunk7QF3OJ45cjs.SafetyReportCategoryFormSchema; exports.SafetyReportCategorySchema = _chunk7QF3OJ45cjs.SafetyReportCategorySchema; exports.SafetyReportFilterSchema = _chunk7QF3OJ45cjs.SafetyReportFilterSchema; exports.SafetyReportFormSchema = _chunk7QF3OJ45cjs.SafetyReportFormSchema; exports.SafetyReportListResponseSchema = _chunk7QF3OJ45cjs.SafetyReportListResponseSchema; exports.SafetyReportMediaSchema = _chunk7QF3OJ45cjs.SafetyReportMediaSchema; exports.SafetyReportSchema = _chunk7QF3OJ45cjs.SafetyReportSchema; exports.SafetyReportStatusEnum = _chunk7QF3OJ45cjs.SafetyReportStatusEnum; exports.SafetyReportSubmissionResponseSchema = _chunk7QF3OJ45cjs.SafetyReportSubmissionResponseSchema; exports.SafetyReportUpdateSchema = _chunk7QF3OJ45cjs.SafetyReportUpdateSchema; exports.SubmitFaqQuestionSchema = _chunk7QF3OJ45cjs.SubmitFaqQuestionSchema; exports.TIME_FORMATS = _chunkMF7G76QScjs.TIME_FORMATS; exports.ThumbnailConversion = _chunkJRVRIKNMcjs.ThumbnailConversion; exports.addressSchema = _chunk7QF3OJ45cjs.addressSchema; exports.aircraftRatingSchema = _chunk7QF3OJ45cjs.aircraftRatingSchema; exports.airplaneIssueSchema = _chunk7QF3OJ45cjs.airplaneIssueSchema; exports.airplaneIssueSeverityEnum = _chunk7QF3OJ45cjs.airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = _chunk7QF3OJ45cjs.airplaneIssueStatusEnum; exports.airplanePermissionSchema = _chunk7QF3OJ45cjs.airplanePermissionSchema; exports.airplaneSchema = _chunk7QF3OJ45cjs.airplaneSchema; exports.airplaneShareInviteSchema = _chunk7QF3OJ45cjs.airplaneShareInviteSchema; exports.airportSchema = _chunk7QF3OJ45cjs.airportSchema; exports.alertSchema = _chunk7QF3OJ45cjs.alertSchema; exports.allowedDocumentTypeSchema = _chunk7QF3OJ45cjs.allowedDocumentTypeSchema; exports.approachTypeSchema = _chunk7QF3OJ45cjs.approachTypeSchema; exports.availSchema = _chunk7QF3OJ45cjs.availSchema; exports.baseMembershipSchema = _chunk7QF3OJ45cjs.baseMembershipSchema; exports.bookingDuration = _chunkMF7G76QScjs.bookingDuration; exports.bookingSchema = _chunk7QF3OJ45cjs.bookingSchema; exports.bytesToHuman = _chunkMF7G76QScjs.bytesToHuman; exports.canPreview = _chunkJRVRIKNMcjs.canPreview; exports.commentSchema = _chunk7QF3OJ45cjs.commentSchema; exports.companySchema = _chunk7QF3OJ45cjs.companySchema; exports.contactAttributeSchema = _chunk7QF3OJ45cjs.contactAttributeSchema; exports.courseEnrollmentMetricsSchema = _chunk7QF3OJ45cjs.courseEnrollmentMetricsSchema; exports.courseEnrollmentSchema = _chunk7QF3OJ45cjs.courseEnrollmentSchema; exports.courseFeeSchema = _chunk7QF3OJ45cjs.courseFeeSchema; exports.courseSchema = _chunk7QF3OJ45cjs.courseSchema; exports.createCrewValidator = _chunkMI4YBENQcjs.createCrewValidator; exports.crewObjectToString = _chunkMF7G76QScjs.crewObjectToString; exports.dateString = _chunkMF7G76QScjs.dateString; exports.dateTimeString = _chunkMF7G76QScjs.dateTimeString; exports.dayString = _chunkMF7G76QScjs.dayString; exports.defaultCrewRoleForMembership = _chunkMI4YBENQcjs.defaultCrewRoleForMembership; exports.displayFee = _chunk2DRKSYW4cjs.displayFee; exports.documentComplianceStatus = _chunk7QF3OJ45cjs.documentComplianceStatus; exports.documentRequirement = _chunk7QF3OJ45cjs.documentRequirement; exports.documentRequirementGroup = _chunk7QF3OJ45cjs.documentRequirementGroup; exports.documentRequirementGroupAssignment = _chunk7QF3OJ45cjs.documentRequirementGroupAssignment; exports.documentSchema = _chunk7QF3OJ45cjs.documentSchema; exports.documentShareSchema = _chunk7QF3OJ45cjs.documentShareSchema; exports.documentType = _chunk7QF3OJ45cjs.documentType; exports.eventSchema = _chunk7QF3OJ45cjs.eventSchema; exports.expenseItemSchema = _chunk7QF3OJ45cjs.expenseItemSchema; exports.expenseSchema = _chunk7QF3OJ45cjs.expenseSchema; exports.extendedAirplaneSchema = _chunk7QF3OJ45cjs.extendedAirplaneSchema; exports.feeSchema = _chunk7QF3OJ45cjs.feeSchema; exports.flightLogSchema = _chunk7QF3OJ45cjs.flightLogSchema; exports.formatDate = _chunkMF7G76QScjs.formatDate; exports.formatDateTime = _chunkMF7G76QScjs.formatDateTime; exports.formatTime = _chunkMF7G76QScjs.formatTime; exports.formatToEuroString = _chunk2DRKSYW4cjs.formatToEuroString; exports.fromCents = _chunk2DRKSYW4cjs.fromCents; exports.getDocumentIcon = _chunkJRVRIKNMcjs.getDocumentIcon; exports.getMediaDisplayName = _chunkJRVRIKNMcjs.getMediaDisplayName; exports.getMediaIcon = _chunkJRVRIKNMcjs.getMediaIcon; exports.getMediaType = _chunkJRVRIKNMcjs.getMediaType; exports.getMonthFromDate = _chunkMF7G76QScjs.getMonthFromDate; exports.hasMembershipRole = _chunkMI4YBENQcjs.hasMembershipRole; exports.invoiceSchema = _chunk7QF3OJ45cjs.invoiceSchema; exports.landingFeeSchema = _chunk7QF3OJ45cjs.landingFeeSchema; exports.landingSchema = _chunk7QF3OJ45cjs.landingSchema; exports.maintenanceEventEstimationSchema = _chunk7QF3OJ45cjs.maintenanceEventEstimationSchema; exports.maintenanceEventSchema = _chunk7QF3OJ45cjs.maintenanceEventSchema; exports.maintenanceStatusSchema = _chunk7QF3OJ45cjs.maintenanceStatusSchema; exports.mapMediaConversions = _chunkJRVRIKNMcjs.mapMediaConversions; exports.mediaCollection = _chunk7QF3OJ45cjs.mediaCollection; exports.mediaSchema = _chunk7QF3OJ45cjs.mediaSchema; exports.membershipSchema = _chunk7QF3OJ45cjs.membershipSchema; exports.membershipStatus = _chunkMF7G76QScjs.membershipStatus; exports.minutesFormatted = _chunkMF7G76QScjs.minutesFormatted; exports.money = _chunk2DRKSYW4cjs.money; exports.moneyFormatted = _chunk2DRKSYW4cjs.moneyFormatted; exports.monthString = _chunkMF7G76QScjs.monthString; exports.paginationMeta = _chunkHQSF3WGFcjs.paginationMeta; exports.parseCourse = _chunkLVTDNDWEcjs.parseCourse; exports.parseFee = _chunk2DRKSYW4cjs.parseFee; exports.parsePrice = _chunk2DRKSYW4cjs.parsePrice; exports.percentage = _chunkMF7G76QScjs.percentage; exports.postSchema = _chunk7QF3OJ45cjs.postSchema; exports.prePaidPackageSchema = _chunk7QF3OJ45cjs.prePaidPackageSchema; exports.priceSchema = _chunk7QF3OJ45cjs.priceSchema; exports.qualificationSchema = _chunk7QF3OJ45cjs.qualificationSchema; exports.recurringFlightSchema = _chunk7QF3OJ45cjs.recurringFlightSchema; exports.roleSchema = _chunk7QF3OJ45cjs.roleSchema; exports.runwaySchema = _chunk7QF3OJ45cjs.runwaySchema; exports.scheduledFlightSchema = _chunk7QF3OJ45cjs.scheduledFlightSchema; exports.settingSchema = _chunk7QF3OJ45cjs.settingSchema; exports.specialFlightSchema = _chunk7QF3OJ45cjs.specialFlightSchema; exports.ticketSchema = _chunk7QF3OJ45cjs.ticketSchema; exports.timeDiffInDays = _chunkMF7G76QScjs.timeDiffInDays; exports.timeString = _chunkMF7G76QScjs.timeString; exports.timeUntil = _chunkMF7G76QScjs.timeUntil; exports.userAircraftRatingSchema = _chunk7QF3OJ45cjs.userAircraftRatingSchema; exports.userQualificationSchema = _chunk7QF3OJ45cjs.userQualificationSchema; exports.userSchema = _chunk7QF3OJ45cjs.userSchema; exports.waypointSchema = _chunk7QF3OJ45cjs.waypointSchema; exports.yearString = _chunkMF7G76QScjs.yearString; exports.zContactDTO = _chunk7QF3OJ45cjs.zContactDTO; exports.zNetGross = _chunk7QF3OJ45cjs.zNetGross; exports.zNullableBool = _chunk7QF3OJ45cjs.zNullableBool; exports.zPhpMoneyObject = _chunk7QF3OJ45cjs.zPhpMoneyObject;
277
+ exports.AvatarConversion = _chunkJRVRIKNMcjs.AvatarConversion; exports.BaseModel = _chunkRC2BBT6Hcjs.BaseModel; exports.DATE_FORMATS = _chunkIVMOR5SWcjs.DATE_FORMATS; exports.DocumentConversion = _chunkJRVRIKNMcjs.DocumentConversion; exports.FaqSchema = _chunkRC2BBT6Hcjs.FaqSchema; exports.FaqStatus = _chunkRC2BBT6Hcjs.FaqStatus; exports.FeeCategoryOptionsSchema = _chunkRC2BBT6Hcjs.FeeCategoryOptionsSchema; exports.FeeSchema = _chunkRC2BBT6Hcjs.FeeSchema; exports.HeaderConversion = _chunkJRVRIKNMcjs.HeaderConversion; exports.ImageConversion = _chunkJRVRIKNMcjs.ImageConversion; exports.MediaType = _chunkJRVRIKNMcjs.MediaType; exports.MimeTypes = _chunkJRVRIKNMcjs.MimeTypes; exports.ReviewFaqSchema = _chunkRC2BBT6Hcjs.ReviewFaqSchema; exports.SAFETY_REPORT_STATUS_COLORS = _chunkRC2BBT6Hcjs.SAFETY_REPORT_STATUS_COLORS; exports.SAFETY_REPORT_STATUS_LABELS = _chunkRC2BBT6Hcjs.SAFETY_REPORT_STATUS_LABELS; exports.SafetyReportCategoryFormSchema = _chunkRC2BBT6Hcjs.SafetyReportCategoryFormSchema; exports.SafetyReportCategorySchema = _chunkRC2BBT6Hcjs.SafetyReportCategorySchema; exports.SafetyReportFilterSchema = _chunkRC2BBT6Hcjs.SafetyReportFilterSchema; exports.SafetyReportFormSchema = _chunkRC2BBT6Hcjs.SafetyReportFormSchema; exports.SafetyReportListResponseSchema = _chunkRC2BBT6Hcjs.SafetyReportListResponseSchema; exports.SafetyReportMediaSchema = _chunkRC2BBT6Hcjs.SafetyReportMediaSchema; exports.SafetyReportSchema = _chunkRC2BBT6Hcjs.SafetyReportSchema; exports.SafetyReportStatusEnum = _chunkRC2BBT6Hcjs.SafetyReportStatusEnum; exports.SafetyReportSubmissionResponseSchema = _chunkRC2BBT6Hcjs.SafetyReportSubmissionResponseSchema; exports.SafetyReportUpdateSchema = _chunkRC2BBT6Hcjs.SafetyReportUpdateSchema; exports.SubmitFaqQuestionSchema = _chunkRC2BBT6Hcjs.SubmitFaqQuestionSchema; exports.TIME_FORMATS = _chunkIVMOR5SWcjs.TIME_FORMATS; exports.ThumbnailConversion = _chunkJRVRIKNMcjs.ThumbnailConversion; exports.addressSchema = _chunkRC2BBT6Hcjs.addressSchema; exports.aircraftRatingSchema = _chunkRC2BBT6Hcjs.aircraftRatingSchema; exports.airplaneIssueSchema = _chunkRC2BBT6Hcjs.airplaneIssueSchema; exports.airplaneIssueSeverityEnum = _chunkRC2BBT6Hcjs.airplaneIssueSeverityEnum; exports.airplaneIssueStatusEnum = _chunkRC2BBT6Hcjs.airplaneIssueStatusEnum; exports.airplanePermissionSchema = _chunkRC2BBT6Hcjs.airplanePermissionSchema; exports.airplaneSchema = _chunkRC2BBT6Hcjs.airplaneSchema; exports.airplaneShareInviteSchema = _chunkRC2BBT6Hcjs.airplaneShareInviteSchema; exports.airportSchema = _chunkRC2BBT6Hcjs.airportSchema; exports.alertSchema = _chunkRC2BBT6Hcjs.alertSchema; exports.allowedDocumentTypeSchema = _chunkRC2BBT6Hcjs.allowedDocumentTypeSchema; exports.approachTypeSchema = _chunkRC2BBT6Hcjs.approachTypeSchema; exports.availSchema = _chunkRC2BBT6Hcjs.availSchema; exports.baseMembershipSchema = _chunkRC2BBT6Hcjs.baseMembershipSchema; exports.bookingDuration = _chunkIVMOR5SWcjs.bookingDuration; exports.bookingSchema = _chunkRC2BBT6Hcjs.bookingSchema; exports.bookingWaypointSchema = _chunkRC2BBT6Hcjs.bookingWaypointSchema; exports.bytesToHuman = _chunkIVMOR5SWcjs.bytesToHuman; exports.canPreview = _chunkJRVRIKNMcjs.canPreview; exports.commentSchema = _chunkRC2BBT6Hcjs.commentSchema; exports.companySchema = _chunkRC2BBT6Hcjs.companySchema; exports.contactAttributeSchema = _chunkRC2BBT6Hcjs.contactAttributeSchema; exports.courseCheckSyllabusSchema = _chunkRC2BBT6Hcjs.courseCheckSyllabusSchema; exports.courseEnrollmentMetricsSchema = _chunkRC2BBT6Hcjs.courseEnrollmentMetricsSchema; exports.courseEnrollmentSchema = _chunkRC2BBT6Hcjs.courseEnrollmentSchema; exports.courseFeeSchema = _chunkRC2BBT6Hcjs.courseFeeSchema; exports.courseSchema = _chunkRC2BBT6Hcjs.courseSchema; exports.createCrewValidator = _chunkMI4YBENQcjs.createCrewValidator; exports.crewObjectToString = _chunkIVMOR5SWcjs.crewObjectToString; exports.dateString = _chunkIVMOR5SWcjs.dateString; exports.dateTimeString = _chunkIVMOR5SWcjs.dateTimeString; exports.dayString = _chunkIVMOR5SWcjs.dayString; exports.defaultCrewRoleForMembership = _chunkMI4YBENQcjs.defaultCrewRoleForMembership; exports.displayFee = _chunk2DRKSYW4cjs.displayFee; exports.documentComplianceStatus = _chunkRC2BBT6Hcjs.documentComplianceStatus; exports.documentRequirement = _chunkRC2BBT6Hcjs.documentRequirement; exports.documentRequirementGroup = _chunkRC2BBT6Hcjs.documentRequirementGroup; exports.documentRequirementGroupAssignment = _chunkRC2BBT6Hcjs.documentRequirementGroupAssignment; exports.documentSchema = _chunkRC2BBT6Hcjs.documentSchema; exports.documentShareSchema = _chunkRC2BBT6Hcjs.documentShareSchema; exports.documentType = _chunkRC2BBT6Hcjs.documentType; exports.eventSchema = _chunkRC2BBT6Hcjs.eventSchema; exports.expenseItemSchema = _chunkRC2BBT6Hcjs.expenseItemSchema; exports.expenseSchema = _chunkRC2BBT6Hcjs.expenseSchema; exports.extendedAirplaneSchema = _chunkRC2BBT6Hcjs.extendedAirplaneSchema; exports.feeSchema = _chunkRC2BBT6Hcjs.feeSchema; exports.flightLogSchema = _chunkRC2BBT6Hcjs.flightLogSchema; exports.formatDate = _chunkIVMOR5SWcjs.formatDate; exports.formatDateTime = _chunkIVMOR5SWcjs.formatDateTime; exports.formatTime = _chunkIVMOR5SWcjs.formatTime; exports.formatToEuroString = _chunk2DRKSYW4cjs.formatToEuroString; exports.fromCents = _chunk2DRKSYW4cjs.fromCents; exports.getDocumentIcon = _chunkJRVRIKNMcjs.getDocumentIcon; exports.getMediaDisplayName = _chunkJRVRIKNMcjs.getMediaDisplayName; exports.getMediaIcon = _chunkJRVRIKNMcjs.getMediaIcon; exports.getMediaType = _chunkJRVRIKNMcjs.getMediaType; exports.getMonthFromDate = _chunkIVMOR5SWcjs.getMonthFromDate; exports.hasMembershipRole = _chunkMI4YBENQcjs.hasMembershipRole; exports.invoiceSchema = _chunkRC2BBT6Hcjs.invoiceSchema; exports.landingFeeSchema = _chunkRC2BBT6Hcjs.landingFeeSchema; exports.landingSchema = _chunkRC2BBT6Hcjs.landingSchema; exports.maintenanceEventEstimationSchema = _chunkRC2BBT6Hcjs.maintenanceEventEstimationSchema; exports.maintenanceEventSchema = _chunkRC2BBT6Hcjs.maintenanceEventSchema; exports.maintenanceStatusSchema = _chunkRC2BBT6Hcjs.maintenanceStatusSchema; exports.mapMediaConversions = _chunkJRVRIKNMcjs.mapMediaConversions; exports.mediaCollection = _chunkRC2BBT6Hcjs.mediaCollection; exports.mediaSchema = _chunkRC2BBT6Hcjs.mediaSchema; exports.membershipSchema = _chunkRC2BBT6Hcjs.membershipSchema; exports.membershipStatus = _chunkIVMOR5SWcjs.membershipStatus; exports.minutesFormatted = _chunkIVMOR5SWcjs.minutesFormatted; exports.money = _chunk2DRKSYW4cjs.money; exports.moneyFormatted = _chunk2DRKSYW4cjs.moneyFormatted; exports.monthString = _chunkIVMOR5SWcjs.monthString; exports.paginationMeta = _chunkHQSF3WGFcjs.paginationMeta; exports.parseCourse = _chunkLVTDNDWEcjs.parseCourse; exports.parseFee = _chunk2DRKSYW4cjs.parseFee; exports.parsePrice = _chunk2DRKSYW4cjs.parsePrice; exports.percentage = _chunkIVMOR5SWcjs.percentage; exports.postSchema = _chunkRC2BBT6Hcjs.postSchema; exports.prePaidPackageSchema = _chunkRC2BBT6Hcjs.prePaidPackageSchema; exports.priceSchema = _chunkRC2BBT6Hcjs.priceSchema; exports.qualificationSchema = _chunkRC2BBT6Hcjs.qualificationSchema; exports.recurringFlightSchema = _chunkRC2BBT6Hcjs.recurringFlightSchema; exports.roleSchema = _chunkRC2BBT6Hcjs.roleSchema; exports.runwaySchema = _chunkRC2BBT6Hcjs.runwaySchema; exports.scheduledFlightSchema = _chunkRC2BBT6Hcjs.scheduledFlightSchema; exports.settingSchema = _chunkRC2BBT6Hcjs.settingSchema; exports.specialFlightSchema = _chunkRC2BBT6Hcjs.specialFlightSchema; exports.tagSchema = _chunkRC2BBT6Hcjs.tagSchema; exports.ticketSchema = _chunkRC2BBT6Hcjs.ticketSchema; exports.timeDiffInDays = _chunkIVMOR5SWcjs.timeDiffInDays; exports.timeString = _chunkIVMOR5SWcjs.timeString; exports.timeUntil = _chunkIVMOR5SWcjs.timeUntil; exports.userAircraftRatingSchema = _chunkRC2BBT6Hcjs.userAircraftRatingSchema; exports.userQualificationSchema = _chunkRC2BBT6Hcjs.userQualificationSchema; exports.userSchema = _chunkRC2BBT6Hcjs.userSchema; exports.waypointSchema = _chunkRC2BBT6Hcjs.waypointSchema; exports.yearString = _chunkIVMOR5SWcjs.yearString; exports.zContactDTO = _chunkRC2BBT6Hcjs.zContactDTO; exports.zNetGross = _chunkRC2BBT6Hcjs.zNetGross; exports.zNullableBool = _chunkRC2BBT6Hcjs.zNullableBool; exports.zPhpMoneyObject = _chunkRC2BBT6Hcjs.zPhpMoneyObject;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseModel, a as addressSchema, b as aircraftRatingSchema, c as airplaneIssueSchema, d as airplaneIssueSeverityEnum, e as airplaneIssueStatusEnum, f as airplanePermissionSchema, g as airplaneSchema, h as airplaneShareInviteSchema, i as airportSchema, j as alertSchema, k as allowedDocumentTypeSchema, l as approachTypeSchema, m as availSchema, n as baseMembershipSchema, o as bookingSchema, p as commentSchema, q as companySchema, r as contactAttributeSchema, s as courseEnrollmentMetricsSchema, t as courseEnrollmentSchema, u as courseFeeSchema, v as courseSchema, w as documentComplianceStatus, x as documentRequirement, y as documentRequirementGroup, z as documentRequirementGroupAssignment, A as documentSchema, C as documentShareSchema, D as documentType, E as eventSchema, F as expenseItemSchema, G as expenseSchema, H as extendedAirplaneSchema, I as feeSchema, J as flightLogSchema, K as invoiceSchema, L as landingFeeSchema, M as landingSchema, N as maintenanceEventEstimationSchema, O as maintenanceEventSchema, P as maintenanceStatusSchema, Q as mediaCollection, R as mediaSchema, S as membershipSchema, T as postSchema, U as prePaidPackageSchema, V as priceSchema, W as qualificationSchema, X as recurringFlightSchema, Y as roleSchema, Z as runwaySchema, _ as scheduledFlightSchema, $ as settingSchema, a0 as specialFlightSchema, a1 as ticketSchema, a2 as userAircraftRatingSchema, a3 as userQualificationSchema, a4 as userSchema, a5 as waypointSchema, a6 as zContactDTO, a7 as zNetGross, a8 as zNullableBool, a9 as zPhpMoneyObject } from './models-BWmpcfR8.cjs';
1
+ export { B as BaseModel, a as addressSchema, b as aircraftRatingSchema, c as airplaneIssueSchema, d as airplaneIssueSeverityEnum, e as airplaneIssueStatusEnum, f as airplanePermissionSchema, g as airplaneSchema, h as airplaneShareInviteSchema, i as airportSchema, j as alertSchema, k as allowedDocumentTypeSchema, l as approachTypeSchema, m as availSchema, n as baseMembershipSchema, o as bookingSchema, p as bookingWaypointSchema, q as commentSchema, r as companySchema, s as contactAttributeSchema, t as courseCheckSyllabusSchema, u as courseEnrollmentMetricsSchema, v as courseEnrollmentSchema, w as courseFeeSchema, x as courseSchema, y as documentComplianceStatus, z as documentRequirement, A as documentRequirementGroup, C as documentRequirementGroupAssignment, D as documentSchema, E as documentShareSchema, F as documentType, G as eventSchema, H as expenseItemSchema, I as expenseSchema, J as extendedAirplaneSchema, K as feeSchema, L as flightLogSchema, M as invoiceSchema, N as landingFeeSchema, O as landingSchema, P as maintenanceEventEstimationSchema, Q as maintenanceEventSchema, R as maintenanceStatusSchema, S as mediaCollection, T as mediaSchema, U as membershipSchema, V as postSchema, W as prePaidPackageSchema, X as priceSchema, Y as qualificationSchema, Z as recurringFlightSchema, _ as roleSchema, $ as runwaySchema, a0 as scheduledFlightSchema, a1 as settingSchema, a2 as specialFlightSchema, a3 as tagSchema, a4 as ticketSchema, a5 as userAircraftRatingSchema, a6 as userQualificationSchema, a7 as userSchema, a8 as waypointSchema, a9 as zContactDTO, aa as zNetGross, ab as zNullableBool, ac as zPhpMoneyObject } from './models-Bc5BKYuI.cjs';
2
2
  export { AircraftUtilization, BookingsData, CompanyDevelopmentReportData, CreateFaqInput, ExpenseData, Faq, FaqSchema, FaqStatus, Fee, FeeCategoryOptions, FeeCategoryOptionsSchema, FeeSchema, FinancialReportData, FinancialSummaryData, FlightHoursData, InstructorData, InstructorEfficiencyReportData, InstructorSummaryData, InvoiceData, LandingsData, Media, MemberActivityData, OperationalReportData, PeriodData, PrepaidPackageData, Report, ReportData, ReportGenerationParams, ReportGenerationResponse, ReportGranularity, ReportListItem, ReportMedia, ReportMetadata, ReportParameters, ReportStatus, ReportStatusResponse, ReportType, RevenueData, ReviewFaqInput, ReviewFaqSchema, SAFETY_REPORT_STATUS_COLORS, SAFETY_REPORT_STATUS_LABELS, SafetyReport, SafetyReportCategory, SafetyReportCategoryForm, SafetyReportCategoryFormSchema, SafetyReportCategorySchema, SafetyReportFilter, SafetyReportFilterSchema, SafetyReportForm, SafetyReportFormSchema, SafetyReportListResponse, SafetyReportListResponseSchema, SafetyReportMedia, SafetyReportMediaSchema, SafetyReportSchema, SafetyReportStatus, SafetyReportStatusEnum, SafetyReportSubmissionResponse, SafetyReportSubmissionResponseSchema, SafetyReportUpdate, SafetyReportUpdateSchema, SubmitFaqQuestionInput, SubmitFaqQuestionSchema, UpdateFaqInput } from './schemas/index.cjs';
3
3
  export { Address, AircraftRating, Airplane, AirplanePermission, AirplaneShareInvite, Airport, Alert, AllowedDocumentType, ApproachType, Avail, BaseMembership, Booking, Comment, Company, ComplianceData, ComplianceGroup, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Course, CourseEnrollment, CourseFee, CreateCommentInput, DataWrappedResponse, Document, DocumentComplianceStatus, DocumentRequirement, DocumentRequirementGroup, DocumentRequirementGroupAssignment, DocumentShare, DocumentType, Event, Expense, ExpenseItem, ExtendedAirplane, FlightLog, Invoice, Landing, LandingFee, MaintenanceEvent, MaintenanceEventEstimation, MaintenanceStatus, MediaCollection, Membership, PaginatedResponse, Post, PrePaidPackage, Price, Qualification, RecurringFlight, Resource, Role, Runway, ScheduledFlight, Setting, SpecialFlight, Ticket, ToggleFavoriteResponse, UpdateCommentInput, User, UserAircraftRating, UserQualification, Waypoint } from './types/index.cjs';
4
4
  export { FeeLike, NetGross, ParsedFee, ParsedPrice, PhpMoneyObject, PriceLike, displayFee, formatToEuroString, fromCents, money, moneyFormatted, parseFee, parsePrice } from './money/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseModel, a as addressSchema, b as aircraftRatingSchema, c as airplaneIssueSchema, d as airplaneIssueSeverityEnum, e as airplaneIssueStatusEnum, f as airplanePermissionSchema, g as airplaneSchema, h as airplaneShareInviteSchema, i as airportSchema, j as alertSchema, k as allowedDocumentTypeSchema, l as approachTypeSchema, m as availSchema, n as baseMembershipSchema, o as bookingSchema, p as commentSchema, q as companySchema, r as contactAttributeSchema, s as courseEnrollmentMetricsSchema, t as courseEnrollmentSchema, u as courseFeeSchema, v as courseSchema, w as documentComplianceStatus, x as documentRequirement, y as documentRequirementGroup, z as documentRequirementGroupAssignment, A as documentSchema, C as documentShareSchema, D as documentType, E as eventSchema, F as expenseItemSchema, G as expenseSchema, H as extendedAirplaneSchema, I as feeSchema, J as flightLogSchema, K as invoiceSchema, L as landingFeeSchema, M as landingSchema, N as maintenanceEventEstimationSchema, O as maintenanceEventSchema, P as maintenanceStatusSchema, Q as mediaCollection, R as mediaSchema, S as membershipSchema, T as postSchema, U as prePaidPackageSchema, V as priceSchema, W as qualificationSchema, X as recurringFlightSchema, Y as roleSchema, Z as runwaySchema, _ as scheduledFlightSchema, $ as settingSchema, a0 as specialFlightSchema, a1 as ticketSchema, a2 as userAircraftRatingSchema, a3 as userQualificationSchema, a4 as userSchema, a5 as waypointSchema, a6 as zContactDTO, a7 as zNetGross, a8 as zNullableBool, a9 as zPhpMoneyObject } from './models-BWmpcfR8.js';
1
+ export { B as BaseModel, a as addressSchema, b as aircraftRatingSchema, c as airplaneIssueSchema, d as airplaneIssueSeverityEnum, e as airplaneIssueStatusEnum, f as airplanePermissionSchema, g as airplaneSchema, h as airplaneShareInviteSchema, i as airportSchema, j as alertSchema, k as allowedDocumentTypeSchema, l as approachTypeSchema, m as availSchema, n as baseMembershipSchema, o as bookingSchema, p as bookingWaypointSchema, q as commentSchema, r as companySchema, s as contactAttributeSchema, t as courseCheckSyllabusSchema, u as courseEnrollmentMetricsSchema, v as courseEnrollmentSchema, w as courseFeeSchema, x as courseSchema, y as documentComplianceStatus, z as documentRequirement, A as documentRequirementGroup, C as documentRequirementGroupAssignment, D as documentSchema, E as documentShareSchema, F as documentType, G as eventSchema, H as expenseItemSchema, I as expenseSchema, J as extendedAirplaneSchema, K as feeSchema, L as flightLogSchema, M as invoiceSchema, N as landingFeeSchema, O as landingSchema, P as maintenanceEventEstimationSchema, Q as maintenanceEventSchema, R as maintenanceStatusSchema, S as mediaCollection, T as mediaSchema, U as membershipSchema, V as postSchema, W as prePaidPackageSchema, X as priceSchema, Y as qualificationSchema, Z as recurringFlightSchema, _ as roleSchema, $ as runwaySchema, a0 as scheduledFlightSchema, a1 as settingSchema, a2 as specialFlightSchema, a3 as tagSchema, a4 as ticketSchema, a5 as userAircraftRatingSchema, a6 as userQualificationSchema, a7 as userSchema, a8 as waypointSchema, a9 as zContactDTO, aa as zNetGross, ab as zNullableBool, ac as zPhpMoneyObject } from './models-Bc5BKYuI.js';
2
2
  export { AircraftUtilization, BookingsData, CompanyDevelopmentReportData, CreateFaqInput, ExpenseData, Faq, FaqSchema, FaqStatus, Fee, FeeCategoryOptions, FeeCategoryOptionsSchema, FeeSchema, FinancialReportData, FinancialSummaryData, FlightHoursData, InstructorData, InstructorEfficiencyReportData, InstructorSummaryData, InvoiceData, LandingsData, Media, MemberActivityData, OperationalReportData, PeriodData, PrepaidPackageData, Report, ReportData, ReportGenerationParams, ReportGenerationResponse, ReportGranularity, ReportListItem, ReportMedia, ReportMetadata, ReportParameters, ReportStatus, ReportStatusResponse, ReportType, RevenueData, ReviewFaqInput, ReviewFaqSchema, SAFETY_REPORT_STATUS_COLORS, SAFETY_REPORT_STATUS_LABELS, SafetyReport, SafetyReportCategory, SafetyReportCategoryForm, SafetyReportCategoryFormSchema, SafetyReportCategorySchema, SafetyReportFilter, SafetyReportFilterSchema, SafetyReportForm, SafetyReportFormSchema, SafetyReportListResponse, SafetyReportListResponseSchema, SafetyReportMedia, SafetyReportMediaSchema, SafetyReportSchema, SafetyReportStatus, SafetyReportStatusEnum, SafetyReportSubmissionResponse, SafetyReportSubmissionResponseSchema, SafetyReportUpdate, SafetyReportUpdateSchema, SubmitFaqQuestionInput, SubmitFaqQuestionSchema, UpdateFaqInput } from './schemas/index.js';
3
3
  export { Address, AircraftRating, Airplane, AirplanePermission, AirplaneShareInvite, Airport, Alert, AllowedDocumentType, ApproachType, Avail, BaseMembership, Booking, Comment, Company, ComplianceData, ComplianceGroup, ComplianceRequirement, ComplianceRequirementGroup, ComplianceResponse, ComplianceSummary, Course, CourseEnrollment, CourseFee, CreateCommentInput, DataWrappedResponse, Document, DocumentComplianceStatus, DocumentRequirement, DocumentRequirementGroup, DocumentRequirementGroupAssignment, DocumentShare, DocumentType, Event, Expense, ExpenseItem, ExtendedAirplane, FlightLog, Invoice, Landing, LandingFee, MaintenanceEvent, MaintenanceEventEstimation, MaintenanceStatus, MediaCollection, Membership, PaginatedResponse, Post, PrePaidPackage, Price, Qualification, RecurringFlight, Resource, Role, Runway, ScheduledFlight, Setting, SpecialFlight, Ticket, ToggleFavoriteResponse, UpdateCommentInput, User, UserAircraftRating, UserQualification, Waypoint } from './types/index.js';
4
4
  export { FeeLike, NetGross, ParsedFee, ParsedPrice, PhpMoneyObject, PriceLike, displayFee, formatToEuroString, fromCents, money, moneyFormatted, parseFee, parsePrice } from './money/index.js';