shuttlepro-shared 1.4.45 → 1.4.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.
- package/models/FeedbackResponse.js +9 -12
- package/models/Workspace.js +1 -0
- package/package.json +1 -1
|
@@ -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/Workspace.js
CHANGED
|
@@ -88,6 +88,7 @@ const ResolutionReasonCategorySchema = new mongoose.Schema({
|
|
|
88
88
|
});
|
|
89
89
|
const feedbackFormSchema = new mongoose.Schema({
|
|
90
90
|
formName: { type: String, required: true, trim: true },
|
|
91
|
+
webhookUrl: { type: String, default: "" },
|
|
91
92
|
brandName: { type: String, default: "" },
|
|
92
93
|
brandLogoUrl: { type: String, default: "", trim: true },
|
|
93
94
|
type: {
|