flykup_model_development 3.1.74 → 3.1.76

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.
Files changed (42) hide show
  1. package/.gitattributes +2 -0
  2. package/.github/workflows/main.yml +30 -0
  3. package/.github/workflows/publish.yml +31 -0
  4. package/auth.js +14 -14
  5. package/config.js +1 -1
  6. package/db_connection.js +23 -23
  7. package/index.js +140 -140
  8. package/models/AadhaarVerification.js +131 -131
  9. package/models/AdminEmail.model.js +39 -38
  10. package/models/BankVerification.js +92 -92
  11. package/models/GSTVerification.js +89 -89
  12. package/models/LiveStreamInteraction.model.js +101 -101
  13. package/models/ProductInteraction.model.js +108 -108
  14. package/models/Review.model.js +121 -121
  15. package/models/SearchAnalytics.js +23 -23
  16. package/models/ShoppableInteraction.model.js +106 -106
  17. package/models/Wishlist.model.js +29 -29
  18. package/models/admin.model.js +42 -42
  19. package/models/appUpdate.model.js +19 -19
  20. package/models/assets.model.js +32 -32
  21. package/models/blockedRegion.models.js +27 -27
  22. package/models/chat.model.js +511 -511
  23. package/models/coHostInvitation.model.js +60 -60
  24. package/models/follow.model.js +38 -38
  25. package/models/loginlogs.model.js +26 -26
  26. package/models/notification.model.js +129 -129
  27. package/models/order.modal.js +386 -385
  28. package/models/orderPayment.model.js +218 -218
  29. package/models/productListing.model.js +322 -322
  30. package/models/profileInteractions.model.js +44 -44
  31. package/models/registerShow.model.js +29 -29
  32. package/models/sellerDraft.model.js +27 -27
  33. package/models/shipper.model.js +126 -126
  34. package/models/shoppableVideo.model.js +237 -237
  35. package/models/shoppableVideoComment.model.js +57 -57
  36. package/models/shoppableVideoLike.model.js +29 -29
  37. package/models/shoppableVideoSave.model.js +27 -27
  38. package/models/shows.model.js +604 -604
  39. package/models/stock.model.js +105 -105
  40. package/models/ticket.model.js +115 -115
  41. package/package.json +19 -19
  42. package/test.html +11 -11
@@ -1,131 +1,131 @@
1
- // models/AadhaarVerification.js
2
- import mongoose from 'mongoose';
3
-
4
- const aadhaarVerificationSchema = new mongoose.Schema({
5
- // User reference - Required field
6
- userId: {
7
- type: mongoose.Schema.Types.ObjectId,
8
- ref: 'users',
9
- required: true,
10
- index: true
11
- },
12
-
13
- // Aadhaar number - Store when sending OTP
14
- aadhaarNumber: {
15
- type: String,
16
- required: true,
17
- index: true
18
- },
19
-
20
- // Core verification info
21
- verificationStatus: {
22
- type: String,
23
- required: true,
24
- enum: ['pending', 'verified', 'failed'],
25
- default: 'pending'
26
- },
27
-
28
- referenceId: {
29
- type: String,
30
- required: true,
31
- index: true
32
- },
33
-
34
- // Personal details - Store after OTP verification
35
- name: {
36
- type: String,
37
- default: null
38
- },
39
-
40
- gender: {
41
- type: String,
42
- default: null
43
- },
44
-
45
- dateOfBirth: {
46
- type: String,
47
- default: null
48
- },
49
-
50
- // Address information - Store after OTP verification
51
- address: {
52
- care_of: {
53
- type: String,
54
- default: null
55
- },
56
- building: {
57
- type: String,
58
- default: null
59
- },
60
- street: {
61
- type: String,
62
- default: null
63
- },
64
- locality: {
65
- type: String,
66
- default: null
67
- },
68
- vtc: {
69
- type: String,
70
- default: null
71
- },
72
- district: {
73
- type: String,
74
- default: null
75
- },
76
- state: {
77
- type: String,
78
- default: null
79
- },
80
- country: {
81
- type: String,
82
- default: null
83
- },
84
- pincode: {
85
- type: String,
86
- default: null
87
- }
88
- },
89
-
90
- // Photo link - Store after OTP verification
91
- photo: {
92
- type: String,
93
- default: null
94
- },
95
-
96
- // Request metadata - Store when sending OTP
97
- otpSentAt: {
98
- type: Date,
99
- default: null
100
- },
101
-
102
- // Verification metadata - Store after OTP verification
103
- verifiedAt: {
104
- type: Date,
105
- default: null
106
- },
107
-
108
- // Raw API response for debugging
109
- rawResponse: {
110
- type: mongoose.Schema.Types.Mixed,
111
- default: null
112
- }
113
- }, {
114
- timestamps: true, // Adds createdAt and updatedAt
115
- collection: 'aadhaar_verifications'
116
- });
117
-
118
- // Indexes for better performance
119
- aadhaarVerificationSchema.index({ userId: 1 });
120
- aadhaarVerificationSchema.index({ referenceId: 1 });
121
- aadhaarVerificationSchema.index({ aadhaarNumber: 1 });
122
- aadhaarVerificationSchema.index({ verificationStatus: 1 });
123
- aadhaarVerificationSchema.index({ createdAt: -1 });
124
-
125
- // Compound indexes for user-specific queries
126
- aadhaarVerificationSchema.index({ userId: 1, verificationStatus: 1 });
127
- aadhaarVerificationSchema.index({ userId: 1, aadhaarNumber: 1 });
128
-
129
- const AadhaarVerification = mongoose.models.AadhaarVerification || mongoose.model("AadhaarVerification", aadhaarVerificationSchema);
130
-
131
- export default AadhaarVerification;
1
+ // models/AadhaarVerification.js
2
+ import mongoose from 'mongoose';
3
+
4
+ const aadhaarVerificationSchema = new mongoose.Schema({
5
+ // User reference - Required field
6
+ userId: {
7
+ type: mongoose.Schema.Types.ObjectId,
8
+ ref: 'users',
9
+ required: true,
10
+ index: true
11
+ },
12
+
13
+ // Aadhaar number - Store when sending OTP
14
+ aadhaarNumber: {
15
+ type: String,
16
+ required: true,
17
+ index: true
18
+ },
19
+
20
+ // Core verification info
21
+ verificationStatus: {
22
+ type: String,
23
+ required: true,
24
+ enum: ['pending', 'verified', 'failed'],
25
+ default: 'pending'
26
+ },
27
+
28
+ referenceId: {
29
+ type: String,
30
+ required: true,
31
+ index: true
32
+ },
33
+
34
+ // Personal details - Store after OTP verification
35
+ name: {
36
+ type: String,
37
+ default: null
38
+ },
39
+
40
+ gender: {
41
+ type: String,
42
+ default: null
43
+ },
44
+
45
+ dateOfBirth: {
46
+ type: String,
47
+ default: null
48
+ },
49
+
50
+ // Address information - Store after OTP verification
51
+ address: {
52
+ care_of: {
53
+ type: String,
54
+ default: null
55
+ },
56
+ building: {
57
+ type: String,
58
+ default: null
59
+ },
60
+ street: {
61
+ type: String,
62
+ default: null
63
+ },
64
+ locality: {
65
+ type: String,
66
+ default: null
67
+ },
68
+ vtc: {
69
+ type: String,
70
+ default: null
71
+ },
72
+ district: {
73
+ type: String,
74
+ default: null
75
+ },
76
+ state: {
77
+ type: String,
78
+ default: null
79
+ },
80
+ country: {
81
+ type: String,
82
+ default: null
83
+ },
84
+ pincode: {
85
+ type: String,
86
+ default: null
87
+ }
88
+ },
89
+
90
+ // Photo link - Store after OTP verification
91
+ photo: {
92
+ type: String,
93
+ default: null
94
+ },
95
+
96
+ // Request metadata - Store when sending OTP
97
+ otpSentAt: {
98
+ type: Date,
99
+ default: null
100
+ },
101
+
102
+ // Verification metadata - Store after OTP verification
103
+ verifiedAt: {
104
+ type: Date,
105
+ default: null
106
+ },
107
+
108
+ // Raw API response for debugging
109
+ rawResponse: {
110
+ type: mongoose.Schema.Types.Mixed,
111
+ default: null
112
+ }
113
+ }, {
114
+ timestamps: true, // Adds createdAt and updatedAt
115
+ collection: 'aadhaar_verifications'
116
+ });
117
+
118
+ // Indexes for better performance
119
+ aadhaarVerificationSchema.index({ userId: 1 });
120
+ aadhaarVerificationSchema.index({ referenceId: 1 });
121
+ aadhaarVerificationSchema.index({ aadhaarNumber: 1 });
122
+ aadhaarVerificationSchema.index({ verificationStatus: 1 });
123
+ aadhaarVerificationSchema.index({ createdAt: -1 });
124
+
125
+ // Compound indexes for user-specific queries
126
+ aadhaarVerificationSchema.index({ userId: 1, verificationStatus: 1 });
127
+ aadhaarVerificationSchema.index({ userId: 1, aadhaarNumber: 1 });
128
+
129
+ const AadhaarVerification = mongoose.models.AadhaarVerification || mongoose.model("AadhaarVerification", aadhaarVerificationSchema);
130
+
131
+ export default AadhaarVerification;
@@ -1,39 +1,40 @@
1
- import mongoose, { Schema, model } from 'mongoose';
2
-
3
- const AdminEmailSchema = new Schema({
4
- email: {
5
- type: String,
6
- required: true,
7
- unique: true,
8
- lowercase: true,
9
- trim: true
10
- },
11
- isActive: {
12
- type: Boolean,
13
- default: true
14
- },
15
- permissions: {
16
- shoppableVideo: {
17
- type: Boolean,
18
- default: false
19
- },
20
- productAccess: {
21
- type: Boolean,
22
- default: false
23
- },
24
- totalAccess: {
25
- type: Boolean,
26
- default: false
27
- }
28
- }
29
- }, {
30
- timestamps: true
31
- });
32
-
33
- // Index for faster querying
34
- AdminEmailSchema.index({ email: 1, isActive: 1 });
35
-
36
- // Export safely
37
- const AdminEmail = mongoose.models.AdminEmail || mongoose.model('AdminEmail', AdminEmailSchema);
38
-
1
+ import mongoose, { Schema, model } from 'mongoose';
2
+
3
+ const AdminEmailSchema = new Schema({
4
+ email: {
5
+ type: String,
6
+ required: true,
7
+ unique: true,
8
+ lowercase: true,
9
+ trim: true
10
+ },
11
+
12
+ isActive: {
13
+ type: Boolean,
14
+ default: true
15
+ },
16
+ permissions: {
17
+ shoppableVideo: {
18
+ type: Boolean,
19
+ default: false
20
+ },
21
+ productAccess: {
22
+ type: Boolean,
23
+ default: false
24
+ },
25
+ totalAccess: {
26
+ type: Boolean,
27
+ default: false
28
+ }
29
+ }
30
+ }, {
31
+ timestamps: true
32
+ });
33
+
34
+ // Index for faster querying
35
+ AdminEmailSchema.index({ email: 1, isActive: 1 });
36
+
37
+ // Export safely
38
+ const AdminEmail = mongoose.models.AdminEmail || mongoose.model('AdminEmail', AdminEmailSchema);
39
+
39
40
  export default AdminEmail;
@@ -1,92 +1,92 @@
1
- // config/devModel/BankVerification.js
2
- import mongoose from 'mongoose';
3
-
4
- const bankVerificationSchema = new mongoose.Schema({
5
- userId: {
6
- type: mongoose.Schema.Types.ObjectId,
7
- ref: 'users',
8
- required: true,
9
- unique: true, // Ensures only one bank verification per user
10
- index: true
11
- },
12
- sellerId: {
13
- type: mongoose.Schema.Types.ObjectId,
14
- ref: 'sellers',
15
-
16
- },
17
- role: {
18
- type: String,
19
- enum: ['user', 'seller', 'admin'],
20
-
21
- },
22
- accountNumber: {
23
- type: String,
24
- required: true
25
- },
26
- ifscCode: {
27
- type: String,
28
- required: true
29
- },
30
- verificationStatus: {
31
- type: String,
32
- enum: ['pending', 'verified', 'failed'],
33
- default: 'pending'
34
- },
35
- accountHolderName: {
36
- type: String,
37
- default: null
38
- },
39
- nameMatch: {
40
- type: Boolean,
41
- default: false
42
- },
43
- accountStatus: {
44
- type: String,
45
- default: null
46
- },
47
- accountType: {
48
- type: String,
49
- default: null
50
- },
51
- bankName: {
52
- type: String,
53
- default: null
54
- },
55
- branchName: {
56
- type: String,
57
- default: null
58
- },
59
- branchAddress: {
60
- type: String,
61
- default: null
62
- },
63
- accountExists: {
64
- type: Boolean,
65
- default: false
66
- },
67
- referenceId: {
68
- type: String,
69
- default: null
70
- },
71
- verificationDate: {
72
- type: Date,
73
- default: Date.now
74
- },
75
- verifiedAt: {
76
- type: Date,
77
- default: null
78
- },
79
- rawResponse: {
80
- type: mongoose.Schema.Types.Mixed,
81
- default: null
82
- }
83
- }, {
84
- timestamps: true
85
- });
86
-
87
- // Indexes for better query performance
88
- bankVerificationSchema.index({ userId: 1, verificationStatus: 1 });
89
- bankVerificationSchema.index({ accountNumber: 1, ifscCode: 1 });
90
- const BankVerification = mongoose.models.BankVerification || mongoose.model("BankVerification", bankVerificationSchema);
91
-
92
- export default BankVerification;
1
+ // config/devModel/BankVerification.js
2
+ import mongoose from 'mongoose';
3
+
4
+ const bankVerificationSchema = new mongoose.Schema({
5
+ userId: {
6
+ type: mongoose.Schema.Types.ObjectId,
7
+ ref: 'users',
8
+ required: true,
9
+ unique: true, // Ensures only one bank verification per user
10
+ index: true
11
+ },
12
+ sellerId: {
13
+ type: mongoose.Schema.Types.ObjectId,
14
+ ref: 'sellers',
15
+
16
+ },
17
+ role: {
18
+ type: String,
19
+ enum: ['user', 'seller', 'admin'],
20
+
21
+ },
22
+ accountNumber: {
23
+ type: String,
24
+ required: true
25
+ },
26
+ ifscCode: {
27
+ type: String,
28
+ required: true
29
+ },
30
+ verificationStatus: {
31
+ type: String,
32
+ enum: ['pending', 'verified', 'failed'],
33
+ default: 'pending'
34
+ },
35
+ accountHolderName: {
36
+ type: String,
37
+ default: null
38
+ },
39
+ nameMatch: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ accountStatus: {
44
+ type: String,
45
+ default: null
46
+ },
47
+ accountType: {
48
+ type: String,
49
+ default: null
50
+ },
51
+ bankName: {
52
+ type: String,
53
+ default: null
54
+ },
55
+ branchName: {
56
+ type: String,
57
+ default: null
58
+ },
59
+ branchAddress: {
60
+ type: String,
61
+ default: null
62
+ },
63
+ accountExists: {
64
+ type: Boolean,
65
+ default: false
66
+ },
67
+ referenceId: {
68
+ type: String,
69
+ default: null
70
+ },
71
+ verificationDate: {
72
+ type: Date,
73
+ default: Date.now
74
+ },
75
+ verifiedAt: {
76
+ type: Date,
77
+ default: null
78
+ },
79
+ rawResponse: {
80
+ type: mongoose.Schema.Types.Mixed,
81
+ default: null
82
+ }
83
+ }, {
84
+ timestamps: true
85
+ });
86
+
87
+ // Indexes for better query performance
88
+ bankVerificationSchema.index({ userId: 1, verificationStatus: 1 });
89
+ bankVerificationSchema.index({ accountNumber: 1, ifscCode: 1 });
90
+ const BankVerification = mongoose.models.BankVerification || mongoose.model("BankVerification", bankVerificationSchema);
91
+
92
+ export default BankVerification;