shuttlepro-shared 1.4.52 → 1.4.53
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.
|
@@ -109,6 +109,13 @@ class CallRepository {
|
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
getCallByFilter(filter) {
|
|
113
|
+
return this._safeExec(
|
|
114
|
+
Call.findOne({ filter }).lean().exec(),
|
|
115
|
+
`Failed to get call filter`
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
112
119
|
endCall(callId, updateObj = {}, history = {}) {
|
|
113
120
|
return this._safeExec(
|
|
114
121
|
Call.findOneAndUpdate(
|
package/models/Call.js
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
const mongoose = require("mongoose");
|
|
2
2
|
const { Schema } = mongoose;
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
// Load uuid dynamically since it's ESM-only
|
|
5
|
+
let uuidv4;
|
|
6
|
+
(async () => {
|
|
7
|
+
const { v4 } = await import("uuid");
|
|
8
|
+
uuidv4 = v4;
|
|
9
|
+
})();
|
|
4
10
|
|
|
5
11
|
const FeedbackResponseSchema = new Schema(
|
|
6
12
|
{
|
|
7
13
|
paramId: {
|
|
8
14
|
type: String,
|
|
9
|
-
default: uuidv4(),
|
|
15
|
+
default: () => uuidv4?.() || "", // use function so each doc gets unique UUID
|
|
10
16
|
},
|
|
11
17
|
type: {
|
|
12
18
|
type: String,
|
|
13
|
-
enum: ["conversation", "order","shop"],
|
|
19
|
+
enum: ["conversation", "order", "shop"],
|
|
14
20
|
default: "conversation",
|
|
15
21
|
},
|
|
16
22
|
refId: {
|
|
@@ -49,15 +55,6 @@ const FeedbackResponseSchema = new Schema(
|
|
|
49
55
|
type: Date,
|
|
50
56
|
default: Date.now,
|
|
51
57
|
},
|
|
52
|
-
|
|
53
|
-
workspaceId: {
|
|
54
|
-
type: String,
|
|
55
|
-
default: "",
|
|
56
|
-
},
|
|
57
|
-
feedbackFormId: {
|
|
58
|
-
type: String,
|
|
59
|
-
default: "",
|
|
60
|
-
},
|
|
61
58
|
qr: {
|
|
62
59
|
link: {
|
|
63
60
|
type: String,
|
package/models/Message.js
CHANGED
package/models/Workspace.js
CHANGED
|
@@ -234,7 +234,6 @@ const workspaceSchema = new mongoose.Schema(
|
|
|
234
234
|
default: 30,
|
|
235
235
|
},
|
|
236
236
|
isDeleted: { type: Boolean, default: false },
|
|
237
|
-
ticketsByConversation: { type: Boolean, default: false },
|
|
238
237
|
businessHours: {
|
|
239
238
|
startTime: { type: String, default: "" },
|
|
240
239
|
endTime: { type: String, default: "" },
|