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
|
};
|
package/models/AgentActivity.js
CHANGED
|
@@ -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
package/models/Workspace.js
CHANGED
|
@@ -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 },
|