@odynn/awayz-core 0.9.17 → 0.9.19
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useQuery as
|
|
1
|
+
import { useQuery as U } from "@tanstack/react-query";
|
|
2
2
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as
|
|
3
|
+
import { E as e, t as F } from "../noRetryInstance-De2sH_IH.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { FeatureService as r } from "../services/features/featureService.js";
|
|
6
6
|
const L = [
|
|
@@ -50,46 +50,47 @@ const L = [
|
|
|
50
50
|
"FLIGHT_FILTERS_FEATURES",
|
|
51
51
|
"WALLET_FEATURES"
|
|
52
52
|
];
|
|
53
|
-
var N = /* @__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))(
|
|
54
|
-
const
|
|
55
|
-
const { data: E, isSuccess: R } =
|
|
56
|
-
queryKey: [
|
|
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 || {}), a = /* @__PURE__ */ ((E) => (E.RESULT = "result", E.SHEET = "sheet", E))(a || {});
|
|
54
|
+
const C = () => {
|
|
55
|
+
const { data: E, isSuccess: R } = U({
|
|
56
|
+
queryKey: [e.FEATURES, "new"],
|
|
57
57
|
queryFn: r.getFeatureFlags,
|
|
58
58
|
staleTime: 1 / 0
|
|
59
|
-
}),
|
|
60
|
-
const
|
|
59
|
+
}), I = R && E ? (() => {
|
|
60
|
+
const T = {};
|
|
61
61
|
return L.forEach((_) => {
|
|
62
|
-
const
|
|
62
|
+
const A = F(
|
|
63
63
|
_.toLowerCase()
|
|
64
64
|
);
|
|
65
|
-
E[_] !== void 0 && (A
|
|
65
|
+
E[_] !== void 0 && (T[A] = E[_]);
|
|
66
66
|
}), S.forEach((_) => {
|
|
67
|
-
const
|
|
67
|
+
const A = F(
|
|
68
68
|
_.toLowerCase()
|
|
69
69
|
);
|
|
70
|
-
E[_] !== void 0 && (A
|
|
70
|
+
E[_] !== void 0 && (T[A] = E[_]);
|
|
71
71
|
}), O.forEach((_) => {
|
|
72
|
-
const
|
|
72
|
+
const A = F(
|
|
73
73
|
_.toLowerCase()
|
|
74
74
|
);
|
|
75
|
-
E[_] !== void 0 && (A
|
|
76
|
-
}),
|
|
75
|
+
E[_] !== void 0 && (T[A] = E[_]);
|
|
76
|
+
}), T;
|
|
77
77
|
})() : null;
|
|
78
78
|
if (R && E) {
|
|
79
79
|
const _ = [
|
|
80
80
|
...L,
|
|
81
81
|
...S,
|
|
82
82
|
...O
|
|
83
|
-
].filter((
|
|
83
|
+
].filter((A) => E[A] === void 0);
|
|
84
84
|
_.length > 0 && console.error("Missing feature flags:", _);
|
|
85
85
|
}
|
|
86
86
|
return {
|
|
87
|
-
featureFlags:
|
|
87
|
+
featureFlags: I ?? {},
|
|
88
88
|
loaded: R
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
91
|
export {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
t as EAmountsDisplayFeature,
|
|
93
|
+
N as EBookingPaymentMethod,
|
|
94
|
+
a as EFlightBookingOptionsDisplayFeature,
|
|
95
|
+
C as useFeatureFlags
|
|
95
96
|
};
|
|
@@ -2,6 +2,11 @@ type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}
|
|
|
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
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"];
|
|
4
4
|
declare const ListFeatureFlag: readonly ["WALLET_PROGRAM_TYPES_FEATURES", "HOTEL_FILTERS_FEATURES", "FLIGHT_FILTERS_FEATURES", "WALLET_FEATURES"];
|
|
5
|
+
export declare enum EBookingPaymentMethod {
|
|
6
|
+
DEFAULT = "default",
|
|
7
|
+
FULL_VCC_PARTIAL_ENABLED = "Full VCC - Partial Enabled",
|
|
8
|
+
FULL_VCC_PARTIAL_DISABLED = "Full VCC - Partial Disabled"
|
|
9
|
+
}
|
|
5
10
|
export type FeatureFlags = StringFeatureFlags & BooleanFeatureFlags & ListFeatureFlags;
|
|
6
11
|
type StringFeatureFlags = {
|
|
7
12
|
[K in (typeof StringFeatureFlag)[number] as CamelCase<K>]: string;
|
|
@@ -60,6 +60,12 @@ export interface IPointsAsCash {
|
|
|
60
60
|
amount: number;
|
|
61
61
|
currency: string;
|
|
62
62
|
};
|
|
63
|
+
statusHistory: {
|
|
64
|
+
status: string;
|
|
65
|
+
timestamp: string;
|
|
66
|
+
message?: string;
|
|
67
|
+
}[];
|
|
68
|
+
exchangeRateAtAuthorisation: number;
|
|
63
69
|
}
|
|
64
70
|
export interface ICancellationTimeline {
|
|
65
71
|
refundAmount: number;
|
package/dist/main.js
CHANGED
|
@@ -6,12 +6,12 @@ import { ClientPointsValue as x } from "./components/ClientPointsValue/ClientPoi
|
|
|
6
6
|
import { Card as u } from "./components/Wallet/Card/Card.js";
|
|
7
7
|
import { awayzClient as c } from "./configs/awayzClient.js";
|
|
8
8
|
import { defaultAwayzConfig as C } from "./configs/defaultAwayzConfig.js";
|
|
9
|
-
import { useAwayzContext as
|
|
10
|
-
import { useBookingManagement as
|
|
11
|
-
import { useSearchLimit as
|
|
12
|
-
import { ETripStatus as
|
|
13
|
-
import { useWallet as
|
|
14
|
-
import { AwayzProvider as
|
|
9
|
+
import { useAwayzContext as h } from "./hooks/useAwayzContext.js";
|
|
10
|
+
import { useBookingManagement as B } from "./hooks/useBookingManagement/useBookingManagement.js";
|
|
11
|
+
import { useSearchLimit as d } from "./hooks/useSearchLimit.js";
|
|
12
|
+
import { ETripStatus as A, useTripManagement as T } from "./hooks/useTripManagement/useTripManagement.js";
|
|
13
|
+
import { useWallet as P } from "./hooks/useWallet/useWallet.js";
|
|
14
|
+
import { AwayzProvider as I } from "./providers/AwayzProvider.js";
|
|
15
15
|
import { CurrencyService as D } from "./services/currency/CurrencyService.js";
|
|
16
16
|
import { c as O, a as R, g as V, i as H } from "./noRetryInstance-De2sH_IH.js";
|
|
17
17
|
import { RewardsService as N } from "./services/rewards/RewardsService.js";
|
|
@@ -19,21 +19,22 @@ import { EBookingType as W } from "./services/trips/TripService.types.js";
|
|
|
19
19
|
import { EAuthFlow as j } from "./types/EAuthFlow.js";
|
|
20
20
|
import { convertCashToClientPoints as G } from "./utils/clientPoints.js";
|
|
21
21
|
import { getCurrency as K } from "./utils/currency.js";
|
|
22
|
-
import { EAmountsDisplayFeature as X,
|
|
23
|
-
import { getBaseUrl as
|
|
22
|
+
import { EAmountsDisplayFeature as X, EBookingPaymentMethod as Y, EFlightBookingOptionsDisplayFeature as Z, useFeatureFlags as _ } from "./hooks/useFeatureFlags.js";
|
|
23
|
+
import { getBaseUrl as oo } from "./configs/baseUrl.js";
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
I as AwayzProvider,
|
|
26
26
|
u as Card,
|
|
27
27
|
i as CashValue,
|
|
28
28
|
x as ClientPointsValue,
|
|
29
29
|
D as CurrencyService,
|
|
30
30
|
X as EAmountsDisplayFeature,
|
|
31
31
|
j as EAuthFlow,
|
|
32
|
+
Y as EBookingPaymentMethod,
|
|
32
33
|
W as EBookingType,
|
|
33
|
-
|
|
34
|
+
Z as EFlightBookingOptionsDisplayFeature,
|
|
34
35
|
m as EInvalidAmountDisplayOption,
|
|
35
36
|
s as EToolTipPosition,
|
|
36
|
-
|
|
37
|
+
A as ETripStatus,
|
|
37
38
|
r as FlightBooking,
|
|
38
39
|
a as HotelBooking,
|
|
39
40
|
N as RewardsService,
|
|
@@ -43,13 +44,13 @@ export {
|
|
|
43
44
|
G as convertCashToClientPoints,
|
|
44
45
|
C as defaultAwayzConfig,
|
|
45
46
|
V as gatewayInstance,
|
|
46
|
-
|
|
47
|
+
oo as getBaseUrl,
|
|
47
48
|
K as getCurrency,
|
|
48
49
|
H as instance,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
h as useAwayzContext,
|
|
51
|
+
B as useBookingManagement,
|
|
52
|
+
_ as useFeatureFlags,
|
|
53
|
+
d as useSearchLimit,
|
|
54
|
+
T as useTripManagement,
|
|
55
|
+
P as useWallet
|
|
55
56
|
};
|