@odynn/awayz-core 0.6.48 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Combination-Bx3lWLOq.js → Combination-CrPZjD5u.js} +382 -382
- package/dist/RewardsService-CB88je4D.js +118952 -0
- package/dist/{TripsService-DywrB9bi.js → TripsService-A25R9nj7.js} +1 -1
- package/dist/assets/ClientPointsValue.css +1 -0
- package/dist/assets/RewardsService.css +1 -0
- package/dist/assets/_styles.css +1 -1
- package/dist/assets/_styles3.css +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +2 -2
- package/dist/components/CashValue/CashValue.js +8 -7
- package/dist/components/CashValue/CashValue.stories.js +23 -22
- package/dist/components/ClientPointsValue/ClientPointsValue.js +258 -0
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Wallet/Card/Card.js +2 -2
- package/dist/components/Wallet/Card/Card.stories.js +16 -15
- package/dist/components/index.js +13 -11
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +67 -66
- package/dist/hooks/useBookingManagement/useBookingManagement.js +12 -11
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +6 -5
- package/dist/hooks/useFeatureFlags.js +35 -31
- package/dist/hooks/useSearchLimit.js +12 -11
- package/dist/hooks/useTripManagement/useTripManagement.js +9 -8
- package/dist/hooks/useTripManagement/useTripManagement.test.js +8 -7
- package/dist/hooks/useWallet/useWallet.js +28 -27
- package/dist/hooks/useWallet/useWallet.test.js +7 -6
- package/dist/{index-Bt2pq2GP.js → index-jyHfrLRo.js} +20 -20
- package/dist/lib/components/ClientPointsValue/ClientPointsValue.d.ts +6 -0
- package/dist/lib/components/index.d.ts +4 -3
- package/dist/lib/hooks/useFeatureFlags.d.ts +8 -3
- package/dist/lib/main.d.ts +1 -0
- package/dist/lib/services/instanceConfig.d.ts +2 -2
- package/dist/main.js +44 -39
- package/dist/{noRetryInstance-Y6wcm2ZM.js → noRetryInstance-CNXX0Siw.js} +466 -468
- package/dist/providers/AwayzProvider.js +13 -12
- package/dist/services/account/AccountService.js +3 -2
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +15 -14
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +1 -1
- package/dist/services/instanceConfig.js +12 -11
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { useQuery as n, useMutation as s } from "@tanstack/react-query";
|
|
2
2
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { E as a,
|
|
3
|
+
import { E as a, a as m } from "../../RewardsService-CB88je4D.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
|
-
import { awayzClient as i } from "../../configs/awayzClient.js";
|
|
7
|
-
import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles4.css';/* empty css */
|
|
8
|
-
/* empty css */
|
|
9
6
|
import "react-i18next";
|
|
10
|
-
|
|
7
|
+
import '../../assets/_styles3.css';import '../../assets/_styles4.css';import '../../assets/_styles.css';import '../../assets/_styles2.css';/* empty css */
|
|
11
8
|
import "../../_styles.flight-booking-DEUJthTJ.js";
|
|
12
9
|
/* empty css */
|
|
10
|
+
import { awayzClient as i } from "../../configs/awayzClient.js";
|
|
11
|
+
import "../../noRetryInstance-CNXX0Siw.js";
|
|
12
|
+
/* empty css */
|
|
13
|
+
/* empty css */
|
|
13
14
|
import { useAwayzContext as l } from "../useAwayzContext.js";
|
|
14
15
|
import "../../context/AwayzContext.js";
|
|
15
16
|
import { WalletService as o } from "../../services/wallet/WalletService.js";
|
|
16
|
-
const
|
|
17
|
-
const { user:
|
|
17
|
+
const B = () => {
|
|
18
|
+
const { user: r } = l(), { data: t } = n({
|
|
18
19
|
queryKey: [a.PROGRAMS],
|
|
19
20
|
queryFn: o.getAwards,
|
|
20
21
|
placeholderData: []
|
|
21
22
|
}), { data: c } = n({
|
|
22
|
-
queryKey: [a.USER_PROGRAMS,
|
|
23
|
-
queryFn: () =>
|
|
23
|
+
queryKey: [a.USER_PROGRAMS, r == null ? void 0 : r.id],
|
|
24
|
+
queryFn: () => r != null && r.id ? o.getUserAwards(r.id) : [],
|
|
24
25
|
placeholderData: [],
|
|
25
|
-
enabled: !!(
|
|
26
|
+
enabled: !!(r != null && r.id)
|
|
26
27
|
}), { data: y } = n({
|
|
27
|
-
queryKey: [a.LINKED_USER_PROGRAMS,
|
|
28
|
-
queryFn: () =>
|
|
28
|
+
queryKey: [a.LINKED_USER_PROGRAMS, r == null ? void 0 : r.id],
|
|
29
|
+
queryFn: () => r != null && r.id ? o.getLinkedUserAwards(r.id) : [],
|
|
29
30
|
placeholderData: [],
|
|
30
|
-
enabled: !!(
|
|
31
|
+
enabled: !!(r != null && r.id)
|
|
31
32
|
}), { data: A } = n({
|
|
32
33
|
queryKey: [a.BANKS],
|
|
33
34
|
queryFn: o.getBanks,
|
|
@@ -46,8 +47,8 @@ const W = () => {
|
|
|
46
47
|
placeholderData: { availablePoints: 0, valuePerPoint: 0, currency: "" },
|
|
47
48
|
enabled: S && R.usePointsAsCashFeature
|
|
48
49
|
}), { mutate: C } = s({
|
|
49
|
-
mutationFn: async (
|
|
50
|
-
const { mainProgram: u, awardsAmount: d } = typeof
|
|
50
|
+
mutationFn: async (e) => {
|
|
51
|
+
const { mainProgram: u, awardsAmount: d } = typeof e == "string" ? { mainProgram: e, awardsAmount: 0 } : e;
|
|
51
52
|
await o.addAwardProgram(u, d);
|
|
52
53
|
},
|
|
53
54
|
onSuccess: () => {
|
|
@@ -56,8 +57,8 @@ const W = () => {
|
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
59
|
}), { mutate: E } = s({
|
|
59
|
-
mutationFn: async (
|
|
60
|
-
await o.removeAwardProgram(
|
|
60
|
+
mutationFn: async (e) => {
|
|
61
|
+
await o.removeAwardProgram(e);
|
|
61
62
|
},
|
|
62
63
|
onSuccess: () => {
|
|
63
64
|
i.invalidateQueries({
|
|
@@ -65,8 +66,8 @@ const W = () => {
|
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
}), { mutateAsync: K } = s({
|
|
68
|
-
mutationFn: async ({ mainProgram:
|
|
69
|
-
const d = t == null ? void 0 : t.find((F) => F.mainProgram ===
|
|
69
|
+
mutationFn: async ({ mainProgram: e, awardsAmount: u }) => {
|
|
70
|
+
const d = t == null ? void 0 : t.find((F) => F.mainProgram === e);
|
|
70
71
|
if (!d)
|
|
71
72
|
throw new Error("Program not found");
|
|
72
73
|
return o.setAwardPoints(d.mainProgram, u);
|
|
@@ -76,19 +77,19 @@ const W = () => {
|
|
|
76
77
|
a.LINKED_USER_PROGRAMS,
|
|
77
78
|
a.USER_PROGRAMS,
|
|
78
79
|
a.PROGRAMS
|
|
79
|
-
].forEach((
|
|
80
|
-
i.invalidateQueries({ queryKey: [
|
|
80
|
+
].forEach((e) => {
|
|
81
|
+
i.invalidateQueries({ queryKey: [e] });
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
}), { mutateAsync: f } = s({
|
|
84
|
-
mutationFn: async (
|
|
85
|
+
mutationFn: async (e) => o.addCardsToWallet(e),
|
|
85
86
|
onSuccess: () => {
|
|
86
87
|
i.invalidateQueries({
|
|
87
88
|
queryKey: [a.USER_CARDS]
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
91
|
}), { mutateAsync: q } = s({
|
|
91
|
-
mutationFn: async (
|
|
92
|
+
mutationFn: async (e) => o.removeCardsFromWallet(e),
|
|
92
93
|
onSuccess: () => {
|
|
93
94
|
i.invalidateQueries({
|
|
94
95
|
queryKey: [a.USER_CARDS]
|
|
@@ -101,13 +102,13 @@ const W = () => {
|
|
|
101
102
|
userPrograms: c || [],
|
|
102
103
|
linkedUserPrograms: y || [],
|
|
103
104
|
hotelPrograms: (t == null ? void 0 : t.filter(
|
|
104
|
-
(
|
|
105
|
+
(e) => e.category.includes(m.HOTEL)
|
|
105
106
|
)) || [],
|
|
106
107
|
airlinePrograms: (t == null ? void 0 : t.filter(
|
|
107
|
-
(
|
|
108
|
+
(e) => e.category.includes(m.AIRLINE)
|
|
108
109
|
)) || [],
|
|
109
110
|
bankPrograms: (t == null ? void 0 : t.filter(
|
|
110
|
-
(
|
|
111
|
+
(e) => e.category.includes(m.BANK)
|
|
111
112
|
)) || [],
|
|
112
113
|
updatePoints: K,
|
|
113
114
|
addAwardProgram: C,
|
|
@@ -126,5 +127,5 @@ const W = () => {
|
|
|
126
127
|
};
|
|
127
128
|
};
|
|
128
129
|
export {
|
|
129
|
-
|
|
130
|
+
B as useWallet
|
|
130
131
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { EWalletEndpoints as r } from "../../configs/endpoints.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
|
-
import "@tanstack/react-query";
|
|
4
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
4
|
import "react";
|
|
6
|
-
import "../../configs/awayzClient.js";
|
|
7
|
-
import { c as l } from "../../noRetryInstance-Y6wcm2ZM.js";
|
|
8
|
-
import '../../assets/_styles3.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles4.css';/* empty css */
|
|
9
|
-
/* empty css */
|
|
10
5
|
import "react-i18next";
|
|
11
|
-
|
|
6
|
+
import '../../assets/_styles3.css';import '../../assets/_styles4.css';import '../../assets/_styles.css';import '../../assets/_styles2.css';/* empty css */
|
|
12
7
|
import "../../_styles.flight-booking-DEUJthTJ.js";
|
|
13
8
|
/* empty css */
|
|
9
|
+
import "@tanstack/react-query";
|
|
10
|
+
import "../../configs/awayzClient.js";
|
|
11
|
+
import { c as l } from "../../noRetryInstance-CNXX0Siw.js";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import "../../RewardsService-CB88je4D.js";
|
|
14
|
+
/* empty css */
|
|
14
15
|
import "../../context/AwayzContext.js";
|
|
15
16
|
import { useWallet as t } from "./useWallet.js";
|
|
16
17
|
import { renderHook as s, waitFor as i } from "../../tests/TestWrapper.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "react";
|
|
2
2
|
var m = {
|
|
3
3
|
color: void 0,
|
|
4
4
|
size: void 0,
|
|
5
5
|
className: void 0,
|
|
6
6
|
style: void 0,
|
|
7
7
|
attr: void 0
|
|
8
|
-
},
|
|
8
|
+
}, v = i.createContext && /* @__PURE__ */ i.createContext(m), g = ["attr", "size", "title"];
|
|
9
9
|
function b(t, e) {
|
|
10
10
|
if (t == null) return {};
|
|
11
11
|
var r = O(t, e), c, n;
|
|
@@ -36,7 +36,7 @@ function u() {
|
|
|
36
36
|
return t;
|
|
37
37
|
}, u.apply(this, arguments);
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function f(t, e) {
|
|
40
40
|
var r = Object.keys(t);
|
|
41
41
|
if (Object.getOwnPropertySymbols) {
|
|
42
42
|
var c = Object.getOwnPropertySymbols(t);
|
|
@@ -49,9 +49,9 @@ function v(t, e) {
|
|
|
49
49
|
function s(t) {
|
|
50
50
|
for (var e = 1; e < arguments.length; e++) {
|
|
51
51
|
var r = arguments[e] != null ? arguments[e] : {};
|
|
52
|
-
e % 2 ?
|
|
52
|
+
e % 2 ? f(Object(r), !0).forEach(function(c) {
|
|
53
53
|
y(t, c, r[c]);
|
|
54
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) :
|
|
54
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : f(Object(r)).forEach(function(c) {
|
|
55
55
|
Object.defineProperty(t, c, Object.getOwnPropertyDescriptor(r, c));
|
|
56
56
|
});
|
|
57
57
|
}
|
|
@@ -75,12 +75,12 @@ function P(t, e) {
|
|
|
75
75
|
return (e === "string" ? String : Number)(t);
|
|
76
76
|
}
|
|
77
77
|
function d(t) {
|
|
78
|
-
return t && t.map((e, r) => /* @__PURE__ */
|
|
78
|
+
return t && t.map((e, r) => /* @__PURE__ */ i.createElement(e.tag, s({
|
|
79
79
|
key: r
|
|
80
80
|
}, e.attr), d(e.child)));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
return (e) => /* @__PURE__ */
|
|
82
|
+
function a(t) {
|
|
83
|
+
return (e) => /* @__PURE__ */ i.createElement(j, u({
|
|
84
84
|
attr: s({}, t.attr)
|
|
85
85
|
}, e), d(t.child));
|
|
86
86
|
}
|
|
@@ -91,7 +91,7 @@ function j(t) {
|
|
|
91
91
|
size: n,
|
|
92
92
|
title: l
|
|
93
93
|
} = t, p = b(t, g), h = n || r.size || "1em", o;
|
|
94
|
-
return r.className && (o = r.className), t.className && (o = (o ? o + " " : "") + t.className), /* @__PURE__ */
|
|
94
|
+
return r.className && (o = r.className), t.className && (o = (o ? o + " " : "") + t.className), /* @__PURE__ */ i.createElement("svg", u({
|
|
95
95
|
stroke: "currentColor",
|
|
96
96
|
fill: "currentColor",
|
|
97
97
|
strokeWidth: "0"
|
|
@@ -103,32 +103,32 @@ function j(t) {
|
|
|
103
103
|
height: h,
|
|
104
104
|
width: h,
|
|
105
105
|
xmlns: "http://www.w3.org/2000/svg"
|
|
106
|
-
}), l && /* @__PURE__ */
|
|
106
|
+
}), l && /* @__PURE__ */ i.createElement("title", null, l), t.children);
|
|
107
107
|
};
|
|
108
|
-
return
|
|
108
|
+
return v !== void 0 ? /* @__PURE__ */ i.createElement(v.Consumer, null, (r) => e(r)) : e(m);
|
|
109
109
|
}
|
|
110
110
|
function x(t) {
|
|
111
|
-
return
|
|
111
|
+
return a({ attr: { viewBox: "0 0 320 512" }, child: [{ tag: "path", attr: { d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" }, child: [] }] })(t);
|
|
112
112
|
}
|
|
113
113
|
function L(t) {
|
|
114
|
-
return
|
|
114
|
+
return a({ attr: { viewBox: "0 0 192 512" }, child: [{ tag: "path", attr: { d: "M96 184c39.8 0 72 32.2 72 72s-32.2 72-72 72-72-32.2-72-72 32.2-72 72-72zM24 80c0 39.8 32.2 72 72 72s72-32.2 72-72S135.8 8 96 8 24 40.2 24 80zm0 352c0 39.8 32.2 72 72 72s72-32.2 72-72-32.2-72-72-72-72 32.2-72 72z" }, child: [] }] })(t);
|
|
115
115
|
}
|
|
116
116
|
function C(t) {
|
|
117
|
-
return
|
|
117
|
+
return a({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M0 168v-16c0-13.255 10.745-24 24-24h360V80c0-21.367 25.899-32.042 40.971-16.971l80 80c9.372 9.373 9.372 24.569 0 33.941l-80 80C409.956 271.982 384 261.456 384 240v-48H24c-13.255 0-24-10.745-24-24zm488 152H128v-48c0-21.314-25.862-32.08-40.971-16.971l-80 80c-9.372 9.373-9.372 24.569 0 33.941l80 80C102.057 463.997 128 453.437 128 432v-48h360c13.255 0 24-10.745 24-24v-16c0-13.255-10.745-24-24-24z" }, child: [] }] })(t);
|
|
118
118
|
}
|
|
119
119
|
function E(t) {
|
|
120
|
-
return
|
|
120
|
+
return a({ attr: { viewBox: "0 0 576 512" }, child: [{ tag: "path", attr: { d: "M480 192H365.71L260.61 8.06A16.014 16.014 0 0 0 246.71 0h-65.5c-10.63 0-18.3 10.17-15.38 20.39L214.86 192H112l-43.2-57.6c-3.02-4.03-7.77-6.4-12.8-6.4H16.01C5.6 128-2.04 137.78.49 147.88L32 256 .49 364.12C-2.04 374.22 5.6 384 16.01 384H56c5.04 0 9.78-2.37 12.8-6.4L112 320h102.86l-49.03 171.6c-2.92 10.22 4.75 20.4 15.38 20.4h65.5c5.74 0 11.04-3.08 13.89-8.06L365.71 320H480c35.35 0 96-28.65 96-64s-60.65-64-96-64z" }, child: [] }] })(t);
|
|
121
121
|
}
|
|
122
122
|
function _(t) {
|
|
123
|
-
return
|
|
123
|
+
return a({ attr: { viewBox: "0 0 352 512" }, child: [{ tag: "path", attr: { d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }, child: [] }] })(t);
|
|
124
124
|
}
|
|
125
125
|
function H(t) {
|
|
126
|
-
return
|
|
126
|
+
return a({ attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z" }, child: [] }] })(t);
|
|
127
127
|
}
|
|
128
128
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
E as F,
|
|
130
|
+
a as G,
|
|
131
|
+
C as a,
|
|
132
132
|
_ as b,
|
|
133
133
|
H as c,
|
|
134
134
|
L as d,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export { FlightBooking } from './Bookings/FlightBooking/FlightBooking';
|
|
2
|
+
export { HotelBooking } from './Bookings/HotelBooking/HotelBooking';
|
|
1
3
|
export { CashValue } from './CashValue/CashValue';
|
|
4
|
+
export * from './CashValue/CashValueTypes';
|
|
2
5
|
export { EToolTipPosition } from './CashValue/CashValueTypes';
|
|
6
|
+
export { ClientPointsValue } from './ClientPointsValue/ClientPointsValue';
|
|
3
7
|
export { Card } from './Wallet/Card/Card';
|
|
4
|
-
export * from './CashValue/CashValueTypes';
|
|
5
|
-
export { FlightBooking } from './Bookings/FlightBooking/FlightBooking';
|
|
6
|
-
export { HotelBooking } from './Bookings/HotelBooking/HotelBooking';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CamelCase } from '@type-op/shared';
|
|
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"];
|
|
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", "AMOUNTS_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", "HEADER_NAVIGATION_FEATURE", "SHOW_FLIGHTS_TRANSFER_PARTNER_FEATURE", "HOTEL_POINTS_ONLY_FEATURE", "FREE_HOTEL_NIGHTS_FEATURE", "HOTEL_DISPLAY_BEST_VALUE_FEATURE", "HOTEL_DISPLAY_POINTS_BREAKDOWN_FEATURE", "USE_TAB_NAVIGATION", "TAB_NAVIGATION_FEATURE", "ADD_AIRLINE_HEALTH_PAGE_FEATURE", "SHOW_NAVIGATION_POPUP_FEATURE", "SHOW_ONLY_BOOKABLE_FEATURE"];
|
|
4
4
|
declare const ListFeatureFlag: readonly ["HOTEL_DETAILS_FEATURE", "WALLET_PROGRAM_TYPES_FEATURES", "HOTEL_FILTERS_FEATURES", "FLIGHT_FILTERS_FEATURES", "WALLET_FEATURES"];
|
|
5
5
|
export type FeatureFlags = StringFeatureFlags & BooleanFeatureFlags & ListFeatureFlags;
|
|
@@ -12,8 +12,13 @@ type BooleanFeatureFlags = {
|
|
|
12
12
|
type ListFeatureFlags = {
|
|
13
13
|
[K in (typeof ListFeatureFlag)[number] as CamelCase<K>]: string[];
|
|
14
14
|
};
|
|
15
|
-
declare
|
|
15
|
+
export declare enum EAmountsDisplayFeature {
|
|
16
|
+
CASH_ONLY = "Cash Only",
|
|
17
|
+
CASH_AND_TRAVEL_PARTNER_POINTS = "Cash And Travel Partner Points",
|
|
18
|
+
CASH_AND_CLIENT_POINTS = "Cash And Client Points"
|
|
19
|
+
}
|
|
20
|
+
export declare const useFeatureFlags: () => {
|
|
16
21
|
featureFlags: FeatureFlags;
|
|
17
22
|
loaded: boolean;
|
|
18
23
|
};
|
|
19
|
-
export
|
|
24
|
+
export {};
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare const getClientConfig: (config: InternalAxiosRequestConfig<any>)
|
|
|
17
17
|
timeout?: number;
|
|
18
18
|
timeoutErrorMessage?: string;
|
|
19
19
|
withCredentials?: boolean;
|
|
20
|
-
adapter?: (import('axios').AxiosAdapter | ("fetch" | "xhr" | "http"
|
|
20
|
+
adapter?: (import('axios').AxiosAdapter | ((string & {}) | "fetch" | "xhr" | "http")) | (import('axios').AxiosAdapter | ((string & {}) | "fetch" | "xhr" | "http"))[];
|
|
21
21
|
auth?: import('axios').AxiosBasicCredentials;
|
|
22
22
|
responseType?: import('axios').ResponseType;
|
|
23
23
|
responseEncoding?: import('axios').responseEncoding | string;
|
|
@@ -67,7 +67,7 @@ export declare const getGatewayConfig: (config: InternalAxiosRequestConfig<any>)
|
|
|
67
67
|
timeout?: number;
|
|
68
68
|
timeoutErrorMessage?: string;
|
|
69
69
|
withCredentials?: boolean;
|
|
70
|
-
adapter?: (import('axios').AxiosAdapter | ("fetch" | "xhr" | "http"
|
|
70
|
+
adapter?: (import('axios').AxiosAdapter | ((string & {}) | "fetch" | "xhr" | "http")) | (import('axios').AxiosAdapter | ((string & {}) | "fetch" | "xhr" | "http"))[];
|
|
71
71
|
auth?: import('axios').AxiosBasicCredentials;
|
|
72
72
|
responseType?: import('axios').ResponseType;
|
|
73
73
|
responseEncoding?: import('axios').responseEncoding | string;
|
package/dist/main.js
CHANGED
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { FlightBooking as r } from "./components/Bookings/FlightBooking/FlightBooking.js";
|
|
2
|
+
import { HotelBooking as a } from "./components/Bookings/HotelBooking/HotelBooking.js";
|
|
3
|
+
import { CashValue as p } from "./components/CashValue/CashValue.js";
|
|
4
|
+
import { EInvalidAmountDisplayOption as m, EToolTipPosition as s } from "./components/CashValue/CashValueTypes.js";
|
|
5
|
+
import { ClientPointsValue as x } from "./components/ClientPointsValue/ClientPointsValue.js";
|
|
6
|
+
import { Card as u } from "./components/Wallet/Card/Card.js";
|
|
6
7
|
import { awayzClient as c } from "./configs/awayzClient.js";
|
|
7
|
-
import { defaultAwayzConfig as
|
|
8
|
-
import { useAwayzContext as
|
|
8
|
+
import { defaultAwayzConfig as w } from "./configs/defaultAwayzConfig.js";
|
|
9
|
+
import { useAwayzContext as A } from "./hooks/useAwayzContext.js";
|
|
9
10
|
import { useBookingManagement as d } from "./hooks/useBookingManagement/useBookingManagement.js";
|
|
10
|
-
import { useSearchLimit as
|
|
11
|
-
import { ETripStatus as
|
|
12
|
-
import { useWallet as
|
|
13
|
-
import { AwayzProvider as
|
|
14
|
-
import { CurrencyService as
|
|
15
|
-
import { c as
|
|
16
|
-
import { RewardsService as
|
|
17
|
-
import { EBookingType as
|
|
18
|
-
import { EAuthFlow as
|
|
19
|
-
import {
|
|
11
|
+
import { useSearchLimit as F } from "./hooks/useSearchLimit.js";
|
|
12
|
+
import { ETripStatus as h, useTripManagement as k } from "./hooks/useTripManagement/useTripManagement.js";
|
|
13
|
+
import { useWallet as z } from "./hooks/useWallet/useWallet.js";
|
|
14
|
+
import { AwayzProvider as S } from "./providers/AwayzProvider.js";
|
|
15
|
+
import { CurrencyService as D } from "./services/currency/CurrencyService.js";
|
|
16
|
+
import { c as R, a as V, g as H, i as L } from "./noRetryInstance-CNXX0Siw.js";
|
|
17
|
+
import { RewardsService as O } from "./services/rewards/RewardsService.js";
|
|
18
|
+
import { EBookingType as W } from "./services/trips/TripService.types.js";
|
|
19
|
+
import { EAuthFlow as j } from "./types/EAuthFlow.js";
|
|
20
|
+
import { EAmountsDisplayFeature as G, useFeatureFlags as J } from "./hooks/useFeatureFlags.js";
|
|
21
|
+
import { getBaseUrl as Q } from "./configs/baseUrl.js";
|
|
20
22
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
S as AwayzProvider,
|
|
24
|
+
u as Card,
|
|
25
|
+
p as CashValue,
|
|
26
|
+
x as ClientPointsValue,
|
|
27
|
+
D as CurrencyService,
|
|
28
|
+
G as EAmountsDisplayFeature,
|
|
29
|
+
j as EAuthFlow,
|
|
30
|
+
W as EBookingType,
|
|
31
|
+
m as EInvalidAmountDisplayOption,
|
|
32
|
+
s as EToolTipPosition,
|
|
33
|
+
h as ETripStatus,
|
|
34
|
+
r as FlightBooking,
|
|
35
|
+
a as HotelBooking,
|
|
36
|
+
O as RewardsService,
|
|
33
37
|
c as awayzClient,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
R as clientInstance,
|
|
39
|
+
V as clientNoRetryInstance,
|
|
40
|
+
w as defaultAwayzConfig,
|
|
41
|
+
H as gatewayInstance,
|
|
42
|
+
Q as getBaseUrl,
|
|
43
|
+
L as instance,
|
|
44
|
+
A as useAwayzContext,
|
|
41
45
|
d as useBookingManagement,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
46
|
+
J as useFeatureFlags,
|
|
47
|
+
F as useSearchLimit,
|
|
48
|
+
k as useTripManagement,
|
|
49
|
+
z as useWallet
|
|
45
50
|
};
|