shuttlepro-shared 1.4.83 → 1.4.84
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.
- package/models/Chatbot.js +0 -11
- package/models/EscalationConfiguration.js +0 -11
- package/models/Workspace.js +4 -0
- package/models.js +0 -2
- package/package.json +1 -1
- package/dump.rdb +0 -0
- package/models/EmailFeedbackReport.js +0 -115
package/models/Chatbot.js
CHANGED
|
@@ -77,17 +77,6 @@ const ChatbotSchema = new Schema(
|
|
|
77
77
|
type: String,
|
|
78
78
|
default: null,
|
|
79
79
|
},
|
|
80
|
-
systemUrl: {
|
|
81
|
-
type: String,
|
|
82
|
-
default: null,
|
|
83
|
-
},
|
|
84
|
-
buttons: [
|
|
85
|
-
{
|
|
86
|
-
id: { type: String, default: "" },
|
|
87
|
-
label: { type: String, default: "" },
|
|
88
|
-
emoji: { type: String, default: "" },
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
80
|
},
|
|
92
81
|
},
|
|
93
82
|
{ timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
|
|
@@ -12,17 +12,6 @@ const EscalationLevelSchema = new Schema({
|
|
|
12
12
|
type: Boolean,
|
|
13
13
|
default: false,
|
|
14
14
|
},
|
|
15
|
-
emailFeedbackChatbot: {
|
|
16
|
-
enabled: {
|
|
17
|
-
type: Boolean,
|
|
18
|
-
default: false,
|
|
19
|
-
},
|
|
20
|
-
chatbotId: {
|
|
21
|
-
type: Schema.Types.ObjectId,
|
|
22
|
-
ref: "Chatbot",
|
|
23
|
-
default: null,
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
15
|
labels: [
|
|
27
16
|
{
|
|
28
17
|
type: Schema.Types.ObjectId,
|
package/models/Workspace.js
CHANGED
|
@@ -361,6 +361,10 @@ const workspaceSchema = new mongoose.Schema(
|
|
|
361
361
|
type: Boolean,
|
|
362
362
|
default: false,
|
|
363
363
|
},
|
|
364
|
+
emailShotCutKey: {
|
|
365
|
+
type: Boolean,
|
|
366
|
+
default: false,
|
|
367
|
+
},
|
|
364
368
|
},
|
|
365
369
|
{ timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
|
|
366
370
|
);
|
package/models.js
CHANGED
|
@@ -36,7 +36,6 @@ const DeviceInfo = require("./models/DeviceInfo");
|
|
|
36
36
|
const Email = require("./models/Email");
|
|
37
37
|
const EmailMessage = require("./models/EmailMessage");
|
|
38
38
|
const EmailNotification = require("./models/EmailNotification");
|
|
39
|
-
const EmailFeedbackReport = require("./models/EmailFeedbackReport");
|
|
40
39
|
const EscalationConfiguration = require("./models/EscalationConfiguration");
|
|
41
40
|
const EscalationManager = require("./models/EscalationManager");
|
|
42
41
|
const Faq = require("./models/Faq");
|
|
@@ -152,7 +151,6 @@ module.exports = {
|
|
|
152
151
|
Email,
|
|
153
152
|
EmailMessage,
|
|
154
153
|
EmailNotification,
|
|
155
|
-
EmailFeedbackReport,
|
|
156
154
|
EscalationConfiguration,
|
|
157
155
|
EscalationManager,
|
|
158
156
|
Faq,
|
package/package.json
CHANGED
package/dump.rdb
DELETED
|
Binary file
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
const { Schema } = require("mongoose");
|
|
2
|
-
|
|
3
|
-
const EmailFeedbackReportSchema = new Schema(
|
|
4
|
-
{
|
|
5
|
-
workspaceId: {
|
|
6
|
-
type: Schema.Types.ObjectId,
|
|
7
|
-
ref: "Workspace",
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
chatbotId: {
|
|
11
|
-
type: Schema.Types.ObjectId,
|
|
12
|
-
ref: "Chatbot",
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
conversationId: {
|
|
16
|
-
type: Schema.Types.ObjectId,
|
|
17
|
-
ref: "Conversation",
|
|
18
|
-
required: true,
|
|
19
|
-
},
|
|
20
|
-
email: {
|
|
21
|
-
type: String,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
status: {
|
|
25
|
-
type: String,
|
|
26
|
-
enum: ["pending", "responded", "completed"],
|
|
27
|
-
default: "pending",
|
|
28
|
-
},
|
|
29
|
-
// Store the initial button click (good/bad)
|
|
30
|
-
initialResponse: {
|
|
31
|
-
buttonId: {
|
|
32
|
-
type: String, // "good" or "bad"
|
|
33
|
-
required: false,
|
|
34
|
-
},
|
|
35
|
-
buttonLabel: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: false,
|
|
38
|
-
},
|
|
39
|
-
respondedAt: {
|
|
40
|
-
type: Date,
|
|
41
|
-
default: null,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
// Store all answers if chatbot has follow-up questions
|
|
45
|
-
answers: [
|
|
46
|
-
{
|
|
47
|
-
question: {
|
|
48
|
-
type: String,
|
|
49
|
-
required: true,
|
|
50
|
-
},
|
|
51
|
-
answer: {
|
|
52
|
-
type: String,
|
|
53
|
-
required: true,
|
|
54
|
-
},
|
|
55
|
-
optionIndex: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: 0,
|
|
58
|
-
},
|
|
59
|
-
options: {
|
|
60
|
-
type: [String],
|
|
61
|
-
default: [],
|
|
62
|
-
},
|
|
63
|
-
answeredAt: {
|
|
64
|
-
type: Date,
|
|
65
|
-
default: Date.now,
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
totalQuestions: {
|
|
70
|
-
type: Number,
|
|
71
|
-
default: 0,
|
|
72
|
-
},
|
|
73
|
-
completedQuestions: {
|
|
74
|
-
type: Number,
|
|
75
|
-
default: 0,
|
|
76
|
-
},
|
|
77
|
-
startedAt: {
|
|
78
|
-
type: Date,
|
|
79
|
-
default: Date.now,
|
|
80
|
-
},
|
|
81
|
-
completedAt: {
|
|
82
|
-
type: Date,
|
|
83
|
-
default: null,
|
|
84
|
-
},
|
|
85
|
-
// Store email message details
|
|
86
|
-
emailMessageId: {
|
|
87
|
-
type: String,
|
|
88
|
-
default: null,
|
|
89
|
-
},
|
|
90
|
-
emailSubject: {
|
|
91
|
-
type: String,
|
|
92
|
-
default: null,
|
|
93
|
-
},
|
|
94
|
-
// Store reference to order/workflow if applicable
|
|
95
|
-
orderId: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: null,
|
|
98
|
-
},
|
|
99
|
-
workflowId: {
|
|
100
|
-
type: Schema.Types.ObjectId,
|
|
101
|
-
ref: "SocialWorkflow",
|
|
102
|
-
default: null,
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
{ timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
// Index for faster queries
|
|
109
|
-
EmailFeedbackReportSchema.index({ workspaceId: 1, email: 1, createdAt: -1 });
|
|
110
|
-
EmailFeedbackReportSchema.index({ conversationId: 1 });
|
|
111
|
-
EmailFeedbackReportSchema.index({ chatbotId: 1 });
|
|
112
|
-
EmailFeedbackReportSchema.index({ status: 1 });
|
|
113
|
-
EmailFeedbackReportSchema.index({ workspaceId: 1, email: 1, orderId: 1 });
|
|
114
|
-
|
|
115
|
-
module.exports = EmailFeedbackReportSchema;
|