@revolugo/common 6.10.9-beta.20 → 6.10.9-beta.22
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/package.json +1 -1
- package/src/types/elements/hotel-offer-list.ts +29 -0
- package/src/types/elements/hotel-offer-request.ts +89 -0
- package/src/types/elements/hotel-offer.ts +2 -0
- package/src/types/elements/hotel-room-offer-request.ts +63 -0
- package/src/types/elements/hotel-room-offer.ts +74 -0
- package/src/types/elements/index.ts +1 -0
- package/src/types/elements/meta-polling.ts +31 -0
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CurrencyType } from './currency.ts'
|
|
2
|
+
import type { HotelOffersSortByType } from './hotel-offer.ts'
|
|
3
|
+
// eslint-disable-next-line no-restricted-imports
|
|
4
|
+
import type { Locale } from '../../constants/index.ts'
|
|
5
|
+
|
|
6
|
+
export enum HotelOffersSortByOrderEnum {
|
|
7
|
+
Asc = 'asc',
|
|
8
|
+
Desc = 'desc',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type HotelOffersSortByOrderType = `${HotelOffersSortByOrderEnum}`
|
|
12
|
+
|
|
13
|
+
export interface HotelOffersListPayload {
|
|
14
|
+
currency: CurrencyType
|
|
15
|
+
hotelOfferRequestId: string
|
|
16
|
+
endingBefore?: string | null
|
|
17
|
+
filterByPrice?: string
|
|
18
|
+
filterByReviewRating?: number
|
|
19
|
+
filterByStar?: string
|
|
20
|
+
hotelRoomOffersLimit?: number
|
|
21
|
+
includeHotelContentDetails?: boolean | null
|
|
22
|
+
lang?: Locale
|
|
23
|
+
limit?: number
|
|
24
|
+
onlyRecommendedHotelOffers?: boolean | null
|
|
25
|
+
priceHistogramStepCount?: number
|
|
26
|
+
sortBy?: HotelOffersSortByType
|
|
27
|
+
sortByOrder?: HotelOffersSortByOrderType
|
|
28
|
+
startingAfter?: string | null
|
|
29
|
+
}
|
|
@@ -60,9 +60,98 @@ export interface HotelOfferRequest {
|
|
|
60
60
|
* @type {SourceMarket}
|
|
61
61
|
*/
|
|
62
62
|
sourceMarket: SourceMarket
|
|
63
|
+
/**
|
|
64
|
+
* Date of the **Hotel Room Offer Request** creation
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof HotelOfferRequestApiResponse
|
|
67
|
+
*/
|
|
68
|
+
createdAt: string
|
|
69
|
+
/**
|
|
70
|
+
* id of the **Hotel Offer Request**
|
|
71
|
+
* @type {string}
|
|
72
|
+
*/
|
|
73
|
+
id: string
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface HotelOfferRequestResponse {
|
|
77
|
+
/**
|
|
78
|
+
* This endpoint allows to find the geo-coordinates of a known address, place or locality via this free-text address query field. This address will eventually be geocoded into a latitude/longitude pair.
|
|
79
|
+
*
|
|
80
|
+
* <b style="color: red;">If address cannot be geocoded (transformed into a latitude/longitude pair) provided **latitude** and **longitude** parameters will be used as fallback.</b>
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof HotelOfferRequestApiResponse
|
|
83
|
+
*/
|
|
84
|
+
address?: string | null
|
|
85
|
+
/**
|
|
86
|
+
* The total number of adults who will be staying in the property.
|
|
87
|
+
* @type {number}
|
|
88
|
+
* @memberof HotelOfferRequestApiResponse
|
|
89
|
+
*/
|
|
90
|
+
adultCount: number
|
|
91
|
+
/**
|
|
92
|
+
* Date of check-in formatted as YYYY-MM-DD.
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof HotelOfferRequestApiResponse
|
|
95
|
+
*/
|
|
96
|
+
checkInDate: string
|
|
97
|
+
/**
|
|
98
|
+
* Date of check-out formatted as YYYY-MM-DD.
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof HotelOfferRequestApiResponse
|
|
101
|
+
*/
|
|
102
|
+
checkOutDate: string
|
|
103
|
+
/**
|
|
104
|
+
* A comma-separated list of child ages (0 up to 17). e.g.: "3,7" represents 2 children respectively 3 and 7 years old.
|
|
105
|
+
* @type {string}
|
|
106
|
+
* @memberof HotelOfferRequestApiResponse
|
|
107
|
+
*/
|
|
108
|
+
children?: string | null
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {EventMetadataApi}
|
|
112
|
+
* @memberof HotelOfferRequestApiResponse
|
|
113
|
+
*/
|
|
114
|
+
eventMetadata?: EventMetadata | null
|
|
115
|
+
/**
|
|
116
|
+
* Search location latitude.
|
|
117
|
+
*
|
|
118
|
+
* <b style="color: red;"> when no address parameter passed.</b>
|
|
119
|
+
* @type {number}
|
|
120
|
+
* @memberof HotelOfferRequestApiResponse
|
|
121
|
+
*/
|
|
122
|
+
latitude?: number | null
|
|
123
|
+
/**
|
|
124
|
+
* Search location longitude.
|
|
125
|
+
*
|
|
126
|
+
* <b style="color: red;"> when no address parameter passed.</b>
|
|
127
|
+
* @type {number}
|
|
128
|
+
* @memberof HotelOfferRequestApiResponse
|
|
129
|
+
*/
|
|
130
|
+
longitude?: number | null
|
|
131
|
+
/**
|
|
132
|
+
* The total number of rooms requested for the stay. Results may display offers matching a different room count than the requested one, however those results will always provide enough occupancy for the total guest count needed.
|
|
133
|
+
*
|
|
134
|
+
* Constraint: The **room_count** cannot be greater than the requested guest count (adult and children guests) and the minimum **room_count** cannot be less than the total guest count (adult and children guests) divided by 4, meaning that the maximum number of guest in a single room cannot be greeater than 4.
|
|
135
|
+
* @type {number}
|
|
136
|
+
* @memberof HotelOfferRequestApiResponse
|
|
137
|
+
*/
|
|
138
|
+
roomCount: number
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* @type {SourceMarket}
|
|
142
|
+
* @memberof HotelOfferRequestApiResponse
|
|
143
|
+
*/
|
|
144
|
+
sourceMarket: SourceMarket
|
|
145
|
+
/**
|
|
146
|
+
* Date of the **Hotel Offer Request** creation
|
|
147
|
+
* @type {string}
|
|
148
|
+
* @memberof HotelOfferRequestApiResponse
|
|
149
|
+
*/
|
|
150
|
+
createdAt: string
|
|
63
151
|
/**
|
|
64
152
|
* id of the **Hotel Offer Request**
|
|
65
153
|
* @type {string}
|
|
154
|
+
* @memberof HotelOfferRequestApiResponse
|
|
66
155
|
*/
|
|
67
156
|
id: string
|
|
68
157
|
}
|
|
@@ -64,6 +64,69 @@ export interface HotelRoomOfferRequest {
|
|
|
64
64
|
id: string
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
export interface HotelRoomOfferRequestResponse {
|
|
68
|
+
/**
|
|
69
|
+
* Requested number of adult(s) to be accommodated.
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
72
|
+
*/
|
|
73
|
+
adultCount: number
|
|
74
|
+
/**
|
|
75
|
+
* Check-in date formatted as `YYYY-MM-DD`.
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
78
|
+
*/
|
|
79
|
+
checkInDate: string
|
|
80
|
+
/**
|
|
81
|
+
* Check-out date formatted as `YYYY-MM-DD`.
|
|
82
|
+
* @type {string}
|
|
83
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
84
|
+
*/
|
|
85
|
+
checkOutDate: string
|
|
86
|
+
/**
|
|
87
|
+
* A comma-separated list of child ages (0 up to 17). e.g.: "3,7" represents 2 children respectively 3 and 7 years old.
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
90
|
+
*/
|
|
91
|
+
children?: string | null
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {EventMetadataApi}
|
|
95
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
96
|
+
*/
|
|
97
|
+
eventMetadata?: EventMetadata | null
|
|
98
|
+
/**
|
|
99
|
+
* id of requested hotel
|
|
100
|
+
* @type {string}
|
|
101
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
102
|
+
*/
|
|
103
|
+
hotelId: string
|
|
104
|
+
/**
|
|
105
|
+
* Number of room(s) requested. Results may display offers matching a different room count than the requested one, however those results will always provide enough occupancy for the total guest count needed.
|
|
106
|
+
* @type {number}
|
|
107
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
108
|
+
*/
|
|
109
|
+
roomCount: number
|
|
110
|
+
/**
|
|
111
|
+
*
|
|
112
|
+
* @type {SourceMarket}
|
|
113
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
114
|
+
*/
|
|
115
|
+
sourceMarket: SourceMarket
|
|
116
|
+
/**
|
|
117
|
+
* Date of the **Hotel Room Offer Request** creation
|
|
118
|
+
* @type {string}
|
|
119
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
120
|
+
*/
|
|
121
|
+
createdAt: string
|
|
122
|
+
/**
|
|
123
|
+
* id of the **Hotel Room Offer Request**
|
|
124
|
+
* @type {string}
|
|
125
|
+
* @memberof HotelRoomOfferRequestApiResponse
|
|
126
|
+
*/
|
|
127
|
+
id: string
|
|
128
|
+
}
|
|
129
|
+
|
|
67
130
|
export type HotelRoomOfferRequestCreate = Pick<
|
|
68
131
|
HotelRoomOfferRequest,
|
|
69
132
|
| 'adultCount'
|
|
@@ -3,12 +3,64 @@ import type { CurrencyType } from './currency.ts'
|
|
|
3
3
|
import type { HotelRoomOfferPackageType } from './hotel-room-offer-package-type.ts'
|
|
4
4
|
import type { HotelRoomOfferType } from './hotel-room-offer-type.ts'
|
|
5
5
|
import type { HotelRoom } from './hotel-room.ts'
|
|
6
|
+
import type { MetaPollingResponse } from './meta-polling.ts'
|
|
6
7
|
import type { SourceMarket } from './source-market.ts'
|
|
7
8
|
import type { Tag } from './tag.ts'
|
|
8
9
|
import type { Tax } from './tax.ts'
|
|
9
10
|
// eslint-disable-next-line no-restricted-imports
|
|
10
11
|
import type { BreakfastOptionType } from '../../constants/index.ts'
|
|
11
12
|
|
|
13
|
+
export interface HotelRoomOffersDataResponse {
|
|
14
|
+
/**
|
|
15
|
+
* The total number of adults who will be staying in the property.
|
|
16
|
+
* @type {number}
|
|
17
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
18
|
+
*/
|
|
19
|
+
adultCount: number
|
|
20
|
+
/**
|
|
21
|
+
* Date of check-in formatted as YYYY-MM-DD.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
24
|
+
*/
|
|
25
|
+
checkInDate: string
|
|
26
|
+
/**
|
|
27
|
+
* Date of check-out formatted as YYYY-MM-DD.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
30
|
+
*/
|
|
31
|
+
checkOutDate: string
|
|
32
|
+
/**
|
|
33
|
+
* A comma-separated list of child ages (0 up to 17). e.g.: "3,7" represents 2 children respectively 3 and 7 years old.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
36
|
+
*/
|
|
37
|
+
children?: string | null
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {CurrencyType}
|
|
41
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
42
|
+
*/
|
|
43
|
+
currency: CurrencyType
|
|
44
|
+
/**
|
|
45
|
+
* Hotel id
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
48
|
+
*/
|
|
49
|
+
hotelId: string
|
|
50
|
+
/**
|
|
51
|
+
* List of **Hotel Room Offers** sorted by price ascending.
|
|
52
|
+
* @type {HotelRoomOffer[]}
|
|
53
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
54
|
+
*/
|
|
55
|
+
hotelRoomOffers: HotelRoomOffer[]
|
|
56
|
+
/**
|
|
57
|
+
* Hotel timezone
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof HotelRoomOffersDataApiResponse
|
|
60
|
+
*/
|
|
61
|
+
hotelTimezone: string
|
|
62
|
+
}
|
|
63
|
+
|
|
12
64
|
/**
|
|
13
65
|
* Description of the Hotel Room Offer.
|
|
14
66
|
* @export
|
|
@@ -147,6 +199,28 @@ export interface HotelRoomOffer {
|
|
|
147
199
|
type?: HotelRoomOfferType
|
|
148
200
|
}
|
|
149
201
|
|
|
202
|
+
export interface HotelRoomOffersResponse {
|
|
203
|
+
/**
|
|
204
|
+
*
|
|
205
|
+
* @type {HotelRoomOffersDataResponse}
|
|
206
|
+
* @memberof HotelRoomOffersApiResponse
|
|
207
|
+
*/
|
|
208
|
+
data: HotelRoomOffersDataResponse
|
|
209
|
+
/**
|
|
210
|
+
*
|
|
211
|
+
* @type {any}
|
|
212
|
+
* @memberof HotelRoomOffersApiResponse
|
|
213
|
+
*/
|
|
214
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
215
|
+
event?: any | null
|
|
216
|
+
/**
|
|
217
|
+
*
|
|
218
|
+
* @type {MetaApiPollingResponse}
|
|
219
|
+
* @memberof HotelRoomOffersApiResponse
|
|
220
|
+
*/
|
|
221
|
+
meta: MetaPollingResponse
|
|
222
|
+
}
|
|
223
|
+
|
|
150
224
|
export interface HotelRoomOfferResponse {
|
|
151
225
|
/**
|
|
152
226
|
* The total number of adults who will be staying in the property.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// eslint-disable-next-line no-restricted-imports
|
|
2
|
+
import type { PollerStatus } from '../../constants/poller.ts'
|
|
3
|
+
|
|
4
|
+
type PollerType = `${PollerStatus}`
|
|
5
|
+
|
|
6
|
+
export interface MetaPollingResponse {
|
|
7
|
+
/**
|
|
8
|
+
* A cursor to use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof MetaApiPollingResponse
|
|
11
|
+
*/
|
|
12
|
+
endingBefore?: string | null
|
|
13
|
+
/**
|
|
14
|
+
* A limit on the number of object to be returned.
|
|
15
|
+
* @type {number}
|
|
16
|
+
* @memberof MetaApiPollingResponse
|
|
17
|
+
*/
|
|
18
|
+
limit?: number
|
|
19
|
+
/**
|
|
20
|
+
* A cursor to use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof MetaApiPollingResponse
|
|
23
|
+
*/
|
|
24
|
+
startingAfter?: string | null
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {PollerType}
|
|
28
|
+
* @memberof MetaApiPollingResponse
|
|
29
|
+
*/
|
|
30
|
+
status: PollerType
|
|
31
|
+
}
|