shuttlepro-shared 1.5.46 → 1.5.47

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.
@@ -34,6 +34,7 @@ const conversationSchema = new mongoose.Schema(
34
34
  "smtp_gmail",
35
35
  "shuttle_smtp",
36
36
  "qlyro",
37
+ "qlyroWebChat",
37
38
  ],
38
39
  required: true,
39
40
  },
@@ -24,6 +24,7 @@ const IntegrationSchema = new mongoose.Schema(
24
24
  "sms",
25
25
  "shuttle_smtp",
26
26
  "qlyro",
27
+ "qlyroWebChat",
27
28
  ],
28
29
  },
29
30
  chatbot: { type: Boolean, default: false },
@@ -52,6 +53,14 @@ const IntegrationSchema = new mongoose.Schema(
52
53
  { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
53
54
  );
54
55
 
56
+ // Qlyro Webchat: a website's chat button is found by its widget id on every
57
+ // page view. Partial, so it only holds Qlyro Webchat channels (each gets a
58
+ // unique widget id when created) and other platforms are unaffected.
59
+ IntegrationSchema.index(
60
+ { "body.widgetId": 1 },
61
+ { unique: true, partialFilterExpression: { type: "qlyroWebChat" } }
62
+ );
63
+
55
64
  IntegrationSchema.virtual("conversations", {
56
65
  ref: "Conversation",
57
66
  localField: "_id",
package/models/Website.js CHANGED
@@ -8,6 +8,9 @@ const websiteSchema = new mongoose.Schema(
8
8
  default: "",
9
9
  },
10
10
  accessToken: { type: String, default: "" },
11
+ refreshToken: { type: String, default: "" },
12
+ accessTokenExpires: { type: Date, default: null },
13
+ refreshTokenExpires: { type: Date, default: null },
11
14
  url: { type: String, default: "" },
12
15
  consumerKey: { type: String, default: "" },
13
16
  consumerSecret: { type: String, default: "" },
@@ -435,6 +435,14 @@ const workspaceSchema = new mongoose.Schema(
435
435
  chatbotTokenSaving: {
436
436
  type: Boolean,
437
437
  },
438
+ /**
439
+ * "AI chat summary" switch: true = after an AI chat is closed, aiSummaryApp writes a short
440
+ * summary for agents. No default on purpose: missing = off. Set by admins in Settings →
441
+ * General Settings (mainApp PUT /settings/update-ai-conversation-summary); off removes the field.
442
+ */
443
+ aiConversationSummary: {
444
+ type: Boolean,
445
+ },
438
446
  /** When true (default), ShuttleBot includes product photos with product detail replies. */
439
447
  chatbotShowProductImages: {
440
448
  type: Boolean,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.5.46",
3
+ "version": "1.5.47",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {