@revolugo/common 7.9.2 → 7.10.0-rc.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolugo/common",
3
- "version": "7.9.2",
3
+ "version": "7.10.0-rc.1",
4
4
  "private": false,
5
5
  "description": "Revolugo common",
6
6
  "author": "Revolugo",
@@ -26,7 +26,7 @@
26
26
  "@asteasolutions/zod-to-openapi": "8.5.0",
27
27
  "change-case": "5.4.4",
28
28
  "dayjs": "1.11.20",
29
- "ky": "2.0.1",
29
+ "ky": "2.0.2",
30
30
  "slugify": "1.6.9",
31
31
  "type-fest": "5.6.0",
32
32
  "uuid": "14.0.0",
@@ -0,0 +1 @@
1
+ export const CARE_TEAM_EMAIL = 'care@revolugo.com'
@@ -1,5 +1,6 @@
1
1
  export * from '../countries/constants.ts'
2
2
  export * from '../currencies/constants.ts'
3
+ export * from './email.ts'
3
4
  export * from './environment.ts'
4
5
  export * from './hotel-offers.ts'
5
6
  export * from './hotel-room-offer.ts'
@@ -139,6 +139,7 @@ export const ICONS_NAME = Object.freeze({
139
139
  pauseCircle: 'ph:pause-circle',
140
140
  pawPrint: 'ph:paw-print',
141
141
  pencil: 'ph:pencil',
142
+ pencilNote: 'ph:note-pencil',
142
143
  phone: 'ph:phone',
143
144
  pill: 'ph:pill',
144
145
  planeTakeOff: 'ph:airplane-takeoff',
@@ -0,0 +1,11 @@
1
+ export enum AddonTypeEnum {
2
+ Insurance = 'insurance',
3
+ }
4
+
5
+ export type AddonType = `${AddonTypeEnum}`
6
+
7
+ export interface Addon {
8
+ price: number
9
+ taxIncludedPrice: number
10
+ type: AddonType
11
+ }
@@ -1,6 +1,7 @@
1
1
  import type { CancellationPolicy } from './cancellation-policy.ts'
2
2
  import type { CurrencyType } from './currency.ts'
3
3
  import type { HotelRoomOffer } from './hotel-room-offer.ts'
4
+ import type { OrderAddon } from './order-addon.ts'
4
5
 
5
6
  export interface BookingPolicies {
6
7
  /**
@@ -9,6 +10,12 @@ export interface BookingPolicies {
9
10
  * @memberof BookingPolicies
10
11
  */
11
12
  id: string
13
+ /**
14
+ * Available add-ons (e.g. insurance)
15
+ * @type {Array<OrderAddon>}
16
+ * @memberof BookingPoliciesApi
17
+ */
18
+ addons?: OrderAddon[]
12
19
  /**
13
20
  * The total number of adults who will be staying in the property.
14
21
  * @type {number}
@@ -7,6 +7,7 @@ export * from './hotel-offers-filters.ts'
7
7
  export * from './hotel-room-offer-package-type.ts'
8
8
  export * from './hotel-room-offer-type.ts'
9
9
  export * from './invoice.ts'
10
+ export * from './order-addon.ts'
10
11
  export * from './payment-method.ts'
11
12
  export * from './source-market.ts'
12
13
  export * from './tax.ts'
@@ -0,0 +1,26 @@
1
+ export enum OrderAddonTypeEnum {
2
+ Insurance = 'insurance',
3
+ }
4
+
5
+ type OrderAddonType = `${OrderAddonTypeEnum}`
6
+
7
+ export interface OrderAddon {
8
+ /**
9
+ *
10
+ * @type {number}
11
+ * @memberof OrderAddon
12
+ */
13
+ price: number
14
+ /**
15
+ *
16
+ * @type {number}
17
+ * @memberof OrderAddon
18
+ */
19
+ taxIncludedPrice: number
20
+ /**
21
+ *
22
+ * @type {string}
23
+ * @memberof OrderAddon
24
+ */
25
+ type: OrderAddonType
26
+ }
@@ -1,3 +1,4 @@
1
+ export * from './addon.ts'
1
2
  export * from './booking.ts'
2
3
  export * from './elements/index.ts'
3
4
 
@@ -5,6 +6,7 @@ export * from './hotel-rooming-list.ts'
5
6
  export * from './http-exception/index.ts'
6
7
  export * from './pagination.ts'
7
8
  export * from './payment.ts'
9
+ export * from './resource-type.ts'
8
10
  export * from './severities.ts'
9
11
  export * from './taxable.ts'
10
12
  export type * from '../countries/types.ts'
@@ -0,0 +1,33 @@
1
+ // eslint-disable-next-line @typescript-eslint/naming-convention
2
+ export const ResourceType = {
3
+ Booking: 'booking',
4
+ BookingGroup: 'booking-group',
5
+ HotelContract: 'hotel-contract',
6
+ Organization: 'organization',
7
+ Product: 'product',
8
+ } as const
9
+
10
+ export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType]
11
+
12
+ export enum CustomerRequestType {
13
+ AddOrRemoveNights = 'add_or_remove_nights',
14
+ AddOrRemovePerson = 'add_or_remove_person',
15
+ ChangeDates = 'change_dates',
16
+ ChangeGuestName = 'change_guest_name',
17
+ EarlyCheckIn = 'early_check_in',
18
+ EarlyCheckInLateCheckOut = 'early_check_in_late_check_out',
19
+ LateCheckOut = 'late_check_out',
20
+ Other = 'other',
21
+ SpecialRequest = 'special_request',
22
+ }
23
+
24
+ export type CustomerRequestTypeValue = `${CustomerRequestType}`
25
+
26
+ // eslint-disable-next-line @typescript-eslint/naming-convention
27
+ export const CustomerRequestResourceType = {
28
+ Booking: ResourceType.Booking,
29
+ BookingGroup: ResourceType.BookingGroup,
30
+ } as const satisfies Partial<typeof ResourceType>
31
+
32
+ export type CustomerRequestResourceType =
33
+ (typeof CustomerRequestResourceType)[keyof typeof CustomerRequestResourceType]