@odynn/awayz-core 0.9.20 → 0.9.21

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.
Files changed (38) hide show
  1. package/dist/TripsService-GImsS17_.js +148 -0
  2. package/dist/assets/_styles6.css +1 -1
  3. package/dist/components/Bookings/FlightBooking/FlightBooking.js +123 -85
  4. package/dist/components/CashValue/CashValue.js +1 -1
  5. package/dist/components/CashValue/CashValue.stories.js +1 -1
  6. package/dist/components/ClientPointsValue/ClientPointsValue.js +1 -1
  7. package/dist/components/Wallet/Card/Card.stories.js +1 -1
  8. package/dist/hooks/useAwayzAuth/useAwayzAuth.js +1 -1
  9. package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
  10. package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
  11. package/dist/hooks/useFeatureFlags.js +1 -1
  12. package/dist/hooks/useSearchLimit.js +1 -1
  13. package/dist/hooks/useTripManagement/mocks/index.js +12 -12
  14. package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
  15. package/dist/hooks/useTripManagement/useTripManagement.test.js +122 -92
  16. package/dist/hooks/useWallet/useWallet.js +1 -1
  17. package/dist/hooks/useWallet/useWallet.test.js +1 -1
  18. package/dist/lib/components/Bookings/FlightBooking/FlightBooking.d.ts +15 -3
  19. package/dist/lib/hooks/useTripManagement/mocks/UncategorisedBookings200.json.d.ts +88 -0
  20. package/dist/lib/services/trips/TripService.types.d.ts +11 -0
  21. package/dist/main.js +1 -1
  22. package/dist/{noRetryInstance-De2sH_IH.js → noRetryInstance-DKhe8ju0.js} +35 -35
  23. package/dist/providers/AwayzProvider.js +1 -1
  24. package/dist/services/account/AccountService.js +1 -1
  25. package/dist/services/bookings/BookingService.js +1 -1
  26. package/dist/services/currency/CurrencyService.js +1 -1
  27. package/dist/services/features/featureService.js +1 -1
  28. package/dist/services/index.js +1 -1
  29. package/dist/services/instance.js +1 -1
  30. package/dist/services/instanceConfig.js +1 -1
  31. package/dist/services/noRetryInstance.js +1 -1
  32. package/dist/services/preferences/PreferencesService.js +1 -1
  33. package/dist/services/rewards/RewardsService.js +1 -1
  34. package/dist/services/trips/TripsService.js +3 -3
  35. package/dist/services/wallet/WalletService.js +1 -1
  36. package/dist/utils/clientPoints.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/TripsService-BJPYRlRO.js +0 -141
@@ -1,5 +1,5 @@
1
1
  import { h as p } from "../../arrayExtensions-DlcBOj5a.js";
2
- import { D as f } from "../../TripsService-BJPYRlRO.js";
2
+ import { D as f } from "../../TripsService-GImsS17_.js";
3
3
  import "react";
4
4
  import { renderHook as o, waitFor as i } from "../../tests/TestWrapper.js";
5
5
  import { EMyTripsEndpoints as c } from "../../configs/endpoints.js";
@@ -10,80 +10,80 @@ import "../../_styles.flight-booking-CaUgKcMC.js";
10
10
  /* empty css */
11
11
  import "@tanstack/react-query";
12
12
  import "../../configs/awayzClient.js";
13
- import { c as d } from "../../noRetryInstance-De2sH_IH.js";
13
+ import { c as d } from "../../noRetryInstance-DKhe8ju0.js";
14
14
  /* empty css */
15
15
  /* empty css */
16
16
  import "../../index-Cv-wvFlM.js";
17
17
  import "../../context/AwayzContext.js";
18
- import { EBookingType as m } from "../../services/trips/TripService.types.js";
18
+ import { EBookingType as g } from "../../services/trips/TripService.types.js";
19
19
  import { useTripManagement as n } from "./useTripManagement.js";
