shuttlepro-shared 1.2.16 → 1.2.18

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.
@@ -173,6 +173,10 @@ const deleteAllTemplatesByWorkspace = async (workspaceId) => {
173
173
  await updateCachedAllDescriptionTemplates();
174
174
  };
175
175
 
176
+ const findTemplateById = async (id) => {
177
+ return await DescriptionTemplate.findById(id).lean().exec();
178
+ };
179
+
176
180
  module.exports = {
177
181
  createTemplate,
178
182
  createOrUpdateTemplate,
@@ -183,4 +187,5 @@ module.exports = {
183
187
  updateManyTemplates,
184
188
  deleteTemplate,
185
189
  deleteAllTemplatesByWorkspace,
190
+ findTemplateById,
186
191
  };
@@ -45,6 +45,7 @@ const activitySchema = new mongoose.Schema({
45
45
  responses: { type: [responseSchema], default: [] },
46
46
  remarks: { type: String, required: false },
47
47
  avgAccuracy: { type: Number, required: false, default: 10 },
48
+ sender: { type: String, required: "" },
48
49
  });
49
50
 
50
51
  const totalActivitySchema = new mongoose.Schema({
@@ -57,7 +58,7 @@ const agentActivitySchema = new mongoose.Schema(
57
58
  {
58
59
  _id: {
59
60
  type: mongoose.Schema.Types.ObjectId,
60
- default: mongoose.Types.ObjectId,
61
+ default: () => new mongoose.Types.ObjectId(),
61
62
  },
62
63
  agentId: { type: String, required: true },
63
64
  agentRole: { type: String, default: "" },
@@ -183,6 +184,7 @@ const findOneAndUpdateAgentActivity = async (
183
184
  return null;
184
185
  }
185
186
  };
187
+
186
188
  module.exports = {
187
189
  AgentActivity,
188
190
  findOneAndUpdateAgentActivity,
package/models/Chatbot.js CHANGED
@@ -10,6 +10,10 @@ const ChatbotSchema = new Schema(
10
10
  type: String,
11
11
  default: "",
12
12
  },
13
+ expiryTime: {
14
+ type: Number,
15
+ default: 300,
16
+ },
13
17
  },
14
18
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
15
19
  );
@@ -113,6 +113,7 @@ const workspaceSchema = new mongoose.Schema(
113
113
  queueTracking: { type: Boolean, default: false },
114
114
  orderConfiguration: { type: String, default: "" },
115
115
  defaultModule: { type: String, default: "dashboard" },
116
+ defaultShift: { type: String, default: "" },
116
117
  dynamicFieldsTemplate: [
117
118
  {
118
119
  groupName: { type: String, required: true, trim: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.16",
3
+ "version": "1.2.18",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {