@odynn/awayz-core 0.10.22 → 0.10.23

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.
@@ -129,6 +129,7 @@ export interface IFlightBookingDetails {
129
129
  availableActions: string[];
130
130
  airlineInitiatedChanges: IAirlineInitiatedChanges[];
131
131
  services: IConfirmedFlightService[];
132
+ createdAt: string;
132
133
  }
133
134
  export interface IFlight {
134
135
  origin: IAirport;
@@ -1,12 +1,12 @@
1
1
  var g = Object.defineProperty;
2
2
  var f = (r, t, a) => t in r ? g(r, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : r[t] = a;
3
- var i = (r, t, a) => f(r, typeof t != "symbol" ? t + "" : t, a);
3
+ var c = (r, t, a) => f(r, typeof t != "symbol" ? t + "" : t, a);
4
4
  import "react/jsx-runtime";
5
5
  import "../../arrayExtensions-DlcBOj5a.js";
6
6
  import { t as y } from "../../numberUtils-B4wd-SGR.js";
7
7
  import { c as l, b as u, g as p } from "../../noRetryInstance-DNLgOg0E.js";
8
8
  import "react";
9
- import { EBookingEndpoints as c } from "../../configs/endpoints.js";
9
+ import { EBookingEndpoints as i } from "../../configs/endpoints.js";
10
10
  const h = (r) => {
11
11
  const t = /P((\d+)D)?T((\d+)H)?((\d+)M)?/, a = r.match(t);
12
12
  if (a) {
@@ -17,10 +17,10 @@ const h = (r) => {
17
17
  };
18
18
  class b {
19
19
  constructor() {
20
- i(this, "getHotelBooking", async (t) => {
20
+ c(this, "getHotelBooking", async (t) => {
21
21
  var s, e;
22
22
  const { data: a } = await l.get(
23
- `${c.USER_HOTEL_BOOKINGS}/${t}`
23
+ `${i.USER_HOTEL_BOOKINGS}/${t}`
24
24
  ), n = a.data.accommodation.rooms[0].rates[0];
25
25
  return {
26
26
  id: a.data._id,
@@ -86,10 +86,10 @@ class b {
86
86
  createdAt: a.data.created_at
87
87
  };
88
88
  });
89
- i(this, "getFlightBooking", async (t) => {
89
+ c(this, "getFlightBooking", async (t) => {
90
90
  var d, s;
91
91
  const { data: a } = await l.get(
92
- `${c.USER_FLIGHT_BOOKINGS}/${t}`
92
+ `${i.USER_FLIGHT_BOOKINGS}/${t}`
93
93
  );
94
94
  return {
95
95
  id: a.data._id,
@@ -154,12 +154,13 @@ class b {
154
154
  refundTo: a.data.cancellation_details.refund_to,
155
155
  confirmedAt: a.data.cancellation_details.confirmed_at
156
156
  } : void 0,
157
- services: u(a.data.services)
157
+ services: u(a.data.services),
158
+ createdAt: a.data.created_at
158
159
  };
159
160
  });
160
- i(this, "initiateCancelFlightBooking", async (t) => {
161
+ c(this, "initiateCancelFlightBooking", async (t) => {
161
162
  const { data: a } = await l.put(
162
- `${c.INITIATE_FLIGHT_CANCEL}/${t}`
163
+ `${i.INITIATE_FLIGHT_CANCEL}/${t}`
163
164
  );
164
165
  if (!a.success)
165
166
  throw new Error("Failed to initiate cancellation");
@@ -169,25 +170,25 @@ class b {
169
170
  refundAmount: y(n.refundAmount)
170
171
  };
171
172
  });
172
- i(this, "confirmCancelFlightBooking", async (t) => {
173
+ c(this, "confirmCancelFlightBooking", async (t) => {
173
174
  const { data: a } = await l.put(
174
- `${c.CONFIRM_FLIGHT_CANCEL}/${t}`
175
+ `${i.CONFIRM_FLIGHT_CANCEL}/${t}`
175
176
  );
176
177
  return a.success;
177
178
  });
178
- i(this, "cancelHotelBooking", async (t) => {
179
+ c(this, "cancelHotelBooking", async (t) => {
179
180
  const { data: a } = await l.post(
180
- `${c.CANCEL_HOTEL_BOOKING}/${t}`
181
+ `${i.CANCEL_HOTEL_BOOKING}/${t}`
181
182
  );
182
183
  return a.success;
183
184
  });
184
- i(this, "actionAirlineChanges", async ({
185
+ c(this, "actionAirlineChanges", async ({
185
186
  bookingId: t,
186
187
  acceptChanges: a,
187
188
  aicId: n
188
189
  }) => {
189
190
  const { data: d } = await l.post(
190
- c.ACTION_AIRLINE_CHANGES,
191
+ i.ACTION_AIRLINE_CHANGES,
191
192
  {
192
193
  booking_id: t,
193
194
  action_taken: a ? "accepted" : "cancelled",
@@ -196,18 +197,18 @@ class b {
196
197
  );
197
198
  return d.success;
198
199
  });
199
- i(this, "cancelPointsBooking", async (t) => {
200
+ c(this, "cancelPointsBooking", async (t) => {
200
201
  const { data: a } = await p.post(
201
- `${c.REFUND_POINTS_BOOKING}`,
202
+ `${i.REFUND_POINTS_BOOKING}`,
202
203
  {
203
204
  bookingId: t
204
205
  }
205
206
  );
206
207
  return a.success;
207
208
  });
208
- i(this, "getPointsAsCash", async (t) => {
209
+ c(this, "getPointsAsCash", async (t) => {
209
210
  const { data: a } = await p.get(
210
- `${c.BOOKING_POINTS_AS_CASH}/${t}`
211
+ `${i.BOOKING_POINTS_AS_CASH}/${t}`
211
212
  );
212
213
  return {
213
214
  ...a.data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odynn/awayz-core",
3
- "version": "0.10.22",
3
+ "version": "0.10.23",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"