flykup_model_production 1.0.21 → 1.0.25

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/db_connection.js CHANGED
@@ -11,8 +11,8 @@ export async function connectToDB(uri) {
11
11
 
12
12
  try {
13
13
  await mongoose.connect(uri, {
14
- maxPoolSize: 100,
15
-
14
+ maxPoolSize: 300,
15
+ minPoolSize: 50,
16
16
  });
17
17
  isConnected = true;
18
18
  console.log(`✅ Shared-models DB connected`);
@@ -52,7 +52,19 @@ const liveStreamInteractionSchema = new mongoose.Schema({
52
52
  type: Number,
53
53
  default: 0
54
54
  },
55
+ firstJoinedAt: Date,
55
56
  lastSeenAt: Date,
57
+ lastLeftAt: Date,
58
+ sessionCount: {
59
+ type: Number,
60
+ default: 0
61
+ },
62
+ sessions: [{
63
+ joinedAt: Date,
64
+ leftAt: Date,
65
+ duration: Number,
66
+ billed : Boolean
67
+ }],
56
68
  hasLiked: {
57
69
  type: Boolean,
58
70
  default: false
@@ -2,7 +2,7 @@ import mongoose from 'mongoose';
2
2
 
3
3
  const { Schema } = mongoose;
4
4
 
5
- const AdminSchema = new Schema(
5
+ const AdminSchema = new Schema(
6
6
  {
7
7
  name: { type: String, required: true },
8
8
  role: { type: String, required: true, default: "admin" },
@@ -32,6 +32,22 @@ const AdminSchema = new Schema(
32
32
  // admins: { readOnly: Boolean, edit: Boolean },
33
33
  },
34
34
  maskingSwitch: { type: Boolean, default: false },
35
+ // Two-Factor Authentication fields
36
+ twoFactorSecret: {
37
+ type: String,
38
+ default: null
39
+ },
40
+ twoFactorEnabled: {
41
+ type: Boolean,
42
+ default: false
43
+ },
44
+ twoFactorBackupCodes: [{
45
+ type: String
46
+ }],
47
+ twoFactorEnabledAt: {
48
+ type: Date,
49
+ default: null
50
+ }
35
51
  },
36
52
  { timestamps: true }
37
53
  );
@@ -4,6 +4,7 @@ import mongoose, { Schema, model } from 'mongoose';
4
4
 
5
5
  import mongoosePaginate from 'mongoose-paginate-v2';
6
6
 
7
+
7
8
  const assetSchema = new mongoose.Schema({
8
9
  title: {
9
10
  type: String,
@@ -163,6 +163,11 @@ const UserSchema = new mongoose.Schema(
163
163
  type: String,
164
164
  enum: ["pending","profile_setup", "completed"],
165
165
  default: "completed" // Default to completed for existing users
166
+ },
167
+ preferredPayment: {
168
+ type: String,
169
+ enum: ["flykup_balance", "payment_gateway", null],
170
+ default: null,
166
171
  },
167
172
  deviceInfo: {
168
173
  deviceId: { type: String, default: null },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_production",
3
- "version": "1.0.21",
3
+ "version": "1.0.25",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,