@roomstay/core 0.1.70-1 → 0.1.71-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.
Files changed (78) hide show
  1. package/dist/types/Addon/Addon.enum.d.ts +14 -0
  2. package/dist/types/Addon/Addon.type.d.ts +24 -0
  3. package/dist/types/Analytics/IBigQueryResponse.type.d.ts +24 -0
  4. package/dist/types/Booking/ISplitPayment.type.d.ts +89 -0
  5. package/dist/types/Booking/PlaceBooking.types.d.ts +0 -2
  6. package/dist/types/Fees/IFeeOptions.type.d.ts +6 -0
  7. package/dist/types/GiftCards/GiftCard.types.d.ts +0 -2
  8. package/dist/utils/feeOptionRules.d.ts +0 -0
  9. package/package.json +1 -1
  10. package/dist/node.js.map +0 -1
  11. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +0 -15
  12. package/dist/types/components/DateRangePicker/DateRangePicker.type.d.ts +0 -8
  13. package/dist/types/components/DateRangePicker/DateRangePickerContext.d.ts +0 -16
  14. package/dist/types/components/DateRangePicker/DateRangePickerDay.d.ts +0 -22
  15. package/dist/types/components/DateRangePicker/DateRangePickerDays.d.ts +0 -7
  16. package/dist/types/components/DateRangePicker/DateRangePickerMonth.d.ts +0 -8
  17. package/dist/types/components/DateRangePicker/FloatingDateRangePicker.d.ts +0 -25
  18. package/dist/types/components/DateRangePicker/index.d.ts +0 -3
  19. package/dist/types/components/Icon/Icon.d.ts +0 -88
  20. package/dist/types/components/Icon/index.d.ts +0 -1
  21. package/dist/types/components/Overlay/Overlay.d.ts +0 -20
  22. package/dist/types/components/Overlay/index.d.ts +0 -1
  23. package/dist/types/components/Portal/Portal.d.ts +0 -7
  24. package/dist/types/components/Portal/index.d.ts +0 -1
  25. package/dist/types/components/Text/Text.d.ts +0 -15
  26. package/dist/types/components/Text/Text.type.d.ts +0 -14
  27. package/dist/types/components/Text/index.d.ts +0 -2
  28. package/dist/types/components/animations/Fade.d.ts +0 -13
  29. package/dist/types/components/animations/index.d.ts +0 -1
  30. package/dist/types/components/index.d.ts +0 -6
  31. package/dist/types/hooks/BodyClickHook.d.ts +0 -8
  32. package/dist/types/hooks/index.d.ts +0 -1
  33. package/dist/types/index.node.d.ts +0 -2
  34. package/dist/types/index.web.d.ts +0 -4
  35. package/dist/types/models/Client/Hotel/WeekdayStartsOn.types.d.ts +0 -4
  36. package/dist/types/models/Client/Hotel/index.d.ts +0 -1
  37. package/dist/types/models/Client/index.d.ts +0 -1
  38. package/dist/types/models/index.d.ts +0 -1
  39. package/dist/types/stories/DateRangePicker.stories.d.ts +0 -8
  40. package/dist/types/stories/FloatingDateRangePicker.stories.d.ts +0 -5
  41. package/dist/types/types/Booking/IBookingCreateErrorResponse.d.ts +0 -11
  42. package/dist/types/types/Booking/IBookingPayment.type.d.ts +0 -42
  43. package/dist/types/types/Booking/IBookingQuote.type.d.ts +0 -29
  44. package/dist/types/types/Booking/IBookingStatus.type.d.ts +0 -5
  45. package/dist/types/types/Booking/IPrice.type.d.ts +0 -7
  46. package/dist/types/types/Company/ECompanyProvider.enum.d.ts +0 -6
  47. package/dist/types/types/Company/IAdminCompany.type.d.ts +0 -31
  48. package/dist/types/types/Events/IRoomstayEvent.type.d.ts +0 -48
  49. package/dist/types/types/Hotel/EHotelPriceModel.enum.d.ts +0 -5
  50. package/dist/types/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts +0 -4
  51. package/dist/types/types/Hotel/IAuxiliaryFilter.type.d.ts +0 -20
  52. package/dist/types/types/Hotel/IHotelColorScheme.type.d.ts +0 -11
  53. package/dist/types/types/Hotel/IHotelOverrides.type.d.ts +0 -18
  54. package/dist/types/types/Hotel/IHotelReplica.type.d.ts +0 -53
  55. package/dist/types/types/Hotel/IHotelService.type.d.ts +0 -6
  56. package/dist/types/types/Image/IRoomstayImage.type.d.ts +0 -8
  57. package/dist/types/types/Member/IRoomstayCognitoMember.type.d.ts +0 -4
  58. package/dist/types/types/Member/IRoomstayMember.type.d.ts +0 -17
  59. package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts +0 -28
  60. package/dist/types/types/Member/IRoomstayMemberBookingAddress.type.d.ts +0 -9
  61. package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts +0 -25
  62. package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts +0 -11
  63. package/dist/types/types/Member/IRoomstayMemberCards.type.d.ts +0 -12
  64. package/dist/types/types/Member/ISession.type.d.ts +0 -4
  65. package/dist/types/types/Policies/EGuaranteePolicy.enum.d.ts +0 -5
  66. package/dist/types/types/RMS/ERMSDiscountType.enum.d.ts +0 -5
  67. package/dist/types/types/RMS/IRMSPropertyDiscount.type.d.ts +0 -28
  68. package/dist/types/types/RMS/IRMSRequirement.type.d.ts +0 -19
  69. package/dist/types/types/Room/IRoomGroup.type.d.ts +0 -11
  70. package/dist/types/types/index.d.ts +0 -56
  71. package/dist/types/utils/bookingTotal.d.ts +0 -7
  72. package/dist/types/utils/calendarHelper.d.ts +0 -16
  73. package/dist/types/utils/color.d.ts +0 -20
  74. package/dist/types/utils/index.node.d.ts +0 -2
  75. package/dist/types/utils/index.web.d.ts +0 -4
  76. package/dist/types/utils/roomstayImageResize.d.ts +0 -14
  77. package/dist/types/utils/uppercaseString.d.ts +0 -1
  78. package/dist/web.js.map +0 -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,24 @@
