@roomstay/core 0.1.80 → 0.2.0-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.
Files changed (137) hide show
  1. package/dist/browser/index.js +830 -768
  2. package/dist/browser/index.js.map +1 -1
  3. package/dist/node/index.cjs +8 -8
  4. package/dist/node/index.cjs.map +1 -1
  5. package/dist/node/index.mjs +830 -768
  6. package/dist/node/index.mjs.map +1 -1
  7. package/dist/types/index.d.ts +3 -140
  8. package/dist/types/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts +28 -0
  9. package/dist/types/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts.map +1 -1
  10. package/dist/types/types/AnalyticsEvents/IRoomstayEventData.type.d.ts +27 -2
  11. package/dist/types/types/AnalyticsEvents/IRoomstayEventData.type.d.ts.map +1 -1
  12. package/dist/types/types/AnalyticsEvents/MetaCapiTransformer.d.ts +0 -1
  13. package/dist/types/types/AnalyticsEvents/MetaCapiTransformer.d.ts.map +1 -1
  14. package/dist/types/types/Availability/Availability.types.d.ts +1 -1
  15. package/dist/types/types/Booking/IBookingExtraFields.type.d.ts +13 -0
  16. package/dist/types/types/Booking/IBookingExtraFields.type.d.ts.map +1 -1
  17. package/dist/types/types/Booking/IBookingPayment.type.d.ts +9 -0
  18. package/dist/types/types/Booking/IBookingPayment.type.d.ts.map +1 -1
  19. package/dist/types/types/Booking/PlaceBooking.types.d.ts +2 -2
  20. package/dist/types/types/Booking/PlaceBooking.types.d.ts.map +1 -1
  21. package/dist/types/types/Company/IAdminCompany.type.d.ts +1 -1
  22. package/dist/types/types/Hotel/EIntegration.enum.d.ts +2 -1
  23. package/dist/types/types/Hotel/EIntegration.enum.d.ts.map +1 -1
  24. package/dist/types/types/Hotel/IHotelReplica.type.d.ts +1 -1
  25. package/dist/types/{Member → types/Member}/EMembershipProvider.type.d.ts +1 -0
  26. package/dist/types/types/Member/EMembershipProvider.type.d.ts.map +1 -0
  27. package/dist/types/types/Member/IRoomstayMember.type.d.ts +1 -1
  28. package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts +1 -1
  29. package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts +1 -1
  30. package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts +1 -1
  31. package/dist/types/types/RMS/ERMSSyncStrategy.enum.d.ts +1 -0
  32. package/dist/types/types/RMS/ERMSSyncStrategy.enum.d.ts.map +1 -1
  33. package/dist/types/{RMS → types/RMS}/RMSGuestDTO.type.d.ts +1 -0
  34. package/dist/types/types/RMS/RMSGuestDTO.type.d.ts.map +1 -0
  35. package/dist/types/types/index.d.ts +2 -0
  36. package/dist/types/types/index.d.ts.map +1 -1
  37. package/dist/types/utils/bookingTotal.d.ts +1 -1
  38. package/dist/types/utils/calculateFee.d.ts +1 -1
  39. package/dist/types/utils/feeTypes.d.ts +1 -1
  40. package/dist/types/utils/roomstayImageResize.d.ts +1 -1
  41. package/package.json +15 -11
  42. package/dist/index.d.ts +0 -2
  43. package/dist/node.js +0 -1
  44. package/dist/types/Addons/Addon.enum.d.ts +0 -2
  45. package/dist/types/Addons/Addon.types.d.ts +0 -55
  46. package/dist/types/Analytics/IBigQueryResults.type.d.ts +0 -45
  47. package/dist/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts +0 -92
  48. package/dist/types/AnalyticsEvents/IAnalyticsSession.type.d.ts +0 -20
  49. package/dist/types/AnalyticsEvents/IRoomstayEventData.type.d.ts +0 -90
  50. package/dist/types/AnalyticsEvents/MetaCapiTransformer.d.ts +0 -20
  51. package/dist/types/Api/Reservations.type.d.ts +0 -84
  52. package/dist/types/Api/RoomNightRate.type.d.ts +0 -7
  53. package/dist/types/Availability/Availability.types.d.ts +0 -121
  54. package/dist/types/Booking/ConfirmBooking.types.d.ts +0 -21
  55. package/dist/types/Booking/EBooking.types.d.ts +0 -12
  56. package/dist/types/Booking/GetBooking.types.d.ts +0 -7
  57. package/dist/types/Booking/IBookingCreateErrorResponse.type.d.ts +0 -13
  58. package/dist/types/Booking/IBookingExtraFields.type.d.ts +0 -18
  59. package/dist/types/Booking/IBookingPayment.type.d.ts +0 -114
  60. package/dist/types/Booking/IBookingQuote.type.d.ts +0 -30
  61. package/dist/types/Booking/ICommonQueryParameters.type.d.ts +0 -3
  62. package/dist/types/Booking/Itinerary.types.d.ts +0 -99
  63. package/dist/types/Booking/PencilReservation.types.d.ts +0 -19
  64. package/dist/types/Booking/PlaceBooking.types.d.ts +0 -89
  65. package/dist/types/Company/ECompanyProvider.enum.d.ts +0 -8
  66. package/dist/types/Company/IAdminCompany.type.d.ts +0 -46
  67. package/dist/types/Company/IAdminCompanyUser.type.d.ts +0 -15
  68. package/dist/types/Events/ERoomstayEventSource.enum.d.ts +0 -4
  69. package/dist/types/Events/IRoomstayEvent.type.d.ts +0 -50
  70. package/dist/types/Fees/EFeeType.enum.d.ts +0 -7
  71. package/dist/types/Fees/IFee.type.d.ts +0 -11
  72. package/dist/types/Fees/IFeeConfigurationOptions.type.d.ts +0 -6
  73. package/dist/types/General/Format.types.d.ts +0 -1
  74. package/dist/types/General/HttpMethod.enum.d.ts +0 -9
  75. package/dist/types/General/IMessage.type.d.ts +0 -6
  76. package/dist/types/General/Pagination.types.d.ts +0 -20
  77. package/dist/types/General/Warning.type.d.ts +0 -14
  78. package/dist/types/GiftCards/GiftCard.types.d.ts +0 -345
  79. package/dist/types/GiftCards/GiftCardAuth.types.d.ts +0 -31
  80. package/dist/types/GiftCards/GiftCardLogs.enum.d.ts +0 -34
  81. package/dist/types/Hotel/EHotelAddressRequirement.enum.d.ts +0 -5
  82. package/dist/types/Hotel/EHotelPriceModel.enum.d.ts +0 -5
  83. package/dist/types/Hotel/EHotelStateFieldConfiguration.enum.d.ts +0 -5
  84. package/dist/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts +0 -4
  85. package/dist/types/Hotel/EIntegration.enum.d.ts +0 -10
  86. package/dist/types/Hotel/IAuxiliaryFilter.type.d.ts +0 -24
  87. package/dist/types/Hotel/IHotelColorScheme.type.d.ts +0 -29
  88. package/dist/types/Hotel/IHotelOverrides.type.d.ts +0 -28
  89. package/dist/types/Hotel/IHotelReplica.type.d.ts +0 -56
  90. package/dist/types/Hotel/IHotelService.type.d.ts +0 -6
  91. package/dist/types/Image/IRoomstayImage.type.d.ts +0 -8
  92. package/dist/types/Maintenance/IMaintenanceStatus.type.d.ts +0 -26
  93. package/dist/types/Media/IMedia.type.d.ts +0 -10
  94. package/dist/types/Member/IMember.type.d.ts +0 -7
  95. package/dist/types/Member/IMemberVerification.type.d.ts +0 -10
  96. package/dist/types/Member/IRoomstayCognitoMember.type.d.ts +0 -4
  97. package/dist/types/Member/IRoomstayMember.type.d.ts +0 -18
  98. package/dist/types/Member/IRoomstayMemberBooking.type.d.ts +0 -28
  99. package/dist/types/Member/IRoomstayMemberBookingAddress.type.d.ts +0 -9
  100. package/dist/types/Member/IRoomstayMemberBookingItem.type.d.ts +0 -25
  101. package/dist/types/Member/IRoomstayMemberBookingProfile.type.d.ts +0 -11
  102. package/dist/types/Member/IRoomstayMemberCards.type.d.ts +0 -12
  103. package/dist/types/Member/IRoomstayMemberJWTData.type.d.ts +0 -3
  104. package/dist/types/Member/IRoomstayMemberLoyalty.type.d.ts +0 -16
  105. package/dist/types/Member/ISession.type.d.ts +0 -4
  106. package/dist/types/Newbook/ENewbookRegion.enum.d.ts +0 -7
  107. package/dist/types/Newbook/ENewbookSyncStrategy.enum.d.ts +0 -5
  108. package/dist/types/Newbook/index.d.ts +0 -2
  109. package/dist/types/OHIP/IOHIPConfiguration.types.d.ts +0 -12
  110. package/dist/types/OHIP/index.d.ts +0 -1
  111. package/dist/types/PMSSync/EPMSSyncStatus.enum.d.ts +0 -8
  112. package/dist/types/PMSSync/IPMSSyncResponse.type.d.ts +0 -10
  113. package/dist/types/PMSSync/index.d.ts +0 -17
  114. package/dist/types/Package/Package.types.d.ts +0 -104
  115. package/dist/types/Policies/EGuaranteePolicy.enum.d.ts +0 -6
  116. package/dist/types/PromoCode/EPromoCodeDiscountType.enum.d.ts +0 -5
  117. package/dist/types/PromoCode/PromoCodeStayDateRangeType.enum.d.ts +0 -11
  118. package/dist/types/RMS/ERMSAuthSyncHistoryStatus.type.d.ts +0 -8
  119. package/dist/types/RMS/ERMSDiscountType.enum.d.ts +0 -6
  120. package/dist/types/RMS/ERMSSyncStrategy.enum.d.ts +0 -39
  121. package/dist/types/RMS/IRMSPropertyDiscount.type.d.ts +0 -33
  122. package/dist/types/RMS/IRMSRequirement.type.d.ts +0 -20
  123. package/dist/types/RMS/IRMSSyncResponse.type.d.ts +0 -8
  124. package/dist/types/RMS/RMSBookingSource.type.d.ts +0 -7
  125. package/dist/types/Room/IRoomGroup.type.d.ts +0 -18
  126. package/dist/utils/TotalCalculator.d.ts +0 -72
  127. package/dist/utils/bookingTotal.d.ts +0 -7
  128. package/dist/utils/calculateFee.d.ts +0 -10
  129. package/dist/utils/feeTypes.d.ts +0 -5
  130. package/dist/utils/index.d.ts +0 -10
  131. package/dist/utils/reflection.d.ts +0 -9
  132. package/dist/utils/roomstayImageResize.d.ts +0 -14
  133. package/dist/utils/roundMoney.d.ts +0 -10
  134. package/dist/utils/typeUtils.d.ts +0 -1
  135. package/dist/utils/uppercaseString.d.ts +0 -1
  136. package/dist/utils/zodUtils.d.ts +0 -19
  137. package/dist/web.js +0 -1
@@ -1,26 +0,0 @@
1
- export type IMaintenanceStatus = {
2
- uuid: string;
3
- /**
4
- * Which service is currently experiencing issues.
5
- */
6
- service: IMaintenanceStatusService;
7
- /**
8
- * The start time of the maintenance window in ISO 8601 format
9
- *
10
- * @example 2023-10-01T00:00:00Z
11
- */
12
- startDate: string;
13
- endDate: string;
14
- /**
15
- * Whether the status is currently in effect or not
16
- */
17
- isActive: boolean;
18
- status: 'error' | 'maintenance';
19
- title: string;
20
- message: string;
21
- };
22
- export declare enum IMaintenanceStatusService {
23
- Frontend = "frontend",
24
- Hotel = "hotel",
25
- Events = "events"
26
- }
@@ -1,10 +0,0 @@
1
- export interface MediaType {
2
- id: string;
3
- name: string;
4
- size?: number;
5
- url: string;
6
- order?: number;
7
- createdDate?: string;
8
- updatedDate?: string;
9
- mediaTarget?: string;
10
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * General membership information passing by the API.
3
- */
4
- export interface IMember {
5
- memberId: string;
6
- promoCode: string;
7
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Extendable list of parameters used to verify a membership.
3
- */
4
- export interface IMemberVerification {
5
- memberNumber?: string;
6
- lastName?: string;
7
- firstName?: string;
8
- email?: string;
9
- password?: string;
10
- }
@@ -1,4 +0,0 @@
1
- export type IRoomstayCognitoMember = {
2
- ['custom:forename']?: string;
3
- ['custom:surname']?: string;
4
- };
@@ -1,18 +0,0 @@
1
- import { IRoomstayCognitoMember, IRoomstayMemberBooking, IRoomstayMemberCards } from '../index.js';
2
- export interface IRoomstayMember extends IRoomstayCognitoMember {
3
- username: string;
4
- email: string;
5
- forename?: string;
6
- surname?: string;
7
- phoneNumber?: string;
8
- address?: {
9
- address?: string;
10
- city?: string;
11
- zip?: string;
12
- state?: string;
13
- country?: string;
14
- };
15
- defaultCard: string;
16
- bookings: IRoomstayMemberBooking[];
17
- cards: IRoomstayMemberCards[];
18
- }
@@ -1,28 +0,0 @@
1
- import { IRoomstayMemberBookingItem, IHotelColorScheme } from '../index.js';
2
- /**
3
- * DynamoDB object reference for a Member Booking
4
- */
5
- export interface IRoomstayMemberBooking {
6
- username: string;
7
- itineraryId: string;
8
- hotelId: string;
9
- hotel: {
10
- name: string;
11
- address: {
12
- line1: string;
13
- line2: string;
14
- line3: string;
15
- city: string;
16
- postalCode: string;
17
- state: string;
18
- country: string;
19
- };
20
- phone: string;
21
- checkInTime: string;
22
- checkOutTime: string;
23
- colors: IHotelColorScheme;
24
- };
25
- itinerary: {
26
- [id: string]: IRoomstayMemberBookingItem;
27
- };
28
- }
@@ -1,9 +0,0 @@
1
- export type IRoomstayMemberBookingAddress = {
2
- line1: string;
3
- line2: string;
4
- line3?: string;
5
- city: string;
6
- postalCode: string;
7
- state: string;
8
- country: string;
9
- };
@@ -1,25 +0,0 @@
1
- import { EBookingStatus, IPrice, IRoomstayMemberBookingProfile } from '../index.js';
2
- export type IRoomstayMemberBookingItem = {
3
- id: string;
4
- roomCode: string;
5
- roomName: string;
6
- images: string[];
7
- rateCode: string;
8
- rateName: string;
9
- adults: number;
10
- children?: number;
11
- profile: IRoomstayMemberBookingProfile;
12
- comments: string[];
13
- status: EBookingStatus;
14
- isCancellable: boolean;
15
- checkInDate: string;
16
- checkOutDate: string;
17
- nights: {
18
- [date: string]: IPrice;
19
- };
20
- cancellationPolicy: string;
21
- guaranteePolicy: string;
22
- promoCode?: string;
23
- cancellationPolicyLongDescription?: string;
24
- guaranteePolicyLongDescription?: string;
25
- };
@@ -1,11 +0,0 @@
1
- import { IRoomstayMemberBookingAddress } from '../index.js';
2
- export type IRoomstayMemberBookingProfile = {
3
- title: string;
4
- firstName: string;
5
- middleName?: string;
6
- lastName: string;
7
- phone?: string;
8
- email?: string;
9
- marketingOptIn?: boolean;
10
- address: IRoomstayMemberBookingAddress;
11
- };
@@ -1,12 +0,0 @@
1
- /**
2
- * These details will always be VGS tokenized strings, for use in the front end
3
- */
4
- export interface IRoomstayMemberCards {
5
- username: string;
6
- cardId: string;
7
- cardNumber: string;
8
- expiry: string;
9
- securityCode: string;
10
- name: string;
11
- type: string;
12
- }
@@ -1,3 +0,0 @@
1
- export type IRoomstayMemberJWTData = {
2
- 'cognito:username': string;
3
- };
@@ -1,16 +0,0 @@
1
- export interface IRoomstayMemberLoyalty {
2
- username: string;
3
- hotelId: string;
4
- spendingBalance: number;
5
- currentTier: number | null;
6
- promoCodeId: string | null;
7
- promoCode: string | null;
8
- redeemedAt: string | null;
9
- lastBookingId: string;
10
- createdAt: string;
11
- updatedAt: string;
12
- }
13
- export interface ILoyaltyTier {
14
- threshold: number;
15
- discountPercent: number;
16
- }
@@ -1,4 +0,0 @@
1
- export interface ISession {
2
- id: string;
3
- hits: number;
4
- }
@@ -1,7 +0,0 @@
1
- export declare enum ENewbookRegion {
2
- Australia = "au",
3
- AsiaPacific = "ap",
4
- Europe = "eu",
5
- UnitedStates = "us",
6
- Staging = "staging"
7
- }
@@ -1,5 +0,0 @@
1
- export declare enum ENewbookSyncStrategy {
2
- Rates = "rates",
3
- Rooms = "rooms",
4
- Availability = "availability"
5
- }
@@ -1,2 +0,0 @@
1
- export * from './ENewbookRegion.enum';
2
- export * from './ENewbookSyncStrategy.enum';
@@ -1,12 +0,0 @@
1
- export type IOHIPConfiguration = {
2
- clientId: string | null;
3
- clientSecret: string | null;
4
- enterpriseId: string | null;
5
- chainCode: string | null;
6
- isProduction: boolean;
7
- tokenExpiryDate?: Date | null;
8
- gatewayUrl: string | null;
9
- connectionSuccesful?: boolean;
10
- interfaceKey?: string | null;
11
- interfaceId?: string | null;
12
- };
@@ -1 +0,0 @@
1
- export * from './IOHIPConfiguration.types';
@@ -1,8 +0,0 @@
1
- export declare enum EPMSSyncStatus {
2
- New = "new",
3
- Queued = "queued",
4
- InProgress = "in_progress",
5
- Success = "success",
6
- Failure = "failure",
7
- RequireResume = "require_resume"
8
- }
@@ -1,10 +0,0 @@
1
- import { ECompanyProvider } from '../Company/ECompanyProvider.enum';
2
- import { EPMSSyncStatus } from './EPMSSyncStatus.enum';
3
- export interface IPMSSyncResponse {
4
- id: number;
5
- provider: ECompanyProvider;
6
- status: EPMSSyncStatus;
7
- syncData: string | null;
8
- syncType: string;
9
- additionalData?: any;
10
- }
@@ -1,17 +0,0 @@
1
- export * from './EPMSSyncStatus.enum';
2
- export * from './IPMSSyncResponse.type';
3
- export declare enum ERMSAuthSyncHistoryStatus {
4
- Success = "success",
5
- Failure = "failure",
6
- New = "new",
7
- Queued = "queued",
8
- InProgress = "in_progress",
9
- RequireResume = "require_resume"
10
- }
11
- export type IRMSSyncResponse = {
12
- id: number;
13
- status: ERMSAuthSyncHistoryStatus;
14
- additionalData: any;
15
- syncData: string | null;
16
- syncType: string;
17
- };
@@ -1,104 +0,0 @@
1
- import { IAddonPriceDetailsFee } from '../Addons/Addon.types';
2
- import { ICommonQueryParameters } from '../Booking/ICommonQueryParameters.type';
3
- import { IItemisedBookingFeeResponse } from '../Booking/Itinerary.types';
4
- export declare class Package {
5
- /**
6
- * The SynXis CR RatePlan Code associated with the Package if the Package is restricted to certain RatePlans
7
- */
8
- ratePlanCode?: string;
9
- name: string;
10
- description: string;
11
- /**
12
- * Whether the price for this package is included in the room rate.
13
- * (Always `false` unless the price is zero)
14
- */
15
- inclusive: boolean;
16
- image: string[];
17
- url?: string;
18
- /**
19
- * Defines how a service is priced.
20
- * Values:
21
- * Per Stay
22
- * Per Night
23
- * Per Person
24
- * Per Person Per Night
25
- */
26
- pricingType: string;
27
- /**
28
- * Number of available items for sale.
29
- */
30
- quantity?: number;
31
- category: string;
32
- cancelPenalty?: string | null;
33
- guaranteeDescription?: string | null;
34
- availability: {
35
- [date: string]: IPriceInfo;
36
- };
37
- }
38
- export declare class ReservedPackage extends Package {
39
- code?: string | undefined;
40
- price?: number;
41
- fees?: number;
42
- itemisedFees?: IItemisedBookingFeeResponse[];
43
- adultQuantity?: number;
44
- childQuantity?: number;
45
- adultPrice?: number;
46
- childPrice?: number;
47
- startDate?: string;
48
- startTime?: string;
49
- hideDatePicker?: boolean;
50
- hideQuantity?: boolean;
51
- order?: number;
52
- discount?: number;
53
- total?: number;
54
- }
55
- export type IPriceInfo = {
56
- /**
57
- * Number of available items for sale.
58
- */
59
- quantity: number;
60
- /**
61
- * Price per quantity
62
- */
63
- price?: number;
64
- adultPrice?: number;
65
- childPrice?: number;
66
- fees?: IAddonPriceDetailsFee[];
67
- adultFees?: IAddonPriceDetailsFee[];
68
- childFees?: IAddonPriceDetailsFee[];
69
- timeSlots?: ITimeSlot[];
70
- };
71
- export type ITimeSlot = {
72
- /**
73
- The start date and time when the package is available.
74
- If the package applies during the whole stay, this node is not returned unless the time needs to be selected. In that case, the Start and End dates do not
75
- include the date: @Start="T07:30:00" and @End="T17:30:00" and @Increment="00:60:00"
76
- Type: DateTime
77
- **/
78
- startTime?: string;
79
- /**
80
- The end date / time when the package is available.
81
- If the package component applies during the whole stay, this node is not returned unless the time needs to be selected. In that case, the Start and End dates
82
- do not include the date: @Start="T07:30:00" and @End="T17:30:00" and @Increment="00:60:00"
83
- Type: DateTime
84
- */
85
- endTime?: string;
86
- /**
87
- Used with @Start and @End. Indicates the interval when the package or service is available.
88
- For example, a package with golf lessons from 7:30 am to 5:30 pm with instructions and available hourly has the TimeSpan attributes set as: @Start="2015-
89
- 010-28T07:30:00" and @End="2015-10-28T17:30:00" and @Increment="00:60:00"
90
- Type: Time
91
- */
92
- increment?: string;
93
- };
94
- export type IGetPackagesRequest = {
95
- adults?: number;
96
- children?: number;
97
- checkInDate: Date;
98
- checkOutDate: Date;
99
- rate: string;
100
- room?: string;
101
- } & ICommonQueryParameters;
102
- export type IGetPackagesResponse = {
103
- [packageName: string]: ReservedPackage;
104
- };
@@ -1,6 +0,0 @@
1
- export declare enum EGuaranteePolicyDepositMode {
2
- Full = "Full",
3
- Percentage = "Percentage",
4
- FirstNight = "FirstNight",
5
- None = "None"
6
- }
@@ -1,5 +0,0 @@
1
- export declare enum EPromoCodeDiscountType {
2
- FlatPercent = "flatPercent",
3
- FlatQuantity = "flatQuantity",
4
- FlatQuantityPerStay = "flatQuantityPerStay"
5
- }
@@ -1,11 +0,0 @@
1
- export declare enum EPromoCodeStayDateRangeType {
2
- Allowed = "Allowed",
3
- Blocked = "Blocked"
4
- }
5
- export declare enum EPromoCodeStayDateRangeRepeatType {
6
- None = "None",
7
- Weekly = "Weekly",
8
- MonthlyDayOfWeek = "MonthlyDayOfWeek",
9
- MonthlyDate = "MonthlyDate",
10
- Yearly = "Yearly"
11
- }
@@ -1,8 +0,0 @@
1
- export declare enum ERMSAuthSyncHistoryStatus {
2
- Success = "success",
3
- Failure = "failure",
4
- New = "new",
5
- Queued = "queued",
6
- InProgress = "in_progress",
7
- RequireResume = "require_resume"
8
- }
@@ -1,6 +0,0 @@
1
- export declare enum ERMSDiscountType {
2
- Percentage = "Percentage",
3
- Amount = "Amount",
4
- Bogo = "BOGO",
5
- NightlyRateOverride = "NightlyRateOverride"
6
- }
@@ -1,39 +0,0 @@
1
- export declare enum ERMSSyncStrategy {
2
- /**
3
- * Super-admin granular sync strategies
4
- */
5
- Hotel = "hotel",
6
- HotelImages = "hotelImages",
7
- Cancellation = "cancellation",
8
- Room = "room",
9
- Rates = "rates",
10
- OneGuaranteePolicy = "oneGuaranteePolicy",
11
- RoomRates = "roomRates",
12
- RoomImages = "roomImages",
13
- BookingSources = "booking-sources",
14
- Areas = "areas",
15
- Dwellings = "dwellings",
16
- AreaDwellings = "areaDwellings",
17
- ConvertDwellingConfigToAuxInput = "convertDwellingConfigToAuxInput",
18
- Discounts = "discounts",
19
- PropertyDiscounts = "propertyDiscounts",
20
- RoomDiscounts = "roomDiscounts",
21
- PropertySundries = "propertySundries",
22
- PropertyFees = "propertyFees",
23
- PropertyCards = "property-cards",
24
- Countries = "countries",
25
- Addons = "addons",
26
- Requirements = "requirements",
27
- RoomAddons = "room-addons",
28
- /**
29
- * Client-facing sync strategies
30
- */
31
- ClientFacingPromoSync = "clientFacingPromoSync",
32
- ClientFacingRoomSync = "clientFacingRoomSync",
33
- ClientFacingRateSync = "clientFacingRateSync",
34
- ClientFacingAreaSync = "clientFacingAreaSync",
35
- /**
36
- * Other sync strategies
37
- */
38
- NewRateFetch = "newRateFetch"
39
- }
@@ -1,33 +0,0 @@
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
- nightlyRateOverride?: {
25
- firstXNights: number;
26
- totalCharge: number;
27
- includeAdditionals: boolean;
28
- };
29
- availableToIbe: boolean;
30
- minimumNightStay: number;
31
- maximumNightStay: number;
32
- availableToMembers: boolean;
33
- };
@@ -1,20 +0,0 @@
1
- export type IRMSRequirement = {
2
- chargeDailyIncludeToDate: boolean;
3
- chargeRequiredDaily: boolean;
4
- code: string;
5
- groupingId: number;
6
- note: string;
7
- sundryId: number;
8
- unitPrice: number;
9
- useSundryAmount: boolean;
10
- feeType: string;
11
- adultAmount: number;
12
- childAmount: number;
13
- infantAmount: number;
14
- amount: number;
15
- quantity: number;
16
- requiredDaily: boolean;
17
- id: number;
18
- name: string;
19
- total: number;
20
- };
@@ -1,8 +0,0 @@
1
- import { ERMSAuthSyncHistoryStatus } from './ERMSAuthSyncHistoryStatus.type';
2
- export type IRMSSyncResponse = {
3
- id: number;
4
- status: ERMSAuthSyncHistoryStatus;
5
- additionalData: any;
6
- syncData: string | null;
7
- syncType: string;
8
- };
@@ -1,7 +0,0 @@
1
- export type RMSBookingSourceType = {
2
- id: number;
3
- companyId: number;
4
- hotelId: string;
5
- name: string;
6
- code: string;
7
- };
@@ -1,18 +0,0 @@
1
- export type IRoomGroup = {
2
- companyId: number;
3
- hotelId: string;
4
- id: string;
5
- groupName: string;
6
- displayOrder: number;
7
- checkInTime: string | null;
8
- checkOutTime: string | null;
9
- /** this will be a list of room codes */
10
- rooms: string[];
11
- auxiliaryFilters: {
12
- [id: string]: {
13
- enabled: boolean;
14
- requireSelection: boolean;
15
- };
16
- };
17
- deletedDate?: Date;
18
- };
@@ -1,72 +0,0 @@
1
- import { BasketAddonDTO } from '../types/Addons/Addon.types';
2
- import { ReservationAddonDTO, ReservationsDTO } from '../types/Api/Reservations.type';
3
- /**
4
- * A utility class to perform calculations related to addon pricing and reservation totals.
5
- */
6
- export declare class TotalCalculator {
7
- /**
8
- * Calculates the base total cost for a single addon, without considering any additional fees.
9
- *
10
- * @param addon - A `BasketAddonDTO` or `ReservationAddonDTO` representing the addon details.
11
- * @param dismissAddonNightCount - If true, skips multiplying totals by the number of nights.
12
- * @returns An object containing:
13
- * - `indPrice`: Total price without per adult/child pricing.
14
- * - `indAdultPrice`: Price calculated based on adult quantities.
15
- * - `indChildPrice`: Price calculated based on child quantities.
16
- * - `addonTotal`: Sum of the above prices, optionally multiplied by nights.
17
- */
18
- static calculateBaseAddonTotal: (addon: Partial<BasketAddonDTO> | Partial<ReservationAddonDTO>, dismissAddonNightCount: boolean) => {
19
- indPrice: number;
20
- indAdultPrice: number;
21
- indChildPrice: number;
22
- addonTotal: number;
23
- };
24
- /**
25
- * Calculates the total for one or more basket addons, including all associated fees.
26
- *
27
- * @param addons - A single or an array of `BasketAddonDTO` objects.
28
- * @param dismissAddonNightCount - If true, disables night-based multiplier for addons.
29
- * @returns An object with:
30
- * - `price`: Total base price (excluding adult/child prices).
31
- * - `adultPrice`: Total based on adult quantities and prices.
32
- * - `childPrice`: Total based on child quantities and prices.
33
- * - `totalFees`: Total of all applicable addon fees.
34
- * - `total`: Sum of prices and fees.
35
- */
36
- static calculateBasketAddonTotal: (addons: BasketAddonDTO | BasketAddonDTO[], dismissAddonNightCount?: boolean) => {
37
- price: number;
38
- adultPrice: number;
39
- childPrice: number;
40
- totalFees: number;
41
- total: number;
42
- };
43
- /**
44
- * Calculates the total for one or more reservation addons, including itemised fees.
45
- *
46
- * @param addons - A single or an array of `ReservationAddonDTO` objects.
47
- * @param dismissAddonNightCount - If true, disables night-based multiplier for addons.
48
- * @returns An object with:
49
- * - `price`: Base addon price without adult/child multipliers.
50
- * - `adultPrice`: Addon cost based on adult rates.
51
- * - `childPrice`: Addon cost based on child rates.
52
- * - `totalFees`: Total of all fees (itemised if available).
53
- * - `total`: Final addon cost including fees.
54
- * - `displayPrice`: Price displayed to the user (varies depending on fee breakdown).
55
- */
56
- static calculateReservationAddonTotal: (addons: ReservationAddonDTO | ReservationAddonDTO[], dismissAddonNightCount?: boolean) => {
57
- price: number;
58
- adultPrice: number;
59
- childPrice: number;
60
- totalFees: number;
61
- total: number;
62
- displayPrice: number;
63
- };
64
- /**
65
- * Calculates the total cost for a reservation, including individual reservation totals and global itemised fees.
66
- *
67
- * @param reservation - The full reservation data in `ReservationsDTO` format.
68
- * @param dismissAddonNightCount - If true, disables night-based multipliers on addons.
69
- * @returns The rounded total cost of the reservation.
70
- */
71
- static calculateTotalForReservation: (reservation: ReservationsDTO, dismissAddonNightCount?: boolean) => number;
72
- }
@@ -1,7 +0,0 @@
1
- import { IRoomstayMemberBooking } from '../types/index.js';
2
- /**
3
- * Calculates the total AFTER tax of the booking.
4
- *
5
- * @param reservation IRoomstayMemberBooking
6
- */
7
- export declare const calculateTotalForMemberBooking: (reservation: IRoomstayMemberBooking) => number;
@@ -1,10 +0,0 @@
1
- import { IFee } from '../types/index.js';
2
- interface FeeCalculationParams {
3
- baseAmount?: number;
4
- numberOfNights?: number;
5
- feeIncludedInBaseAmount?: boolean;
6
- extractedFromRates?: boolean;
7
- removedPercentages?: number[];
8
- }
9
- export declare function calculateFeeAmount(fee: IFee, params?: FeeCalculationParams): number;
10
- export {};
@@ -1,5 +0,0 @@
1
- import { EFeeType, IFee, IFeeConfigurationOptions } from '../types/index.js';
2
- export declare function getFilteredBookingFees<T extends IFee>(fees: T[]): T[];
3
- export declare function getFilteredBookingRateFees<T extends IFee>(fees: T[]): T[];
4
- export declare function getFilteredBookingAddonFees<T extends IFee>(fees: T[]): T[];
5
- export declare function getFeeOptionValidity(feeType: EFeeType): Record<keyof IFeeConfigurationOptions, boolean>;