@vibe-flats/booking-engine-common-server 1.0.63 → 1.0.65

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.
@@ -9,6 +9,7 @@ export declare const COMMON_SERVER: {
9
9
  guesty: {
10
10
  fees: {
11
11
  utilities: string;
12
+ discountMonthly: string;
12
13
  };
13
14
  };
14
15
  hubpost: {
@@ -11,7 +11,8 @@ exports.COMMON_SERVER = {
11
11
  },
12
12
  guesty: {
13
13
  fees: {
14
- utilities: 'Utilities'
14
+ utilities: 'Utilities',
15
+ discountMonthly: 'Discount (Monthly Stay)'
15
16
  }
16
17
  },
17
18
  hubpost: {
@@ -0,0 +1,26 @@
1
+ import mongoose from 'mongoose';
2
+ export interface MarketDocument extends mongoose.Document {
3
+ name: string;
4
+ externalId: string;
5
+ publicId: string;
6
+ isActive: boolean;
7
+ website: {
8
+ summary: string;
9
+ description: string;
10
+ slug: string;
11
+ sortOrder: number;
12
+ meta: {
13
+ title: string;
14
+ description: string;
15
+ };
16
+ faq: {
17
+ question: string;
18
+ answer: string;
19
+ }[];
20
+ };
21
+ createdAt: Date;
22
+ updatedAt: Date;
23
+ }
24
+ export declare const MarketModel: (connection: mongoose.Connection) => mongoose.Model<MarketDocument, {}, {}, {}, mongoose.Document<unknown, {}, MarketDocument> & MarketDocument & Required<{
25
+ _id: unknown;
26
+ }>, any>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MarketModel = void 0;
7
+ const mongoose_1 = __importDefault(require("mongoose"));
8
+ const schema = new mongoose_1.default.Schema({
9
+ name: {
10
+ type: String,
11
+ required: true
12
+ },
13
+ externalId: {
14
+ type: String,
15
+ required: true
16
+ },
17
+ publicId: {
18
+ type: String,
19
+ required: true
20
+ },
21
+ isActive: {
22
+ type: Boolean,
23
+ required: true,
24
+ default: true
25
+ },
26
+ website: {
27
+ type: new mongoose_1.default.Schema({
28
+ summary: { type: String },
29
+ description: { type: String },
30
+ slug: { type: String },
31
+ sortOrder: { type: Number, default: 99 },
32
+ meta: {
33
+ type: new mongoose_1.default.Schema({
34
+ title: { type: String },
35
+ description: { type: String }
36
+ }),
37
+ _id: false
38
+ },
39
+ faq: [
40
+ {
41
+ type: new mongoose_1.default.Schema({
42
+ question: { type: String },
43
+ answer: { type: String }
44
+ }),
45
+ _id: false
46
+ }
47
+ ]
48
+ }),
49
+ _id: false
50
+ }
51
+ }, {
52
+ timestamps: true
53
+ });
54
+ schema.index({ name: 1 });
55
+ const MarketModel = (connection) => {
56
+ return connection.model('Market', schema);
57
+ };
58
+ exports.MarketModel = MarketModel;
@@ -1,5 +1,8 @@
1
1
  import mongoose from 'mongoose';
2
2
  export declare const unitsModels: (connection: mongoose.Connection) => {
3
+ MarketModel: mongoose.Model<import("./models/markets").MarketDocument, {}, {}, {}, mongoose.Document<unknown, {}, import("./models/markets").MarketDocument> & import("./models/markets").MarketDocument & Required<{
4
+ _id: unknown;
5
+ }>, any>;
3
6
  CityModel: mongoose.Model<import("./models/cities").CityDocument, {}, {}, {}, mongoose.Document<unknown, {}, import("./models/cities").CityDocument> & import("./models/cities").CityDocument & Required<{
4
7
  _id: unknown;
5
8
  }>, any>;
@@ -6,7 +6,9 @@ const units_1 = require("./models/units");
6
6
  const availability_1 = require("./models/availability");
7
7
  const building_1 = require("./models/building");
8
8
  const areas_1 = require("./models/areas");
9
+ const markets_1 = require("./models/markets");
9
10
  const unitsModels = (connection) => ({
11
+ MarketModel: (0, markets_1.MarketModel)(connection),
10
12
  CityModel: (0, cities_1.CityModel)(connection),
11
13
  UnitModel: (0, units_1.UnitModel)(connection),
12
14
  AvailabilityModel: (0, availability_1.AvailabilityModel)(connection),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-flats/booking-engine-common-server",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",