@roomstay/core 0.1.74-4 → 0.1.74

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 (86) hide show
  1. package/dist/node.js +1 -1
  2. package/dist/node.js.LICENSE.txt +7 -0
  3. package/dist/node.js.map +1 -0
  4. package/dist/types/Booking/IBookingCreateErrorResponse.d.ts +11 -0
  5. package/dist/types/Booking/IBookingPayment.type.d.ts +1 -7
  6. package/dist/types/Booking/IBookingStatus.type.d.ts +5 -0
  7. package/dist/types/Booking/IPrice.type.d.ts +7 -0
  8. package/dist/types/GiftCards/GiftCard.types.d.ts +2 -89
  9. package/dist/types/GiftCards/GiftCardLogs.enum.d.ts +1 -1
  10. package/dist/types/Maintenance/IMaintenanceStatus.type.d.ts +1 -4
  11. package/dist/types/Policies/EGuaranteePolicy.enum.d.ts +0 -5
  12. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +15 -0
  13. package/dist/types/components/DateRangePicker/DateRangePicker.type.d.ts +8 -0
  14. package/dist/types/components/DateRangePicker/DateRangePickerContext.d.ts +16 -0
  15. package/dist/types/components/DateRangePicker/DateRangePickerDay.d.ts +22 -0
  16. package/dist/types/components/DateRangePicker/DateRangePickerDays.d.ts +7 -0
  17. package/dist/types/components/DateRangePicker/DateRangePickerMonth.d.ts +8 -0
  18. package/dist/types/components/DateRangePicker/FloatingDateRangePicker.d.ts +25 -0
  19. package/dist/types/components/DateRangePicker/index.d.ts +3 -0
  20. package/dist/types/components/Icon/Icon.d.ts +88 -0
  21. package/dist/types/components/Icon/index.d.ts +1 -0
  22. package/dist/types/components/Overlay/Overlay.d.ts +20 -0
  23. package/dist/types/components/Overlay/index.d.ts +1 -0
  24. package/dist/types/components/Portal/Portal.d.ts +7 -0
  25. package/dist/types/components/Portal/index.d.ts +1 -0
  26. package/dist/types/components/Text/Text.d.ts +15 -0
  27. package/dist/types/components/Text/Text.type.d.ts +14 -0
  28. package/dist/types/components/Text/index.d.ts +2 -0
  29. package/dist/types/components/animations/Fade.d.ts +13 -0
  30. package/dist/types/components/animations/index.d.ts +1 -0
  31. package/dist/types/components/index.d.ts +6 -0
  32. package/dist/types/hooks/BodyClickHook.d.ts +8 -0
  33. package/dist/types/hooks/index.d.ts +1 -0
  34. package/dist/types/index.d.ts +2 -12
  35. package/dist/types/index.node.d.ts +2 -0
  36. package/dist/types/index.web.d.ts +4 -0
  37. package/dist/types/models/Client/Hotel/WeekdayStartsOn.types.d.ts +4 -0
  38. package/dist/types/models/Client/Hotel/index.d.ts +1 -0
  39. package/dist/types/models/Client/index.d.ts +1 -0
  40. package/dist/types/models/index.d.ts +1 -0
  41. package/dist/types/stories/DateRangePicker.stories.d.ts +8 -0
  42. package/dist/types/stories/FloatingDateRangePicker.stories.d.ts +5 -0
  43. package/dist/types/types/Booking/IBookingCreateErrorResponse.d.ts +11 -0
  44. package/dist/types/types/Booking/IBookingPayment.type.d.ts +42 -0
  45. package/dist/types/types/Booking/IBookingQuote.type.d.ts +29 -0
  46. package/dist/types/types/Booking/IBookingStatus.type.d.ts +5 -0
  47. package/dist/types/types/Booking/IPrice.type.d.ts +7 -0
  48. package/dist/types/types/Company/ECompanyProvider.enum.d.ts +6 -0
  49. package/dist/types/types/Company/IAdminCompany.type.d.ts +31 -0
  50. package/dist/types/types/Events/IRoomstayEvent.type.d.ts +48 -0
  51. package/dist/types/types/Hotel/EHotelPriceModel.enum.d.ts +5 -0
  52. package/dist/types/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts +4 -0
  53. package/dist/types/types/Hotel/IAuxiliaryFilter.type.d.ts +20 -0
  54. package/dist/types/types/Hotel/IHotelColorScheme.type.d.ts +11 -0
  55. package/dist/types/types/Hotel/IHotelOverrides.type.d.ts +18 -0
  56. package/dist/types/types/Hotel/IHotelReplica.type.d.ts +53 -0
  57. package/dist/types/types/Hotel/IHotelService.type.d.ts +6 -0
  58. package/dist/types/types/Image/IRoomstayImage.type.d.ts +8 -0
  59. package/dist/types/types/Member/IRoomstayCognitoMember.type.d.ts +4 -0
  60. package/dist/types/types/Member/IRoomstayMember.type.d.ts +17 -0
  61. package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts +28 -0
  62. package/dist/types/types/Member/IRoomstayMemberBookingAddress.type.d.ts +9 -0
  63. package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts +25 -0
  64. package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts +11 -0
  65. package/dist/types/types/Member/IRoomstayMemberCards.type.d.ts +12 -0
  66. package/dist/types/types/Member/ISession.type.d.ts +4 -0
  67. package/dist/types/types/Policies/EGuaranteePolicy.enum.d.ts +5 -0
  68. package/dist/types/types/RMS/ERMSDiscountType.enum.d.ts +5 -0
  69. package/dist/types/types/RMS/IRMSPropertyDiscount.type.d.ts +28 -0
  70. package/dist/types/types/RMS/IRMSRequirement.type.d.ts +19 -0
  71. package/dist/types/types/Room/IRoomGroup.type.d.ts +11 -0
  72. package/dist/types/types/index.d.ts +56 -0
  73. package/dist/types/utils/bookingTotal.d.ts +7 -0
  74. package/dist/types/utils/calendarHelper.d.ts +16 -0
  75. package/dist/types/utils/color.d.ts +20 -0
  76. package/dist/types/utils/index.node.d.ts +2 -0
  77. package/dist/types/utils/index.web.d.ts +4 -0
  78. package/dist/types/utils/roomstayImageResize.d.ts +14 -0
  79. package/dist/types/utils/uppercaseString.d.ts +1 -0
  80. package/dist/utils/roundMoney.d.ts +1 -11
  81. package/dist/web.js +1 -1
  82. package/dist/web.js.LICENSE.txt +7 -0
  83. package/dist/web.js.map +1 -0
  84. package/package.json +1 -1
  85. package/dist/types/Addon/Addon.enum.d.ts +0 -14
  86. package/dist/types/Addon/Addon.type.d.ts +0 -24
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import { Dayjs } from "dayjs";
3
+ import { EDateRangePickerTheme } from "./DateRangePicker.type";
4
+ export interface DateRangePickerContextProps {
5
+ todayInUnix: number;
6
+ today: Dayjs | null;
7
+ startDate: Dayjs | null;
8
+ endDate: Dayjs | null;
9
+ hoveredMonth: Dayjs | null;
10
+ currentMonth: Dayjs | null;
11
+ onHoverOver: (date: Dayjs) => void;
12
+ onDayClicked: (date: Dayjs) => void;
13
+ fixedStartDate: boolean;
14
+ theme?: EDateRangePickerTheme;
15
+ }
16
+ export declare const DateRangePickerContext: React.Context<DateRangePickerContextProps>;
@@ -0,0 +1,22 @@
1
+ import { FC } from "react";
2
+ import dayjs from "dayjs";
3
+ import { Color } from "@utils/color";
4
+ interface DatePickerDayProps {
5
+ text: any;
6
+ day?: dayjs.Dayjs | any;
7
+ unix: number;
8
+ price?: Promise<number>;
9
+ statuses?: DatePickerDayStatus[];
10
+ selectable?: boolean;
11
+ onClick?: (day: string) => void;
12
+ onHover?: (day: string, status: boolean) => void;
13
+ color?: Color;
14
+ }
15
+ export declare enum DatePickerDayStatus {
16
+ Inactive = 0,
17
+ Selecting = "--selecting",
18
+ Loading = "--loading",
19
+ Selected = "--selected"
20
+ }
21
+ declare const DateRangePickerDay: FC<DatePickerDayProps>;
22
+ export { DateRangePickerDay };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import dayjs from "dayjs";
3
+ interface DatePickerDaysProps {
4
+ showingMonth: dayjs.Dayjs;
5
+ }
6
+ export declare function DateRangePickerDays(props: DatePickerDaysProps): React.JSX.Element;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import dayjs from "dayjs";
3
+ interface DatePickerMonthProps {
4
+ showingMonth: dayjs.Dayjs;
5
+ small?: boolean;
6
+ }
7
+ export declare function DateRangePickerMonth(props: DatePickerMonthProps): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import dayjs from "dayjs";
3
+ import { Placement } from "@popperjs/core";
4
+ import { DateRangePickerProps } from "./index";
5
+ export interface FloatingDateRangePickerProps extends Omit<DateRangePickerProps, "selectedStartDate" | "selectedEndDate" | "onStartDateChanged" | "onEndDateChanged"> {
6
+ children?: React.ReactNode;
7
+ startDate?: dayjs.Dayjs | null;
8
+ endDate?: dayjs.Dayjs | null;
9
+ overlayOffset?: [number, number];
10
+ fixedStartDate?: boolean;
11
+ container?: HTMLElement;
12
+ selectedDateChanged?: (startDate: dayjs.Dayjs, endDate: dayjs.Dayjs) => void;
13
+ className?: string;
14
+ overlay?: {
15
+ placement?: Placement;
16
+ fallbackPlacements?: Placement;
17
+ };
18
+ }
19
+ export interface FloatingDateRangePickerHandle {
20
+ closePicker: () => void;
21
+ openPicker: () => void;
22
+ toggle: () => void;
23
+ }
24
+ declare const FloatingDateRangePicker: React.ForwardRefExoticComponent<FloatingDateRangePickerProps & React.RefAttributes<FloatingDateRangePickerHandle>>;
25
+ export { FloatingDateRangePicker };
@@ -0,0 +1,3 @@
1
+ export * from "./DateRangePicker";
2
+ export * from "./FloatingDateRangePicker";
3
+ export * from "./DateRangePicker.type";
@@ -0,0 +1,88 @@
1
+ import { Color } from "@utils/color";
2
+ import React from "react";
3
+ export declare enum IconType {
4
+ Email = "Email",
5
+ Degrees = "Degrees",
6
+ Hotel = "Hotel",
7
+ Hotel2 = "Hotel-2",
8
+ Map = "Map",
9
+ Info = "Info",
10
+ Deal = "Deal",
11
+ Money = "Money",
12
+ Lock = "Lock",
13
+ Check = "Check",
14
+ CheckCircled = "Check-Circled",
15
+ Bed = "Bed",
16
+ ApplePay = "Apple-Pay",
17
+ PayPal = "PayPal",
18
+ Person = "Person",
19
+ ChildFriendly = "Child-Friendly",
20
+ Fridge = "Fridge",
21
+ Smoking = "Smoking",
22
+ Gym = "Gym",
23
+ Bar = "Bar",
24
+ Laundry = "Laundry",
25
+ Breakfast = "Breakfast",
26
+ Snacks = "Snacks",
27
+ Phone = "Phone",
28
+ ViewMonth = "View-Month",
29
+ Ovolo = "Ovolo",
30
+ ViewWeek = "View-Week",
31
+ AirCon = "Air-Con",
32
+ WiFi = "Wifi",
33
+ Time = "Time",
34
+ People = "People",
35
+ Calendar = "Calendar",
36
+ CreditCard = "Credit-Card",
37
+ Spinner = "Spinner",
38
+ Fullscreen = "Fullscreen",
39
+ Star = "Star",
40
+ ArrowRight = "Arrow-Right",
41
+ ArrowLeft = "Arrow-Left",
42
+ ArrowUp = "Arrow-Up",
43
+ ArrowDown = "Arrow-Down",
44
+ ArrowLeft2 = "Arrow-2-Left",
45
+ ArrowUp2 = "Arrow-2-Up",
46
+ ArrowRight2 = "Arrow-2-Right",
47
+ ArrowDown2 = "Arrow-2-Down",
48
+ Close = "Close",
49
+ Remove = "Remove",
50
+ Add = "Add",
51
+ Dropdown = "Dropdown",
52
+ Train = "Train",
53
+ Taxi = "Taxi",
54
+ Share = "Share",
55
+ Print = "Print",
56
+ LogOut = "Log-Out",
57
+ Error = "Error",
58
+ Edit = "Edit",
59
+ Bus = "Bus",
60
+ Airplane = "Airplane",
61
+ Menu = "Menu",
62
+ LootBag = "loot-bag",
63
+ LateCheckout = "Late-Checkout",
64
+ RoomSize = "Room-Size",
65
+ RoomUpgrade = "Room-Upgrade",
66
+ Champagne = "Champagne",
67
+ Eye = "Eye",
68
+ EyeBlocked = "EyeBlocked",
69
+ Delete = "Delete",
70
+ ArrowLeft3 = "Arrow-3-Left",
71
+ ArrowUp3 = "Arrow-3-Up",
72
+ ArrowRight3 = "Arrow-3-Right",
73
+ ArrowDown3 = "Arrow-3-Down"
74
+ }
75
+ export interface IconProps {
76
+ icon: IconType;
77
+ size?: string;
78
+ name?: string;
79
+ color?: Color;
80
+ backgroundColor?: Color;
81
+ noPadding?: boolean;
82
+ onClick?: () => void;
83
+ borderRadius?: "oval" | "round";
84
+ className?: string;
85
+ }
86
+ export declare function IconDropdown(): React.JSX.Element;
87
+ export declare function IconDropdownFilled(): React.JSX.Element;
88
+ export declare function Icon(props: IconProps): React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Icon";
@@ -0,0 +1,20 @@
1
+ import React, { LegacyRef, ReactNode } from "react";
2
+ import { Placement, PositioningStrategy } from "@popperjs/core";
3
+ export type OverlayProps = {
4
+ children: ReactNode | ReactNode[];
5
+ open: boolean;
6
+ usePortal?: boolean;
7
+ container?: HTMLElement | null;
8
+ followElement?: Element | null;
9
+ className?: string;
10
+ containerClassName?: string;
11
+ hideStyles?: boolean;
12
+ placement?: Placement;
13
+ fallbackPlacements?: Placement;
14
+ strategy?: PositioningStrategy;
15
+ onClose?: (e: Event) => void;
16
+ offset?: [number, number];
17
+ overlayRef?: LegacyRef<HTMLDivElement>;
18
+ preventScroll?: boolean;
19
+ };
20
+ export declare const Overlay: (props: OverlayProps) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./Overlay";
@@ -0,0 +1,7 @@
1
+ import { FC, PropsWithChildren } from "react";
2
+ type RoomstayPortalProps = PropsWithChildren<{
3
+ target: HTMLElement;
4
+ preventZIndex?: boolean;
5
+ }>;
6
+ export declare const RoomstayPortal: FC<RoomstayPortalProps>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Portal";
@@ -0,0 +1,15 @@
1
+ import React, { FC } from "react";
2
+ import { TextAlign, TextTransform, TextType } from "./Text.type";
3
+ import { Color } from "@utils/color";
4
+ export type TextProps = React.JSX.IntrinsicElements["p"] & {
5
+ type?: TextType;
6
+ color?: Color;
7
+ align?: TextAlign;
8
+ transforms?: TextTransform[];
9
+ inline?: boolean;
10
+ bold?: boolean;
11
+ preformatted?: boolean;
12
+ lineThrough?: boolean;
13
+ };
14
+ declare const Text: FC<TextProps>;
15
+ export { Text };
@@ -0,0 +1,14 @@
1
+ export declare enum TextType {
2
+ Body = "body",
3
+ Small = "small",
4
+ Caption = "caption",
5
+ Label = "label"
6
+ }
7
+ export declare enum TextTransform {
8
+ Uppercase = "u-uppercase"
9
+ }
10
+ export declare enum TextAlign {
11
+ Center = "u-align-center",
12
+ Right = "u-align-right",
13
+ Left = "u-align-left"
14
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Text";
2
+ export * from "./Text.type";
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ interface FadeProps {
3
+ children?: React.ReactElement;
4
+ open: boolean;
5
+ onEnter?: () => void;
6
+ onExited?: () => void;
7
+ /**
8
+ * Callback on complete animation of exit action
9
+ */
10
+ onExitCompletely?: () => void;
11
+ }
12
+ export declare const FadeAnimation: React.ForwardRefExoticComponent<FadeProps & React.RefAttributes<HTMLDivElement>>;
13
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./Fade";
@@ -0,0 +1,6 @@
1
+ export * from "./DateRangePicker/index";
2
+ export * from "./animations/index";
3
+ export * from "./Icon/index";
4
+ export * from "./Overlay/index";
5
+ export * from "./Portal/index";
6
+ export * from "./Text/index";
@@ -0,0 +1,8 @@
1
+ export declare const useBodyClick: () => {
2
+ onBodyClick: (event: EventListener, target?: HTMLElement | Document | null) => {
3
+ remove: () => void;
4
+ };
5
+ onBodyClickExcept: (event: EventListener, ignore: HTMLElement, target?: HTMLElement | Document | null) => {
6
+ remove: () => void;
7
+ };
8
+ };
@@ -0,0 +1 @@
1
+ export * from "./BodyClickHook";
@@ -91,11 +91,11 @@ export * from './Events/IRoomstayEvent.type';
91
91
  /**
92
92
  * General
93
93
  */
94
- export * from './General/Format.types';
95
94
  export * from './General/HttpMethod.enum';
96
95
  export * from './General/IMessage.type';
97
- export * from './General/Pagination.types';
98
96
  export * from './General/Warning.type';
97
+ export * from './General/Pagination.types';
98
+ export * from './General/Format.types';
99
99
  /**
100
100
  * Media
101
101
  */
@@ -106,20 +106,10 @@ export * from './Media/IMedia.type';
106
106
  export * from './Fees/EFeeType.enum';
107
107
  export * from './Fees/IFee.type';
108
108
  export * from './Fees/IFeeConfigurationOptions.type';
109
- /**
110
- * Api
111
- */
112
- export * from './Api/Reservations.type';
113
- export * from './Api/RoomNightRate.type';
114
109
  /**
115
110
  * Analytics
116
111
  */
117
112
  export * from './Analytics/IBigQueryResults.type';
118
- /**
119
- * Gift Cards
120
- */
121
- export * from './GiftCards/GiftCard.types';
122
- export * from './GiftCards/GiftCardAuth.types';
123
113
  /**
124
114
  * Addons
125
115
  */
@@ -0,0 +1,2 @@
1
+ export * from "./types/index";
2
+ export * from "./utils/index.node";
@@ -0,0 +1,4 @@
1
+ export * from "./types/index";
2
+ export * from "./utils/index.web";
3
+ export * from "./components/index";
4
+ export * from "./hooks/index";
@@ -0,0 +1,4 @@
1
+ export declare enum WeekdayStartsOn {
2
+ Monday = "monday",
3
+ Sunday = "sunday"
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./WeekdayStartsOn.types";
@@ -0,0 +1 @@
1
+ export * from "./Hotel/index";
@@ -0,0 +1 @@
1
+ export * from "./Client/index";
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import { DateRangePickerProps } from "@components/DateRangePicker/DateRangePicker";
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, DateRangePickerProps>;
4
+ export default _default;
5
+ export declare const Primary: (args: DateRangePickerProps) => React.JSX.Element;
6
+ export declare const StartDatePopulated: (args: DateRangePickerProps) => React.JSX.Element;
7
+ export declare const MultipleMonths: (args: DateRangePickerProps) => React.JSX.Element;
8
+ export declare const ThemeSpecific: (args: DateRangePickerProps) => React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("@components").FloatingDateRangePickerProps & React.RefAttributes<import("@components").FloatingDateRangePickerHandle>>;
3
+ export default _default;
4
+ export declare const Primary: () => React.JSX.Element;
5
+ export declare const ThemeSpecific: () => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This is the response body that comes down if a booking fails anywhere in the booking flow.
3
+ *
4
+ * Object will contain a public message only, with partial reservation data to be able to attempt to "resume" the booking
5
+ */
6
+ export type IBookingCreateErrorResponse = {
7
+ canRetryPayment: boolean;
8
+ isPaymentTaken: boolean;
9
+ publicMessage: string;
10
+ roomstayId: string;
11
+ };
@@ -0,0 +1,42 @@
1
+ export declare enum EBookingPaymentMethod {
2
+ Card = "Card",
3
+ SavedCard = "SavedCard",
4
+ Planpay = "Planpay",
5
+ Adyen = "Adyen"
6
+ }
7
+ /**
8
+ * This enum decides what the function of the default payment input is (additionals like Planpay, or perhaps crypto in the future are other options, this only governs the default card input)
9
+ */
10
+ export declare enum EHotelCardProcessor {
11
+ Passthrough = "Passthrough",
12
+ Adyen = "Adyen",
13
+ Till = "Till",
14
+ RMSPay = "RMSPay"
15
+ }
16
+ export declare enum EPlanpayBookingStatus {
17
+ Unknown = "unknown",// incase plan.deposit.status is unavailable
18
+ Unpaid = "unpaid",
19
+ Accepted = "accepted",
20
+ Cancelled = "cancelled",
21
+ Refunded = "refunded",
22
+ Rejected = "rejected"
23
+ }
24
+ export type IBookingPaymentTokenizedCard = {
25
+ Type: string;
26
+ Number: string;
27
+ Expiry: number;
28
+ CVV: string;
29
+ Name: string;
30
+ };
31
+ /**
32
+ * Booking payment attached to a booking.
33
+ *
34
+ * Could be either Card or Planpay
35
+ */
36
+ export type IBookingPayment = {
37
+ Method: EBookingPaymentMethod;
38
+ SavedCardID?: string;
39
+ PlanpayCheckoutId?: string;
40
+ PaymentCard?: IBookingPaymentTokenizedCard;
41
+ RedirectUrl?: string;
42
+ };
@@ -0,0 +1,29 @@
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
+ memberNumber?: string;
19
+ }[];
20
+ };
21
+ export type IBookingQuoteResponse = {
22
+ rows: {
23
+ rowId: string;
24
+ totalRate: number;
25
+ totalDeposit: number;
26
+ totalFees: number;
27
+ quoteId: number;
28
+ }[];
29
+ } | null;
@@ -0,0 +1,5 @@
1
+ export declare enum IBookingStatus {
2
+ Pending = "Pending",
3
+ Committed = "Committed",
4
+ Cancelled = "Cancelled"
5
+ }
@@ -0,0 +1,7 @@
1
+ export type IPrice = {
2
+ cost: number;
3
+ discount: number;
4
+ tax: number;
5
+ fee: number;
6
+ total: number;
7
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum ECompanyProvider {
2
+ Synxis = "Synxis",
3
+ Availpro = "Availpro",
4
+ RMS = "RMS",
5
+ Siteminder = "Siteminder"
6
+ }
@@ -0,0 +1,31 @@
1
+ import type { ECompanyProvider } from '../../index.js';
2
+ export interface IAdminCompany {
3
+ id: number;
4
+ name: string;
5
+ provider: ECompanyProvider;
6
+ providerLogin: string;
7
+ providerPassword: string;
8
+ hotels: {
9
+ name: string;
10
+ label: string;
11
+ id: string;
12
+ rms?: {
13
+ clientId: number;
14
+ clientPassword: string;
15
+ useTrainingDb: boolean;
16
+ apiUrl: string;
17
+ };
18
+ }[];
19
+ }
20
+ export type IAdminGetCompaiesResponse = IAdminCompany[];
21
+ /** What the API expects */
22
+ export type IAdminFetchRMSHotelsRequest = {
23
+ /** Passing this field will apply changes */
24
+ confirm?: boolean;
25
+ };
26
+ /** Response type of the Fetch RMS hotels endpoint. This endpoint will contact RMS and fetch Hotel's details directly from their database.
27
+ * On initial call the data won't be applied, you must call this API again and set {@link IAdminFetchRMSHotelsRequest.confirm} to true to apply the data */
28
+ export type IAdminFetchRMSHotelsResponse = {
29
+ /** If the hotels have in fact been synced, this will be true */
30
+ hasConfirmed: boolean;
31
+ };
@@ -0,0 +1,48 @@
1
+ type IRoomstayEventAvailabilityPrice = {
2
+ currency: string;
3
+ majorValue: string;
4
+ value: number;
5
+ };
6
+ export type IRoomstayEvent = {
7
+ eventId: string;
8
+ source: "eventbrite" | string;
9
+ name: string;
10
+ summary: string;
11
+ description: string;
12
+ image: {
13
+ background?: string;
14
+ url: string;
15
+ isRoomstay?: boolean;
16
+ id?: string;
17
+ };
18
+ checkoutUrl: string;
19
+ url: string;
20
+ endDate: string;
21
+ startDate: string;
22
+ /**
23
+ * Used to override the startDate (if event is repeating for example, say every thursday at 6pm)
24
+ */
25
+ eventTimeDescription: string;
26
+ unixStartTime: number;
27
+ timezone: string;
28
+ searchCity: string[];
29
+ latitude: number;
30
+ longitude: number;
31
+ isPermanent?: boolean;
32
+ address: {
33
+ line1: string;
34
+ line2: string;
35
+ city: string;
36
+ country: string;
37
+ region: string;
38
+ };
39
+ availability: {
40
+ isSoldOut: boolean;
41
+ hasAvailableTickets: boolean;
42
+ isFree: boolean;
43
+ minPrice: IRoomstayEventAvailabilityPrice;
44
+ maxPrice: IRoomstayEventAvailabilityPrice;
45
+ };
46
+ tags: any;
47
+ };
48
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare enum EHotelPriceModel {
2
+ PerPerson = "PerPerson",
3
+ PerDay = "PerDay",
4
+ PerOccupancy = "PerOccupancy"
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum EHotelWeekdayStartsOn {
2
+ Monday = "monday",
3
+ Sunday = "sunday"
4
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * These filters can be applied to room groups currently,
3
+ * they add a way to add custom props on rooms, that in turn let you filter
4
+ * them in the front end further
5
+ */
6
+ export type IAuxiliaryFilter = {
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;
14
+ /** If set to true, and user decides to filter by 3rd entry, 1st & 2nd also works */
15
+ includeAllAbove: boolean;
16
+ options: string[] | {
17
+ value: string | number;
18
+ label: string;
19
+ }[];
20
+ };
@@ -0,0 +1,11 @@
1
+ export type IHotelColorScheme = {
2
+ accent: string;
3
+ accent2: string;
4
+ accent3: string;
5
+ success?: string;
6
+ navbar?: {
7
+ background?: string;
8
+ text?: string;
9
+ textActive?: string;
10
+ };
11
+ };
@@ -0,0 +1,18 @@
1
+ export declare enum EDistanceUnitType {
2
+ Metric = "metric",
3
+ Imperial = "imperial"
4
+ }
5
+ export type ITransportDistances = {
6
+ plane?: string;
7
+ train?: string;
8
+ bus?: string;
9
+ taxi?: string;
10
+ };
11
+ export type IHotelOverrides = {
12
+ hideByLine?: boolean;
13
+ overrideDistanceUnitType?: boolean;
14
+ distanceUnitType?: EDistanceUnitType;
15
+ transportDistances?: ITransportDistances;
16
+ phoneNumberInSummary?: boolean;
17
+ enabledEventIds?: string[];
18
+ };