@revolugo/common 7.0.1 → 7.1.0

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 (35) hide show
  1. package/package.json +2 -2
  2. package/src/cancellation-policies.test.ts +8 -2
  3. package/src/cancellation-policies.ts +57 -4
  4. package/src/currencies/types.ts +1 -1
  5. package/src/currencies/utils.ts +52 -52
  6. package/src/schemas/hotel-room-offer.ts +18 -13
  7. package/src/schemas/hotel-room.ts +1 -4
  8. package/src/types/calendar.ts +2 -2
  9. package/src/types/elements/amenity.ts +10 -10
  10. package/src/types/elements/booking-policy.ts +7 -7
  11. package/src/types/elements/booking.ts +15 -15
  12. package/src/types/elements/contact-person.ts +7 -0
  13. package/src/types/elements/elements-events.ts +2 -0
  14. package/src/types/elements/event-metadata.ts +6 -6
  15. package/src/types/elements/hotel-offer-list.ts +1 -1
  16. package/src/types/elements/hotel-offer-request.ts +21 -21
  17. package/src/types/elements/hotel-offer.ts +15 -15
  18. package/src/types/elements/hotel-offers-filters.ts +1 -1
  19. package/src/types/elements/hotel-room-offer-request.ts +22 -22
  20. package/src/types/elements/hotel-room-offer.ts +15 -15
  21. package/src/types/elements/hotel-room.ts +6 -6
  22. package/src/types/elements/hotel-rooming-list.ts +8 -8
  23. package/src/types/elements/hotel.ts +6 -6
  24. package/src/types/elements/meta-polling.ts +6 -6
  25. package/src/types/event.ts +1 -1
  26. package/src/types/hotel-contract.ts +1 -1
  27. package/src/types/hotel-room-stock.ts +1 -1
  28. package/src/types/pagination.ts +2 -2
  29. package/src/utils/create-composite-key.ts +2 -2
  30. package/src/utils/debounce.ts +1 -1
  31. package/src/utils/generate-dummy-hotel-images.ts +7 -5
  32. package/src/utils/get-sanitized-room-count.ts +1 -1
  33. package/src/utils/images.ts +5 -0
  34. package/src/utils/parse-children.ts +1 -1
  35. package/src/utils/poller.ts +56 -55
@@ -2,6 +2,11 @@ import type { EventMetadata } from './event-metadata.ts'
2
2
  import type { SourceMarket } from './source-market.ts'
3
3
 
4
4
  export interface HotelOfferRequest {
5
+ /**
6
+ * id of the **Hotel Offer Request**
7
+ * @type {string}
8
+ */
9
+ id: string
5
10
  /**
6
11
  * 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.
7
12
  *
@@ -29,6 +34,12 @@ export interface HotelOfferRequest {
29
34
  * @type {string}
30
35
  */
31
36
  children?: string | null
37
+ /**
38
+ * Date of the **Hotel Room Offer Request** creation
39
+ * @type {string}
40
+ * @memberof HotelOfferRequestApiResponse
41
+ */
42
+ createdAt: string
32
43
  /**
33
44
  *
34
45
  * @type {EventMetadata}
@@ -60,20 +71,15 @@ export interface HotelOfferRequest {
60
71
  * @type {SourceMarket}
61
72
  */
62
73
  sourceMarket: SourceMarket
63
- /**
64
- * Date of the **Hotel Room Offer Request** creation
65
- * @type {string}
66
- * @memberof HotelOfferRequestApiResponse
67
- */
68
- createdAt: string
74
+ }
75
+
76
+ export interface HotelOfferRequestResponse {
69
77
  /**
70
78
  * id of the **Hotel Offer Request**
71
79
  * @type {string}
80
+ * @memberof HotelOfferRequestApiResponse
72
81
  */
73
82
  id: string
74
- }
75
-
76
- export interface HotelOfferRequestResponse {
77
83
  /**
78
84
  * 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
85
  *
@@ -106,6 +112,12 @@ export interface HotelOfferRequestResponse {
106
112
  * @memberof HotelOfferRequestApiResponse
107
113
  */
108
114
  children?: string | null
115
+ /**
116
+ * Date of the **Hotel Offer Request** creation
117
+ * @type {string}
118
+ * @memberof HotelOfferRequestApiResponse
119
+ */
120
+ createdAt: string
109
121
  /**
110
122
  *
111
123
  * @type {EventMetadataApi}
@@ -142,18 +154,6 @@ export interface HotelOfferRequestResponse {
142
154
  * @memberof HotelOfferRequestApiResponse
143
155
  */
144
156
  sourceMarket: SourceMarket
145
- /**
146
- * Date of the **Hotel Offer Request** creation
147
- * @type {string}
148
- * @memberof HotelOfferRequestApiResponse
149
- */
150
- createdAt: string
151
- /**
152
- * id of the **Hotel Offer Request**
153
- * @type {string}
154
- * @memberof HotelOfferRequestApiResponse
155
- */
156
- id: string
157
157
  }
