shuttlepro-shared 1.5.15 → 1.5.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.
@@ -69,6 +69,8 @@ const conversationSchema = new mongoose.Schema(
69
69
  messageId: { type: String, default: "" },
70
70
  profileId: { type: Schema.Types.ObjectId, ref: "Profile" },
71
71
  conversationCloseTime: { type: String },
72
+ // Cycle start for Gmail/SMTP reopen (customer or agent after close)
73
+ lastCustomerReopenAt: { type: Date, default: null },
72
74
  workspaceId: { type: Schema.Types.ObjectId, ref: "Workspace" },
73
75
  postId: { type: String, default: "" },
74
76
  postUrl: { type: String, default: "" },
@@ -118,6 +120,29 @@ const conversationSchema = new mongoose.Schema(
118
120
  workflowQueueActive: { type: Boolean, default: false },
119
121
  workflowInitiatedAt: { type: Date, default: null },
120
122
  initialWorkflowMessageId: { type: String, default: "" },
123
+ // Soft-merge for Gmail/SMTP email chats only (provider threads stay separate)
124
+ mergedInto: {
125
+ type: {
126
+ id: { type: String, default: "" },
127
+ threadId: { type: String, default: "" },
128
+ },
129
+ default: null,
130
+ },
131
+ mergedConversations: {
132
+ type: [
133
+ {
134
+ id: { type: String, default: "" },
135
+ threadId: { type: String, default: "" },
136
+ },
137
+ ],
138
+ default: [],
139
+ },
140
+ mergedAt: { type: Date, default: null },
141
+ mergedBy: {
142
+ type: Schema.Types.ObjectId,
143
+ ref: "User",
144
+ default: null,
145
+ },
121
146
  },
122
147
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
123
148
  );
@@ -411,6 +411,7 @@ const workspaceSchema = new mongoose.Schema(
411
411
  default: false,
412
412
  },
413
413
  productNavigationLink: { type: String, default: "" },
414
+ productCategory: { type: String, default: "" },
414
415
  },
415
416
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
416
417
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.5.15",
3
+ "version": "1.5.17",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {