@revolugo/common 6.9.7 → 6.10.0-beta.1
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 +13 -7
- package/src/cancellation-policies.test.ts +12 -9
- package/src/cancellation-policies.ts +31 -26
- package/src/constants/countries.ts +0 -2515
- package/src/constants/currencies.ts +0 -1812
- package/src/constants/environment.ts +1 -0
- package/src/constants/hotel-offers.ts +2 -0
- package/src/constants/hotel.ts +3 -0
- package/src/constants/locales.ts +6 -0
- package/src/constants/measurement.ts +1 -0
- package/src/constants/time.ts +1 -0
- package/src/countries/constants.ts +2518 -0
- package/src/countries/index.ts +7 -0
- package/src/currencies/index.ts +1817 -0
- package/src/map/distance.ts +22 -0
- package/src/map/index.ts +1 -0
- package/src/models/paginated-queries.ts +1 -0
- package/src/types/country.ts +1 -1
- package/src/types/elements/amenity.ts +266 -0
- package/src/types/elements/bed.ts +20 -0
- package/src/types/elements/booking-policy.ts +80 -0
- package/src/types/elements/booking.ts +236 -0
- package/src/types/elements/cancellation-policy.ts +20 -0
- package/src/types/elements/contact-person.ts +158 -0
- package/src/types/elements/currency.ts +3 -0
- package/src/types/elements/event-metadata.ts +38 -0
- package/src/types/elements/event.ts +14 -0
- package/src/types/elements/hotel-image.ts +44 -0
- package/src/types/elements/hotel-images.ts +47 -0
- package/src/types/elements/hotel-offer-request.ts +82 -0
- package/src/types/elements/hotel-offer.ts +208 -0
- package/src/types/elements/hotel-review-rating.ts +14 -0
- package/src/types/elements/hotel-room-offer-package-type.ts +8 -0
- package/src/types/elements/hotel-room-offer-request.ts +77 -0
- package/src/types/elements/hotel-room-offer-type.ts +6 -0
- package/src/types/elements/hotel-room-offer.ts +192 -0
- package/src/types/elements/hotel-room.ts +102 -0
- package/src/types/elements/hotel-rooming-list.ts +49 -0
- package/src/types/elements/hotel.ts +184 -0
- package/src/types/elements/index.ts +22 -0
- package/src/types/elements/invoice.ts +21 -0
- package/src/types/elements/payment-method.ts +159 -0
- package/src/types/elements/source-market.ts +247 -0
- package/src/types/elements/tag.ts +32 -0
- package/src/types/elements/tax.ts +52 -0
- package/src/types/elements/travel-times.ts +45 -0
- package/src/types/geo-coordinates.ts +4 -0
- package/src/types/index.ts +2 -0
- package/src/utils/array-tools.ts +3 -2
- package/src/utils/case-transformers.ts +1 -0
- package/src/utils/colors.ts +4 -4
- package/src/utils/currency.ts +30 -18
- package/src/utils/dates.ts +6 -10
- package/src/utils/debounce.ts +2 -2
- package/src/utils/find-unique-keys.ts +2 -2
- package/src/utils/get-guest-count.ts +1 -0
- package/src/utils/images.ts +58 -0
- package/src/utils/index.ts +2 -1
- package/src/utils/lang-default-fallbacks.ts +1 -1
- package/src/utils/math.ts +3 -3
- package/src/utils/numbers.ts +8 -7
- package/src/utils/object-tools.ts +66 -2
- package/src/utils/poller.ts +1 -0
- package/src/utils/random.ts +12 -0
- package/src/utils/strings.ts +5 -2
- package/src/utils/uniq-by.ts +12 -9
- package/src/utils/validators.ts +1 -0
- package/src/utils/countries.ts +0 -4
|
@@ -39,6 +39,7 @@ export enum BookingEnvironment {
|
|
|
39
39
|
Development = 'development',
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/* @__PURE__ */
|
|
42
43
|
export const BOOKING_API_URLS = {
|
|
43
44
|
[Environment.Production]: 'https://booking-api.revolugo.com',
|
|
44
45
|
[Environment.Sandbox]: 'https://booking-api.sandbox.revolugo.com',
|
package/src/constants/hotel.ts
CHANGED
package/src/constants/locales.ts
CHANGED
|
@@ -29,6 +29,7 @@ export function langFromString(langStr: string): Lang | undefined {
|
|
|
29
29
|
}
|
|
30
30
|
/* eslint-enable */
|
|
31
31
|
|
|
32
|
+
/* @__PURE__ */
|
|
32
33
|
export const LANG_TO_LOCALE: Record<Lang, Locale> = {
|
|
33
34
|
[Lang.EN]: Locale.en_US,
|
|
34
35
|
[Lang.FR]: Locale.fr_FR,
|
|
@@ -39,6 +40,7 @@ export const LANG_TO_LOCALE: Record<Lang, Locale> = {
|
|
|
39
40
|
[Lang.PT]: Locale.en_US,
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
/* @__PURE__ */
|
|
42
44
|
export const LOCALE_TO_LANG = {
|
|
43
45
|
[Locale.de_DE]: Lang.DE,
|
|
44
46
|
[Locale.en_US]: Lang.EN,
|
|
@@ -49,6 +51,7 @@ export const LOCALE_TO_LANG = {
|
|
|
49
51
|
[Locale.pt_PT]: Lang.PT,
|
|
50
52
|
}
|
|
51
53
|
|
|
54
|
+
/* @__PURE__ */
|
|
52
55
|
export const LOCALES = {
|
|
53
56
|
[Locale.en_US]: {
|
|
54
57
|
code: Locale.en_US,
|
|
@@ -101,6 +104,9 @@ export const LOCALES = {
|
|
|
101
104
|
},
|
|
102
105
|
}
|
|
103
106
|
|
|
107
|
+
/* @__PURE__ */
|
|
104
108
|
export const DATE_STRING_FORMAT = 'YYYY-MM-DD'
|
|
109
|
+
/* @__PURE__ */
|
|
105
110
|
export const FR_DATE_STRING_FORMAT = 'DD-MM-YYYY'
|
|
111
|
+
/* @__PURE__ */
|
|
106
112
|
export const DEFAULT_LOCALE = Locale.fr_FR
|
package/src/constants/time.ts
CHANGED