1
+ export type IDailyRevenue = {
2
+ date: string;
3
+ revenue: number;
4
+ };
5
+ export type IDailyRoomBreakdown = {
6
+ date: string;
7
+ roomName: string;
8
+ purchases: number;
9
+ };
10
+ export type IRegionBreakdown = {
11
+ country: string;
12
+ region: string;
13
+ purchases: number;
14
+ revenue: number;
15
+ };
16
+ export type IBigQueryResponse = {
17
+ purchases: number;
18
+ cancellations: number;
19
+ revenue: number;
20
+ conversionRate: number;
21
+ dailyRevenue: IDailyRevenue[];
22
+ dailyRoomsBreakdown: IDailyRoomBreakdown[];
23
+ regionBreakdown: IRegionBreakdown[];
24
+ };
@@ -0,0 +1,89 @@
1
+ import { EHotelCardProcessor } from './IBookingPayment.type';
2
+ export declare enum ESplitPaymentState {
3
+ INITIATED = "initiated",
4
+ GIFTCARD_AUTHORIZED = "giftcard_authorized",
5
+ CC_AUTHORIZED = "cc_authorized",
6
+ CAPTURED = "captured",
7
+ FAILED = "failed",
8
+ ROLLED_BACK = "rolled_back"
9
+ }
10
+ export declare enum ESplitPaymentStatus {
11
+ PENDING = "pending",
12
+ AUTHORIZED = "authorized",
13
+ CAPTURED = "captured",
14
+ FAILED = "failed"
15
+ }
16
+ export interface IGiftCardPaymentDetails {
17
+ amount: number;
18
+ cardCode: string;
19
+ authorizationId?: string;
20
+ status: ESplitPaymentStatus;
21
+ expiresAt?: Date;
22
+ }
23
+ export interface ICreditCardPaymentDetails {
24
+ amount: number;
25
+ processor: EHotelCardProcessor;
26
+ authorizationId?: string;
27
+ status: ESplitPaymentStatus;
28
+ expiresAt?: Date;
29
+ }
30
+ export interface ISplitPayment {
31
+ splitPaymentId: string;
32
+ totalAmount: number;
33
+ giftCard: IGiftCardPaymentDetails;
34
+ creditCard: ICreditCardPaymentDetails;
35
+ sessionState: ESplitPaymentState;
36
+ createdAt: Date;
37
+ updatedAt: Date;
38
+ expiresAt: Date;
39
+ }
40
+ export interface ISplitPaymentSession {
41
+ id: string;
42
+ bookingId: number;
43
+ companyId: number;
44
+ hotelId: string;
45
+ splitPayment: ISplitPayment;
46
+ }
47
+ export interface IInitiateSplitPaymentRequest {
48
+ bookingId: number;
49
+ giftCardCode: string;
50
+ giftCardAmount: number;
51
+ creditCardAmount: number;
52
+ }
53
+ export interface IInitiateSplitPaymentResponse {
54
+ sessionId: string;
55
+ giftCardAmount: number;
56
+ creditCardAmount: number;
57
+ expiresAt: Date;
58
+ }
59
+ export interface IAuthorizationResult {
60
+ success: boolean;
61
+ authorizationId?: string;
62
+ expiresAt?: Date;
63
+ error?: string;
64
+ }
65
+ export interface ICaptureResult {
66
+ success: boolean;
67
+ giftCardCaptured: boolean;
68
+ creditCardCaptured: boolean;
69
+ error?: string;
70
+ }
71
+ export interface ISplitPaymentCheckoutDetails {
72
+ sessionId: string;
73
+ currentStep: 'giftcard' | 'creditcard' | 'capture';
74
+ giftCard: {
75
+ amount: number;
76
+ status: ESplitPaymentStatus;
77
+ authorizationId?: string;
78
+ expiresAt?: Date;
79
+ };
80
+ creditCard: {
81
+ amount: number;
82
+ status: ESplitPaymentStatus;
83
+ processor?: EHotelCardProcessor;
84
+ redirectUrl?: string;
85
+ authorizationId?: string;
86
+ expiresAt?: Date;
87
+ };
88
+ expiresAt: Date;
89
+ }
@@ -22,8 +22,6 @@ export type IPlaceBookingRequest = {
22
22
  giftCard?: {
23
23
  token: string;
24
24
  code: string;
25
- amount: number;
26
- transactionId: string;
27
25
  };
28
26
  extraFields?: IBookingExtraFields;
29
27
  } & ICommonQueryParameters;
@@ -0,0 +1,6 @@
1
+ export interface IFeeOptions {
2
+ includeInRates: boolean;
3
+ alreadyIncludedInRates: boolean;
4
+ appliesToAddons: boolean;
5
+ includePreviousFeesInCalculation: boolean;
6
+ }
@@ -184,8 +184,6 @@ export type IGiftCardTransactionDTO = {
184
184
  date: Date;
185
185
  type: EGiftCardTransactionType;
186
186
  amount: number;
187
- /** Token required to complete preauthorised transactions */
188
- token?: string;
189
187
  };
190
188
  /**
191
189
  * Extended transaction details for admin view including description and running balance.
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roomstay/core",
3
- "version": "0.1.70-1",
3
+ "version": "0.1.71-0",
4
4
  "description": "Details shared between Roomstay libraries. Anything from Currency, to Generic types",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
package/dist/node.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"node.js","sources":["../src/types/Booking/IBookingStatus.type.ts","../src/types/Booking/IBookingPayment.type.ts","../src/types/Company/ECompanyProvider.enum.ts","../src/types/Hotel/IHotelOverrides.type.ts","../src/types/Hotel/EHotelPriceModel.enum.ts","../src/types/Hotel/EHotelWeekdayStartsOn.enum.ts","../src/types/RMS/ERMSDiscountType.enum.ts","../src/types/Image/IRoomstayImage.type.ts","../src/types/Policies/EGuaranteePolicy.enum.ts","../src/utils/bookingTotal.ts","../src/utils/uppercaseString.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null],"names":["IBookingStatus","EBookingPaymentMethod","EHotelCardProcessor","EPlanpayBookingStatus","ECompanyProvider","EDistanceUnitType","EHotelPriceModel","EHotelWeekdayStartsOn","ERMSDiscountType","ERoomstayImageSize","EGuarantyPolicyPrepaymentType","reservation","total","itinerary","Object","values","item","nightsArray","keys","nights","night","toUppercase","toUpperCase"],"mappings":"aAAA,IAAYA,ECAAC,EAUAC,EAOAC,ECjBAC,ECAAC,ECAAC,ECAAC,ECAAC,ECAAC,ECAAC,ERAAV,QAIXA,oBAAA,GAJWA,EAAAA,QAAcA,iBAAdA,uBAIX,CAAA,IAHC,QAAA,UACAA,EAAA,UAAA,YACAA,EAAA,UAAA,YCHUC,QAKXA,2BAAA,GALWA,EAAAA,gCAAAA,QAAAA,sBAKX,CAAA,IAJG,KAAA,OACAA,EAAA,UAAA,YACAA,EAAA,QAAA,UACAA,EAAA,MAAA,QAMQC,QAKXA,yBAAA,GALWA,EAAAA,8BAAAA,QAAAA,oBAKX,CAAA,IAJG,YAAA,cACAA,EAAA,MAAA,QACAA,EAAA,KAAA,OACAA,EAAA,OAAA,SAGQC,QAOXA,2BAAA,GAPWA,EAAAA,QAAqBA,wBAArBA,8BAOX,CAAA,IANC,QAAA,UACAA,EAAA,OAAA,SACAA,EAAA,SAAA,WACAA,EAAA,UAAA,YACAA,EAAA,SAAA,WACAA,EAAA,SAAA,WCvBUC,QAKXA,sBAAA,GALWA,EAAAA,QAAgBA,mBAAhBA,yBAKX,CAAA,IAJG,OAAA,SACAA,EAAA,SAAA,WACAA,EAAA,IAAA,MACAA,EAAA,WAAA,aCJQC,QAGXA,uBAAA,GAHWA,EAAAA,QAAiBA,oBAAjBA,0BAGX,CAAA,IAFC,OAAA,SACAA,EAAA,SAAA,WCFUC,QAIXA,sBAAA,GAJWA,EAAAA,QAAgBA,mBAAhBA,yBAIX,CAAA,IAHC,UAAA,YACAA,EAAA,OAAA,SACAA,EAAA,aAAA,eCHUC,QAGXA,2BAAA,GAHWA,EAAAA,QAAqBA,wBAArBA,8BAGX,CAAA,IAFC,OAAA,SACAA,EAAA,OAAA,SCFUC,QAIXA,sBAAA,GAJWA,EAAAA,QAAgBA,mBAAhBA,yBAIX,CAAA,IAHG,WAAA,aACAA,EAAA,OAAA,SACAA,EAAA,KAAA,OCHQC,QAOXA,wBAAA,GAPWA,EAAAA,QAAkBA,qBAAlBA,2BAOX,CAAA,IANGA,EAAA,KAAA,KAAA,OACAA,EAAAA,EAAA,KAAA,KAAA,OACAA,EAAAA,EAAA,MAAA,KAAA,QACAA,EAAAA,EAAA,OAAA,KAAA,SACAA,EAAAA,EAAA,MAAA,MAAA,QACAA,EAAAA,EAAA,WAAA,MAAA,aCNQC,QAIXA,mCAAA,GAJWA,EAAAA,QAA6BA,gCAA7BA,sCAIX,CAAA,IAHG,YAAA,QACAA,EAAA,WAAA,aACAA,EAAA,OAAA,gDCKFC,IAEA,IAAIC,EAAQ,EAEZ,MAAMC,EAAYC,OAAOC,OAAOJ,EAAYE,WAE5C,IAAK,MAAMG,KAAQH,EAAW,CAC5B,MAAMI,EAAcH,OAAOI,KAAKF,EAAKG,QAErC,IAAK,MAAMC,KAASH,EAClBL,GAASI,EAAKG,OAAOC,GAAOR,KAE/B,CAED,OAAOA,CAAK,0BCtBR,SAA0BS,GAC9B,OAAOA,EAAYC,aACrB"}
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import dayjs from "dayjs";
3
- import { EDateRangePickerTheme } from "./DateRangePicker.type";
4
- export interface DateRangePickerProps {
5
- selectedStartDate?: dayjs.Dayjs | null;
6
- selectedEndDate?: dayjs.Dayjs | null;
7
- showArrows?: boolean;
8
- small?: boolean;
9
- onStartDateChanged?: (date: dayjs.Dayjs) => void;
10
- onEndDateChanged?: (date: dayjs.Dayjs) => void;
11
- fixedStartDate?: boolean;
12
- showMultipleMonths?: boolean;
13
- theme?: EDateRangePickerTheme;
14
- }
15
- export declare function DateRangePicker(props: DateRangePickerProps): React.JSX.Element;
@@ -1,8 +0,0 @@
1
- export declare enum EDateRangePickerTheme {
2
- Default = "default",
3
- Specific = "specific"
4
- }
5
- export declare enum EDateRangePickingState {
6
- StartDate = 1,
7
- EndDate = 2
8
- }
@@ -1,16 +0,0 @@
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>;
@@ -1,22 +0,0 @@
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 };
@@ -1,7 +0,0 @@
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 {};
@@ -1,8 +0,0 @@
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 {};
@@ -1,25 +0,0 @@
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 };
@@ -1,3 +0,0 @@
1
- export * from "./DateRangePicker";
2
- export * from "./FloatingDateRangePicker";
3
- export * from "./DateRangePicker.type";
@@ -1,88 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export * from "./Icon";
@@ -1,20 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export * from "./Overlay";
@@ -1,7 +0,0 @@
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 {};
@@ -1 +0,0 @@
1
- export * from "./Portal";
@@ -1,15 +0,0 @@
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 };
@@ -1,14 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- export * from "./Text";
2
- export * from "./Text.type";
@@ -1,13 +0,0 @@
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 {};
@@ -1 +0,0 @@
1
- export * from "./Fade";
@@ -1,6 +0,0 @@
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";
@@ -1,8 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export * from "./BodyClickHook";
@@ -1,2 +0,0 @@
1
- export * from "./types/index";
2
- export * from "./utils/index.node";
@@ -1,4 +0,0 @@
1
- export * from "./types/index";
2
- export * from "./utils/index.web";
3
- export * from "./components/index";
4
- export * from "./hooks/index";
@@ -1,4 +0,0 @@
1
- export declare enum WeekdayStartsOn {
2
- Monday = "monday",
3
- Sunday = "sunday"
4
- }
@@ -1 +0,0 @@
1
- export * from "./WeekdayStartsOn.types";
@@ -1 +0,0 @@
1
- export * from "./Hotel/index";
@@ -1 +0,0 @@
1
- export * from "./Client/index";
@@ -1,8 +0,0 @@
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;
@@ -1,5 +0,0 @@
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;
@@ -1,11 +0,0 @@
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
- };
@@ -1,42 +0,0 @@
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
- };
@@ -1,29 +0,0 @@
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;