158
158
 
159
159
  export interface HotelOfferRequestCreate {
@@ -9,6 +9,12 @@ import type { TravelTimeItem } from './travel-times.ts'
9
9
  import type { CurrencyCode } from '../../currencies/constants.ts'
10
10
 
11
11
  export interface HotelOffer {
12
+ /**
13
+ * Hotel id.
14
+ * @type {string}
15
+ * @memberof HotelOffer
16
+ */
17
+ id: string
12
18
  /**
13
19
  * Hotel address.
14
20
  * @type {string}
@@ -102,11 +108,11 @@ export interface HotelOffer {
102
108
  */
103
109
  hotelReviewRatings?: HotelReviewRating[] | null
104
110
  /**
105
- * Hotel id.
106
- * @type {string}
111
+ *
112
+ * @type {Array<HotelRoomOffer>}
107
113
  * @memberof HotelOffer
108
114
  */
109
- id: string
115
+ hotelRoomOffers: HotelRoomOffer[]
110
116
  /**
111
117
  *
112
118
  * @type {HotelImages}
@@ -162,6 +168,12 @@ export interface HotelOffer {
162
168
  * @memberof HotelOffer
163
169
  */
164
170
  state?: string | null
171
+ /**
172
+ *
173
+ * @type {Array<Tag>}
174
+ * @memberof HotelOffer
175
+ */
176
+ tags?: Tag[]
165
177
  /**
166
178
  * TripAdvisor property id. When applicable.
167
179
  * @type {string}
@@ -186,18 +198,6 @@ export interface HotelOffer {
186
198
  * @memberof HotelOffer
187
199
  */
188
200
  website?: string | null
189
- /**
190
- *
191
- * @type {Array<HotelRoomOffer>}
192
- * @memberof HotelOffer
193
- */
194
- hotelRoomOffers: HotelRoomOffer[]
195
- /**
196
- *
197
- * @type {Array<Tag>}
198
- * @memberof HotelOffer
199
- */
200
- tags?: Tag[]
201
201
  }
202
202
 
203
203
  export enum HotelOffersSortByEnum {
@@ -9,9 +9,9 @@ export enum FilterName {
9
9
  }
10
10
 
11
11
  export interface HotelOffersFilters {
12
+ [FilterName.Price]: [number, number]
12
13
  [FilterName.Rating]: string
13
14
  [FilterName.ReviewRating]?: number
14
- [FilterName.Price]: [number, number]
15
15
  [FilterName.SortBy]: {
16
16
  direction: HotelOffersSortByOrderType
17
17
  value: HotelOffersSortByEnum
@@ -2,6 +2,12 @@ import type { EventMetadata } from './event-metadata.ts'
2
2
  import type { SourceMarket } from './source-market.ts'
3
3
 
4
4
  export interface HotelRoomOfferRequest {
5
+ /**
6
+ * id of the **Hotel Room Offer Request**
7
+ * @type {string}
8
+ * @memberof HotelRoomOfferRequest
9
+ */
10
+ id: string
5
11
  /**
6
12
  * Requested number of adult(s) to be accommodated.
7
13
  * @type {number}
@@ -26,6 +32,12 @@ export interface HotelRoomOfferRequest {
26
32
  * @memberof HotelRoomOfferRequest
27
33
  */
28
34
  children?: string | null
35
+ /**
36
+ * Date of the **Hotel Room Offer Request** creation
37
+ * @type {string}
38
+ * @memberof HotelRoomOfferRequest
39
+ */
40
+ createdAt: string
29
41
  /**
30
42
  *
31
43
  * @type {EventMetadata}
@@ -50,21 +62,15 @@ export interface HotelRoomOfferRequest {
50
62
  * @memberof HotelRoomOfferRequest
51
63
  */
52
64
  sourceMarket: SourceMarket
53
- /**
54
- * Date of the **Hotel Room Offer Request** creation
55
- * @type {string}
56
- * @memberof HotelRoomOfferRequest
57
- */
58
- createdAt: string
65
+ }
66
+
67
+ export interface HotelRoomOfferRequestResponse {
59
68
  /**
60
69
  * id of the **Hotel Room Offer Request**
61
70
  * @type {string}
62
- * @memberof HotelRoomOfferRequest
71
+ * @memberof HotelRoomOfferRequestApiResponse
63
72
  */
64
73
  id: string
65
- }
66
-
67
- export interface HotelRoomOfferRequestResponse {
68
74
  /**
69
75
  * Requested number of adult(s) to be accommodated.
70
76
  * @type {number}
@@ -89,6 +95,12 @@ export interface HotelRoomOfferRequestResponse {
89
95
  * @memberof HotelRoomOfferRequestApiResponse
90
96
  */
91
97
  children?: string | null
98
+ /**
99
+ * Date of the **Hotel Room Offer Request** creation
100
+ * @type {string}
101
+ * @memberof HotelRoomOfferRequestApiResponse
102
+ */
103
+ createdAt: string
92
104
  /**
93
105
  *
94
106
  * @type {EventMetadataApi}
@@ -113,18 +125,6 @@ export interface HotelRoomOfferRequestResponse {
113
125
  * @memberof HotelRoomOfferRequestApiResponse
114
126
  */
115
127
  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
128
  }
129
129
 
130
130
  export type HotelRoomOfferRequestCreate = Pick<
@@ -70,6 +70,12 @@ export interface HotelRoomOffersDataResponse {
70
70
  * @interface HotelRoomOffer
71
71
  */
72
72
  export interface HotelRoomOffer {
73
+ /**
74
+ * Hotel Room Offer id.
75
+ * @type {string}
76
+ * @memberof HotelRoomOffer
77
+ */
78
+ id?: string
73
79
  /**
74
80
  * Quantity of breakfast per night included in the given **Hotel Room Offer**
75
81
  * @type {number}
@@ -138,12 +144,6 @@ export interface HotelRoomOffer {
138
144
  * @memberof HotelRoomOffer
139
145
  */
140
146
  hotelRooms: HotelRoom[]
141
- /**
142
- * Hotel Room Offer id.
143
- * @type {string}
144
- * @memberof HotelRoomOffer
145
- */
146
- id?: string
147
147
  /**
148
148
  * An **Hotel Room Offer** of type **PACKAGE** can be of **4 types**, described by **package_type** parameter:
149
149
  *
@@ -157,7 +157,7 @@ export interface HotelRoomOffer {
157
157
  * @type {string}
158
158
  * @memberof HotelRoomOffer
159
159
  */
160
- packageType?: HotelRoomOfferPackageType
160
+ packageType?: HotelRoomOfferPackageType | null
161
161
  /**
162
162
  * Price with taxes NOT INCLUDED of the given **Hotel Room Offer** including breakfast(s) when applicable, expressed in the requested **currency**.
163
163
  * @type {number}
@@ -172,18 +172,16 @@ export interface HotelRoomOffer {
172
172
  sourceMarket: SourceMarket
173
173
  /**
174
174
  *
175
- * @type {Array<Tag>}
175
+ * @type {StayTaxesInfo}
176
176
  * @memberof HotelRoomOffer
177
177
  */
178
- tags?: Tag[]
178
+ stayTaxesInfo: StayTaxesInfo
179
179
  /**
180
- * Price of the given **Hotel Room Offer** including breakfast(s) when applicable, and including all taxes from returned **taxes** list parameter expressed in the requested **currency**.
181
180
  *
182
- * This data is not returned for a **Hotel Room Offer** of type **HOTEL_ROOM**, you'll need to compute and display the actual tax included price of the final **Hotel Room** package corresponding to the guest count and night count requested, or make a call to the **[Create Hotel Room Offer](/v1/documentation#operation/postV1Hotel_room_offers)** endpoint in order to get a valid and bookable **Hotel Room Offer** where **type = PACKAGE** based on a packaged list of **Hotel Room Offers** of type **HOTEL_ROOM**.
183
- * @type {number}
181
+ * @type {Array<Tag>}
184
182
  * @memberof HotelRoomOffer
185
183
  */
186
- taxIncludedPrice: number
184
+ tags?: Tag[]
187
185
  /**
188
186
  *
189
187
  * @type {Array<Tax>}
@@ -192,11 +190,13 @@ export interface HotelRoomOffer {
192
190
  taxes?: Tax[]
193
191
 
194
192
  /**
193
+ * Price of the given **Hotel Room Offer** including breakfast(s) when applicable, and including all taxes from returned **taxes** list parameter expressed in the requested **currency**.
195
194
  *
196
- * @type {StayTaxesInfo}
195
+ * This data is not returned for a **Hotel Room Offer** of type **HOTEL_ROOM**, you'll need to compute and display the actual tax included price of the final **Hotel Room** package corresponding to the guest count and night count requested, or make a call to the **[Create Hotel Room Offer](/v1/documentation#operation/postV1Hotel_room_offers)** endpoint in order to get a valid and bookable **Hotel Room Offer** where **type = PACKAGE** based on a packaged list of **Hotel Room Offers** of type **HOTEL_ROOM**.
196
+ * @type {number}
197
197
  * @memberof HotelRoomOffer
198
198
  */
199
- stayTaxesInfo: StayTaxesInfo
199
+ taxIncludedPrice: number
200
200
 
201
201
  /**
202
202
  * Hotel Room Offer type.
@@ -2,6 +2,12 @@ import type { Bed } from './bed.ts'
2
2
  import type { HotelImage } from './hotel-image.ts'
3
3
 
4
4
  export interface HotelRoom {
5
+ /**
6
+ * Hotel Room id, when applicable.
7
+ * @type {string}
8
+ * @memberof HotelRoom
9
+ */
10
+ id: string
5
11
  /**
6
12
  * List of amenities in the room. May be subject to changes at the Hotel.
7
13
  * @type {Array<string>}
@@ -52,12 +58,6 @@ export interface HotelRoom {
52
58
  * @memberof HotelRoom
53
59
  */
54
60
  highresImages?: boolean | null
55
- /**
56
- * Hotel Room id, when applicable.
57
- * @type {string}
58
- * @memberof HotelRoom
59
- */
60
- id: string
61
61
  /**
62
62
  * List of indexes corresponding to image names for the given Hotel Room among the related hotel images.
63
63
  * @type {Array<number>}
@@ -6,16 +6,22 @@ export interface HotelRoomingListGuest {
6
6
  * @type {string}
7
7
  * @memberof HotelRoomingListGuest
8
8
  */
9
- fullname: string
9
+ id: string
10
10
  /**
11
11
  *
12
12
  * @type {string}
13
13
  * @memberof HotelRoomingListGuest
14
14
  */
15
- id: string
15
+ fullname: string
16
16
  }
17
17
 
18
18
  export interface HotelRoomingList {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof HotelRoomingList
23
+ */
24
+ id: string
19
25
  /**
20
26
  *
21
27
  * @type {HotelRoom}
@@ -34,12 +40,6 @@ export interface HotelRoomingList {
34
40
  * @memberof HotelRoomingList
35
41
  */
36
42
  hotelRoomingListGuests: HotelRoomingListGuest[]
37
- /**
38
- *
39
- * @type {string}
40
- * @memberof HotelRoomingList
41
- */
42
- id: string
43
43
  /**
44
44
  *
45
45
  * @type {string}
@@ -6,6 +6,12 @@ import type { HotelReviewRating } from './hotel-review-rating.ts'
6
6
  import type { TravelTimeItem } from './travel-times.ts'
7
7
 
8
8
  export interface Hotel {
9
+ /**
10
+ * Hotel id.
11
+ * @type {string}
12
+ * @memberof HotelApi
13
+ */
14
+ id: string
9
15
  /**
10
16
  * Hotel address.
11
17
  * @type {string}
@@ -96,12 +102,6 @@ export interface Hotel {
96
102
  * @memberof HotelApi
97
103
  */
98
104
  hotelReviewRatings?: HotelReviewRating[] | null
99
- /**
100
- * Hotel id.
101
- * @type {string}
102
- * @memberof HotelApi
103
- */
104
- id: string
105
105
  /**
106
106
  *
107
107
  * @type {HotelImages}
@@ -22,16 +22,16 @@ export interface MetaPollingResponse {
22
22
  * @memberof MetaApiPollingResponse
23
23
  */
24
24
  startingAfter?: string | null
25
- /**
26
- *
27
- * @type {number}
28
- * @memberof HotelOffersApiResponseMeta
29
- */
30
- totalCount?: number | null
31
25
  /**
32
26
  *
33
27
  * @type {PollerType}
34
28
  * @memberof MetaApiPollingResponse
35
29
  */
36
30
  status: PollerType
31
+ /**
32
+ *
33
+ * @type {number}
34
+ * @memberof HotelOffersApiResponseMeta
35
+ */
36
+ totalCount?: number | null
37
37
  }
@@ -1,7 +1,7 @@
1
1
  export interface IEvent {
2
+ id: string
2
3
  eventDateFrom?: Date
3
4
  eventDateTo?: Date
4
- id: string
5
5
  name: string
6
6
  slug: string
7
7
  }
@@ -1,13 +1,13 @@
1
1
  import type { IHotelRoomStock } from './hotel-room-stock.ts'
2
2
 
3
3
  export interface IHotelContract {
4
+ id: string
4
5
  createdAt: string
5
6
  forcedTotalComissionsAmount: number
6
7
  forcedTotalPurchasedAmount: number
7
8
  forcedTotalVatComissionsAmount: number
8
9
  hotelId: string
9
10
  hotelRoomStocks?: IHotelRoomStock[]
10
- id: string
11
11
  name: string
12
12
  status: string
13
13
  updatedAt: string
@@ -1,6 +1,7 @@
1
1
  import type { BreakfastOption } from '../constants/hotel.ts'
2
2
 
3
3
  export interface IHotelRoomStock {
4
+ id?: string
4
5
  breakfastOption: BreakfastOption
5
6
  breakfastRetrocommission?: number
6
7
  breakfastUnitPrice?: number
@@ -9,7 +10,6 @@ export interface IHotelRoomStock {
9
10
  eventScoped: boolean
10
11
  hotelContractId?: string
11
12
  hotelRoomId: string
12
- id?: string
13
13
  marginRate: number
14
14
  minNightCount?: number
15
15
  rate: number
@@ -17,10 +17,10 @@ export interface IPaginationOptions {
17
17
  }
18
18
 
19
19
  export interface IPaginationPageInfo {
20
+ endCursor: string | null
20
21
  hasNextPage: boolean
21
22
  hasPreviousPage: boolean
22
23
  startCursor: string | null
23
- endCursor: string | null
24
24
  totalCount: number
25
25
  }
26
26
 
@@ -30,8 +30,8 @@ export interface IPaginationEdge<T> {
30
30
  }
31
31
 
32
32
  export interface IPaginationConnection<T> {
33
- pageInfo: IPaginationPageInfo
34
33
  edges: IPaginationEdge<T>[]
34
+ pageInfo: IPaginationPageInfo
35
35
  }
36
36
 
37
37
  export enum PaginationException {
@@ -1,7 +1,7 @@
1
1
  interface CompositeLeafAttributes {
2
2
  excludedTokens?: string[]
3
- removeSplitCharacters?: boolean
4
3
  parentKey?: string
4
+ removeSplitCharacters?: boolean
5
5
  }
6
6
 
7
7
  export enum CompositeAttributesType {
@@ -17,7 +17,6 @@ type CompositeKeyOptions<T> =
17
17
  ? CompositeKeyOptions<U>
18
18
  : CompositeLeafAttributes & {
19
19
  attributes: CompositeOmitAttributes<T> | CompositeAttributesType
20
- sort?: (keyof T)[]
21
20
  children?: {
22
21
  [K in keyof T]?: NonNullable<T[K]> extends object
23
22
  ? CompositeKeyOptions<NonNullable<T[K]>>
@@ -25,6 +24,7 @@ type CompositeKeyOptions<T> =
25
24
  ? CompositeKeyOptions<U>
26
25
  : CompositeLeafAttributes
27
26
  }
27
+ sort?: (keyof T)[]
28
28
  }
29
29
 
30
30
  export function createCompositeKey<T>(
@@ -17,8 +17,8 @@ export interface DebouncedFunction<
17
17
  }
18
18
 
19
19
  interface DebouncedPromise<FunctionReturn> {
20
- resolve: (result: FunctionReturn) => void
21
20
  reject: (reason?: any) => void
21
+ resolve: (result: FunctionReturn) => void
22
22
  }
23
23
 
24
24
  export function debounce<Args extends any[], F extends (...args: Args) => any>(
@@ -4,12 +4,14 @@ import { getRandomInt } from './get-random-int.ts'
4
4
  import type { HotelImage } from '../types/index.ts'
5
5
 
6
6
  export function generateDummyHotelImages(): HotelImage {
7
+ const bgColor = getRandomHexColor()
8
+ const fontColor = getRandomHexColor()
7
9
  return {
8
10
  isHeroImage: false,
9
- l: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${getRandomHexColor()}/${getRandomHexColor()}`,
10
- m: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${getRandomHexColor()}/${getRandomHexColor()}`,
11
- s: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${getRandomHexColor()}/${getRandomHexColor()}`,
12
- xl: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${getRandomHexColor()}/${getRandomHexColor()}`,
13
- xs: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${getRandomHexColor()}/${getRandomHexColor()}`,
11
+ l: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${bgColor}/${fontColor}`,
12
+ m: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${bgColor}/${fontColor}`,
13
+ s: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${bgColor}/${fontColor}`,
14
+ xl: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${bgColor}/${fontColor}`,
15
+ xs: `https://dummyimage.com/${getRandomInt(300, 900)}x${getRandomInt(300, 900)}/${bgColor}/${fontColor}`,
14
16
  }
15
17
  }
@@ -6,8 +6,8 @@ export function getSanitizedRoomCount({
6
6
  roomCount,
7
7
  }: {
8
8
  adultCount: number
9
- roomCount: number
10
9
  maxAdultsPerRoom?: number
10
+ roomCount: number
11
11
  }): number {
12
12
  // Ensure at least enough rooms for each adult and at most MAX_ADULTS_PER_ROOM per room
13
13
  if (!Number.isFinite(roomCount) || roomCount < 1) {
@@ -56,3 +56,8 @@ export const mapImagesUrls = (
56
56
 
57
57
  return null
58
58
  }
59
+
60
+ export const getImageUrls = (
61
+ hotelImages: HotelImage[],
62
+ size: ImageSize,
63
+ ): string[] => hotelImages.map(hotelImage => hotelImage[size])
@@ -1,5 +1,5 @@
1
1
  export function parseChildren(children: string | null | undefined): number[] {
2
2
  return ((children && children.split(',')) || []).map(child =>
3
- Number.parseInt(child),
3
+ Number.parseInt(child, 10),
4
4
  )
5
5
  }