flykup_model_development 3.0.3 → 3.0.4

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.
@@ -61,7 +61,22 @@ const shoppableVideoInteractionSchema = new mongoose.Schema({
61
61
  productsClicked: [{ // Unique list of products clicked by this user for this video
62
62
  type: mongoose.Schema.Types.ObjectId,
63
63
  ref: 'productlistings'
64
- }]
64
+ }],
65
+ maxSecondReached: {
66
+ type: Number,
67
+ default: 0
68
+ },
69
+ rewatchCount: {
70
+ type: Number,
71
+ default: 0
72
+ },
73
+ watchSessions: [{
74
+ startedAt: Date,
75
+ endedAt: Date,
76
+ duration: Number,
77
+ completionPercentage: Number,
78
+ maxSecond: Number
79
+ }],
65
80
  }, {
66
81
  timestamps: true
67
82
  });
@@ -71,6 +86,9 @@ shoppableVideoInteractionSchema.index({ video: 1, user: 1 }, {
71
86
  unique: true,
72
87
  partialFilterExpression: { user: { $exists: true } }
73
88
  });
89
+ shoppableVideoInteractionSchema.index({ video: 1, maxSecondReached: 1 });
90
+ shoppableVideoInteractionSchema.index({ video: 1, rewatchCount: 1 });
91
+ shoppableVideoInteractionSchema.index({ host: 1, user: 1 });
74
92
 
75
93
  // Ensures a unique interaction record per anonymous session per video.
76
94
  shoppableVideoInteractionSchema.index({ video: 1, sessionIdentifier: 1 }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,