shuttlepro-shared 1.4.64 → 1.4.66
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/Automation.js +16 -0
- package/models/Chatbot.js +14 -2
- package/models/Webhook.js +1 -1
- package/models.js +0 -2
- package/package.json +1 -1
package/models/Automation.js
CHANGED
|
@@ -177,6 +177,17 @@ const AutomationAction = new Schema({
|
|
|
177
177
|
},
|
|
178
178
|
flow: {},
|
|
179
179
|
},
|
|
180
|
+
sendTemplate: {
|
|
181
|
+
enabled: { type: Boolean, default: false },
|
|
182
|
+
integrationId: {
|
|
183
|
+
id: defaultStringType,
|
|
184
|
+
type: defaultStringType,
|
|
185
|
+
accountTitle: defaultStringType,
|
|
186
|
+
businessId: defaultStringType,
|
|
187
|
+
name: defaultStringType,
|
|
188
|
+
},
|
|
189
|
+
workflow: {},
|
|
190
|
+
},
|
|
180
191
|
chatbot: {
|
|
181
192
|
enabled: { type: Boolean, default: false },
|
|
182
193
|
id: defaultStringType,
|
|
@@ -222,6 +233,11 @@ const AutomationCondition = new Schema({
|
|
|
222
233
|
"afterShift",
|
|
223
234
|
"orderConfirmation",
|
|
224
235
|
"orderPublish",
|
|
236
|
+
"orderDelivery",
|
|
237
|
+
"criticalOrder",
|
|
238
|
+
"refusedOrder",
|
|
239
|
+
"sendReceipt",
|
|
240
|
+
"shipperAdvice",
|
|
225
241
|
"newCommentPost",
|
|
226
242
|
"profile",
|
|
227
243
|
"moveTicket",
|
package/models/Chatbot.js
CHANGED
|
@@ -20,7 +20,7 @@ const ChatbotSchema = new Schema(
|
|
|
20
20
|
},
|
|
21
21
|
type: {
|
|
22
22
|
type: String,
|
|
23
|
-
enum: ["chatbot", "agent", "interactive"],
|
|
23
|
+
enum: ["chatbot", "agent", "interactive", "feedback-bot"],
|
|
24
24
|
default: "chatbot",
|
|
25
25
|
},
|
|
26
26
|
interactiveId: {
|
|
@@ -62,7 +62,19 @@ const ChatbotSchema = new Schema(
|
|
|
62
62
|
],
|
|
63
63
|
},
|
|
64
64
|
],
|
|
65
|
+
feedbackConfig: {
|
|
66
|
+
templateId: {
|
|
67
|
+
type: Schema.Types.Mixed,
|
|
68
|
+
default: null,
|
|
69
|
+
},
|
|
70
|
+
questions: [
|
|
71
|
+
{
|
|
72
|
+
question: { type: String, default: "" },
|
|
73
|
+
options: [{ type: String, default: "" }],
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
65
77
|
},
|
|
66
78
|
{ timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
|
|
67
79
|
);
|
|
68
|
-
module.exports = ChatbotSchema;
|
|
80
|
+
module.exports = ChatbotSchema;
|
package/models/Webhook.js
CHANGED
package/models.js
CHANGED
|
@@ -101,7 +101,6 @@ const UserRole = require("./models/UserRole");
|
|
|
101
101
|
const UserSession = require("./models/UserSession");
|
|
102
102
|
const UserWorkflow = require("./models/UserWorkflow");
|
|
103
103
|
const VariantLocation = require("./models/VariantLocation");
|
|
104
|
-
const Webhook = require("./models/Webhook");
|
|
105
104
|
const Website = require("./models/Website");
|
|
106
105
|
const WhatsappFlow = require("./models/WhatsappFlow");
|
|
107
106
|
const WorkflowRun = require("./models/WorkflowRun");
|
|
@@ -214,7 +213,6 @@ module.exports = {
|
|
|
214
213
|
UserSession,
|
|
215
214
|
UserWorkflow,
|
|
216
215
|
VariantLocation,
|
|
217
|
-
Webhook,
|
|
218
216
|
Website,
|
|
219
217
|
WhatsappFlow,
|
|
220
218
|
Workflow,
|