shuttlepro-shared 1.4.49 → 1.4.50

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,13 +109,6 @@ 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
-
119
112
  endCall(callId, updateObj = {}, history = {}) {
120
113
  return this._safeExec(
121
114
  Call.findOneAndUpdate(
@@ -1,22 +1,16 @@
1
1
  const mongoose = require("mongoose");
2
2
  const { Schema } = mongoose;
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
- })();
3
+ const { v4: uuidv4 } = require("uuid");
10
4
 
11
5
  const FeedbackResponseSchema = new Schema(
12
6
  {
13
7
  paramId: {
14
8
  type: String,
15
- default: () => uuidv4?.() || "", // use function so each doc gets unique UUID
9
+ default: uuidv4(),
16
10
  },
17
11
  type: {
18
12
  type: String,
19
- enum: ["conversation", "order", "shop"],
13
+ enum: ["conversation", "order","shop"],
20
14
  default: "conversation",
21
15
  },
22
16
  refId: {
@@ -55,6 +49,15 @@ const FeedbackResponseSchema = new Schema(
55
49
  type: Date,
56
50
  default: Date.now,
57
51
  },
52
+
53
+ workspaceId: {
54
+ type: String,
55
+ default: "",
56
+ },
57
+ feedbackFormId: {
58
+ type: String,
59
+ default: "",
60
+ },
58
61
  qr: {
59
62
  link: {
60
63
  type: String,
@@ -20,6 +20,13 @@ const InteractiveSchema = new Schema({
20
20
  enum: ["button", "list"],
21
21
  default: "list",
22
22
  },
23
+ messages: [
24
+ {
25
+ type: { type: String, default: "" },
26
+ url: { type: String, default: "" },
27
+ value: { type: String, default: "" },
28
+ },
29
+ ],
23
30
  header: {
24
31
  type: {
25
32
  type: String,
@@ -20,6 +20,14 @@ const WorkflowRunSchema = new Schema(
20
20
  type: String,
21
21
  default: "",
22
22
  },
23
+ messageId: {
24
+ type: String,
25
+ default: "",
26
+ },
27
+ messageStatus: {
28
+ type: String,
29
+ default: "",
30
+ },
23
31
  initialMessageId: {
24
32
  type: Schema.Types.ObjectId,
25
33
  ref: "DescriptionTemplate",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.4.49",
3
+ "version": "1.4.50",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {