@roomstay/core 0.1.74 → 0.1.75-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/node.js +1 -1
- package/dist/types/Addon/Addon.enum.d.ts +14 -0
- package/dist/types/Addon/Addon.type.d.ts +24 -0
- package/dist/types/Analytics/IAnalyticsEvent.type.d.ts +35 -0
- package/dist/types/Analytics/IAnalyticsSession.type.d.ts +11 -0
- package/dist/types/Analytics/IBigQueryResponse.type.d.ts +24 -0
- package/dist/types/AnalyticsEvents/IAnalyticsEvent.type.d.ts +65 -0
- package/dist/types/AnalyticsEvents/IAnalyticsSession.type.d.ts +20 -0
- package/dist/types/AnalyticsEvents/IRoomstayEventData.type.d.ts +71 -0
- package/dist/types/AnalyticsEvents/MetaCapiTransformer.d.ts +21 -0
- package/dist/types/Api/Reservations.type.d.ts +1 -0
- package/dist/types/Availability/Availability.types.d.ts +1 -0
- package/dist/types/Booking/IBookingPayment.type.d.ts +8 -1
- package/dist/types/Booking/ISplitPayment.type.d.ts +89 -0
- package/dist/types/Fees/IFeeOptions.type.d.ts +6 -0
- package/dist/types/GiftCards/GiftCard.types.d.ts +89 -2
- package/dist/types/GiftCards/GiftCardLogs.enum.d.ts +1 -1
- package/dist/types/Hotel/EIntegration.enum.d.ts +2 -1
- package/dist/types/Maintenance/IMaintenanceStatus.type.d.ts +4 -1
- package/dist/types/Policies/EGuaranteePolicy.enum.d.ts +5 -0
- package/dist/types/index.d.ts +19 -2
- package/dist/utils/feeOptionRules.d.ts +0 -0
- package/dist/utils/roundMoney.d.ts +11 -1
- package/dist/web.js +1 -1
- package/package.json +1 -1
- package/dist/node.js.map +0 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +0 -15
- package/dist/types/components/DateRangePicker/DateRangePicker.type.d.ts +0 -8
- package/dist/types/components/DateRangePicker/DateRangePickerContext.d.ts +0 -16
- package/dist/types/components/DateRangePicker/DateRangePickerDay.d.ts +0 -22
- package/dist/types/components/DateRangePicker/DateRangePickerDays.d.ts +0 -7
- package/dist/types/components/DateRangePicker/DateRangePickerMonth.d.ts +0 -8
- package/dist/types/components/DateRangePicker/FloatingDateRangePicker.d.ts +0 -25
- package/dist/types/components/DateRangePicker/index.d.ts +0 -3
- package/dist/types/components/Icon/Icon.d.ts +0 -88
- package/dist/types/components/Icon/index.d.ts +0 -1
- package/dist/types/components/Overlay/Overlay.d.ts +0 -20
- package/dist/types/components/Overlay/index.d.ts +0 -1
- package/dist/types/components/Portal/Portal.d.ts +0 -7
- package/dist/types/components/Portal/index.d.ts +0 -1
- package/dist/types/components/Text/Text.d.ts +0 -15
- package/dist/types/components/Text/Text.type.d.ts +0 -14
- package/dist/types/components/Text/index.d.ts +0 -2
- package/dist/types/components/animations/Fade.d.ts +0 -13
- package/dist/types/components/animations/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -6
- package/dist/types/hooks/BodyClickHook.d.ts +0 -8
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/index.node.d.ts +0 -2
- package/dist/types/index.web.d.ts +0 -4
- package/dist/types/models/Client/Hotel/WeekdayStartsOn.types.d.ts +0 -4
- package/dist/types/models/Client/Hotel/index.d.ts +0 -1
- package/dist/types/models/Client/index.d.ts +0 -1
- package/dist/types/models/index.d.ts +0 -1
- package/dist/types/stories/DateRangePicker.stories.d.ts +0 -8
- package/dist/types/stories/FloatingDateRangePicker.stories.d.ts +0 -5
- package/dist/types/types/Booking/IBookingCreateErrorResponse.d.ts +0 -11
- package/dist/types/types/Booking/IBookingPayment.type.d.ts +0 -42
- package/dist/types/types/Booking/IBookingQuote.type.d.ts +0 -29
- package/dist/types/types/Booking/IBookingStatus.type.d.ts +0 -5
- package/dist/types/types/Booking/IPrice.type.d.ts +0 -7
- package/dist/types/types/Company/ECompanyProvider.enum.d.ts +0 -6
- package/dist/types/types/Company/IAdminCompany.type.d.ts +0 -31
- package/dist/types/types/Events/IRoomstayEvent.type.d.ts +0 -48
- package/dist/types/types/Hotel/EHotelPriceModel.enum.d.ts +0 -5
- package/dist/types/types/Hotel/EHotelWeekdayStartsOn.enum.d.ts +0 -4
- package/dist/types/types/Hotel/IAuxiliaryFilter.type.d.ts +0 -20
- package/dist/types/types/Hotel/IHotelColorScheme.type.d.ts +0 -11
- package/dist/types/types/Hotel/IHotelOverrides.type.d.ts +0 -18
- package/dist/types/types/Hotel/IHotelReplica.type.d.ts +0 -53
- package/dist/types/types/Hotel/IHotelService.type.d.ts +0 -6
- package/dist/types/types/Image/IRoomstayImage.type.d.ts +0 -8
- package/dist/types/types/Member/IRoomstayCognitoMember.type.d.ts +0 -4
- package/dist/types/types/Member/IRoomstayMember.type.d.ts +0 -17
- package/dist/types/types/Member/IRoomstayMemberBooking.type.d.ts +0 -28
- package/dist/types/types/Member/IRoomstayMemberBookingAddress.type.d.ts +0 -9
- package/dist/types/types/Member/IRoomstayMemberBookingItem.type.d.ts +0 -25
- package/dist/types/types/Member/IRoomstayMemberBookingProfile.type.d.ts +0 -11
- package/dist/types/types/Member/IRoomstayMemberCards.type.d.ts +0 -12
- package/dist/types/types/Member/ISession.type.d.ts +0 -4
- package/dist/types/types/Policies/EGuaranteePolicy.enum.d.ts +0 -5
- package/dist/types/types/RMS/ERMSDiscountType.enum.d.ts +0 -5
- package/dist/types/types/RMS/IRMSPropertyDiscount.type.d.ts +0 -28
- package/dist/types/types/RMS/IRMSRequirement.type.d.ts +0 -19
- package/dist/types/types/Room/IRoomGroup.type.d.ts +0 -11
- package/dist/types/types/index.d.ts +0 -56
- package/dist/types/utils/bookingTotal.d.ts +0 -7
- package/dist/types/utils/calendarHelper.d.ts +0 -16
- package/dist/types/utils/color.d.ts +0 -20
- package/dist/types/utils/index.node.d.ts +0 -2
- package/dist/types/utils/index.web.d.ts +0 -4
- package/dist/types/utils/roomstayImageResize.d.ts +0 -14
- package/dist/types/utils/uppercaseString.d.ts +0 -1
- package/dist/web.js.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Meta CAPI Transformer
|
|
3
|
+
*
|
|
4
|
+
* Transforms Roomstay event data to Meta CAPI format.
|
|
5
|
+
* Used both client-side (for Meta Pixel) and server-side (for Meta CAPI).
|
|
6
|
+
*/
|
|
7
|
+
import { ERoomstayEventName, IMetaEventData, IMetaUserData } from './IAnalyticsEvent.type';
|
|
8
|
+
import { IRoomstayEventData, IRoomstayGuestData } from './IRoomstayEventData.type';
|
|
9
|
+
/**
|
|
10
|
+
* Maps Roomstay event names to Meta CAPI event names
|
|
11
|
+
*/
|
|
12
|
+
export declare function toMetaEventName(eventName: ERoomstayEventName): string;
|
|
13
|
+
/**
|
|
14
|
+
* Transform roomstay event to Meta pixel/CAPI event.
|
|
15
|
+
* Note: ViewBookingEngine events should not be transformed - they are for session init only.
|
|
16
|
+
*/
|
|
17
|
+
export declare function transformToMetaEventData(eventData: IRoomstayEventData): IMetaEventData;
|
|
18
|
+
/**
|
|
19
|
+
* Transform guest data to Meta user_data format.
|
|
20
|
+
*/
|
|
21
|
+
export declare function transformToMetaUserData(guest: IRoomstayGuestData): IMetaUserData;
|
|
@@ -21,7 +21,8 @@ export declare enum EHotelCardProcessor {
|
|
|
21
21
|
RMSPay = "RMSPay",
|
|
22
22
|
Windcave = "Windcave",
|
|
23
23
|
Mastercard = "Mastercard",
|
|
24
|
-
Stripe = "Stripe"
|
|
24
|
+
Stripe = "Stripe",
|
|
25
|
+
PayPal = "PayPal"
|
|
25
26
|
}
|
|
26
27
|
export declare enum EPlanpayBookingStatus {
|
|
27
28
|
Unknown = "unknown",// incase plan.deposit.status is unavailable
|
|
@@ -92,6 +93,12 @@ export type IPaymentCheckoutDetails = {
|
|
|
92
93
|
publishableApiKey: string;
|
|
93
94
|
successUrl: string;
|
|
94
95
|
};
|
|
96
|
+
paypal?: {
|
|
97
|
+
orderId: string;
|
|
98
|
+
clientId: string;
|
|
99
|
+
successUrl: string;
|
|
100
|
+
currencyCode: string;
|
|
101
|
+
};
|
|
95
102
|
isSplitPayment?: boolean;
|
|
96
103
|
totalAuthorizedAmount?: number;
|
|
97
104
|
};
|
|
@@ -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
|
+
}
|
|
@@ -114,9 +114,40 @@ export declare const EditGiftCardSchema: z.ZodObject<{
|
|
|
114
114
|
recipientPhone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
115
|
}, z.core.$strip>;
|
|
116
116
|
export type IEditGiftCardRequest = z.infer<typeof EditGiftCardSchema>;
|
|
117
|
+
/**
|
|
118
|
+
* Payment type enum - defines how payment is processed
|
|
119
|
+
*/
|
|
120
|
+
export declare enum EGiftCardPaymentType {
|
|
121
|
+
Passthrough = "Passthrough",// VGS tokenization
|
|
122
|
+
PaymentProcessor = "PaymentProcessor"
|
|
123
|
+
}
|
|
117
124
|
/**
|
|
118
125
|
* Schema for validating purchasing a gift card.
|
|
119
126
|
*/
|
|
127
|
+
export declare const CreatePaymentSessionSchema: z.ZodObject<{
|
|
128
|
+
companyId: z.ZodNumber;
|
|
129
|
+
amount: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
130
|
+
currency: z.ZodDefault<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export type ICreatePaymentSessionRequest = z.infer<typeof CreatePaymentSessionSchema>;
|
|
133
|
+
export type ICreatePaymentSessionResponse = {
|
|
134
|
+
sessionId: string;
|
|
135
|
+
sessionData: string;
|
|
136
|
+
clientKey: string;
|
|
137
|
+
};
|
|
138
|
+
export declare const PaymentProcessorDataSchema: z.ZodObject<{
|
|
139
|
+
sessionId: z.ZodString;
|
|
140
|
+
resultCode: z.ZodString;
|
|
141
|
+
pspReference: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export type IPaymentProcessorData = z.infer<typeof PaymentProcessorDataSchema>;
|
|
144
|
+
export declare const PassthroughPaymentDataSchema: z.ZodObject<{
|
|
145
|
+
cardHolder: z.ZodString;
|
|
146
|
+
cardNumberToken: z.ZodString;
|
|
147
|
+
cardCvcToken: z.ZodString;
|
|
148
|
+
cardExpiry: z.ZodString;
|
|
149
|
+
}, z.core.$strip>;
|
|
150
|
+
export type IPassthroughPaymentData = z.infer<typeof PassthroughPaymentDataSchema>;
|
|
120
151
|
export declare const PurchaseGiftCardSchema: z.ZodObject<{
|
|
121
152
|
amount: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodType<number, unknown, z.core.$ZodTypeInternals<number, unknown>>>;
|
|
122
153
|
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -140,15 +171,34 @@ export declare const PurchaseGiftCardSchema: z.ZodObject<{
|
|
|
140
171
|
companyId: z.ZodNumber;
|
|
141
172
|
sendViaEmail: z.ZodDefault<z.ZodBoolean>;
|
|
142
173
|
payment: z.ZodOptional<z.ZodObject<{
|
|
174
|
+
sessionId: z.ZodString;
|
|
175
|
+
resultCode: z.ZodString;
|
|
176
|
+
pspReference: z.ZodOptional<z.ZodString>;
|
|
177
|
+
}, z.core.$strip>>;
|
|
178
|
+
passthroughPayment: z.ZodOptional<z.ZodObject<{
|
|
143
179
|
cardHolder: z.ZodString;
|
|
144
180
|
cardNumberToken: z.ZodString;
|
|
145
|
-
cardExpiry: z.ZodString;
|
|
146
181
|
cardCvcToken: z.ZodString;
|
|
182
|
+
cardExpiry: z.ZodString;
|
|
147
183
|
}, z.core.$strip>>;
|
|
148
184
|
}, z.core.$strip>;
|
|
149
185
|
export type IPurchaseGiftCardRequest = z.infer<typeof PurchaseGiftCardSchema>;
|
|
186
|
+
export type IPurchasePaymentData = {
|
|
187
|
+
payment: IPaymentProcessorData;
|
|
188
|
+
} | {
|
|
189
|
+
passthroughPayment: IPassthroughPaymentData;
|
|
190
|
+
};
|
|
150
191
|
export type IPurchaseGiftCardResponse = IGiftCardDTO & {
|
|
151
|
-
password: string;
|
|
192
|
+
password: string | null;
|
|
193
|
+
};
|
|
194
|
+
export declare const RefundGiftCardSchema: z.ZodObject<{
|
|
195
|
+
giftCardId: z.ZodNumber;
|
|
196
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strip>;
|
|
198
|
+
export type IRefundGiftCardRequest = z.infer<typeof RefundGiftCardSchema>;
|
|
199
|
+
export type IRefundGiftCardResponse = {
|
|
200
|
+
success: boolean;
|
|
201
|
+
refundReference: string;
|
|
152
202
|
};
|
|
153
203
|
export declare const ValidateGiftCardSchema: z.ZodObject<{
|
|
154
204
|
companyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -164,6 +214,34 @@ export declare const RedeemGiftCardSchema: z.ZodObject<{
|
|
|
164
214
|
description: z.ZodString;
|
|
165
215
|
}, z.core.$strip>;
|
|
166
216
|
export type IRedeemGiftCardRequest = z.infer<typeof RedeemGiftCardSchema>;
|
|
217
|
+
export declare enum EGiftCardPaymentProvider {
|
|
218
|
+
Adyen = "Adyen"
|
|
219
|
+
}
|
|
220
|
+
export declare enum EGiftCardPaymentStatus {
|
|
221
|
+
Pending = "Pending",
|
|
222
|
+
Authorized = "Authorized",
|
|
223
|
+
Captured = "Captured",
|
|
224
|
+
Failed = "Failed",
|
|
225
|
+
Refunded = "Refunded"
|
|
226
|
+
}
|
|
227
|
+
export declare enum AdyenResultCode {
|
|
228
|
+
Authorised = "Authorised",
|
|
229
|
+
Refused = "Refused",
|
|
230
|
+
Cancelled = "Cancelled",
|
|
231
|
+
Pending = "Pending",
|
|
232
|
+
Received = "Received",
|
|
233
|
+
Error = "Error",
|
|
234
|
+
IdentifyShopper = "IdentifyShopper",
|
|
235
|
+
ChallengeShopper = "ChallengeShopper"
|
|
236
|
+
}
|
|
237
|
+
export declare enum AdyenEventCode {
|
|
238
|
+
AUTHORISATION = "AUTHORISATION",
|
|
239
|
+
CAPTURE = "CAPTURE",
|
|
240
|
+
REFUND = "REFUND",
|
|
241
|
+
CANCELLATION = "CANCELLATION",
|
|
242
|
+
REFUND_FAILED = "REFUND_FAILED",
|
|
243
|
+
CAPTURE_FAILED = "CAPTURE_FAILED"
|
|
244
|
+
}
|
|
167
245
|
export declare enum EGiftCardTransactionType {
|
|
168
246
|
Purchase = "Purchase",
|
|
169
247
|
Redemption = "Redemption",
|
|
@@ -236,3 +314,12 @@ export type IAdminGiftCardLogDTO = {
|
|
|
236
314
|
new: string;
|
|
237
315
|
}> | null;
|
|
238
316
|
};
|
|
317
|
+
/**
|
|
318
|
+
* Email branding configuration for gift card emails.
|
|
319
|
+
*/
|
|
320
|
+
export type IGiftCardEmailBranding = {
|
|
321
|
+
logoUrl: string;
|
|
322
|
+
primaryColor: string;
|
|
323
|
+
backgroundColor: string;
|
|
324
|
+
cardImageUrl: string;
|
|
325
|
+
};
|
|
@@ -28,7 +28,7 @@ export declare enum ELogType {
|
|
|
28
28
|
UserCreated = "User Created",
|
|
29
29
|
UserLinked = "User Linked to Company",
|
|
30
30
|
Purchase = "Gift Card Purchased",
|
|
31
|
-
Payment = "Payment
|
|
31
|
+
Payment = "Payment",
|
|
32
32
|
Email = "Email Delivery",
|
|
33
33
|
Transaction = "Gift Card Transaction"
|
|
34
34
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export type IMaintenanceStatus = {
|
|
2
|
-
uuid: string;
|
|
3
2
|
/**
|
|
4
3
|
* Which service is currently experiencing issues.
|
|
5
4
|
*/
|
|
@@ -10,6 +9,10 @@ export type IMaintenanceStatus = {
|
|
|
10
9
|
* @example 2023-10-01T00:00:00Z
|
|
11
10
|
*/
|
|
12
11
|
startDate: string;
|
|
12
|
+
/**
|
|
13
|
+
* UUID generated on create. Is not used as a primary key, or an index.
|
|
14
|
+
*/
|
|
15
|
+
uuid: string;
|
|
13
16
|
endDate: string;
|
|
14
17
|
/**
|
|
15
18
|
* Whether the status is currently in effect or not
|
package/dist/types/index.d.ts
CHANGED
|
@@ -91,11 +91,11 @@ export * from './Events/IRoomstayEvent.type';
|
|
|
91
91
|
/**
|
|
92
92
|
* General
|
|
93
93
|
*/
|
|
94
|
+
export * from './General/Format.types';
|
|
94
95
|
export * from './General/HttpMethod.enum';
|
|
95
96
|
export * from './General/IMessage.type';
|
|
96
|
-
export * from './General/Warning.type';
|
|
97
97
|
export * from './General/Pagination.types';
|
|
98
|
-
export * from './General/
|
|
98
|
+
export * from './General/Warning.type';
|
|
99
99
|
/**
|
|
100
100
|
* Media
|
|
101
101
|
*/
|
|
@@ -106,10 +106,27 @@ 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';
|
|
109
114
|
/**
|
|
110
115
|
* Analytics
|
|
111
116
|
*/
|
|
112
117
|
export * from './Analytics/IBigQueryResults.type';
|
|
118
|
+
/**
|
|
119
|
+
* Analytics Events
|
|
120
|
+
*/
|
|
121
|
+
export * from './AnalyticsEvents/IAnalyticsSession.type';
|
|
122
|
+
export * from './AnalyticsEvents/IAnalyticsEvent.type';
|
|
123
|
+
export * from './AnalyticsEvents/IRoomstayEventData.type';
|
|
124
|
+
export * from './AnalyticsEvents/MetaCapiTransformer';
|
|
125
|
+
/**
|
|
126
|
+
* Gift Cards
|
|
127
|
+
*/
|
|
128
|
+
export * from './GiftCards/GiftCard.types';
|
|
129
|
+
export * from './GiftCards/GiftCardAuth.types';
|
|
113
130
|
/**
|
|
114
131
|
* Addons
|
|
115
132
|
*/
|
|
File without changes
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import Decimal from "decimal.js";
|
|
2
|
+
export declare const RoundingType: {
|
|
3
|
+
[key: string]: Decimal.Rounding;
|
|
4
|
+
};
|
|
5
|
+
interface RoundMoneyOptions {
|
|
6
|
+
precision?: number;
|
|
7
|
+
rounding?: Decimal.Rounding;
|
|
8
|
+
}
|
|
1
9
|
/**
|
|
2
10
|
* Rounds a monetary amount to two decimal places.
|
|
3
11
|
*
|
|
@@ -5,6 +13,8 @@
|
|
|
5
13
|
* with some systems, such as RMS.
|
|
6
14
|
*
|
|
7
15
|
* @param amount a string or number to be rounded
|
|
16
|
+
* @param options an object containing precision and rounding options
|
|
8
17
|
* @returns the rounded amount as a number
|
|
9
18
|
*/
|
|
10
|
-
export declare const roundMoney: (amount: string | number) => number;
|
|
19
|
+
export declare const roundMoney: (amount: string | number, options?: RoundMoneyOptions) => number;
|
|
20
|
+
export {};
|