@odynn/awayz-hotels 0.5.4 → 0.5.6
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.
|
@@ -112,6 +112,14 @@ export interface IBestCheckout {
|
|
|
112
112
|
* `IBestCheckoutResponse.optimal_user_program_checkout.programs.program_value_currency`
|
|
113
113
|
*/
|
|
114
114
|
programValueCurrency: string;
|
|
115
|
+
/**
|
|
116
|
+
* ---
|
|
117
|
+
* ### If the program is a transfer partner or the hotel it self.
|
|
118
|
+
*
|
|
119
|
+
* Maps to:
|
|
120
|
+
* `IBestCheckoutResponse.optimal_user_program_checkout.programs.is_transfer_program`
|
|
121
|
+
*/
|
|
122
|
+
isTransferProgram: boolean;
|
|
115
123
|
}[];
|
|
116
124
|
};
|
|
117
125
|
/**
|
|
@@ -5,8 +5,8 @@ import { clientInstance as l } from "@odynn/awayz-core";
|
|
|
5
5
|
import { s as E } from "../../stringUtils-DFhHh7H1.js";
|
|
6
6
|
import "../../moment-BGjjqtLQ.js";
|
|
7
7
|
import "../../arrayExtensions-CFEBYUok.js";
|
|
8
|
-
import { c as
|
|
9
|
-
import { E as
|
|
8
|
+
import { c as m } from "../../objectUtils-DOsrxUF7.js";
|
|
9
|
+
import { E as h } from "../../DateFormats-DZD30Nea.js";
|
|
10
10
|
import "react";
|
|
11
11
|
import { EHotelEndpoints as _ } from "../../configs/endpoints.js";
|
|
12
12
|
import { EBestCheckoutType as d } from "../../enums/EBestCheckoutType.js";
|
|
@@ -35,9 +35,9 @@ class P {
|
|
|
35
35
|
success: !0,
|
|
36
36
|
data: e.data.cities.map(
|
|
37
37
|
(a) => {
|
|
38
|
-
const { search_id: c, search_type:
|
|
38
|
+
const { search_id: c, search_type: p, description: r, coordinates: g, city: y } = a, u = {
|
|
39
39
|
searchId: c,
|
|
40
|
-
searchType:
|
|
40
|
+
searchType: p,
|
|
41
41
|
description: r,
|
|
42
42
|
coordinates: g,
|
|
43
43
|
city: y
|
|
@@ -67,7 +67,7 @@ class P {
|
|
|
67
67
|
});
|
|
68
68
|
return t != null && t.success ? {
|
|
69
69
|
success: !0,
|
|
70
|
-
data:
|
|
70
|
+
data: m(
|
|
71
71
|
(e = t.data) == null ? void 0 : e.hotels
|
|
72
72
|
)
|
|
73
73
|
} : {
|
|
@@ -90,7 +90,7 @@ class P {
|
|
|
90
90
|
});
|
|
91
91
|
return t != null && t.success ? {
|
|
92
92
|
success: !0,
|
|
93
|
-
data:
|
|
93
|
+
data: m(
|
|
94
94
|
(e = t.data) == null ? void 0 : e.hotels
|
|
95
95
|
)
|
|
96
96
|
} : {
|
|
@@ -114,7 +114,7 @@ class P {
|
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
|
-
return
|
|
117
|
+
return m(e.data);
|
|
118
118
|
} catch {
|
|
119
119
|
return [];
|
|
120
120
|
}
|
|
@@ -124,8 +124,8 @@ class P {
|
|
|
124
124
|
const e = {
|
|
125
125
|
hotel_group: s.hotelGroup,
|
|
126
126
|
hotel_id: s.hotelId,
|
|
127
|
-
check_in_date: s.checkinDate.format(
|
|
128
|
-
check_out_date: s.checkoutDate.format(
|
|
127
|
+
check_in_date: s.checkinDate.format(h.ServerDate),
|
|
128
|
+
check_out_date: s.checkoutDate.format(h.ServerDate)
|
|
129
129
|
};
|
|
130
130
|
try {
|
|
131
131
|
const { data: t } = await l.post(
|
|
@@ -134,7 +134,7 @@ class P {
|
|
|
134
134
|
), a = ((o = t.data) == null ? void 0 : o.length) > 0 ? t.data[0] : null;
|
|
135
135
|
return {
|
|
136
136
|
success: t.success,
|
|
137
|
-
data: a == null ? null :
|
|
137
|
+
data: a == null ? null : m(a)
|
|
138
138
|
};
|
|
139
139
|
} catch (t) {
|
|
140
140
|
const a = t;
|
|
@@ -188,7 +188,8 @@ class P {
|
|
|
188
188
|
transferRatio: r.program_transfer_ratio,
|
|
189
189
|
centsPerPoint: r.program_value_cents,
|
|
190
190
|
programPointsValue: r.program_points_value,
|
|
191
|
-
programValueCurrency: r.program_value_currency
|
|
191
|
+
programValueCurrency: r.program_value_currency,
|
|
192
|
+
isTransferProgram: r.is_transfer_program
|
|
192
193
|
})
|
|
193
194
|
)
|
|
194
195
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odynn/awayz-hotels",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@odynn/awayz-core": "
|
|
69
|
+
"@odynn/awayz-core": "^0.5.10",
|
|
70
70
|
"@tanstack/react-query": "^5.66.9",
|
|
71
71
|
"string-comparison": "^1.3.0"
|
|
72
72
|
}
|