shuttlepro-shared 1.2.16 → 1.2.17

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: "" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.16",
3
+ "version": "1.2.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {