@roomstay/core 0.1.19 → 0.1.21
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/node.js +1 -1
- package/dist/types/Booking/IBookingQuote.type.d.ts +28 -0
- package/dist/types/Hotel/IAuxiliaryFilter.type.d.ts +10 -1
- package/dist/types/RMS/ERMSDiscountType.enum.d.ts +5 -0
- package/dist/types/RMS/IPropertyDiscount.type.d.ts +5 -0
- package/dist/types/RMS/IRMSPropertyDiscount.type.d.ts +28 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/web.js +1 -1
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(n,o)=>{for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let o,t,a,r,i,c,d,l,u;function
|
|
1
|
+
(()=>{"use strict";var e={d:(n,o)=>{for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let o,t,a,r,i,c,d,l,u,y;function s(e){return e.toUpperCase()}e.r(n),e.d(n,{EBookingPaymentMethod:()=>t,ECompanyProvider:()=>i,EDistanceUnitType:()=>c,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>d,EHotelWeekdayStartsOn:()=>l,EPlanpayBookingStatus:()=>r,ERMSDiscountType:()=>u,ERoomstayImageSize:()=>y,IBookingStatus:()=>o,calculateTotalForMemberBooking:()=>p,resizeRoomstayImageUrl:()=>m,uppercaseString:()=>s}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(o||(o={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen"}(t||(t={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till"}(a||(a={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={})),function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS"}(i||(i={})),function(e){e.Metric="metric",e.Imperial="imperial"}(c||(c={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(d||(d={})),function(e){e.Monday="monday",e.Sunday="sunday"}(l||(l={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO"}(u||(u={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(y||(y={}));const p=e=>{let n=0;const o=Object.values(e.itinerary);for(const e of o){const o=Object.keys(e.nights);for(const t of o)n+=e.nights[t].total}return n},m=(e,n)=>e.includes("cdn.app.roomstay.io")?e+"?w="+n:e;module.exports=n})();
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type IBookingQuoteRequest = {
|
|
2
|
+
rows: {
|
|
3
|
+
rowId: string;
|
|
4
|
+
rateCode: string;
|
|
5
|
+
roomCode: string;
|
|
6
|
+
adults?: number;
|
|
7
|
+
children?: number;
|
|
8
|
+
infants?: number;
|
|
9
|
+
promoCode?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Example format "2023-10-22 10:00:00"
|
|
12
|
+
*/
|
|
13
|
+
checkIn: string;
|
|
14
|
+
/**
|
|
15
|
+
* Example format "2023-10-22 10:00:00"
|
|
16
|
+
*/
|
|
17
|
+
checkOut: string;
|
|
18
|
+
}[];
|
|
19
|
+
};
|
|
20
|
+
export type IBookingQuoteResponse = {
|
|
21
|
+
rows: {
|
|
22
|
+
rowId: string;
|
|
23
|
+
totalRate: number;
|
|
24
|
+
totalDeposit: number;
|
|
25
|
+
totalFees: number;
|
|
26
|
+
quoteId: number;
|
|
27
|
+
}[];
|
|
28
|
+
} | null;
|
|
@@ -5,7 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type IAuxiliaryFilter = {
|
|
7
7
|
type: 'select';
|
|
8
|
+
/**
|
|
9
|
+
* If the target value can have multiple values specified (i.e if room can both have "tend", and "caravan" as a type)
|
|
10
|
+
*/
|
|
11
|
+
allowSourceMultiple?: boolean;
|
|
12
|
+
/** If a room is selected with this value, require that the user enters the specific value at checkout */
|
|
13
|
+
requireInput?: boolean;
|
|
8
14
|
/** If set to true, and user decides to filter by 3rd entry, 1st & 2nd also works */
|
|
9
15
|
includeAllAbove: boolean;
|
|
10
|
-
options: string[]
|
|
16
|
+
options: string[] | {
|
|
17
|
+
value: string | number;
|
|
18
|
+
label: string;
|
|
19
|
+
}[];
|
|
11
20
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ERMSDiscountType } from './ERMSDiscountType.enum';
|
|
2
|
+
export type IRMSPropertyDiscount = {
|
|
3
|
+
name: string;
|
|
4
|
+
hotelId: 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
|
+
availableToIbe: boolean;
|
|
25
|
+
minimumNightStay: number;
|
|
26
|
+
maximumNightStay: number;
|
|
27
|
+
availableToMembers: boolean;
|
|
28
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
export * from './Booking/IPrice.type';
|
|
5
5
|
export * from './Booking/IBookingStatus.type';
|
|
6
6
|
export * from './Booking/IBookingPayment.type';
|
|
7
|
+
export * from './Booking/IBookingQuote.type';
|
|
7
8
|
/**
|
|
8
9
|
* Company
|
|
9
10
|
*/
|
|
@@ -23,6 +24,11 @@ export * from './Hotel/IAuxiliaryFilter.type';
|
|
|
23
24
|
* Room
|
|
24
25
|
*/
|
|
25
26
|
export * from './Room/IRoomGroup.type';
|
|
27
|
+
/**
|
|
28
|
+
* RMS
|
|
29
|
+
*/
|
|
30
|
+
export * from './RMS/IRMSPropertyDiscount.type';
|
|
31
|
+
export * from './RMS/ERMSDiscountType.enum';
|
|
26
32
|
/**
|
|
27
33
|
* Image
|
|
28
34
|
*/
|
package/dist/web.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(n,o)=>{for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let o,t,a,r,i,c,d,l,u;function
|
|
1
|
+
define("@roomstay/core",[],(()=>(()=>{"use strict";var e={d:(n,o)=>{for(var t in o)e.o(o,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:o[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};let o,t,a,r,i,c,d,l,u,y;function s(e){return e.toUpperCase()}e.r(n),e.d(n,{EBookingPaymentMethod:()=>t,ECompanyProvider:()=>i,EDistanceUnitType:()=>c,EHotelCardProcessor:()=>a,EHotelPriceModel:()=>d,EHotelWeekdayStartsOn:()=>l,EPlanpayBookingStatus:()=>r,ERMSDiscountType:()=>u,ERoomstayImageSize:()=>y,IBookingStatus:()=>o,calculateTotalForMemberBooking:()=>p,resizeRoomstayImageUrl:()=>m,uppercaseString:()=>s}),function(e){e.Pending="Pending",e.Committed="Committed",e.Cancelled="Cancelled"}(o||(o={})),function(e){e.Card="Card",e.SavedCard="SavedCard",e.Planpay="Planpay",e.Adyen="Adyen"}(t||(t={})),function(e){e.Passthrough="Passthrough",e.Adyen="Adyen",e.Till="Till"}(a||(a={})),function(e){e.Unknown="unknown",e.Unpaid="unpaid",e.Accepted="accepted",e.Cancelled="cancelled",e.Refunded="refunded",e.Rejected="rejected"}(r||(r={})),function(e){e.Synxis="Synxis",e.Availpro="Availpro",e.RMS="RMS"}(i||(i={})),function(e){e.Metric="metric",e.Imperial="imperial"}(c||(c={})),function(e){e.PerPerson="PerPerson",e.PerDay="PerDay",e.PerOccupancy="PerOccupancy"}(d||(d={})),function(e){e.Monday="monday",e.Sunday="sunday"}(l||(l={})),function(e){e.Percentage="Percentage",e.Amount="Amount",e.Bogo="BOGO"}(u||(u={})),function(e){e[e.Icon=128]="Icon",e[e.Tiny=256]="Tiny",e[e.Small=512]="Small",e[e.Medium=768]="Medium",e[e.Large=1024]="Large",e[e.ExtraLarge=1600]="ExtraLarge"}(y||(y={}));const p=e=>{let n=0;const o=Object.values(e.itinerary);for(const e of o){const o=Object.keys(e.nights);for(const t of o)n+=e.nights[t].total}return n},m=(e,n)=>e.includes("cdn.app.roomstay.io")?e+"?w="+n:e;return n})()));
|