shuttlepro-shared 1.4.8 → 1.4.10

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.
@@ -39,7 +39,12 @@ const updateCustomerProfile = async (id, data) => {
39
39
  }).exec();
40
40
  return updated;
41
41
  };
42
-
42
+ const updateManyCustomerProfiles = async (filter, data) => {
43
+ const result = await CustomerProfile.updateMany(filter, {
44
+ $set: data,
45
+ }).exec();
46
+ return result;
47
+ };
43
48
  const updateCustomerProfileByFilter = async (
44
49
  filter,
45
50
  data,
@@ -112,4 +117,5 @@ module.exports = {
112
117
  findAllCustomerProfilesByFilter,
113
118
  findAllCustomerProfilesByFilterFromDb,
114
119
  searchCustomerProfilesByName,
120
+ updateManyCustomerProfiles,
115
121
  };
@@ -55,32 +55,6 @@ const AutomationAction = new Schema({
55
55
  templateId: descriptionJoin,
56
56
  delay: defaultStringType,
57
57
  },
58
- ticketList: {
59
- enabled: { type: Boolean, default: false },
60
- templateId: descriptionJoin,
61
- delay: defaultStringType,
62
- ticketList: [
63
- {
64
- id: {
65
- type: mongoose.Schema.Types.ObjectId,
66
- ref: "Column",
67
- required: true,
68
- },
69
- title: {
70
- type: String,
71
- required: true,
72
- },
73
- name: {
74
- type: String,
75
- required: true,
76
- },
77
- type: {
78
- type: String,
79
- required: true,
80
- },
81
- },
82
- ],
83
- },
84
58
  markAsSpam: {
85
59
  enabled: { type: Boolean, default: false },
86
60
  },
@@ -195,7 +169,6 @@ const AutomationCondition = new Schema({
195
169
  "shift",
196
170
  "newCommentPost",
197
171
  "profile",
198
- "moveTicket",
199
172
  ],
200
173
  },
201
174
  keyValue: {
@@ -220,7 +193,6 @@ const AutomationCondition = new Schema({
220
193
  "orderPublish",
221
194
  "newCommentPost",
222
195
  "profile",
223
- "moveTicket",
224
196
  ],
225
197
  },
226
198
  subKeyValue: {
@@ -24,6 +24,8 @@ const CustomerProfileSchema = new Schema(
24
24
  default: null,
25
25
  },
26
26
  body: {},
27
+ suspend: { type: Boolean, default: false }, // For Delete Comment Check
28
+ spam: { type: Boolean, default: false }, // For Hide Comment Check
27
29
  },
28
30
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
29
31
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.4.8",
3
+ "version": "1.4.10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {