@vibe-flats/booking-engine-common-server 1.0.44 → 1.0.46

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.
@@ -3,6 +3,9 @@ export declare const COMMON_SERVER: {
3
3
  symbol: string;
4
4
  code: string;
5
5
  };
6
+ priceFactor: {
7
+ monthly: number;
8
+ };
6
9
  guesty: {
7
10
  fees: {
8
11
  utilities: string;
@@ -6,6 +6,9 @@ exports.COMMON_SERVER = {
6
6
  symbol: '$',
7
7
  code: 'USD'
8
8
  },
9
+ priceFactor: {
10
+ monthly: 30
11
+ },
9
12
  guesty: {
10
13
  fees: {
11
14
  utilities: 'Utilities'
@@ -6,7 +6,7 @@ const guestyPrice = (unit, stay) => {
6
6
  var _a;
7
7
  //
8
8
  const nights = stay.length;
9
- const multiplier = nights >= 30 ? unit.prices.monthlyPriceFactor : 1;
9
+ const multiplier = nights >= app_1.COMMON_SERVER.priceFactor.monthly ? unit.prices.monthlyPriceFactor : 1;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-flats/booking-engine-common-server",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",