shuttlepro-shared 1.5.47 → 1.5.49

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.
@@ -18,6 +18,8 @@ const assignmentSchema = new mongoose.Schema({
18
18
  },
19
19
  });
20
20
 
21
+ assignmentSchema.index({ cardId: 1 }); // Card assignee lookups
22
+
21
23
  const Assignment = mongoose.model("Assignment", assignmentSchema);
22
24
 
23
25
  module.exports = Assignment;
package/models/Card.js CHANGED
@@ -170,6 +170,7 @@ const cardSchema = new mongoose.Schema(
170
170
  );
171
171
 
172
172
  cardSchema.index({ workspaceId: 1, createdAt: 1 }); // Common filter
173
+ cardSchema.index({ columnId: 1, deleted: 1, category: 1, createdAt: 1 }); // Task-manager board lookups
173
174
 
174
175
  // Virtual for the assignedTo user
175
176
  cardSchema.virtual("assignedToUser", {
@@ -30,4 +30,6 @@ const cardCommentSchema = new mongoose.Schema(
30
30
  { timestamps: true }
31
31
  );
32
32
 
33
+ cardCommentSchema.index({ cardId: 1, deleted: 1 }); // Card comment lookups
34
+
33
35
  module.exports = mongoose.model("CardComment", cardCommentSchema);
@@ -42,6 +42,8 @@ const EscalationManagerSchema = new Schema(
42
42
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
43
43
  );
44
44
 
45
+ EscalationManagerSchema.index({ refId: 1 }); // Card/conversation escalation lookups
46
+
45
47
  const EscalationManager = mongoose.model(
46
48
  "EscalationManager",
47
49
  EscalationManagerSchema
@@ -443,6 +443,17 @@ const workspaceSchema = new mongoose.Schema(
443
443
  aiConversationSummary: {
444
444
  type: Boolean,
445
445
  },
446
+ /**
447
+ * "New agent activity" switch: true = conversationApp also writes one
448
+ * AgentActivityEvent row per agent action (actual sender gets the credit,
449
+ * server-side response time, System Outreach status). No default on
450
+ * purpose: missing/false = off. The old AgentActivity daily records are
451
+ * written exactly as before either way, so turning this on or off never
452
+ * changes existing report counts.
453
+ */
454
+ agentActivityV2: {
455
+ type: Boolean,
456
+ },
446
457
  /** When true (default), ShuttleBot includes product photos with product detail replies. */
447
458
  chatbotShowProductImages: {
448
459
  type: Boolean,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.5.47",
3
+ "version": "1.5.49",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {