flykup_model_development 3.1.51 → 3.1.52

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.
@@ -7,57 +7,22 @@ import Seller from "./seller.model.js";
7
7
  const UserSchema = new mongoose.Schema(
8
8
  {
9
9
  devices: [
10
- {
11
- deviceId: { type: String, required: true },
12
- fcmToken: { type: String, required: true },
13
- platform: {
14
- type: String,
15
- enum: ["web", "android", "ios", "mobile-web"],
16
- required: true,
17
- },
18
- lastLogin: { type: Date, default: Date.now },
19
- lastLogout: { type: Date },
20
- isActive: { type: Boolean, default: true },
21
- _id: false,
22
- },
23
- ],
24
- devices: [
25
- {
26
- deviceId: { type: String, required: true },
27
- snsEndpointArn: { type: String }, // Store SNS endpoint ARN
28
- fcmToken: { type: String }, // ✅ Keep FCM token during migration
29
- platform: {
30
- type: String,
31
- enum: ["web", "android", "ios", "mobile-web"],
32
- required: true,
33
- },
34
- lastLogin: { type: Date, default: Date.now },
35
- lastLogout: { type: Date },
36
- isActive: { type: Boolean, default: true },
37
- _id: false,
10
+ {
11
+ deviceId: { type: String, required: true },
12
+ fcmToken: { type: String, required: true },
13
+ snsEndpointArn: { type: String, default: null }, // New field for SNS
14
+ platform: {
15
+ type: String,
16
+ enum: ["web", "android", "ios", "mobile-web"],
17
+ required: true,
38
18
  },
39
- ],
40
- // devices: [
41
- // {
42
- // deviceId: { type: String, required: true },
43
- // // SNS for mobile apps
44
- // snsEndpointArn: { type: String },
45
- // fcmToken: { type: String },
46
-
47
- // // Web Push for browsers
48
- // webPushSubscription: { type: Object }, // Stores the PushSubscription object
49
-
50
- // platform: {
51
- // type: String,
52
- // enum: ["web", "android", "ios", "mobile-web"],
53
- // required: true,
54
- // },
55
- // lastLogin: { type: Date, default: Date.now },
56
- // lastLogout: { type: Date },
57
- // isActive: { type: Boolean, default: true },
58
- // _id: false,
59
- // },
60
- // ],
19
+ lastLogin: { type: Date, default: Date.now },
20
+ lastLogout: { type: Date },
21
+ isActive: { type: Boolean, default: true },
22
+ _id: false,
23
+ },
24
+ ],
25
+
61
26
  sellerInfo: { type: mongoose.Schema.Types.ObjectId, ref: "sellers" },
62
27
  dropshipperInfo: { type: mongoose.Schema.Types.ObjectId, ref: "dropshippers" },
63
28
  categories: { type: [String], default: [], maxLength: 100 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flykup_model_development",
3
- "version": "3.1.51",
3
+ "version": "3.1.52",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "private": false,