20
20
  /* empty css */
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.2VT5v0um-lKoi8TEt.js";
23
- let g = {
24
- past: [...B.data],
25
- upcoming: [...b.data].concat(k.data)
21
+ import { UncategorisedBookings200 as T, PastTrip200 as y, UpcomingTrip200 as B, UpdatedTrip200 as b } from "./mocks/index.js";
22
+ import { d as u, v as k, b as D, t as s, g as e } from "../../vi.2VT5v0um-lKoi8TEt.js";
23
+ let l = {
24
+ past: [...y.data],
25
+ upcoming: [...B.data].concat(b.data)
26
26
  };
27
27
  u("useTripManagement", () => {
28
- T.mocked(d.get).mockImplementation((t, r) => {
29
- var a, l;
30
- return t === c.UNCATEGORISED_BOOKINGS ? Promise.resolve({
31
- data: y
32
- }) : ((a = r == null ? void 0 : r.params) == null ? void 0 : a.status) === "past" ? Promise.resolve({
33
- data: { ...B, data: g.past }
34
- }) : ((l = r == null ? void 0 : r.params) == null ? void 0 : l.status) === "upcoming" ? Promise.resolve({
35
- data: { ...b, data: g.upcoming }
28
+ k.mocked(d.get).mockImplementation((r, t) => {
29
+ var a, m;
30
+ return r === c.UNCATEGORISED_BOOKINGS ? Promise.resolve({
31
+ data: T
32
+ }) : ((a = t == null ? void 0 : t.params) == null ? void 0 : a.status) === "past" ? Promise.resolve({
33
+ data: { ...y, data: l.past }
34
+ }) : ((m = t == null ? void 0 : t.params) == null ? void 0 : m.status) === "upcoming" ? Promise.resolve({
35
+ data: { ...B, data: l.upcoming }
36
36
  }) : Promise.resolve({ data: {} });
37
- }), T.mocked(d.put).mockImplementation((t) => {
38
- if (t === `${c.TRIPS}/67fd23bc3a7cbcd0a8757cdc`) {
39
- const r = {
40
- ...k.data,
37
+ }), k.mocked(d.put).mockImplementation((r) => {
38
+ if (r === `${c.TRIPS}/67fd23bc3a7cbcd0a8757cdc`) {
39
+ const t = {
40
+ ...b.data,
41
41
  name: "Updated Trip"
42
42
  };
43
- return g.past = g.past.map(
44
- (a) => a._id === "67fd23bc3a7cbcd0a8757cdc" ? r : a
45
- ), g.upcoming = g.upcoming.map(
46
- (a) => a._id === "67fd23bc3a7cbcd0a8757cdc" ? r : a
43
+ return l.past = l.past.map(
44
+ (a) => a._id === "67fd23bc3a7cbcd0a8757cdc" ? t : a
45
+ ), l.upcoming = l.upcoming.map(
46
+ (a) => a._id === "67fd23bc3a7cbcd0a8757cdc" ? t : a
47
47
  ), Promise.resolve({
48
- data: k
48
+ data: b
49
49
  });
50
50
  }
51
- return t === c.ADD_BOOKING ? Promise.resolve({
51
+ return r === c.ADD_BOOKING ? Promise.resolve({
52
52
  data: { success: !0, message: "Booking added to trip successfully" }
53
53
  }) : Promise.resolve({ data: {} });
54
54
  }), D(() => {
55
- T.clearAllMocks();
55
+ k.clearAllMocks();
56
56
  }), u("Get User Trips", () => {
57
57
  s("Has past trips", async () => {
58
- const { result: t } = o(() => n());
58
+ const { result: r } = o(() => n());
59
59
  await i(() => {
60
- e(t.current.pastTrips.length).greaterThan(0), e(
61
- p(t.current.pastTrips[0].endDate).isBefore(p())
60
+ e(r.current.pastTrips.length).greaterThan(0), e(
61
+ p(r.current.pastTrips[0].endDate).isBefore(p())
62
62
  ).toBe(!0);
63
63
  });
64
64
  }), s("Has upcoming trips", async () => {
65
- const { result: t } = o(() => n());
65
+ const { result: r } = o(() => n());
66
66
  await i(() => {
67
- e(t.current.upcomingTrips.length).greaterThan(0), e(
68
- p(t.current.upcomingTrips[0].startDate).isAfter(p())
67
+ e(r.current.upcomingTrips.length).greaterThan(0), e(
68
+ p(r.current.upcomingTrips[0].startDate).isAfter(p())
69
69
  ).toBe(!0);
70
70
  });
71
71
  }), s("Has correct flight booking structure", async () => {
72
- const { result: t } = o(() => n());
72
+ const { result: r } = o(() => n());
73
73
  await i(() => {
74
- const r = t.current.uncategorisedFlightBookings[0], a = y.data.flight_bookings[0];
75
- e(r).toMatchObject({
74
+ const t = r.current.uncategorisedFlightBookings[0], a = T.data.flight_bookings[0];
75
+ e(t).toMatchObject({
76
76
  id: a._id,
77
77
  reference: a.booking_reference,
78
78
  startDate: e.any(String),
79
79
  endDate: e.any(String),
80
- bookingType: m.FLIGHT,
81
- airlines: a.slices.map((l) => ({
80
+ bookingType: g.FLIGHT,
81
+ airlines: a.slices.map((m) => ({
82
82
  logo: f + ".svg",
83
- name: l.carriers.operating[0]
83
+ name: m.carriers.operating[0]
84
84
  })),
85
85
  arrival: {
86
- airportCode: a.slices.getLast().destination,
86
+ airportCode: a.slices[0].destination,
87
87
  location: ""
88
88
  },
89
89
  departure: {
@@ -95,19 +95,49 @@ u("useTripManagement", () => {
95
95
  hasAirlineChanges: !1,
96
96
  orderId: a.order_id,
97
97
  type: a.type,
98
- cancelledAt: a.cancelled_at
98
+ cancelledAt: a.cancelled_at,
99
+ isRoundTrip: !1
100
+ });
101
+ });
102
+ }), s("Has correct round-trip flight booking structure", async () => {
103
+ const { result: r } = o(() => n());
104
+ await i(() => {
105
+ const t = r.current.uncategorisedFlightBookings[1], a = T.data.flight_bookings[1];
106
+ e(t).toMatchObject({
107
+ id: a._id,
108
+ reference: a.booking_reference,
109
+ bookingType: g.FLIGHT,
110
+ isRoundTrip: !0,
111
+ departure: {
112
+ airportCode: "LAX",
113
+ location: ""
114
+ },
115
+ arrival: {
116
+ airportCode: "HRL",
117
+ location: ""
118
+ },
119
+ inboundDeparture: {
120
+ airportCode: "HRL",
121
+ location: ""
122
+ },
123
+ inboundArrival: {
124
+ airportCode: "LAX",
125
+ location: ""
126
+ },
127
+ outboundArrivalDate: "2025-07-06T22:29:00.000Z",
128
+ inboundDepartureDate: "2025-07-10T20:07:00.000Z"
99
129
  });
100
130
  });
101
131
  }), s("Has correct hotel booking structure", async () => {
102
- const { result: t } = o(() => n());
132
+ const { result: r } = o(() => n());
103
133
  await i(() => {
104
- const r = t.current.uncategorisedHotelBookings[0];
105
- e(r).toMatchObject({
134
+ const t = r.current.uncategorisedHotelBookings[0];
135
+ e(t).toMatchObject({
106
136
  id: e.any(String),
107
137
  reference: e.any(String),
108
138
  startDate: e.any(String),
109
139
  endDate: e.any(String),
110
- bookingType: m.HOTEL,
140
+ bookingType: g.HOTEL,
111
141
  name: e.any(String),
112
142
  image: e.any(String),
113
143
  guests: e.any(Number),
@@ -119,83 +149,83 @@ u("useTripManagement", () => {
119
149
  });
120
150
  }), u("Create Trip", () => {
121
151
  s("Invalid Requests", async () => {
122
- const { result: t } = o(() => n());
123
- t.current.createTrip(), await i(() => {
124
- var r;
125
- e(t.current.isCreateTripError).toBe(!0), e((r = t.current.createTripError) == null ? void 0 : r.message).toContain(
152
+ const { result: r } = o(() => n());
153
+ r.current.createTrip(), await i(() => {
154
+ var t;
155
+ e(r.current.isCreateTripError).toBe(!0), e((t = r.current.createTripError) == null ? void 0 : t.message).toContain(
126
156
  "Trip details are required to create a trip"
127
157
  );
128
- }), t.current.createTrip({
158
+ }), r.current.createTrip({
129
159
  name: "",
130
160
  startDate: "",
131
161
  endDate: ""
132
162
  }), await i(() => {
133
- var r;
134
- e(t.current.isCreateTripError).toBe(!0), e((r = t.current.createTripError) == null ? void 0 : r.message).toContain(
163
+ var t;
164
+ e(r.current.isCreateTripError).toBe(!0), e((t = r.current.createTripError) == null ? void 0 : t.message).toContain(
135
165
  "Trip name, start date, and end date are required"
136
166
  );
137
167
  });
138
168
  }), s("Can successfully create a trip", async () => {
139
- const t = {
169
+ const r = {
140
170
  name: "New Trip",
141
171
  startDate: p().add(1, "days").format("YYYY-MM-DD"),
142
172
  endDate: p().add(2, "days").format("YYYY-MM-DD")
143
- }, { result: r } = o(() => n());
144
- r.current.createTrip(t), await i(() => {
173
+ }, { result: t } = o(() => n());
174
+ t.current.createTrip(r), await i(() => {
145
175
  e(d.post).toHaveBeenCalledWith(
146
176
  c.TRIPS,
147
177
  e.objectContaining({
148
- name: t.name,
149
- start_date: t.startDate,
150
- end_date: t.endDate
178
+ name: r.name,
179
+ start_date: r.startDate,
180
+ end_date: r.endDate
151
181
  })
152
182
  );
153
183
  });
154
184
  });
155
185
  }), u("Delete Trip", () => {
156
186
  s("Can successfully delete a trip", async () => {
157
- const t = "12345", { result: r } = o(() => n());
158
- r.current.deleteTrip(t), await i(() => {
187
+ const r = "12345", { result: t } = o(() => n());
188
+ t.current.deleteTrip(r), await i(() => {
159
189
  e(d.delete).toHaveBeenCalledWith(
160
- `${c.TRIPS}/${t}`
190
+ `${c.TRIPS}/${r}`
161
191
  );
162
192
  });
163
193
  });
164
194
  }), u("Update Trip", () => {
165
195
  s("Invalid tripId arg", async () => {
166
- const { result: t } = o(() => n());
167
- t.current.updateTrip({
196
+ const { result: r } = o(() => n());
197
+ r.current.updateTrip({
168
198
  tripId: "",
169
199
  tripDetails: {
170
200
  name: "Updated Trip"
171
201
  }
172
202
  }), await i(() => {
173
- var r;
174
- e(t.current.isUpdateTripError).toBe(!0), e((r = t.current.updateTripError) == null ? void 0 : r.message).toContain(
203
+ var t;
204
+ e(r.current.isUpdateTripError).toBe(!0), e((t = r.current.updateTripError) == null ? void 0 : t.message).toContain(
175
205
  "Trip ID is required"
176
206
  );
177
207
  });
178
208
  }), s("Invalid tripDetails arg", async () => {
179
- const { result: t } = o(() => n());
180
- t.current.updateTrip({
209
+ const { result: r } = o(() => n());
210
+ r.current.updateTrip({
181
211
  tripId: "123",
182
212
  tripDetails: {}
183
213
  }), await i(() => {
184
- var r;
185
- e(t.current.isUpdateTripError).toBe(!0), e((r = t.current.updateTripError) == null ? void 0 : r.message).toContain(
214
+ var t;
215
+ e(r.current.isUpdateTripError).toBe(!0), e((t = r.current.updateTripError) == null ? void 0 : t.message).toContain(
186
216
  "Trip details must be provided for update"
187
217
  );
188
218
  });
189
219
  }), s("Successful update", async () => {
190
- const { result: t } = o(() => n()), r = "682ffebaa6cc24f39d99fdc7";
191
- t.current.updateTrip({
192
- tripId: r,
220
+ const { result: r } = o(() => n()), t = "682ffebaa6cc24f39d99fdc7";
221
+ r.current.updateTrip({
222
+ tripId: t,
193
223
  tripDetails: {
194
224
  name: "Updated Trip"
195
225
  }
196
226
  }), await i(() => {
197
227
  e(d.put).toHaveBeenCalledWith(
198
- `${c.TRIPS}/${r}`,
228
+ `${c.TRIPS}/${t}`,
199
229
  e.objectContaining({
200
230
  name: "Updated Trip"
201
231
  })
@@ -204,52 +234,52 @@ u("useTripManagement", () => {
204
234
  });
205
235
  }), u("Add Booking to Trip", () => {
206
236
  s("Invalid tripId arg", async () => {
207
- const { result: t } = o(() => n());
208
- t.current.addBookingToTrip({
209
- booking: t.current.uncategorisedHotelBookings[0]
237
+ const { result: r } = o(() => n());
238
+ r.current.addBookingToTrip({
239
+ booking: r.current.uncategorisedHotelBookings[0]
210
240
  }), await i(() => {
211
- var r;
212
- e(t.current.isAddBookingToTripError).toBe(!0), e((r = t.current.addBookingToTripError) == null ? void 0 : r.message).toContain(
241
+ var t;
242
+ e(r.current.isAddBookingToTripError).toBe(!0), e((t = r.current.addBookingToTripError) == null ? void 0 : t.message).toContain(
213
243
  "Trip ID is required"
214
244
  );
215
245
  });
216
246
  }), s("Invalid bookingId arg", async () => {
217
- const { result: t } = o(() => n());
218
- t.current.addBookingToTrip({
247
+ const { result: r } = o(() => n());
248
+ r.current.addBookingToTrip({
219
249
  tripId: "12345"
220
250
  }), await i(() => {
221
- var r;
222
- e(t.current.isAddBookingToTripError).toBe(!0), e((r = t.current.addBookingToTripError) == null ? void 0 : r.message).toContain(
251
+ var t;
252
+ e(r.current.isAddBookingToTripError).toBe(!0), e((t = r.current.addBookingToTripError) == null ? void 0 : t.message).toContain(
223
253
  "Booking is required"
224
254
  );
225
255
  });
226
256
  }), s("Successfully add hotel booking to trip", async () => {
227
- const { result: t } = o(() => n()), r = t.current.uncategorisedHotelBookings[0], a = t.current.upcomingTrips[0];
228
- t.current.addBookingToTrip({
257
+ const { result: r } = o(() => n()), t = r.current.uncategorisedHotelBookings[0], a = r.current.upcomingTrips[0];
258
+ r.current.addBookingToTrip({
229
259
  tripId: a.id,
230
- booking: r
260
+ booking: t
231
261
  }), await i(() => {
232
262
  e(d.put).toHaveBeenCalledWith(
233
263
  c.ADD_BOOKING,
234
264
  e.objectContaining({
235
265
  trip_id: a.id,
236
- booking_id: r.id,
237
- booking_type: m.HOTEL
266
+ booking_id: t.id,
267
+ booking_type: g.HOTEL
238
268
  })
239
269
  );
240
270
  });
241
271
  }), s("Successfully add flight booking to trip", async () => {
242
- const { result: t } = o(() => n()), r = t.current.uncategorisedFlightBookings[0], a = t.current.upcomingTrips[0];
243
- t.current.addBookingToTrip({
272
+ const { result: r } = o(() => n()), t = r.current.uncategorisedFlightBookings[0], a = r.current.upcomingTrips[0];
273
+ r.current.addBookingToTrip({
244
274
  tripId: a.id,
245
- booking: r
275
+ booking: t
246
276
  }), await i(() => {
247
277
  e(d.put).toHaveBeenCalledWith(
248
278
  c.ADD_BOOKING,
249
279
  e.objectContaining({
250
280
  trip_id: a.id,
251
- booking_id: r.id,
252
- booking_type: m.FLIGHT
281
+ booking_id: t.id,
282
+ booking_type: g.FLIGHT
253
283
  })
254
284
  );
255
285
  });
@@ -1,6 +1,6 @@
1
1
  import { useQuery as n, useMutation as s } from "@tanstack/react-query";
2
2
  import "../../arrayExtensions-DlcBOj5a.js";
3
- import { E as a, d as u } from "../../noRetryInstance-De2sH_IH.js";
3
+ import { E as a, d as u } from "../../noRetryInstance-DKhe8ju0.js";
4
4
  import "react";
5
5
  import "react/jsx-runtime";
6
6
  import "react-i18next";
@@ -8,7 +8,7 @@ import "../../_styles.flight-booking-CaUgKcMC.js";
8
8
  /* empty css */
9
9
  import "@tanstack/react-query";
10
10
  import "../../configs/awayzClient.js";
11
- import { c as l } from "../../noRetryInstance-De2sH_IH.js";
11
+ import { c as l } from "../../noRetryInstance-DKhe8ju0.js";
12
12
  /* empty css */
13
13
  /* empty css */
14
14
  import "../../index-Cv-wvFlM.js";
@@ -14,11 +14,11 @@ export interface IFlightBookingProps {
14
14
  name: string;
15
15
  }[];
16
16
  /**
17
- * The location and time of the flight's departure
17
+ * The location and time of the outbound flight's departure
18
18
  */
19
19
  departure: IFlightBookingLocation;
20
20
  /**
21
- * The location and time of the flight's arrival
21
+ * The location and time of the outbound flight's arrival
22
22
  */
23
23
  arrival: IFlightBookingLocation;
24
24
  /**
@@ -42,6 +42,18 @@ export interface IFlightBookingProps {
42
42
  */
43
43
  hasAirlineChanges: boolean;
44
44
  onClick?: () => void;
45
+ /**
46
+ * The location and time of the inbound (return) flight's departure.
47
+ * When provided, a second leg row is rendered on the card.
48
+ */
49
+ inboundDeparture?: IFlightBookingLocation;
50
+ /**
51
+ * The location and time of the inbound (return) flight's arrival
52
+ * This is a change from before, where it was flightBooking.slices.getLast().destination
53
+ * We now explicitly arrival/departure for one-way and outbound.
54
+ * For round-trip, we have inboundDeparture/Arrival as optional props
55
+ */
56
+ inboundArrival?: IFlightBookingLocation;
45
57
  /**
46
58
  * Context options to show in the menu
47
59
  * Generally used for actions like "Cancel Booking", "Add to trip", etc.
@@ -55,5 +67,5 @@ export interface IFlightBookingProps {
55
67
  * flight class, number of passengers, and cancellation status.
56
68
  * It also provides a menu for additional actions if context options are provided.
57
69
  */
58
- export declare const FlightBooking: ({ airlines, departure, arrival, bookingRef, flightClass, numberOfPassengers, cancelledAt, hasAirlineChanges, onClick, contextOptions }: IFlightBookingProps) => import("react/jsx-runtime").JSX.Element;
70
+ export declare const FlightBooking: ({ airlines, departure, arrival, bookingRef, flightClass, numberOfPassengers, cancelledAt, hasAirlineChanges, onClick, inboundDeparture, inboundArrival, contextOptions }: IFlightBookingProps) => import("react/jsx-runtime").JSX.Element;
59
71
  export {};
@@ -114,6 +114,94 @@ declare const _default: {
114
114
  "createdAt": "2025-05-30T14:20:36.839Z",
115
115
  "updatedAt": "2025-05-30T14:21:11.541Z",
116
116
  "__v": 0
117
+ },
118
+ {
119
+ "_id": "6839beb48672ca8a09862484",
120
+ "flight_offer_id": "off_0000AucdLMS6m6Um63c7m9",
121
+ "user_id": "67d82b1c52c4a4dbe4e640c0",
122
+ "status": "flight confirmed",
123
+ "available_actions": ["cancel", "change", "update"],
124
+ "total_currency": "USD",
125
+ "arrival_date": "2025-07-10T21:35:00.000Z",
126
+ "base_amount": "210.72",
127
+ "extras_amount": "0.00",
128
+ "extras_currency": "USD",
129
+ "base_currency": "USD",
130
+ "conditions": {
131
+ "refund_before_departure": {
132
+ "penalty_currency": "USD",
133
+ "penalty_amount": "25.00",
134
+ "allowed": true
135
+ },
136
+ "change_before_departure": {
137
+ "penalty_currency": null,
138
+ "penalty_amount": null,
139
+ "allowed": false
140
+ }
141
+ },
142
+ "departure_date": "2025-07-06T17:01:00.000Z",
143
+ "passengers": [{ "id": "pas_0000AucdLMBnkjS3HTz6N1", "type": null }],
144
+ "slices": [
145
+ {
146
+ "id": "sli_0000AucdLMS6m6Um63c7m8",
147
+ "origin": "LAX",
148
+ "destination": "HRL",
149
+ "fare_brand_name": "Basic Economy",
150
+ "carriers": {
151
+ "marketing": ["American Airlines"],
152
+ "operating": ["American Airlines"],
153
+ "operating_iata_codes": ["AA"]
154
+ },
155
+ "segments": [
156
+ {
157
+ "departing_at": "2025-07-06T17:01:00.000Z",
158
+ "arriving_at": "2025-07-06T22:29:00.000Z"
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "id": "sli_0000AucdLMS6m6Um63c7m9",
164
+ "origin": "HRL",
165
+ "destination": "LAX",
166
+ "fare_brand_name": "Basic Economy",
167
+ "carriers": {
168
+ "marketing": ["American Airlines"],
169
+ "operating": ["American Airlines"],
170
+ "operating_iata_codes": ["AA"]
171
+ },
172
+ "segments": [
173
+ {
174
+ "departing_at": "2025-07-10T20:07:00.000Z",
175
+ "arriving_at": "2025-07-10T21:35:00.000Z"
176
+ }
177
+ ]
178
+ }
179
+ ],
180
+ "tax_amount": "37.92",
181
+ "tax_currency": "USD",
182
+ "total_amount": "248.64",
183
+ "type": "instant",
184
+ "synced_at": "2025-05-30T14:21:11Z",
185
+ "order_id": "ord_0000AucdQ6tTnRRInXiCLh",
186
+ "booking_reference": "T4DNFX",
187
+ "cancelled_at": null,
188
+ "payment_status": {
189
+ "paid_at": "2025-05-30T14:21:11Z",
190
+ "price_guarantee_expires_at": null,
191
+ "payment_required_by": null,
192
+ "awaiting_payment": false
193
+ },
194
+ "documents": [
195
+ {
196
+ "passenger_ids": ["pas_0000AucdLMBnkjS3HTz6N1"],
197
+ "unique_identifier": "1",
198
+ "type": "electronic_ticket"
199
+ }
200
+ ],
201
+ "services": [],
202
+ "createdAt": "2025-05-30T14:20:36.839Z",
203
+ "updatedAt": "2025-05-30T14:21:11.541Z",
204
+ "__v": 0
117
205
  }
118
206
  ]
119
207
  }
@@ -52,6 +52,17 @@ export interface IFlightBooking extends IBooking {
52
52
  hasAirlineChanges: boolean;
53
53
  orderId: string;
54
54
  type: string;
55
+ isRoundTrip?: boolean;
56
+ outboundArrivalDate?: string;
57
+ inboundDepartureDate?: string;
58
+ inboundDeparture?: {
59
+ airportCode: string;
60
+ location: string;
61
+ };
62
+ inboundArrival?: {
63
+ airportCode: string;
64
+ location: string;
65
+ };
55
66
  }
56
67
  export interface IUncategorizedBookings {
57
68
  flightBookings: IFlightBooking[];
package/dist/main.js CHANGED
@@ -13,7 +13,7 @@ import { ETripStatus as A, useTripManagement as T } from "./hooks/useTripManagem
13
13
  import { useWallet as P } from "./hooks/useWallet/useWallet.js";
14
14
  import { AwayzProvider as I } from "./providers/AwayzProvider.js";
15
15
  import { CurrencyService as D } from "./services/currency/CurrencyService.js";
16
- import { c as O, a as R, g as V, i as H } from "./noRetryInstance-De2sH_IH.js";
16
+ import { c as O, a as R, g as V, i as H } from "./noRetryInstance-DKhe8ju0.js";
17
17
  import { RewardsService as N } from "./services/rewards/RewardsService.js";
18
18
  import { EBookingType as W } from "./services/trips/TripService.types.js";
19
19
  import { EAuthFlow as j } from "./types/EAuthFlow.js";