@vibe-flats/booking-engine-common-server 1.0.30 → 1.0.32

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.
@@ -5,6 +5,7 @@ export interface AreaDocument extends mongoose.Document {
5
5
  externalName: string;
6
6
  publicId: string;
7
7
  city: CityDocument;
8
+ description: string;
8
9
  }
9
10
  export declare const AreaModel: (connection: mongoose.Connection) => mongoose.Model<AreaDocument, {}, {}, {}, mongoose.Document<unknown, {}, AreaDocument> & AreaDocument & Required<{
10
11
  _id: unknown;
@@ -41,6 +41,10 @@ const schema = new mongoose_1.default.Schema({
41
41
  city: {
42
42
  type: mongoose_1.Schema.Types.ObjectId,
43
43
  ref: 'City'
44
+ },
45
+ description: {
46
+ type: String,
47
+ required: false
44
48
  }
45
49
  });
46
50
  schema.index({ publicId: 1 });
@@ -1,7 +1,10 @@
1
1
  import mongoose from 'mongoose';
2
2
  export interface CityDocument extends mongoose.Document {
3
3
  name: string;
4
+ externalName: string;
4
5
  publicId: string;
6
+ slug: string;
7
+ description: string;
5
8
  }
6
9
  export declare const CityModel: (connection: mongoose.Connection) => mongoose.Model<CityDocument, {}, {}, {}, mongoose.Document<unknown, {}, CityDocument> & CityDocument & Required<{
7
10
  _id: unknown;
@@ -17,9 +17,18 @@ const schema = new mongoose_1.default.Schema({
17
17
  publicId: {
18
18
  type: String,
19
19
  required: true
20
+ },
21
+ slug: {
22
+ type: String,
23
+ required: false
24
+ },
25
+ description: {
26
+ type: String,
27
+ required: false
20
28
  }
21
29
  });
22
30
  schema.index({ publicId: 1 });
31
+ schema.index({ slug: 1 }, { unique: true });
23
32
  schema.index({ externalName: 1 });
24
33
  const CityModel = (connection) => {
25
34
  return connection.model('City', schema);
@@ -58,6 +58,7 @@ export interface UnitDocument extends mongoose.Document {
58
58
  vrbo: string;
59
59
  booking: string;
60
60
  };
61
+ slug: string;
61
62
  }
62
63
  export declare const UnitModel: (connection: mongoose.Connection) => mongoose.Model<UnitDocument, {}, {}, {}, mongoose.Document<unknown, {}, UnitDocument> & UnitDocument & Required<{
63
64
  _id: unknown;
@@ -92,7 +92,8 @@ const schema = new mongoose_1.default.Schema({
92
92
  }),
93
93
  required: false,
94
94
  _id: false
95
- }
95
+ },
96
+ slug: { type: String, required: false }
96
97
  }, {
97
98
  timestamps: true,
98
99
  versionKey: false,
@@ -102,6 +103,7 @@ const schema = new mongoose_1.default.Schema({
102
103
  schema.index({ publicId: 1 });
103
104
  schema.index({ code: 1 });
104
105
  schema.index({ hubspotId: 1 });
106
+ schema.index({ slug: 1 }, { unique: true });
105
107
  const UnitModel = (connection) => {
106
108
  return connection.model('Unit', schema);
107
109
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-flats/booking-engine-common-server",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",