tango-api-schema 2.1.80 → 2.1.82

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/index.js CHANGED
@@ -69,6 +69,7 @@ import taskQuestionModel from './schema/taskQuestion.model.js';
69
69
  import taskAssignModel from './schema/taskAssign.model.js';
70
70
  import taskProcessedModel from './schema/taskProcessed.model.js';
71
71
  import taskProcessedConfigModel from './schema/taskProcessedConfig.model.js';
72
+ import webSocketConnectionModel from "./schema/webSocketConnection.model.js";
72
73
 
73
74
  export default {
74
75
  leadModel,
@@ -141,5 +142,6 @@ export default {
141
142
  taskQuestionModel,
142
143
  taskAssignModel,
143
144
  taskProcessedModel,
144
- taskProcessedConfigModel
145
+ taskProcessedConfigModel,
146
+ webSocketConnectionModel
145
147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "2.1.80",
3
+ "version": "2.1.82",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -38,11 +38,7 @@ const liveConnectionSchema = new mongoose.Schema(
38
38
  enum: ['open', 'closed', 'connecting', 'error'],
39
39
  default: 'closed', // Default state when connection is not established
40
40
  },
41
- socketInstance: {
42
- type: mongoose.Schema.Types.ObjectId,
43
- ref: 'WebSocketConnection', // Reference to WebSocketConnection
44
- required: false, // We won't store the actual WebSocket here, just an ID
45
- },
41
+ socketInstance: { type: Object, required: true }
46
42
  },
47
43
  {
48
44
  timestamps: true,
@@ -11,7 +11,7 @@ const webSocketConnectionSchema = new mongoose.Schema({
11
11
  });
12
12
 
13
13
  webSocketConnectionSchema.index({ createdAt: 1 }, { expires: "1d" });
14
- export default mongoose.model( 'webSocketConnection', webSocketConnectionSchema, 'webSocketConnectionSchema' );
14
+ export default mongoose.model( 'webSocketConnection', webSocketConnectionSchema, 'webSocketConnection' );
15
15
 
16
16
 
17
17