shuttlepro-shared 1.4.96 → 1.4.98

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.
@@ -11,9 +11,19 @@ const CategorySchema = new Schema(
11
11
  ref: "Workspace",
12
12
  default: null,
13
13
  },
14
+ websiteId: {
15
+ type: Schema.Types.ObjectId,
16
+ ref: "Website",
17
+ default: null,
18
+ },
14
19
  oldId: { type: String, default: "" },
15
20
  webCategoryId: { type: Number, default: null },
16
21
  parentId: { type: Schema.Types.ObjectId, ref: "Category", default: null },
22
+ websiteId: {
23
+ type: Schema.Types.ObjectId,
24
+ ref: "Website",
25
+ default: null,
26
+ },
17
27
  createdBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
18
28
  updatedBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
19
29
  isDeleted: { type: Boolean, default: false },
@@ -19,10 +19,20 @@ const LocationSchema = new Schema(
19
19
  ref: "Workspace",
20
20
  default: null,
21
21
  },
22
+ websiteId: {
23
+ type: Schema.Types.ObjectId,
24
+ ref: "Website",
25
+ default: null,
26
+ },
22
27
  legacy: { type: Boolean, default: false },
23
28
  name: { type: String, default: "" },
24
29
  isDeleted: { type: Boolean, default: false },
25
30
  bcLocationId: { type: String, default: "" },
31
+ websiteId: {
32
+ type: Schema.Types.ObjectId,
33
+ ref: "Website",
34
+ default: null,
35
+ },
26
36
  createdBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
27
37
  updatedBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
28
38
  },
package/models/Order.js CHANGED
@@ -64,6 +64,11 @@ const OrderSchema = new Schema(
64
64
  trackingId: { type: String, default: "" },
65
65
  shipperInformation: ShipperInformation,
66
66
  isCnGenerated: { type: Boolean, default: false },
67
+ websiteId: {
68
+ type: Schema.Types.ObjectId,
69
+ ref: "Website",
70
+ default: null,
71
+ },
67
72
  swap: { type: String, default: "" },
68
73
  status: { type: String, default: "" },
69
74
  lastStatusTime: { type: String, default: "" },
@@ -104,6 +109,11 @@ const OrderSchema = new Schema(
104
109
  ref: "Workspace",
105
110
  default: null,
106
111
  },
112
+ websiteId: {
113
+ type: Schema.Types.ObjectId,
114
+ ref: "Website",
115
+ default: null,
116
+ },
107
117
  orderType: { type: String, default: "" },
108
118
  barCode: { type: String, default: "" },
109
119
  quantity: { type: Number, default: 0 },
@@ -177,6 +187,8 @@ const OrderSchema = new Schema(
177
187
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
178
188
  );
179
189
 
190
+ OrderSchema.index({ workspaceId: 1, websiteId: 1, webOrderId: 1 });
191
+
180
192
  OrderSchema.virtual("checkPoints", {
181
193
  ref: "Checkpoint",
182
194
  localField: "_id",
package/models/Product.js CHANGED
@@ -61,6 +61,8 @@ const ProductSchema = new Schema(
61
61
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
62
62
  );
63
63
 
64
+ ProductSchema.index({ workspaceId: 1, websiteId: 1, webProductId: 1 });
65
+
64
66
  ProductSchema.virtual("productCategories", {
65
67
  ref: "ProductCategory",
66
68
  localField: "_id",
@@ -11,7 +11,9 @@ const ProductQueueSchema = new mongoose.Schema(
11
11
  userId: { type: String, default: "" },
12
12
  workspaceName: { type: String, default: "" },
13
13
  workspaceId: { type: String, default: "" },
14
+ websiteId: { type: String, default: "" },
14
15
  webhookData: { type: String, default: "" },
16
+ websiteId: { type: String, default: "" },
15
17
  },
16
18
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
17
19
  );
@@ -359,6 +359,10 @@ const workspaceSchema = new mongoose.Schema(
359
359
  tokens: { type: Number, default: 0 },
360
360
  limit: { type: Number, default: 0 },
361
361
  },
362
+ enableInternalChat: {
363
+ type: Boolean,
364
+ default: false,
365
+ },
362
366
  hideMarketingTemplates: {
363
367
  type: Boolean,
364
368
  default: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.4.96",
3
+ "version": "1.4.98",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {