shuttlepro-shared 1.3.98 → 1.4.1
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.
- package/common/repositories/call.repository.js +540 -0
- package/common/repositories/index.js +2 -0
- package/config/socket.js +249 -30
- package/models/Attribute.js +0 -5
- package/models/Automation.js +0 -10
- package/models/Call.js +188 -0
- package/models/Card.js +0 -5
- package/models/Category.js +0 -5
- package/models/Checkpoint.js +0 -5
- package/models/Customer.js +0 -5
- package/models/Location.js +0 -5
- package/models/Order.js +0 -6
- package/models/OrderPdf.js +0 -5
- package/models/OrderProduct.js +0 -5
- package/models/Product.js +0 -5
- package/models/ProductAttachment.js +0 -5
- package/models/ProductAttribute.js +0 -5
- package/models/ProductCategory.js +0 -5
- package/models/ProductTag.js +0 -5
- package/models/ProductVariant.js +0 -5
- package/models/Tag.js +0 -5
- package/models/VariantLocation.js +0 -5
- package/models.js +2 -0
- package/package.json +1 -1
package/models/Order.js
CHANGED
|
@@ -103,11 +103,6 @@ const OrderSchema = new Schema(
|
|
|
103
103
|
ref: "Workspace",
|
|
104
104
|
default: null,
|
|
105
105
|
},
|
|
106
|
-
websiteId: {
|
|
107
|
-
type: Schema.Types.ObjectId,
|
|
108
|
-
ref: "Website",
|
|
109
|
-
default: null,
|
|
110
|
-
},
|
|
111
106
|
orderType: { type: String, default: "" },
|
|
112
107
|
barCode: { type: String, default: "" },
|
|
113
108
|
quantity: { type: Number, default: 0 },
|
|
@@ -228,7 +223,6 @@ const markOrUnMarkOrderAsDuplicate = async (doc) => {
|
|
|
228
223
|
const phoneRegex = getPhoneRegex(doc?.customerPhone);
|
|
229
224
|
let orders = await Order.find({
|
|
230
225
|
workspaceId: doc?.workspaceId,
|
|
231
|
-
websiteId: doc?.websiteId,
|
|
232
226
|
isDeleted: false,
|
|
233
227
|
statusType: "pending",
|
|
234
228
|
customerPhone: phoneRegex,
|
package/models/OrderPdf.js
CHANGED
|
@@ -20,11 +20,6 @@ const OrderPdfScehma = new mongoose.Schema(
|
|
|
20
20
|
ref: "Workspace",
|
|
21
21
|
default: null,
|
|
22
22
|
},
|
|
23
|
-
websiteId: {
|
|
24
|
-
type: Schema.Types.ObjectId,
|
|
25
|
-
ref: "Website",
|
|
26
|
-
default: null,
|
|
27
|
-
},
|
|
28
23
|
createdBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
29
24
|
updatedBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
30
25
|
},
|
package/models/OrderProduct.js
CHANGED
|
@@ -31,11 +31,6 @@ const OrderProductSchema = new Schema(
|
|
|
31
31
|
ref: "Workspace",
|
|
32
32
|
default: null,
|
|
33
33
|
},
|
|
34
|
-
websiteId: {
|
|
35
|
-
type: Schema.Types.ObjectId,
|
|
36
|
-
ref: "Website",
|
|
37
|
-
default: null,
|
|
38
|
-
},
|
|
39
34
|
},
|
|
40
35
|
{ timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
|
|
41
36
|
);
|
package/models/Product.js
CHANGED
|
@@ -31,11 +31,6 @@ const ProductSchema = new Schema(
|
|
|
31
31
|
type: Schema.Types.ObjectId,
|
|
32
32
|
ref: "Workspace",
|
|
33
33
|
default: null,
|
|
34
|
-
},
|
|
35
|
-
websiteId: {
|
|
36
|
-
type: Schema.Types.ObjectId,
|
|
37
|
-
ref: "Website",
|
|
38
|
-
default: null,
|
|
39
34
|
},
|
|
40
35
|
storeType: { type: String, default: "LOCAL" },
|
|
41
36
|
isDeleted: { type: Boolean, default: false },
|
|
@@ -22,11 +22,6 @@ const ProductAttachmentSchema = new Schema(
|
|
|
22
22
|
ref: "Workspace",
|
|
23
23
|
default: null,
|
|
24
24
|
},
|
|
25
|
-
websiteId: {
|
|
26
|
-
type: Schema.Types.ObjectId,
|
|
27
|
-
ref: "Website",
|
|
28
|
-
default: null,
|
|
29
|
-
},
|
|
30
25
|
height: { type: Number, default: 0 },
|
|
31
26
|
variantIds: [
|
|
32
27
|
{ type: Schema.Types.ObjectId, ref: "ProductVariant", default: null },
|
|
@@ -16,11 +16,6 @@ const ProductAttributeSchema = new mongoose.Schema(
|
|
|
16
16
|
ref: "Workspace",
|
|
17
17
|
default: null,
|
|
18
18
|
},
|
|
19
|
-
websiteId: {
|
|
20
|
-
type: Schema.Types.ObjectId,
|
|
21
|
-
ref: "Website",
|
|
22
|
-
default: null,
|
|
23
|
-
},
|
|
24
19
|
isDeleted: { type: Boolean, default: false },
|
|
25
20
|
position: { type: String, default: "1" },
|
|
26
21
|
},
|
|
@@ -11,11 +11,6 @@ const ProductCategorySchema = 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
|
-
},
|
|
19
14
|
createdBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
20
15
|
updatedBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
21
16
|
isDeleted: { type: Boolean, default: false },
|
package/models/ProductTag.js
CHANGED
|
@@ -11,11 +11,6 @@ const ProductTagSchema = 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
|
-
},
|
|
19
14
|
createdBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
20
15
|
updatedBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
21
16
|
isDeleted: { type: Boolean, default: false },
|
package/models/ProductVariant.js
CHANGED
|
@@ -17,11 +17,6 @@ const ProductVariantSchema = new Schema(
|
|
|
17
17
|
ref: "Workspace",
|
|
18
18
|
default: null,
|
|
19
19
|
},
|
|
20
|
-
websiteId: {
|
|
21
|
-
type: Schema.Types.ObjectId,
|
|
22
|
-
ref: "Website",
|
|
23
|
-
default: null,
|
|
24
|
-
},
|
|
25
20
|
webVariantId: { type: Number, default: null },
|
|
26
21
|
inventoryPolicy: { type: String, default: "deny" }, //deny,continue
|
|
27
22
|
taxable: { type: Boolean, default: false },
|
package/models/Tag.js
CHANGED
|
@@ -8,11 +8,6 @@ const TagSchema = new Schema(
|
|
|
8
8
|
ref: "Workspace",
|
|
9
9
|
default: null,
|
|
10
10
|
},
|
|
11
|
-
websiteId: {
|
|
12
|
-
type: Schema.Types.ObjectId,
|
|
13
|
-
ref: "Website",
|
|
14
|
-
default: null,
|
|
15
|
-
},
|
|
16
11
|
oldId: { type: String, default: "" },
|
|
17
12
|
webTagId: { type: Number, default: "" },
|
|
18
13
|
createdBy: { type: Schema.Types.ObjectId, ref: "User", default: null },
|
|
@@ -13,11 +13,6 @@ const VariantLocationSchema = new Schema(
|
|
|
13
13
|
ref: "Workspace",
|
|
14
14
|
default: null,
|
|
15
15
|
},
|
|
16
|
-
websiteId: {
|
|
17
|
-
type: Schema.Types.ObjectId,
|
|
18
|
-
ref: "Website",
|
|
19
|
-
default: null,
|
|
20
|
-
},
|
|
21
16
|
productId: { type: Schema.Types.ObjectId, ref: "Product", default: null },
|
|
22
17
|
locationId: { type: Schema.Types.ObjectId, ref: "Location", default: null },
|
|
23
18
|
webVariantLocationId: { type: Number, default: null },
|
package/models.js
CHANGED
|
@@ -104,6 +104,7 @@ const WhatsappFlow = require("./models/WhatsappFlow");
|
|
|
104
104
|
const Workflow = require("./models/Workflow");
|
|
105
105
|
const Workspace = require("./models/Workspace");
|
|
106
106
|
const Shop = require("./models/Shop");
|
|
107
|
+
const Call = require("./models/Call");
|
|
107
108
|
|
|
108
109
|
module.exports = {
|
|
109
110
|
Activity,
|
|
@@ -212,4 +213,5 @@ module.exports = {
|
|
|
212
213
|
Workflow,
|
|
213
214
|
Workspace,
|
|
214
215
|
Shop,
|
|
216
|
+
Call,
|
|
215
217
|
};
|