@odynn/awayz-core 0.9.1 → 0.9.2

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.
@@ -49,7 +49,7 @@ const $ = (n, t) => {
49
49
  }
50
50
  }), {
51
51
  mutate: I,
52
- isPending: p,
52
+ isPending: m,
53
53
  isError: y,
54
54
  error: G,
55
55
  isSuccess: L
@@ -62,7 +62,7 @@ const $ = (n, t) => {
62
62
  provider: r.pointsAsCash.provider,
63
63
  type: o.FLIGHT,
64
64
  pointsAmount: r.pointsAsCash.points,
65
- cashAmount: r.pointsAsCash.cashValue
65
+ cashAmount: r.pointsAsCash.cashValue.amount
66
66
  }), e.confirmCancelFlightBooking(n);
67
67
  if (t === o.HOTEL)
68
68
  return i != null && i.pointsAsCash && await e.cancelPointsBooking({
@@ -71,7 +71,7 @@ const $ = (n, t) => {
71
71
  provider: i.pointsAsCash.provider,
72
72
  type: o.HOTEL,
73
73
  pointsAmount: i.pointsAsCash.points,
74
- cashAmount: i.pointsAsCash.cashValue
74
+ cashAmount: i.pointsAsCash.cashValue.amount
75
75
  }), e.cancelHotelBooking(n);
76
76
  },
77
77
  onSuccess: () => {
@@ -84,15 +84,15 @@ const $ = (n, t) => {
84
84
  error: K
85
85
  } = u({
86
86
  mutationFn: async (c) => {
87
- var m, l;
88
- const C = (l = (m = r == null ? void 0 : r.airlineInitiatedChanges) == null ? void 0 : m.filter(
87
+ var C, l;
88
+ const p = (l = (C = r == null ? void 0 : r.airlineInitiatedChanges) == null ? void 0 : C.filter(
89
89
  (T) => !T.actionTaken
90
90
  )) == null ? void 0 : l[0];
91
- if (t === o.FLIGHT && (r != null && r.airlineInitiatedChanges) && C)
91
+ if (t === o.FLIGHT && (r != null && r.airlineInitiatedChanges) && p)
92
92
  return e.actionAirlineChanges({
93
93
  bookingId: n,
94
94
  acceptChanges: c,
95
- aicId: C.id
95
+ aicId: p.id
96
96
  });
97
97
  throw new Error("Not supported for hotel bookings");
98
98
  },
@@ -118,8 +118,8 @@ const $ = (n, t) => {
118
118
  initiateCancellationError: H,
119
119
  isInitiateCancellationSuccess: O,
120
120
  cancelBooking: I,
121
- isCancellingBooking: p,
122
- isCancelingBooking: p,
121
+ isCancellingBooking: m,
122
+ isCancelingBooking: m,
123
123
  isCancelBookingError: y,
124
124
  cancelBookingError: G,
125
125
  isCancelBookingSuccess: L,
@@ -58,7 +58,10 @@ export interface IPointsAsCash {
58
58
  pointsValue: number;
59
59
  confirmationCode: string;
60
60
  provider: string;
61
- cashValue: number;
61
+ cashValue: {
62
+ amount: number;
63
+ currency: string;
64
+ };
62
65
  }
63
66
  export interface ICancellationTimeline {
64
67
  refundAmount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odynn/awayz-core",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"