@revolugo/common 7.9.2 → 7.10.0-rc.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.
- package/package.json +2 -2
- package/src/constants/email.ts +1 -0
- package/src/constants/index.ts +1 -0
- package/src/icons/index.ts +1 -0
- package/src/types/addon.ts +11 -0
- package/src/types/elements/booking-policy.ts +7 -0
- package/src/types/elements/index.ts +1 -0
- package/src/types/elements/order-addon.ts +26 -0
- package/src/types/index.ts +2 -0
- package/src/types/resource-type.ts +33 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revolugo/common",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.10.0-rc.0",
|
|
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.
|
|
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'
|
package/src/constants/index.ts
CHANGED
package/src/icons/index.ts
CHANGED
|
@@ -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
|
+
}
|
package/src/types/index.ts
CHANGED
|
@@ -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]
|