@odynn/awayz-core 0.10.34 → 0.10.36
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/{TripsService-DtjkgWX5.js → TripsService-C_TStOtx.js} +1 -1
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/ClientPointsValue/ClientPointsValue.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +1 -1
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +95 -82
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -2
- package/dist/hooks/useWallet/useWallet.js +1 -1
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/services/bookings/BookingService.types.d.ts +16 -0
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-BbgLI6--.js → noRetryInstance-wA6BVsyM.js} +411 -409
- package/dist/providers/AwayzProvider.js +1 -1
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +68 -60
- package/dist/services/currency/CurrencyService.js +1 -1
- 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 +1 -1
- 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/dist/utils/clientPoints.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var f = (s, e, a) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var n = (s, e, a) => f(s, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
6
|
-
import { c as i, f as u, b as d, r as D } from "./noRetryInstance-
|
|
6
|
+
import { c as i, f as u, b as d, r as D } from "./noRetryInstance-wA6BVsyM.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { DEFAULT_LOGO as S } from "./configs/defaultAwayzConfig.js";
|
|
9
9
|
import { EMyTripsEndpoints as o } from "./configs/endpoints.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as r, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { useQuery as _ } from "@tanstack/react-query";
|
|
3
3
|
import { g as u, a as S, b as f } from "../../cashUtils-DyxlHnod.js";
|
|
4
4
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { E as T } from "../../noRetryInstance-
|
|
5
|
+
import { E as T } from "../../noRetryInstance-wA6BVsyM.js";
|
|
6
6
|
import { useMemo as I } from "react";
|
|
7
7
|
import { a as v } from "../../index-C8p5kinH.js";
|
|
8
8
|
import "react-i18next";
|
|
@@ -9,7 +9,7 @@ import { CashValue as n } from "./CashValue.js";
|
|
|
9
9
|
import { EToolTipPosition as t, EInvalidAmountDisplayOption as o } from "./CashValueTypes.js";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "../../context/AwayzContext.js";
|
|
12
|
-
import "../../noRetryInstance-
|
|
12
|
+
import "../../noRetryInstance-wA6BVsyM.js";
|
|
13
13
|
import "../../configs/awayzClient.js";
|
|
14
14
|
import { EAuthFlow as a } from "../../types/EAuthFlow.js";
|
|
15
15
|
/* empty css */
|
|
@@ -2,7 +2,7 @@ import { jsxs as u } from "react/jsx-runtime";
|
|
|
2
2
|
import { useQuery as c } from "@tanstack/react-query";
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
4
|
import { c as p } from "../../numberUtils-B4wd-SGR.js";
|
|
5
|
-
import { E as f } from "../../noRetryInstance-
|
|
5
|
+
import { E as f } from "../../noRetryInstance-wA6BVsyM.js";
|
|
6
6
|
import { useMemo as C } from "react";
|
|
7
7
|
import { useAwayzContext as l } from "../../hooks/useAwayzContext.js";
|
|
8
8
|
import "react-i18next";
|
|
@@ -8,7 +8,7 @@ import '../../../assets/_styles6.css';import '../../../assets/_styles5.css';impo
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../configs/awayzClient.js";
|
|
10
10
|
import { EAuthFlow as a } from "../../../types/EAuthFlow.js";
|
|
11
|
-
import "../../../noRetryInstance-
|
|
11
|
+
import "../../../noRetryInstance-wA6BVsyM.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
import "../../../index-Cv-wvFlM.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as G } from "../../cashUtils-DyxlHnod.js";
|
|
2
2
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { e as
|
|
3
|
+
import { e as V, A as d, E as _ } from "../../noRetryInstance-wA6BVsyM.js";
|
|
4
4
|
import { a } from "../../keys-C7jV6nZg.js";
|
|
5
|
-
import { useState as
|
|
6
|
-
import { awayzClient as
|
|
7
|
-
import { PreferencesService as
|
|
5
|
+
import { useState as E, useCallback as F, useEffect as R } from "react";
|
|
6
|
+
import { awayzClient as K } from "../../configs/awayzClient.js";
|
|
7
|
+
import { PreferencesService as Q } from "../../services/preferences/PreferencesService.js";
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "react/jsx-runtime";
|
|
10
10
|
import "react-i18next";
|
|
@@ -16,63 +16,63 @@ import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '..
|
|
|
16
16
|
import "../../index-Cv-wvFlM.js";
|
|
17
17
|
import "../../context/AwayzContext.js";
|
|
18
18
|
/* empty css */
|
|
19
|
-
import { EAuthFlow as
|
|
20
|
-
const
|
|
21
|
-
var
|
|
22
|
-
let i = "",
|
|
23
|
-
typeof o == "string" ? i = o : o instanceof
|
|
19
|
+
import { EAuthFlow as O } from "../../types/EAuthFlow.js";
|
|
20
|
+
const b = (t, o) => {
|
|
21
|
+
var g, k;
|
|
22
|
+
let i = "", w = o;
|
|
23
|
+
typeof o == "string" ? i = o : o instanceof V ? (i = o.message, w = {
|
|
24
24
|
message: o.message,
|
|
25
25
|
cause: o.cause,
|
|
26
26
|
status: o.status,
|
|
27
|
-
data: (
|
|
28
|
-
}) : i = o.message, (
|
|
27
|
+
data: (g = o == null ? void 0 : o.response) == null ? void 0 : g.data
|
|
28
|
+
}) : i = o.message, (k = window.parent) == null || k.postMessage(
|
|
29
29
|
{
|
|
30
30
|
type: "auth_error",
|
|
31
|
-
details: { message: i, action: t, info:
|
|
31
|
+
details: { message: i, action: t, info: w }
|
|
32
32
|
},
|
|
33
33
|
"*"
|
|
34
34
|
);
|
|
35
|
-
},
|
|
36
|
-
const [o, i] =
|
|
35
|
+
}, ye = (t) => {
|
|
36
|
+
const [o, i] = E(!0), [w, g] = E(!1), [k, I] = E(), [u, h] = E(), [P, A] = E(!1), [l, N] = E(), [p, H] = E([]), [U, M] = E([]), S = F(
|
|
37
37
|
async (s) => {
|
|
38
|
-
s.token && localStorage.setItem(a.TOKEN, s.token), s.refreshToken && localStorage.setItem(a.REFRESH_TOKEN, s.refreshToken), t != null && t.onSuccess && (t == null || t.onSuccess(s)), t != null && t.onSuccessAsync && await (t == null ? void 0 : t.onSuccessAsync(s)), i(!1), A(!1),
|
|
38
|
+
s.token && localStorage.setItem(a.TOKEN, s.token), s.refreshToken && localStorage.setItem(a.REFRESH_TOKEN, s.refreshToken), t != null && t.onSuccess && (t == null || t.onSuccess(s)), t != null && t.onSuccessAsync && await (t == null ? void 0 : t.onSuccessAsync(s)), i(!1), A(!1), g(!0), I(s.token), h(s.user), K.invalidateQueries();
|
|
39
39
|
},
|
|
40
40
|
[t]
|
|
41
|
-
),
|
|
41
|
+
), m = F(
|
|
42
42
|
async (s, e) => {
|
|
43
|
-
if (t.authFlow ===
|
|
44
|
-
|
|
43
|
+
if (t.authFlow === O.POST_MESSAGE) {
|
|
44
|
+
b(e ?? "exchange_token", s), i(!1);
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
t != null && t.onError && (t == null || t.onError(s)), t != null && t.onErrorAsync && await (t == null ? void 0 : t.onErrorAsync(s)), i(!1);
|
|
48
48
|
},
|
|
49
49
|
[t]
|
|
50
|
-
),
|
|
50
|
+
), v = async (s, e, r) => {
|
|
51
51
|
try {
|
|
52
|
-
const { success: n, data: c, message:
|
|
52
|
+
const { success: n, data: c, message: f } = await d.authenticateWithToken(
|
|
53
53
|
s,
|
|
54
54
|
e,
|
|
55
55
|
r
|
|
56
56
|
);
|
|
57
57
|
if (!n) {
|
|
58
|
-
|
|
58
|
+
m(f);
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
if (!(c != null && c.token)) {
|
|
62
|
-
|
|
62
|
+
m("no awayz token returned after exchanging id token");
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
localStorage.setItem(a.TOKEN, c.token), await
|
|
66
|
-
const { data:
|
|
65
|
+
localStorage.setItem(a.TOKEN, c.token), await S(c);
|
|
66
|
+
const { data: y, ...T } = await d.getRequestLimit();
|
|
67
67
|
if (!T.success) {
|
|
68
68
|
console.error({ reqLimitError: T });
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
(
|
|
71
|
+
y == null || y.forEach(
|
|
72
|
+
(C) => window.parent.postMessage(
|
|
73
73
|
{
|
|
74
74
|
type: "request_limit",
|
|
75
|
-
limit:
|
|
75
|
+
limit: C
|
|
76
76
|
},
|
|
77
77
|
"*"
|
|
78
78
|
)
|
|
@@ -82,60 +82,60 @@ const Q = (t, o) => {
|
|
|
82
82
|
} finally {
|
|
83
83
|
i(!1);
|
|
84
84
|
}
|
|
85
|
-
},
|
|
85
|
+
}, q = async () => {
|
|
86
86
|
try {
|
|
87
|
-
const { success: s, data: e } = await
|
|
88
|
-
queryKey: [
|
|
89
|
-
queryFn:
|
|
87
|
+
const { success: s, data: e } = await K.ensureQueryData({
|
|
88
|
+
queryKey: [_.CHECK_USER],
|
|
89
|
+
queryFn: d.checkUser
|
|
90
90
|
});
|
|
91
91
|
if (!s) {
|
|
92
|
-
|
|
92
|
+
m(e);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
-
await
|
|
95
|
+
await S({
|
|
96
96
|
user: e,
|
|
97
97
|
token: localStorage.getItem(a.TOKEN)
|
|
98
98
|
});
|
|
99
99
|
} catch (s) {
|
|
100
|
-
|
|
100
|
+
m(s);
|
|
101
101
|
} finally {
|
|
102
102
|
i(!1);
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
|
-
|
|
106
|
-
if (t.authFlow !==
|
|
107
|
-
localStorage.getItem(a.TOKEN) ?
|
|
105
|
+
R(() => {
|
|
106
|
+
if (t.authFlow !== O.STANDARD) return;
|
|
107
|
+
localStorage.getItem(a.TOKEN) ? q() : i(!1);
|
|
108
108
|
}, []);
|
|
109
|
-
const
|
|
110
|
-
const s = await
|
|
111
|
-
|
|
109
|
+
const x = async () => {
|
|
110
|
+
const s = await d.getRegions();
|
|
111
|
+
H(s);
|
|
112
112
|
const e = s.map((c) => c.currency), n = Array.from(new Set(e)).map((c) => ({
|
|
113
113
|
code: c,
|
|
114
|
-
symbol:
|
|
114
|
+
symbol: G(c) || c
|
|
115
115
|
}));
|
|
116
|
-
|
|
116
|
+
M(n);
|
|
117
117
|
};
|
|
118
|
-
return
|
|
119
|
-
|
|
120
|
-
}, []),
|
|
121
|
-
if (t.authFlow !==
|
|
118
|
+
return R(() => {
|
|
119
|
+
x();
|
|
120
|
+
}, []), R(() => {
|
|
121
|
+
if (t.authFlow !== O.QUERY) return;
|
|
122
122
|
const s = new URLSearchParams(window.location.search), e = s.get(a.TOKEN), r = s.get(a.REFRESH_TOKEN), n = (t.isTestMode ? s.get(a.OVERRIDE_TOKEN_EXCHANGE_ENDPOINT) : void 0) || void 0;
|
|
123
|
-
e &&
|
|
124
|
-
}, []),
|
|
125
|
-
if (t.authFlow !==
|
|
123
|
+
e && v(e, r ?? "", n);
|
|
124
|
+
}, []), R(() => {
|
|
125
|
+
if (t.authFlow !== O.POST_MESSAGE) return;
|
|
126
126
|
const s = async (e) => {
|
|
127
|
-
var
|
|
127
|
+
var T;
|
|
128
128
|
if (e.data.type !== "auth") return;
|
|
129
|
-
const r = (
|
|
130
|
-
if (localStorage.setItem(a.OVERRIDE_PAC_ENDPOINT,
|
|
131
|
-
const
|
|
129
|
+
const r = (T = e.data) == null ? void 0 : T.idToken, n = e.data.refreshToken, c = t.isTestMode ? e.data.overrideTokenExchangeEndpoint : void 0, f = t.isTestMode ? e.data.overridePACEndpoint : void 0, y = typeof f == "string" && f.trim() ? f.trim() : void 0;
|
|
130
|
+
if (y ? localStorage.setItem(a.OVERRIDE_PAC_ENDPOINT, y) : localStorage.removeItem(a.OVERRIDE_PAC_ENDPOINT), !r) {
|
|
131
|
+
const C = `received message ${JSON.stringify(
|
|
132
132
|
e.data
|
|
133
133
|
)}
|
|
134
134
|
no idToken in body`;
|
|
135
|
-
|
|
135
|
+
m(C);
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
|
-
localStorage.setItem(a.REFRESH_TOKEN, n), await
|
|
138
|
+
localStorage.setItem(a.REFRESH_TOKEN, n), await v(r, n, c);
|
|
139
139
|
};
|
|
140
140
|
return window.addEventListener("message", s), window.parent && window.parent.postMessage(
|
|
141
141
|
{
|
|
@@ -148,51 +148,51 @@ const Q = (t, o) => {
|
|
|
148
148
|
};
|
|
149
149
|
}, []), {
|
|
150
150
|
isAuthenticating: o,
|
|
151
|
-
isAuthenticated:
|
|
152
|
-
isMfaPending:
|
|
153
|
-
token:
|
|
151
|
+
isAuthenticated: w,
|
|
152
|
+
isMfaPending: P,
|
|
153
|
+
token: k,
|
|
154
154
|
user: u,
|
|
155
|
-
supportedRegions:
|
|
156
|
-
supportedCurrencies:
|
|
155
|
+
supportedRegions: p,
|
|
156
|
+
supportedCurrencies: U,
|
|
157
157
|
signIn: async (s) => {
|
|
158
158
|
i(!0);
|
|
159
|
-
const e = await
|
|
160
|
-
return e.success ? (localStorage.removeItem(a.TOKEN), localStorage.removeItem(a.REFRESH_TOKEN),
|
|
159
|
+
const e = await d.login(s);
|
|
160
|
+
return e.success ? (localStorage.removeItem(a.TOKEN), localStorage.removeItem(a.REFRESH_TOKEN), I(void 0), g(!1), N(e.data), h(e.data.user), A(!0), i(!1), { success: !0, message: "OTP sent to email" }) : (i(!1), m(e.message), { success: !1, message: e.message });
|
|
161
161
|
},
|
|
162
162
|
signUp: async (s) => {
|
|
163
163
|
var r;
|
|
164
|
-
const e = await
|
|
164
|
+
const e = await d.signUp(s);
|
|
165
165
|
if (!e.success)
|
|
166
|
-
|
|
166
|
+
m(e.message);
|
|
167
167
|
else {
|
|
168
168
|
const n = (r = e.data) == null ? void 0 : r.refreshToken;
|
|
169
|
-
localStorage.setItem(a.REFRESH_TOKEN, n), await
|
|
169
|
+
localStorage.setItem(a.REFRESH_TOKEN, n), await S(e.data);
|
|
170
170
|
}
|
|
171
171
|
return e;
|
|
172
172
|
},
|
|
173
173
|
signOut: () => {
|
|
174
|
-
localStorage.removeItem(a.TOKEN), localStorage.removeItem(a.REFRESH_TOKEN),
|
|
174
|
+
localStorage.removeItem(a.TOKEN), localStorage.removeItem(a.REFRESH_TOKEN), g(!1), A(!1), N(void 0), I(void 0), h(void 0);
|
|
175
175
|
},
|
|
176
176
|
continueWithGoogle: async (s, e) => {
|
|
177
177
|
var n;
|
|
178
|
-
const r = await
|
|
178
|
+
const r = await d.getOrCreateGoogleUser(
|
|
179
179
|
s,
|
|
180
180
|
e
|
|
181
181
|
);
|
|
182
182
|
if (!r.success)
|
|
183
|
-
|
|
183
|
+
m(r.message);
|
|
184
184
|
else {
|
|
185
185
|
const c = (n = r.data) == null ? void 0 : n.refreshToken;
|
|
186
|
-
localStorage.setItem(a.REFRESH_TOKEN, c), await
|
|
186
|
+
localStorage.setItem(a.REFRESH_TOKEN, c), await S(r.data);
|
|
187
187
|
}
|
|
188
188
|
return r;
|
|
189
189
|
},
|
|
190
|
-
resendVerificationEmail: async (s) => (await
|
|
190
|
+
resendVerificationEmail: async (s) => (await d.resendVerificationEmail(s)).success,
|
|
191
191
|
setTokens: (s, e) => {
|
|
192
|
-
localStorage.setItem(a.TOKEN, s), localStorage.setItem(a.REFRESH_TOKEN, e),
|
|
192
|
+
localStorage.setItem(a.TOKEN, s), localStorage.setItem(a.REFRESH_TOKEN, e), v(s, e);
|
|
193
193
|
},
|
|
194
194
|
setPreferredCurrency: async (s) => {
|
|
195
|
-
const e = await
|
|
195
|
+
const e = await Q.setCurrency(s);
|
|
196
196
|
if (!e.success || !e.data)
|
|
197
197
|
return console.error("Failed to set preferred currency:", e), !1;
|
|
198
198
|
if (u) {
|
|
@@ -203,26 +203,39 @@ const Q = (t, o) => {
|
|
|
203
203
|
currency: e.data.currency || u.preferences.currency
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
|
-
|
|
207
|
-
queryKey: [
|
|
206
|
+
h(r), K.invalidateQueries({
|
|
207
|
+
queryKey: [_.CHECK_USER]
|
|
208
208
|
});
|
|
209
209
|
}
|
|
210
210
|
return !0;
|
|
211
211
|
},
|
|
212
212
|
verify2FA: async (s) => {
|
|
213
|
+
var r, n, c;
|
|
213
214
|
if (!(u != null && u.emailAddress)) {
|
|
214
|
-
const
|
|
215
|
-
return
|
|
215
|
+
const f = "No email address associated with user for 2FA verification";
|
|
216
|
+
return m(f), {
|
|
216
217
|
success: !1,
|
|
217
|
-
message:
|
|
218
|
+
message: f
|
|
218
219
|
};
|
|
219
220
|
}
|
|
220
|
-
const e = await
|
|
221
|
-
|
|
221
|
+
const e = await d.validate2FA(u == null ? void 0 : u.emailAddress, s);
|
|
222
|
+
if (!e.success)
|
|
223
|
+
m(e.message);
|
|
224
|
+
else {
|
|
225
|
+
const f = {
|
|
226
|
+
...l,
|
|
227
|
+
...e.data,
|
|
228
|
+
token: ((r = e.data) == null ? void 0 : r.token) || (l == null ? void 0 : l.token),
|
|
229
|
+
refreshToken: ((n = e.data) == null ? void 0 : n.refreshToken) || (l == null ? void 0 : l.refreshToken),
|
|
230
|
+
user: ((c = e.data) == null ? void 0 : c.user) || (l == null ? void 0 : l.user) || u
|
|
231
|
+
};
|
|
232
|
+
N(void 0), await S(f);
|
|
233
|
+
}
|
|
234
|
+
return e;
|
|
222
235
|
}
|
|
223
236
|
};
|
|
224
237
|
};
|
|
225
238
|
export {
|
|
226
|
-
|
|
227
|
-
|
|
239
|
+
b as authFailurePostMessage,
|
|
240
|
+
ye as useAwayzAuth
|
|
228
241
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery as S, useMutation as E } from "@tanstack/react-query";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { E as a } from "../../noRetryInstance-
|
|
4
|
+
import { E as a } from "../../noRetryInstance-wA6BVsyM.js";
|
|
5
5
|
import { useState as j } from "react";
|
|
6
6
|
import "react-i18next";
|
|
7
7
|
import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '../../assets/_styles5.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';/* empty css */
|
|
@@ -3,7 +3,7 @@ import "react/jsx-runtime";
|
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "../../configs/awayzClient.js";
|
|
6
|
-
import { c } from "../../noRetryInstance-
|
|
6
|
+
import { c } from "../../noRetryInstance-wA6BVsyM.js";
|
|
7
7
|
import "react-i18next";
|
|
8
8
|
import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '../../assets/_styles5.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';/* empty css */
|
|
9
9
|
/* empty css */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery as U } from "@tanstack/react-query";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { E as N, t as F } from "../noRetryInstance-
|
|
4
|
+
import { E as N, t as F } from "../noRetryInstance-wA6BVsyM.js";
|
|
5
5
|
import { useMemo as r } from "react";
|
|
6
6
|
import { FeatureService as e } from "../services/features/featureService.js";
|
|
7
7
|
const L = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery as u } from "@tanstack/react-query";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { E as m, A as c, b as f } from "../noRetryInstance-
|
|
4
|
+
import { E as m, A as c, b as f } from "../noRetryInstance-wA6BVsyM.js";
|
|
5
5
|
import { useEffect as d } from "react";
|
|
6
6
|
import { useAwayzContext as y } from "./useAwayzContext.js";
|
|
7
7
|
var s = /* @__PURE__ */ ((r) => (r.HOTEL = "Hotel", r.FLIGHT = "Flight", r))(s || {});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery as u, useMutation as p } from "@tanstack/react-query";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import { h as m } from "../../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { E as e } from "../../noRetryInstance-
|
|
4
|
+
import { E as e } from "../../noRetryInstance-wA6BVsyM.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-i18next";
|
|
7
7
|
import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '../../assets/_styles5.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';/* empty css */
|
|
@@ -13,7 +13,7 @@ import { awayzClient as o } from "../../configs/awayzClient.js";
|
|
|
13
13
|
import "../../index-Cv-wvFlM.js";
|
|
14
14
|
import "../../context/AwayzContext.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
import { T as n } from "../../TripsService-
|
|
16
|
+
import { T as n } from "../../TripsService-C_TStOtx.js";
|
|
17
17
|
const b = ({
|
|
18
18
|
tripId: t,
|
|
19
19
|
tripDetails: s
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import { h as p } from "../../arrayExtensions-DlcBOj5a.js";
|
|
3
|
-
import { D as f } from "../../TripsService-
|
|
3
|
+
import { D as f } from "../../TripsService-C_TStOtx.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { renderHook as o, waitFor as i } from "../../tests/TestWrapper.js";
|
|
6
6
|
import { EMyTripsEndpoints as c } from "../../configs/endpoints.js";
|
|
@@ -10,7 +10,7 @@ import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '..
|
|
|
10
10
|
/* empty css */
|
|
11
11
|
import "@tanstack/react-query";
|
|
12
12
|
import "../../configs/awayzClient.js";
|
|
13
|
-
import { c as d } from "../../noRetryInstance-
|
|
13
|
+
import { c as d } from "../../noRetryInstance-wA6BVsyM.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
/* empty css */
|
|
16
16
|
import "../../index-Cv-wvFlM.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQuery as s, useMutation as i } from "@tanstack/react-query";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "../../arrayExtensions-DlcBOj5a.js";
|
|
4
|
-
import { E as a, d as l } from "../../noRetryInstance-
|
|
4
|
+
import { E as a, d as l } from "../../noRetryInstance-wA6BVsyM.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "react-i18next";
|
|
7
7
|
import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '../../assets/_styles5.css';import '../../assets/_styles2.css';import '../../assets/_styles.css';import '../../assets/_styles3.css';/* empty css */
|
|
@@ -8,7 +8,7 @@ import '../../assets/_styles4.css';import '../../assets/_styles6.css';import '..
|
|
|
8
8
|
/* empty css */
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
10
|
import "../../configs/awayzClient.js";
|
|
11
|
-
import { c as l } from "../../noRetryInstance-
|
|
11
|
+
import { c as l } from "../../noRetryInstance-wA6BVsyM.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
/* empty css */
|
|
14
14
|
import "../../index-Cv-wvFlM.js";
|
|
@@ -45,6 +45,22 @@ export interface IHotelBookingDetails {
|
|
|
45
45
|
name: string;
|
|
46
46
|
}[];
|
|
47
47
|
createdAt: string;
|
|
48
|
+
conditions: ICondition[];
|
|
49
|
+
loyaltyProgram: {
|
|
50
|
+
supportedLoyaltyProgramme: string;
|
|
51
|
+
loyaltyProgrammeAccountNumber: string;
|
|
52
|
+
};
|
|
53
|
+
amenities: IAmenities[];
|
|
54
|
+
phoneNumber: string;
|
|
55
|
+
email: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ICondition {
|
|
58
|
+
title: string;
|
|
59
|
+
description: string;
|
|
60
|
+
}
|
|
61
|
+
export interface IAmenities {
|
|
62
|
+
description: string;
|
|
63
|
+
type: string;
|
|
48
64
|
}
|
|
49
65
|
export interface IBed {
|
|
50
66
|
type: string;
|
package/dist/main.js
CHANGED
|
@@ -13,7 +13,7 @@ import { ETripStatus as d, useTripManagement as v } from "./hooks/useTripManagem
|
|
|
13
13
|
import { useWallet as k } from "./hooks/useWallet/useWallet.js";
|
|
14
14
|
import { ECancelStatus as z } from "./hooks/useBookingManagement/useBookingManagement.types.js";
|
|
15
15
|
import { AwayzProvider as M } from "./providers/AwayzProvider.js";
|
|
16
|
-
import { A as R, c as V, a as H, g as L, i as N } from "./noRetryInstance-
|
|
16
|
+
import { A as R, c as V, a as H, g as L, i as N } from "./noRetryInstance-wA6BVsyM.js";
|
|
17
17
|
import { ESource as U } from "./services/account/AccountServices.types.js";
|
|
18
18
|
import { CurrencyService as b } from "./services/currency/CurrencyService.js";
|
|
19
19
|
import { RewardsService as q } from "./services/rewards/RewardsService.js";
|