@roomstay/core 0.1.84-3 → 0.1.84-4
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.LICENSE.txt +7 -0
- package/dist/types/Analytics/IAnalyticsDailyRow.type.d.ts +25 -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/Booking/ISplitPayment.type.d.ts +89 -0
- package/dist/types/Company/IAdminCompany.type.d.ts +2 -0
- package/dist/types/Fees/IFeeOptions.type.d.ts +6 -0
- package/dist/types/GoogleAds/IGoogleAdsDailyRow.type.d.ts +4 -0
- package/dist/types/Member/LoyaltyTiers.d.ts +6 -0
- package/dist/types/MetaAds/IMetaAdsDailyRow.type.d.ts +4 -0
- package/dist/types/Metasearch/IMetasearchDailyRow.type.d.ts +7 -7
- package/dist/types/Newbook/ENewbookSiteSelectionFeeType.enum.d.ts +4 -0
- package/dist/types/Newbook/ENewbookSiteSelectionType.enum.d.ts +6 -0
- package/dist/types/Newbook/ENewbookSyncType.enum.d.ts +3 -0
- package/dist/types/Newbook/INewbookSyncResponse.type.d.ts +9 -0
- package/dist/types/PMS/EPMSSyncStatus.enum.d.ts +8 -0
- package/dist/types/PMS/IPMSSyncResponse.type.d.ts +10 -0
- package/dist/types/PMS/index.d.ts +2 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/utils/feeOptionRules.d.ts +0 -0
- package/dist/web.js.LICENSE.txt +7 -0
- package/package.json +1 -1
- package/dist/types/DisplayPolicy/ERuleType.d.ts +0 -6
- package/dist/types/DisplayPolicy/ERuleType.enum.d.ts +0 -6
- package/dist/types/DisplayPolicy/IDisplayPolicy.d.ts +0 -25
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface IAnalyticsDailyRow {
|
|
2
|
+
date: string;
|
|
3
|
+
clicks: number;
|
|
4
|
+
bookings: number;
|
|
5
|
+
revenue: number;
|
|
6
|
+
cost: number;
|
|
7
|
+
impressions: number;
|
|
8
|
+
}
|
|
9
|
+
export interface IAnalyticsWithComparison<T extends IAnalyticsDailyRow = IAnalyticsDailyRow> {
|
|
10
|
+
current: T[];
|
|
11
|
+
comparison: T[];
|
|
12
|
+
}
|
|
13
|
+
export interface IAnalyticsAggregated {
|
|
14
|
+
impressions: number;
|
|
15
|
+
clicks: number;
|
|
16
|
+
bookings: number;
|
|
17
|
+
revenue: number;
|
|
18
|
+
cost: number;
|
|
19
|
+
ctr: number;
|
|
20
|
+
conversionRate: number;
|
|
21
|
+
cpc: number;
|
|
22
|
+
aov: number;
|
|
23
|
+
roas: number;
|
|
24
|
+
costOfSale: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type AnalyticsEventName = 'AddToCart' | 'InitiateCheckout' | 'Purchase';
|
|
2
|
+
export interface IAnalyticsEventData {
|
|
3
|
+
currency: string;
|
|
4
|
+
value: number;
|
|
5
|
+
contentIds?: string[];
|
|
6
|
+
contentType?: string;
|
|
7
|
+
contents?: Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
quantity: number;
|
|
10
|
+
itemPrice: number;
|
|
11
|
+
}>;
|
|
12
|
+
numItems?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface IAnalyticsUserData {
|
|
15
|
+
email?: string;
|
|
16
|
+
phone?: string;
|
|
17
|
+
firstName?: string;
|
|
18
|
+
lastName?: string;
|
|
19
|
+
city?: string;
|
|
20
|
+
state?: string;
|
|
21
|
+
zipCode?: string;
|
|
22
|
+
country?: string;
|
|
23
|
+
externalId?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface IAnalyticsEvent {
|
|
26
|
+
eventId: string;
|
|
27
|
+
sessionId: string;
|
|
28
|
+
hotelId: string;
|
|
29
|
+
eventName: AnalyticsEventName;
|
|
30
|
+
eventTime: number;
|
|
31
|
+
eventData: IAnalyticsEventData;
|
|
32
|
+
userData?: IAnalyticsUserData;
|
|
33
|
+
createdAt: number;
|
|
34
|
+
ttl: number;
|
|
35
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -16,6 +16,8 @@ export interface IAdminCompany {
|
|
|
16
16
|
isHotelEventsEnabled: boolean;
|
|
17
17
|
isAnalyticsEnabled: boolean;
|
|
18
18
|
isMetasearchEnabled: boolean;
|
|
19
|
+
isGoogleAdsEnabled: boolean;
|
|
20
|
+
isMetaAdsEnabled: boolean;
|
|
19
21
|
preventMemberPortalWelcomeEmails: boolean;
|
|
20
22
|
hotels: {
|
|
21
23
|
name: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { IAnalyticsDailyRow } from '../Analytics/IAnalyticsDailyRow.type';
|
|
2
|
+
export interface IMetasearchDailyRow extends IAnalyticsDailyRow {
|
|
3
|
+
hotelId: string;
|
|
4
|
+
channel: string;
|
|
5
|
+
linkType: string;
|
|
6
|
+
deviceType: string;
|
|
7
|
+
market: string;
|
|
8
8
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EPMSSyncStatus } from '../PMS/EPMSSyncStatus.enum';
|
|
2
|
+
import { ENewbookSyncStrategy } from './ENewbookSyncStrategy.enum';
|
|
3
|
+
export interface INewbookSyncResponse {
|
|
4
|
+
id: number;
|
|
5
|
+
status: EPMSSyncStatus;
|
|
6
|
+
syncData: string | null;
|
|
7
|
+
syncType: ENewbookSyncStrategy;
|
|
8
|
+
additionalData?: any;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ export * from './Api/RoomNightRate.type';
|
|
|
127
127
|
* Analytics
|
|
128
128
|
*/
|
|
129
129
|
export * from './Analytics/IBigQueryResults.type';
|
|
130
|
+
export * from './Analytics/IAnalyticsDailyRow.type';
|
|
130
131
|
/**
|
|
131
132
|
* Analytics Events
|
|
132
133
|
*/
|
|
@@ -164,3 +165,11 @@ export * from './DisplayPolicy/EDisplayPolicyRuleType.enum';
|
|
|
164
165
|
* Metasearch
|
|
165
166
|
*/
|
|
166
167
|
export * from './Metasearch/IMetasearchDailyRow.type';
|
|
168
|
+
/**
|
|
169
|
+
* Google Ads
|
|
170
|
+
*/
|
|
171
|
+
export * from './GoogleAds/IGoogleAdsDailyRow.type';
|
|
172
|
+
/**
|
|
173
|
+
* Meta Ads
|
|
174
|
+
*/
|
|
175
|
+
export * from './MetaAds/IMetaAdsDailyRow.type';
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ERuleType } from './ERuleType';
|
|
2
|
-
export interface IDisplayPolicy {
|
|
3
|
-
id: number;
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
applicableRates: string[];
|
|
7
|
-
conditions: ICondition[];
|
|
8
|
-
}
|
|
9
|
-
export type IScheduleConfiguration = {
|
|
10
|
-
rruleSet: string;
|
|
11
|
-
durationMs: number;
|
|
12
|
-
};
|
|
13
|
-
export type ICondition = {
|
|
14
|
-
ruleType: ERuleType.Schedule;
|
|
15
|
-
configuration: IScheduleConfiguration;
|
|
16
|
-
} | {
|
|
17
|
-
ruleType: ERuleType.DeviceTarget;
|
|
18
|
-
configuration: unknown;
|
|
19
|
-
} | {
|
|
20
|
-
ruleType: ERuleType.GeoLock;
|
|
21
|
-
configuration: unknown;
|
|
22
|
-
} | {
|
|
23
|
-
ruleType: ERuleType.CheapestOf;
|
|
24
|
-
configuration: unknown;
|
|
25
|
-
};
|