@odynn/awayz-core 0.9.19 → 0.9.20
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/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +12 -10
- package/dist/hooks/useTripManagement/useTripManagement.test.js +1 -1
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/hooks/useFeatureFlags.d.ts +1 -1
- package/dist/magic-string.es-uPKorP4O.js +663 -0
- package/dist/tests/TestWrapper.js +1130 -1153
- package/dist/vi.2VT5v0um-lKoi8TEt.js +10573 -0
- package/package.json +4 -2
- package/dist/magic-string.es-D4UQQyt0.js +0 -859
- package/dist/vi.ClIskdbk-k6t29WRA.js +0 -12860
|
@@ -17,7 +17,7 @@ import "../../configs/awayzClient.js";
|
|
|
17
17
|
import { EBookingType as r } from "../../services/trips/TripService.types.js";
|
|
18
18
|
/* empty css */
|
|
19
19
|
import { renderHook as a, waitFor as n } from "../../tests/TestWrapper.js";
|
|
20
|
-
import { d as s, v as u, t as l, g as e } from "../../vi.
|
|
20
|
+
import { d as s, v as u, t as l, g as e } from "../../vi.2VT5v0um-lKoi8TEt.js";
|
|
21
21
|
const d = { _id: "6811290ef16af25943018944", order_id: "ord_0000AvQk8IXqiCE2o20e00", user_id: "67d82b1c52c4a4dbe4e640c0", void_window_ends_at: null, documents: [{ passenger_ids: ["pas_0000AvQjcLZRvVQivKWRxi"], unique_identifier: "1", type: "electronic_ticket" }], synced_at: "2025-06-23T18:32:48Z", available_actions: ["cancel", "change", "update"], airline_initiated_changes: [], cancellation: null, tax_currency: "USD", base_currency: "USD", base_amount: "77.49", tax_amount: "13.94", total_currency: "USD", offer_id: "off_0000AvQjcLqSuF2bm6U2U7", booking_reference: "GHNRHO", created_at: "2025-06-23T18:31:58.211428Z", payment_status: { paid_at: "2025-06-23T18:31:58Z", price_guarantee_expires_at: null, payment_required_by: null, awaiting_payment: !1 }, live_mode: !1, total_amount: "91.43", slices: [{ destination_type: "airport", origin_type: "airport", fare_brand_name: "Basic", segments: [{ origin_terminal: "2", destination_terminal: "1", aircraft: { iata_code: "773", name: "Boeing 777-300", id: "arc_00009VMF8AhXSSRnQDI6HE" }, departing_at: "2025-07-30T22:27:00", arriving_at: "2025-07-31T00:24:00", operating_carrier: { logo_symbol_url: "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg", logo_lockup_url: null, conditions_of_carriage_url: "https://duffelairways.com/dummy-url/conditions-of-carriage", iata_code: "ZZ", name: "Duffel Airways", id: "arl_00009VME7D6ivUu8dn35WK" }, marketing_carrier: { logo_symbol_url: "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg", logo_lockup_url: null, conditions_of_carriage_url: "https://duffelairways.com/dummy-url/conditions-of-carriage", iata_code: "ZZ", name: "Duffel Airways", id: "arl_00009VME7D6ivUu8dn35WK" }, stops: [], operating_carrier_flight_number: "9596", marketing_carrier_flight_number: "9596", distance: "1034.9960998474376", passengers: [{ baggages: [{ quantity: 1, type: "checked" }, { quantity: 1, type: "carry_on" }], cabin_class_marketing_name: "Economy", passenger_id: "pas_0000AvQjcLZRvVQivKWRxi", seat: null, cabin_class: "economy" }], duration: "PT1H57M", destination: { icao_code: "LFPG", iata_country_code: "FR", iata_city_code: "PAR", city_name: "Paris", iata_code: "CDG", latitude: 49.011244, longitude: 2.548962, city: { icao_code: null, iata_country_code: "FR", iata_city_code: "PAR", city_name: null, iata_code: "PAR", latitude: null, longitude: null, time_zone: null, type: "city", name: "Paris", id: "cit_par_fr" }, time_zone: "Europe/Paris", type: "airport", name: "Paris Charles de Gaulle Airport", id: "arp_cdg_fr" }, origin: { icao_code: "LOWW", iata_country_code: "AT", iata_city_code: "VIE", city_name: "Vienna", iata_code: "VIE", latitude: 48.113065, longitude: 16.568137, city: null, time_zone: "Europe/Vienna", type: "airport", name: "Vienna International Airport", id: "arp_vie_at" }, id: "seg_0000AvQjcLqSuF2bm6U2U5" }], conditions: { change_before_departure: { penalty_currency: "GBP", penalty_amount: "10.00", allowed: !0 } }, duration: "PT1H57M", destination: { icao_code: "LFPG", iata_country_code: "FR", iata_city_code: "PAR", city_name: "Paris", iata_code: "CDG", latitude: 49.011244, longitude: 2.548962, city: { icao_code: null, iata_country_code: "FR", iata_city_code: "PAR", city_name: null, iata_code: "PAR", latitude: null, longitude: null, time_zone: null, type: "city", name: "Paris", id: "cit_par_fr" }, time_zone: "Europe/Paris", type: "airport", name: "Paris Charles de Gaulle Airport", id: "arp_cdg_fr" }, origin: { icao_code: "LOWW", iata_country_code: "AT", iata_city_code: "VIE", city_name: "Vienna", iata_code: "VIE", latitude: 48.113065, longitude: 16.568137, city: null, time_zone: "Europe/Vienna", type: "airport", name: "Vienna International Airport", id: "arp_vie_at" }, id: "sli_0000AvQjcLqSuF2bm6U2U6" }], passengers: [{ born_on: "2007-04-29", loyalty_programme_accounts: [], family_name: "Botha", given_name: "Adriaan", gender: "m", infant_passenger_id: null, phone_number: "+12345642342", user_id: null, email: "adriaan.botha@typedev.co.za", title: "mr", type: "adult", id: "pas_0000AvQjcLZRvVQivKWRxi" }], conditions: { refund_before_departure: { penalty_currency: null, penalty_amount: null, allowed: !1 }, change_before_departure: { penalty_currency: "GBP", penalty_amount: "10.00", allowed: !0 } }, cancelled_at: null, changes: [], content: "managed", services: [], users: ["icu_0000Asbm8q0FlWOhf0fDUm"], metadata: null, type: "instant", owner: { logo_symbol_url: "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/ZZ.svg", logo_lockup_url: null, conditions_of_carriage_url: "https://duffelairways.com/dummy-url/conditions-of-carriage", iata_code: "ZZ", name: "Duffel Airways", id: "arl_00009VME7D6ivUu8dn35WK" }, id: "ord_0000AvQk8IXqiCE2o20e00", status: "flight confirmed" }, m = "Flight booking found", g = !0, _ = { internalRequestId: "f6b54196-4d33-434d-9800-d9dc72a074ab" }, h = {
|
|
22
22
|
data: d,
|
|
23
23
|
message: m,
|
|
@@ -43,20 +43,22 @@ const L = [
|
|
|
43
43
|
"CASH_BOOKING_FEATURE",
|
|
44
44
|
"DISABLE_FREE_USER_CASH_BOOKING_FEATURE",
|
|
45
45
|
"ENABLE_EASY_SUPPORT_BOT_FEATURE",
|
|
46
|
-
"SHOW_ONLY_BOOKABLE_FEATURE"
|
|
47
|
-
|
|
46
|
+
"SHOW_ONLY_BOOKABLE_FEATURE",
|
|
47
|
+
"HIDE_FLIGHT_SEARCH_CONTAINER_FEATURE",
|
|
48
|
+
"HIDE_HOTEL_SEARCH_CONTAINER_FEATURE"
|
|
49
|
+
], I = [
|
|
48
50
|
"WALLET_PROGRAM_TYPES_FEATURES",
|
|
49
51
|
"HOTEL_FILTERS_FEATURES",
|
|
50
52
|
"FLIGHT_FILTERS_FEATURES",
|
|
51
53
|
"WALLET_FEATURES"
|
|
52
54
|
];
|
|
53
|
-
var N = /* @__PURE__ */ ((E) => (E.DEFAULT = "default", E.FULL_VCC_PARTIAL_ENABLED = "Full VCC - Partial Enabled", E.FULL_VCC_PARTIAL_DISABLED = "Full VCC - Partial Disabled", E))(N || {}), t = /* @__PURE__ */ ((E) => (E.CASH_ONLY = "Cash Only", E.CASH_AND_TRAVEL_PARTNER_POINTS = "Cash And Travel Partner Points", E.CASH_AND_CLIENT_POINTS = "Cash And Client Points", E))(t || {}),
|
|
54
|
-
const
|
|
55
|
+
var N = /* @__PURE__ */ ((E) => (E.DEFAULT = "default", E.FULL_VCC_PARTIAL_ENABLED = "Full VCC - Partial Enabled", E.FULL_VCC_PARTIAL_DISABLED = "Full VCC - Partial Disabled", E))(N || {}), t = /* @__PURE__ */ ((E) => (E.CASH_ONLY = "Cash Only", E.CASH_AND_TRAVEL_PARTNER_POINTS = "Cash And Travel Partner Points", E.CASH_AND_CLIENT_POINTS = "Cash And Client Points", E))(t || {}), H = /* @__PURE__ */ ((E) => (E.RESULT = "result", E.SHEET = "sheet", E))(H || {});
|
|
56
|
+
const l = () => {
|
|
55
57
|
const { data: E, isSuccess: R } = U({
|
|
56
58
|
queryKey: [e.FEATURES, "new"],
|
|
57
59
|
queryFn: r.getFeatureFlags,
|
|
58
60
|
staleTime: 1 / 0
|
|
59
|
-
}),
|
|
61
|
+
}), O = R && E ? (() => {
|
|
60
62
|
const T = {};
|
|
61
63
|
return L.forEach((_) => {
|
|
62
64
|
const A = F(
|
|
@@ -68,7 +70,7 @@ const C = () => {
|
|
|
68
70
|
_.toLowerCase()
|
|
69
71
|
);
|
|
70
72
|
E[_] !== void 0 && (T[A] = E[_]);
|
|
71
|
-
}),
|
|
73
|
+
}), I.forEach((_) => {
|
|
72
74
|
const A = F(
|
|
73
75
|
_.toLowerCase()
|
|
74
76
|
);
|
|
@@ -79,18 +81,18 @@ const C = () => {
|
|
|
79
81
|
const _ = [
|
|
80
82
|
...L,
|
|
81
83
|
...S,
|
|
82
|
-
...
|
|
84
|
+
...I
|
|
83
85
|
].filter((A) => E[A] === void 0);
|
|
84
86
|
_.length > 0 && console.error("Missing feature flags:", _);
|
|
85
87
|
}
|
|
86
88
|
return {
|
|
87
|
-
featureFlags:
|
|
89
|
+
featureFlags: O ?? {},
|
|
88
90
|
loaded: R
|
|
89
91
|
};
|
|
90
92
|
};
|
|
91
93
|
export {
|
|
92
94
|
t as EAmountsDisplayFeature,
|
|
93
95
|
N as EBookingPaymentMethod,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
+
H as EFlightBookingOptionsDisplayFeature,
|
|
97
|
+
l as useFeatureFlags
|
|
96
98
|
};
|
|
@@ -19,7 +19,7 @@ import { EBookingType as m } from "../../services/trips/TripService.types.js";
|
|
|
19
19
|
import { useTripManagement as n } from "./useTripManagement.js";
|
|
20
20
|
/* empty css */
|
|
21
21
|
import { UncategorisedBookings200 as y, PastTrip200 as B, UpcomingTrip200 as b, UpdatedTrip200 as k } from "./mocks/index.js";
|
|
22
|
-
import { d as u, v as T, b as D, t as s, g as e } from "../../vi.
|
|
22
|
+
import { d as u, v as T, b as D, t as s, g as e } from "../../vi.2VT5v0um-lKoi8TEt.js";
|
|
23
23
|
let g = {
|
|
24
24
|
past: [...B.data],
|
|
25
25
|
upcoming: [...b.data].concat(k.data)
|
|
@@ -16,7 +16,7 @@ import "../../context/AwayzContext.js";
|
|
|
16
16
|
import { useWallet as t } from "./useWallet.js";
|
|
17
17
|
/* empty css */
|
|
18
18
|
import { renderHook as s, waitFor as i } from "../../tests/TestWrapper.js";
|
|
19
|
-
import { d as m, v as c, b as p, t as n, g as o } from "../../vi.
|
|
19
|
+
import { d as m, v as c, b as p, t as n, g as o } from "../../vi.2VT5v0um-lKoi8TEt.js";
|
|
20
20
|
const _ = !0, v = [{ _id: "AAAviatorBis", name: "AAdvantage Aviator Business", signupBonus: 7e4, cashBonus: 0, minimumSpend: 2e3, daysToSpend: 90, annual_fee: 95, annualFeeWaived: !1, cashPerks: 0, bank: { name: "Barclays" }, rewards_currency: "American Airlines Miles", bisCard: !0, chargeCard: !1, cardFamily: 0, websiteUrl: "https://frequentmiler.com/AviatorBiz/#Goto", network: { name: "Mastercard" }, _modified: "2022-08-30T00:24:55.568Z", colour: "#1A3251", region: "US", faredrop_card_id: "", alternateRegions: [], logoUrl: "https://s3.us-east-1.amazonaws.com/awayz/card_logos/barclays-white.svg" }, { _id: "AARed", name: "AAdvantage Aviator Red", signupBonus: 6e4, cashBonus: 0, minimumSpend: 0, daysToSpend: 30, annual_fee: 99, annualFeeWaived: !0, cashPerks: 0, bank: { name: "Barclays" }, rewards_currency: "American Airlines Miles", bisCard: !1, chargeCard: !1, cardFamily: 1, websiteUrl: "https://frequentmiler.com/AviatorRed/#Goto", network: { name: "Mastercard" }, colour: "#1A3251", region: "US", faredrop_card_id: "", alternateRegions: [], logoUrl: "https://s3.us-east-1.amazonaws.com/awayz/card_logos/barclays-white.svg" }, { _id: "AASilver", name: "AAdvantage Aviator Silver", signupBonus: 0, cashBonus: 0, minimumSpend: 0, daysToSpend: 0, annual_fee: 195, annualFeeWaived: !1, cashPerks: 75, bank: { name: "Barclays" }, rewards_currency: "American Airlines Miles", bisCard: !1, chargeCard: !1, cardFamily: 1, websiteUrl: "https://frequentmiler.boardingarea.com/AviatorSilver/#Goto", network: { name: "Mastercard" }, _modified: "2022-08-30T00:27:10.347Z", updatedAt: "2022-10-26T06:55:01.187Z", colour: "#C8C8C8", region: "US", faredrop_card_id: "", alternateRegions: [], logoUrl: "https://s3.us-east-1.amazonaws.com/awayz/card_logos/barclays-black.svg" }, { _id: "AFKLMcard", name: "Air France KLM Card", signupBonus: 7e4, cashBonus: 0, minimumSpend: 2e3, daysToSpend: 90, annual_fee: 89, annualFeeWaived: !1, cashPerks: 150, bank: { name: "BofA" }, rewards_currency: "Flying Blue Miles", bisCard: !1, chargeCard: !1, cardFamily: 6, websiteUrl: "https://frequentmiler.com/AFKLM/#Goto", network: { name: "Mastercard" }, _modified: "2022-08-30T00:41:10.038Z", colour: "#1A3251", region: "US", faredrop_card_id: "", alternateRegions: [], logoUrl: "https://s3.us-east-1.amazonaws.com/awayz/card_logos/bofa-white.svg" }, { _id: "ASBis", name: "Alaska Airlines Visa Business", signupBonus: 7e4, cashBonus: 0, minimumSpend: 4e3, daysToSpend: 90, annual_fee: 75, annualFeeWaived: !1, cashPerks: 0, bank: { name: "BofA" }, rewards_currency: "Alaska MileagePlan", bisCard: !0, chargeCard: !1, cardFamily: 10, websiteUrl: "https://frequentmiler.com/ASbiz/#Goto", network: { name: "Visa" }, _modified: "2022-08-30T00:41:42.408Z", colour: "#1A3251", region: "US", faredrop_card_id: "", alternateRegions: [], logoUrl: "https://s3.us-east-1.amazonaws.com/awayz/card_logos/bofa-white.svg" }, { _id: "AltReserve", name: "Altitude Reserve", signupBonus: 5e4, cashBonus: 0, minimumSpend: 4500, daysToSpend: 90, annual_fee: 400, annualFeeWaived: !1, cashPerks: 0, bank: { name: "US Bank" }, rewards_currency: "Altitude Reserve Points", bisCard: !1, chargeCard: !1, cardFamily: 28, websiteUrl: "https://frequentmiler.com/USBAR/#Goto", network: { name: "Visa" }, colour: "#3767A2", region: "US", faredrop_card_id: "", points_as_cash_conversion_ratio: 0.015, updatedAt: "2024-10-18T14:47:25.187Z", alternateRegions: [], logoUrl: "https://s3.us-east-1.amazonaws.com/awayz/card_logos/us-bank-white.svg" }], y = {
|
|
21
21
|
success: _,
|
|
22
22
|
data: v
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}` ? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}` : Lowercase<S>;
|
|
2
2
|
declare const StringFeatureFlag: readonly ["DEFAULT_CURRENCY_FEATURE", "TOTAL_DISPLAY_FEATURE", "HOTEL_DETAILS_LAYOUT_FEATURE", "TRIP_MANAGEMENT_FEATURE", "FLIGHT_FILTER_LAYOUT_FEATURE", "WALLET_MANAGEMENT_FEATURE", "WALLET_PROGRAM_TYPES_FEATURES", "FLIGHT_PAGINATION_FEATURE", "AVAILABILITY_ALERTS_DISPLAY_FEATURE", "PAYMENT_TYPE_FEATURE", "HOTEL_DETAILS_FEATURES", "SEARCH_RADIUS_POSITION_FEATURE", "NAVIGATION_FEATURE", "BOOKING_PAYMENT_METHOD_FEATURE", "AMOUNTS_DISPLAY_FEATURE", "FLIGHT_BOOKING_OPTIONS_DISPLAY_FEATURE"];
|
|
3
|
-
declare const BooleanFeatureFlag: readonly ["CURRENCY_FILTER_FEATURE", "FREE_HOTEL_NIGHTS_FEATURE", "SHOW_BOOKABLE_FEATURE", "FILTER_PRESETS_FEATURE", "SPLIT_HOTEL_CHAINS_FEATURE", "FLIGHT_SHOW_ANIMATION_FEATURE", "SHOW_FOOTER_FEATURE", "SHOW_AVAILABILITY_ALERTS_FEATURE", "USE_POINTS_AS_CASH_FEATURE", "HAS_HEADER_FEATURE", "SHOW_FLIGHTS_TRANSFER_PARTNER_FEATURE", "HOTEL_POINTS_ONLY_FEATURE", "FREE_HOTEL_NIGHTS_FEATURE", "HOTEL_DISPLAY_BEST_VALUE_FEATURE", "HOTEL_DISPLAY_POINTS_BREAKDOWN_FEATURE", "TAB_NAVIGATION_FEATURE", "ADD_AIRLINE_HEALTH_PAGE_FEATURE", "SHOW_NAVIGATION_POPUP_FEATURE", "SHOW_ONLY_BOOKABLE_FEATURE", "CASH_BOOKING_FEATURE", "DISABLE_FREE_USER_CASH_BOOKING_FEATURE", "ENABLE_EASY_SUPPORT_BOT_FEATURE", "SHOW_ONLY_BOOKABLE_FEATURE"];
|
|
3
|
+
declare const BooleanFeatureFlag: readonly ["CURRENCY_FILTER_FEATURE", "FREE_HOTEL_NIGHTS_FEATURE", "SHOW_BOOKABLE_FEATURE", "FILTER_PRESETS_FEATURE", "SPLIT_HOTEL_CHAINS_FEATURE", "FLIGHT_SHOW_ANIMATION_FEATURE", "SHOW_FOOTER_FEATURE", "SHOW_AVAILABILITY_ALERTS_FEATURE", "USE_POINTS_AS_CASH_FEATURE", "HAS_HEADER_FEATURE", "SHOW_FLIGHTS_TRANSFER_PARTNER_FEATURE", "HOTEL_POINTS_ONLY_FEATURE", "FREE_HOTEL_NIGHTS_FEATURE", "HOTEL_DISPLAY_BEST_VALUE_FEATURE", "HOTEL_DISPLAY_POINTS_BREAKDOWN_FEATURE", "TAB_NAVIGATION_FEATURE", "ADD_AIRLINE_HEALTH_PAGE_FEATURE", "SHOW_NAVIGATION_POPUP_FEATURE", "SHOW_ONLY_BOOKABLE_FEATURE", "CASH_BOOKING_FEATURE", "DISABLE_FREE_USER_CASH_BOOKING_FEATURE", "ENABLE_EASY_SUPPORT_BOT_FEATURE", "SHOW_ONLY_BOOKABLE_FEATURE", "HIDE_FLIGHT_SEARCH_CONTAINER_FEATURE", "HIDE_HOTEL_SEARCH_CONTAINER_FEATURE"];
|
|
4
4
|
declare const ListFeatureFlag: readonly ["WALLET_PROGRAM_TYPES_FEATURES", "HOTEL_FILTERS_FEATURES", "FLIGHT_FILTERS_FEATURES", "WALLET_FEATURES"];
|
|
5
5
|
export declare enum EBookingPaymentMethod {
|
|
6
6
|
DEFAULT = "default",
|