@vibe-flats/booking-engine-common-server 1.0.18 → 1.0.20
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.
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const COMMON_SERVER: {
|
|
2
|
+
currency: {
|
|
3
|
+
symbol: string;
|
|
4
|
+
code: string;
|
|
5
|
+
};
|
|
2
6
|
formats: {
|
|
3
7
|
date: {
|
|
4
8
|
short: {
|
|
@@ -12,4 +16,80 @@ export declare const COMMON_APP: {
|
|
|
12
16
|
utilities: string;
|
|
13
17
|
};
|
|
14
18
|
};
|
|
19
|
+
hubpost: {
|
|
20
|
+
objectTypes: {
|
|
21
|
+
contact: string;
|
|
22
|
+
ticket: string;
|
|
23
|
+
reservation: string;
|
|
24
|
+
};
|
|
25
|
+
quotes: {
|
|
26
|
+
associations: {
|
|
27
|
+
contact: number;
|
|
28
|
+
unit: number;
|
|
29
|
+
ticket: number;
|
|
30
|
+
quote: number;
|
|
31
|
+
reservation: number;
|
|
32
|
+
};
|
|
33
|
+
types: {
|
|
34
|
+
new: number;
|
|
35
|
+
extension: number;
|
|
36
|
+
};
|
|
37
|
+
pipeline: string;
|
|
38
|
+
stages: {
|
|
39
|
+
open: {
|
|
40
|
+
id: string;
|
|
41
|
+
label: string;
|
|
42
|
+
};
|
|
43
|
+
won: {
|
|
44
|
+
id: string;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
groupWon: {
|
|
48
|
+
id: string;
|
|
49
|
+
label: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
pmsChannels: {
|
|
55
|
+
direct: string;
|
|
56
|
+
};
|
|
57
|
+
stages: {
|
|
58
|
+
inquiry: {
|
|
59
|
+
id: string;
|
|
60
|
+
label: string;
|
|
61
|
+
};
|
|
62
|
+
awaitingDeposit: {
|
|
63
|
+
id: string;
|
|
64
|
+
label: string;
|
|
65
|
+
};
|
|
66
|
+
awaitingKyc: {
|
|
67
|
+
id: string;
|
|
68
|
+
label: string;
|
|
69
|
+
};
|
|
70
|
+
pendingKycApproval: {
|
|
71
|
+
id: string;
|
|
72
|
+
label: string;
|
|
73
|
+
};
|
|
74
|
+
preStay: {
|
|
75
|
+
id: string;
|
|
76
|
+
label: string;
|
|
77
|
+
};
|
|
78
|
+
stay: {
|
|
79
|
+
id: string;
|
|
80
|
+
label: string;
|
|
81
|
+
};
|
|
82
|
+
postStay: {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
};
|
|
86
|
+
inquiryArchive: {
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
};
|
|
90
|
+
cancelled: {
|
|
91
|
+
id: string;
|
|
92
|
+
label: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
15
95
|
};
|
package/build/src/config/app.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.COMMON_SERVER = void 0;
|
|
4
|
+
exports.COMMON_SERVER = {
|
|
5
|
+
currency: {
|
|
6
|
+
symbol: '$',
|
|
7
|
+
code: 'USD'
|
|
8
|
+
},
|
|
5
9
|
formats: {
|
|
6
10
|
date: {
|
|
7
11
|
short: {
|
|
@@ -14,5 +18,81 @@ exports.COMMON_APP = {
|
|
|
14
18
|
fees: {
|
|
15
19
|
utilities: 'Utilities'
|
|
16
20
|
}
|
|
21
|
+
},
|
|
22
|
+
hubpost: {
|
|
23
|
+
objectTypes: {
|
|
24
|
+
contact: '0-1',
|
|
25
|
+
ticket: '0-5',
|
|
26
|
+
reservation: '2-30640026'
|
|
27
|
+
},
|
|
28
|
+
quotes: {
|
|
29
|
+
associations: {
|
|
30
|
+
contact: 127,
|
|
31
|
+
unit: 125,
|
|
32
|
+
ticket: 132,
|
|
33
|
+
quote: 131,
|
|
34
|
+
reservation: 129
|
|
35
|
+
},
|
|
36
|
+
types: {
|
|
37
|
+
new: 1,
|
|
38
|
+
extension: 2
|
|
39
|
+
},
|
|
40
|
+
pipeline: '125304116',
|
|
41
|
+
stages: {
|
|
42
|
+
open: {
|
|
43
|
+
id: '219455915',
|
|
44
|
+
label: 'Open'
|
|
45
|
+
},
|
|
46
|
+
won: {
|
|
47
|
+
id: '219455916',
|
|
48
|
+
label: 'Won'
|
|
49
|
+
},
|
|
50
|
+
groupWon: {
|
|
51
|
+
id: '219568457',
|
|
52
|
+
label: 'Group Won'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
pmsChannels: {
|
|
58
|
+
direct: 'Direct'
|
|
59
|
+
},
|
|
60
|
+
stages: {
|
|
61
|
+
inquiry: {
|
|
62
|
+
id: '190000293',
|
|
63
|
+
label: 'Inquiry'
|
|
64
|
+
},
|
|
65
|
+
awaitingDeposit: {
|
|
66
|
+
id: '190068831',
|
|
67
|
+
label: 'Awaiting Deposit'
|
|
68
|
+
},
|
|
69
|
+
awaitingKyc: {
|
|
70
|
+
id: '205417363',
|
|
71
|
+
label: 'Awaiting KYC'
|
|
72
|
+
},
|
|
73
|
+
pendingKycApproval: {
|
|
74
|
+
id: '205417364',
|
|
75
|
+
label: 'Pending KYC Approval'
|
|
76
|
+
},
|
|
77
|
+
preStay: {
|
|
78
|
+
id: '190068832',
|
|
79
|
+
label: 'Pre Stay'
|
|
80
|
+
},
|
|
81
|
+
stay: {
|
|
82
|
+
id: '190068833',
|
|
83
|
+
label: 'Stay'
|
|
84
|
+
},
|
|
85
|
+
postStay: {
|
|
86
|
+
id: '190000294',
|
|
87
|
+
label: 'Post Stay'
|
|
88
|
+
},
|
|
89
|
+
inquiryArchive: {
|
|
90
|
+
id: '189954565',
|
|
91
|
+
label: 'Inquiry Archive'
|
|
92
|
+
},
|
|
93
|
+
cancelled: {
|
|
94
|
+
id: '190068915',
|
|
95
|
+
label: 'Cancelled'
|
|
96
|
+
}
|
|
17
97
|
}
|
|
18
98
|
};
|
|
@@ -10,7 +10,7 @@ const guestyPrice = (unit, stay) => {
|
|
|
10
10
|
// Apply multiplier: Guesty's approach to monthly pricing
|
|
11
11
|
const rent = +(stay.reduce((acc, stay) => acc + stay.price, 0) * multiplier).toFixed(0);
|
|
12
12
|
const cleaning = unit.prices.cleaningFee;
|
|
13
|
-
const utilities = (((_a = unit.fees.find(fee => fee.name.trim() === app_1.
|
|
13
|
+
const utilities = (((_a = unit.fees.find(fee => fee.name.trim() === app_1.COMMON_SERVER.guesty.fees.utilities)) === null || _a === void 0 ? void 0 : _a.value) || 0) * nights;
|
|
14
14
|
return { nights, rent, cleaning, utilities };
|
|
15
15
|
};
|
|
16
16
|
exports.guestyPrice = guestyPrice;
|