@roomstay/core 0.1.85-0 → 0.1.85-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/dist/types/Addon/Addon.enum.d.ts +14 -0
- package/dist/types/Addon/Addon.type.d.ts +24 -0
- package/dist/types/Booking/IBookingPayment.type.d.ts +0 -3
- package/dist/types/DisplayPolicy/ERuleType.d.ts +6 -0
- package/dist/types/DisplayPolicy/ERuleType.enum.d.ts +6 -0
- package/dist/types/DisplayPolicy/IDisplayPolicy.d.ts +25 -0
- package/dist/types/RMS/ERMSAuthSyncHistoryStatus.type.d.ts +8 -0
- package/dist/types/RMS/IRMSDiscount.type.d.ts +34 -0
- package/dist/types/RMS/IRMSSyncResponse.type.d.ts +8 -0
- package/dist/types/Rule/EDayOfWeek.enum.d.ts +9 -0
- package/dist/types/Rule/EDisplayPolicyEffectType.enum.d.ts +11 -0
- package/dist/types/Rule/ERuleType.enum.d.ts +11 -0
- package/dist/types/Rule/IRule.type.d.ts +1 -0
- package/dist/types/Rule/IRuleConfigurations.type.d.ts +68 -0
- package/dist/types/Rule/IRuleContext.type.d.ts +13 -0
- package/dist/types/Rule/index.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum AddonPricingType {
|
|
2
|
+
PER_STAY = "Per stay",
|
|
3
|
+
PER_NIGHT = "Per night",
|
|
4
|
+
PER_PERSON = "Per person",
|
|
5
|
+
PER_PERSON_PER_NIGHT = "Per person per night",
|
|
6
|
+
PER_ALL_PERSONS = "Per all persons",
|
|
7
|
+
PER_ALL_PERSONS_PER_NIGHT = "Per all persons per night",
|
|
8
|
+
PER_QUANTITY_NAME_PER_NIGHT = "Per Quantity Name Per Night",
|
|
9
|
+
PER_ROOM_QUANTITY_PER_NIGHT = "Per Room Quantity Per Night",
|
|
10
|
+
PER_PERSON_OCCUPANCY_PER_NIGHT = "Per Person Occupancy Per Night",
|
|
11
|
+
PER_ADULT_OCCUPANCY_PER_NIGHT = "Per Adult Occupancy Per Night",
|
|
12
|
+
PER_CHILD_OCCUPANCY_PER_NIGHT = "Per Child Occupancy Per Night"
|
|
13
|
+
}
|
|
14
|
+
export declare const ADDON_PER_NIGHT_TYPES: AddonPricingType[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SimpleItemisedFee } from "types/Fees/IFee.type";
|
|
2
|
+
export type BasketAddonDTO = {
|
|
3
|
+
availability: any;
|
|
4
|
+
code: string;
|
|
5
|
+
inclusive: false;
|
|
6
|
+
pricingType: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
adultQuantity: number;
|
|
9
|
+
childQuantity?: number;
|
|
10
|
+
description: string;
|
|
11
|
+
name: string;
|
|
12
|
+
category: string;
|
|
13
|
+
image: string;
|
|
14
|
+
price: number;
|
|
15
|
+
adultPrice?: number;
|
|
16
|
+
childPrice?: number;
|
|
17
|
+
fee: number;
|
|
18
|
+
adultFee?: number;
|
|
19
|
+
childFee?: number;
|
|
20
|
+
fees?: SimpleItemisedFee[];
|
|
21
|
+
adultFees?: SimpleItemisedFee[];
|
|
22
|
+
childFees?: SimpleItemisedFee[];
|
|
23
|
+
nights?: number;
|
|
24
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ERuleType } from './ERuleType';
|
|
2
|
+
export interface IDisplayPolicy {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
applicableRates: string[];
|
|
7
|
+
conditions: ICondition[];
|
|
8
|
+
}
|
|
9
|
+
export type IScheduleConfiguration = {
|
|
10
|
+
rruleSet: string;
|
|
11
|
+
durationMs: number;
|
|
12
|
+
};
|
|
13
|
+
export type ICondition = {
|
|
14
|
+
ruleType: ERuleType.Schedule;
|
|
15
|
+
configuration: IScheduleConfiguration;
|
|
16
|
+
} | {
|
|
17
|
+
ruleType: ERuleType.DeviceTarget;
|
|
18
|
+
configuration: unknown;
|
|
19
|
+
} | {
|
|
20
|
+
ruleType: ERuleType.GeoLock;
|
|
21
|
+
configuration: unknown;
|
|
22
|
+
} | {
|
|
23
|
+
ruleType: ERuleType.CheapestOf;
|
|
24
|
+
configuration: unknown;
|
|
25
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ERMSDiscountType } from './ERMSDiscountType.enum';
|
|
2
|
+
import { IRuleSpec } from '../Rule/IRuleConfigurations.type';
|
|
3
|
+
export type IRMSDiscount = {
|
|
4
|
+
name: string;
|
|
5
|
+
rmsDiscountId: number;
|
|
6
|
+
description: string;
|
|
7
|
+
discountType: ERMSDiscountType;
|
|
8
|
+
amount?: {
|
|
9
|
+
amount: number;
|
|
10
|
+
};
|
|
11
|
+
percentage?: {
|
|
12
|
+
percentage: number;
|
|
13
|
+
noGreaterThan: number;
|
|
14
|
+
includePackage: boolean;
|
|
15
|
+
includeAdditionals: boolean;
|
|
16
|
+
appliesToTotalRate: boolean;
|
|
17
|
+
};
|
|
18
|
+
bogo?: {
|
|
19
|
+
buyXNights: number;
|
|
20
|
+
getXNights: number;
|
|
21
|
+
getXNightsCycles: number;
|
|
22
|
+
includeAdditionals: boolean;
|
|
23
|
+
};
|
|
24
|
+
nightlyRateOverride?: {
|
|
25
|
+
firstXNights: number;
|
|
26
|
+
totalCharge: number;
|
|
27
|
+
includeAdditionals: boolean;
|
|
28
|
+
};
|
|
29
|
+
availableToIbe: boolean;
|
|
30
|
+
minimumNightStay: number;
|
|
31
|
+
maximumNightStay: number;
|
|
32
|
+
availableToMembers: boolean;
|
|
33
|
+
rules: IRuleSpec[];
|
|
34
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum EDisplayPolicyEffectType {
|
|
2
|
+
Visibility = "visibility",
|
|
3
|
+
Exclusivity = "exclusivity"
|
|
4
|
+
}
|
|
5
|
+
export declare enum EDisplayPolicyExclusivityMode {
|
|
6
|
+
Cheapest = "cheapest",
|
|
7
|
+
MostExpensive = "most_expensive"
|
|
8
|
+
}
|
|
9
|
+
export interface IDisplayPolicyExclusivityConfiguration {
|
|
10
|
+
mode: EDisplayPolicyExclusivityMode;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum ERuleType {
|
|
2
|
+
Schedule = "Schedule",
|
|
3
|
+
GeoLock = "GeoLock",
|
|
4
|
+
DeviceTarget = "DeviceTarget",
|
|
5
|
+
DayOfWeek = "DayOfWeek",
|
|
6
|
+
HotelRestriction = "HotelRestriction",
|
|
7
|
+
RoomRestriction = "RoomRestriction",
|
|
8
|
+
RateRestriction = "RateRestriction",
|
|
9
|
+
NightCount = "NightCount",
|
|
10
|
+
AnyOf = "AnyOf"
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { IRuleSpec } from './IRuleConfigurations.type';
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { EDayOfWeek } from './EDayOfWeek.enum';
|
|
2
|
+
import { ERuleType } from './ERuleType.enum';
|
|
3
|
+
export interface IScheduleConfig {
|
|
4
|
+
type: 'clock' | 'stay';
|
|
5
|
+
rules: Array<{
|
|
6
|
+
type: 'include' | 'exclude';
|
|
7
|
+
startDate: string;
|
|
8
|
+
endDate: string;
|
|
9
|
+
rrule?: string;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export interface IGeoLockConfig {
|
|
13
|
+
applicableCountryCodes: string[];
|
|
14
|
+
mode: 'allow' | 'deny';
|
|
15
|
+
}
|
|
16
|
+
export type TDeviceTarget = 'mobile' | 'desktop';
|
|
17
|
+
export interface IDeviceTargetConfig {
|
|
18
|
+
allowedDevices: TDeviceTarget[];
|
|
19
|
+
}
|
|
20
|
+
export type TDayOfWeekSource = 'arrival' | 'night' | 'booking';
|
|
21
|
+
export interface IDayOfWeekConfig {
|
|
22
|
+
source: TDayOfWeekSource;
|
|
23
|
+
allowedDays: EDayOfWeek[];
|
|
24
|
+
}
|
|
25
|
+
export interface IHotelRestrictionConfig {
|
|
26
|
+
hotelIds: string[];
|
|
27
|
+
}
|
|
28
|
+
export interface IRoomRestrictionConfig {
|
|
29
|
+
roomCodes: string[];
|
|
30
|
+
}
|
|
31
|
+
export interface IRateRestrictionConfig {
|
|
32
|
+
rateCodes: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface INightCountConfig {
|
|
35
|
+
min?: number;
|
|
36
|
+
max?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface IAnyOfConfig {
|
|
39
|
+
branches: IRuleSpec[][];
|
|
40
|
+
}
|
|
41
|
+
export type IRuleSpec = {
|
|
42
|
+
ruleType: ERuleType.Schedule;
|
|
43
|
+
configuration: IScheduleConfig;
|
|
44
|
+
} | {
|
|
45
|
+
ruleType: ERuleType.GeoLock;
|
|
46
|
+
configuration: IGeoLockConfig;
|
|
47
|
+
} | {
|
|
48
|
+
ruleType: ERuleType.DeviceTarget;
|
|
49
|
+
configuration: IDeviceTargetConfig;
|
|
50
|
+
} | {
|
|
51
|
+
ruleType: ERuleType.DayOfWeek;
|
|
52
|
+
configuration: IDayOfWeekConfig;
|
|
53
|
+
} | {
|
|
54
|
+
ruleType: ERuleType.HotelRestriction;
|
|
55
|
+
configuration: IHotelRestrictionConfig;
|
|
56
|
+
} | {
|
|
57
|
+
ruleType: ERuleType.RoomRestriction;
|
|
58
|
+
configuration: IRoomRestrictionConfig;
|
|
59
|
+
} | {
|
|
60
|
+
ruleType: ERuleType.RateRestriction;
|
|
61
|
+
configuration: IRateRestrictionConfig;
|
|
62
|
+
} | {
|
|
63
|
+
ruleType: ERuleType.NightCount;
|
|
64
|
+
configuration: INightCountConfig;
|
|
65
|
+
} | {
|
|
66
|
+
ruleType: ERuleType.AnyOf;
|
|
67
|
+
configuration: IAnyOfConfig;
|
|
68
|
+
};
|