@mac777/project-pinecone-models 1.1.16 → 1.1.17
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/dist/User.d.ts +117 -0
- package/dist/User.js +93 -0
- package/package.json +1 -1
- package/src/User.ts +96 -0
package/dist/User.d.ts
CHANGED
|
@@ -10,6 +10,29 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
10
10
|
emailVerified: boolean;
|
|
11
11
|
phoneVerified: boolean;
|
|
12
12
|
nidVerified: boolean;
|
|
13
|
+
verification?: {
|
|
14
|
+
status: "pending" | "rejected" | "unverified" | "verified";
|
|
15
|
+
documents: mongoose.Types.DocumentArray<{
|
|
16
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
17
|
+
url: string;
|
|
18
|
+
filename: string;
|
|
19
|
+
uploadedAt: NativeDate;
|
|
20
|
+
}, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, any, {
|
|
21
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
22
|
+
url: string;
|
|
23
|
+
filename: string;
|
|
24
|
+
uploadedAt: NativeDate;
|
|
25
|
+
}> & {
|
|
26
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
27
|
+
url: string;
|
|
28
|
+
filename: string;
|
|
29
|
+
uploadedAt: NativeDate;
|
|
30
|
+
}>;
|
|
31
|
+
rejectionReason?: string | null | undefined;
|
|
32
|
+
reviewedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
33
|
+
reviewedAt?: NativeDate | null | undefined;
|
|
34
|
+
submittedAt?: NativeDate | null | undefined;
|
|
35
|
+
} | null | undefined;
|
|
13
36
|
moderation?: {
|
|
14
37
|
isSuspended: boolean;
|
|
15
38
|
isVerified: boolean;
|
|
@@ -38,6 +61,22 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
38
61
|
} | null | undefined;
|
|
39
62
|
refreshToken?: string | null | undefined;
|
|
40
63
|
googleId?: string | null | undefined;
|
|
64
|
+
hostProfile?: {
|
|
65
|
+
contactPerson?: {
|
|
66
|
+
name?: string | null | undefined;
|
|
67
|
+
designation?: string | null | undefined;
|
|
68
|
+
phone?: string | null | undefined;
|
|
69
|
+
email?: string | null | undefined;
|
|
70
|
+
} | null | undefined;
|
|
71
|
+
role?: "event_organizer" | "venue_owner" | "authorized_rep" | "artist" | null | undefined;
|
|
72
|
+
organizationName?: string | null | undefined;
|
|
73
|
+
} | null | undefined;
|
|
74
|
+
profileCompleteness?: {
|
|
75
|
+
hasContactInfo: boolean;
|
|
76
|
+
hasPaymentDetails: boolean;
|
|
77
|
+
hasVerificationDocs: boolean;
|
|
78
|
+
isComplete: boolean;
|
|
79
|
+
} | null | undefined;
|
|
41
80
|
} & mongoose.DefaultTimestampProps, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
42
81
|
email: string;
|
|
43
82
|
role: "user" | "host" | "admin";
|
|
@@ -47,6 +86,29 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
47
86
|
emailVerified: boolean;
|
|
48
87
|
phoneVerified: boolean;
|
|
49
88
|
nidVerified: boolean;
|
|
89
|
+
verification?: {
|
|
90
|
+
status: "pending" | "rejected" | "unverified" | "verified";
|
|
91
|
+
documents: mongoose.Types.DocumentArray<{
|
|
92
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
93
|
+
url: string;
|
|
94
|
+
filename: string;
|
|
95
|
+
uploadedAt: NativeDate;
|
|
96
|
+
}, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, any, {
|
|
97
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
98
|
+
url: string;
|
|
99
|
+
filename: string;
|
|
100
|
+
uploadedAt: NativeDate;
|
|
101
|
+
}> & {
|
|
102
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
103
|
+
url: string;
|
|
104
|
+
filename: string;
|
|
105
|
+
uploadedAt: NativeDate;
|
|
106
|
+
}>;
|
|
107
|
+
rejectionReason?: string | null | undefined;
|
|
108
|
+
reviewedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
109
|
+
reviewedAt?: NativeDate | null | undefined;
|
|
110
|
+
submittedAt?: NativeDate | null | undefined;
|
|
111
|
+
} | null | undefined;
|
|
50
112
|
moderation?: {
|
|
51
113
|
isSuspended: boolean;
|
|
52
114
|
isVerified: boolean;
|
|
@@ -75,6 +137,22 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
75
137
|
} | null | undefined;
|
|
76
138
|
refreshToken?: string | null | undefined;
|
|
77
139
|
googleId?: string | null | undefined;
|
|
140
|
+
hostProfile?: {
|
|
141
|
+
contactPerson?: {
|
|
142
|
+
name?: string | null | undefined;
|
|
143
|
+
designation?: string | null | undefined;
|
|
144
|
+
phone?: string | null | undefined;
|
|
145
|
+
email?: string | null | undefined;
|
|
146
|
+
} | null | undefined;
|
|
147
|
+
role?: "event_organizer" | "venue_owner" | "authorized_rep" | "artist" | null | undefined;
|
|
148
|
+
organizationName?: string | null | undefined;
|
|
149
|
+
} | null | undefined;
|
|
150
|
+
profileCompleteness?: {
|
|
151
|
+
hasContactInfo: boolean;
|
|
152
|
+
hasPaymentDetails: boolean;
|
|
153
|
+
hasVerificationDocs: boolean;
|
|
154
|
+
isComplete: boolean;
|
|
155
|
+
} | null | undefined;
|
|
78
156
|
} & mongoose.DefaultTimestampProps>, {}, mongoose.ResolveSchemaOptions<{
|
|
79
157
|
timestamps: true;
|
|
80
158
|
}>> & mongoose.FlatRecord<{
|
|
@@ -86,6 +164,29 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
86
164
|
emailVerified: boolean;
|
|
87
165
|
phoneVerified: boolean;
|
|
88
166
|
nidVerified: boolean;
|
|
167
|
+
verification?: {
|
|
168
|
+
status: "pending" | "rejected" | "unverified" | "verified";
|
|
169
|
+
documents: mongoose.Types.DocumentArray<{
|
|
170
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
171
|
+
url: string;
|
|
172
|
+
filename: string;
|
|
173
|
+
uploadedAt: NativeDate;
|
|
174
|
+
}, mongoose.Types.Subdocument<mongoose.mongo.BSON.ObjectId, any, {
|
|
175
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
176
|
+
url: string;
|
|
177
|
+
filename: string;
|
|
178
|
+
uploadedAt: NativeDate;
|
|
179
|
+
}> & {
|
|
180
|
+
type: "other" | "nid" | "trade_license" | "tax_certificate";
|
|
181
|
+
url: string;
|
|
182
|
+
filename: string;
|
|
183
|
+
uploadedAt: NativeDate;
|
|
184
|
+
}>;
|
|
185
|
+
rejectionReason?: string | null | undefined;
|
|
186
|
+
reviewedBy?: mongoose.Types.ObjectId | null | undefined;
|
|
187
|
+
reviewedAt?: NativeDate | null | undefined;
|
|
188
|
+
submittedAt?: NativeDate | null | undefined;
|
|
189
|
+
} | null | undefined;
|
|
89
190
|
moderation?: {
|
|
90
191
|
isSuspended: boolean;
|
|
91
192
|
isVerified: boolean;
|
|
@@ -114,6 +215,22 @@ declare const userSchema: mongoose.Schema<any, mongoose.Model<any, any, any, any
|
|
|
114
215
|
} | null | undefined;
|
|
115
216
|
refreshToken?: string | null | undefined;
|
|
116
217
|
googleId?: string | null | undefined;
|
|
218
|
+
hostProfile?: {
|
|
219
|
+
contactPerson?: {
|
|
220
|
+
name?: string | null | undefined;
|
|
221
|
+
designation?: string | null | undefined;
|
|
222
|
+
phone?: string | null | undefined;
|
|
223
|
+
email?: string | null | undefined;
|
|
224
|
+
} | null | undefined;
|
|
225
|
+
role?: "event_organizer" | "venue_owner" | "authorized_rep" | "artist" | null | undefined;
|
|
226
|
+
organizationName?: string | null | undefined;
|
|
227
|
+
} | null | undefined;
|
|
228
|
+
profileCompleteness?: {
|
|
229
|
+
hasContactInfo: boolean;
|
|
230
|
+
hasPaymentDetails: boolean;
|
|
231
|
+
hasVerificationDocs: boolean;
|
|
232
|
+
isComplete: boolean;
|
|
233
|
+
} | null | undefined;
|
|
117
234
|
} & mongoose.DefaultTimestampProps> & {
|
|
118
235
|
_id: mongoose.Types.ObjectId;
|
|
119
236
|
} & {
|
package/dist/User.js
CHANGED
|
@@ -141,6 +141,99 @@ const userSchema = new mongoose_1.default.Schema({
|
|
|
141
141
|
googleId: {
|
|
142
142
|
type: String,
|
|
143
143
|
required: false
|
|
144
|
+
},
|
|
145
|
+
// Host Profile (for event organizers)
|
|
146
|
+
hostProfile: {
|
|
147
|
+
organizationName: {
|
|
148
|
+
type: String,
|
|
149
|
+
required: false
|
|
150
|
+
},
|
|
151
|
+
role: {
|
|
152
|
+
type: String,
|
|
153
|
+
enum: ['event_organizer', 'venue_owner', 'authorized_rep', 'artist'],
|
|
154
|
+
required: false
|
|
155
|
+
},
|
|
156
|
+
contactPerson: {
|
|
157
|
+
name: {
|
|
158
|
+
type: String,
|
|
159
|
+
required: false
|
|
160
|
+
},
|
|
161
|
+
email: {
|
|
162
|
+
type: String,
|
|
163
|
+
required: false
|
|
164
|
+
},
|
|
165
|
+
phone: {
|
|
166
|
+
type: String,
|
|
167
|
+
required: false
|
|
168
|
+
},
|
|
169
|
+
designation: {
|
|
170
|
+
type: String,
|
|
171
|
+
required: false
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
// Verification (for hosts)
|
|
176
|
+
verification: {
|
|
177
|
+
status: {
|
|
178
|
+
type: String,
|
|
179
|
+
enum: ['unverified', 'pending', 'verified', 'rejected'],
|
|
180
|
+
default: 'unverified'
|
|
181
|
+
},
|
|
182
|
+
documents: [{
|
|
183
|
+
type: {
|
|
184
|
+
type: String,
|
|
185
|
+
enum: ['nid', 'trade_license', 'tax_certificate', 'other'],
|
|
186
|
+
required: true
|
|
187
|
+
},
|
|
188
|
+
url: {
|
|
189
|
+
type: String,
|
|
190
|
+
required: true
|
|
191
|
+
},
|
|
192
|
+
filename: {
|
|
193
|
+
type: String,
|
|
194
|
+
required: true
|
|
195
|
+
},
|
|
196
|
+
uploadedAt: {
|
|
197
|
+
type: Date,
|
|
198
|
+
default: Date.now
|
|
199
|
+
}
|
|
200
|
+
}],
|
|
201
|
+
submittedAt: {
|
|
202
|
+
type: Date,
|
|
203
|
+
required: false
|
|
204
|
+
},
|
|
205
|
+
reviewedAt: {
|
|
206
|
+
type: Date,
|
|
207
|
+
required: false
|
|
208
|
+
},
|
|
209
|
+
reviewedBy: {
|
|
210
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
211
|
+
ref: 'User',
|
|
212
|
+
required: false
|
|
213
|
+
},
|
|
214
|
+
rejectionReason: {
|
|
215
|
+
type: String,
|
|
216
|
+
required: false
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
// Profile Completeness Tracking
|
|
220
|
+
profileCompleteness: {
|
|
221
|
+
hasContactInfo: {
|
|
222
|
+
type: Boolean,
|
|
223
|
+
default: false
|
|
224
|
+
},
|
|
225
|
+
hasPaymentDetails: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: false
|
|
228
|
+
},
|
|
229
|
+
hasVerificationDocs: {
|
|
230
|
+
type: Boolean,
|
|
231
|
+
default: false
|
|
232
|
+
},
|
|
233
|
+
isComplete: {
|
|
234
|
+
type: Boolean,
|
|
235
|
+
default: false
|
|
236
|
+
}
|
|
144
237
|
}
|
|
145
238
|
}, {
|
|
146
239
|
timestamps: true
|
package/package.json
CHANGED
package/src/User.ts
CHANGED
|
@@ -139,6 +139,102 @@ const userSchema = new mongoose.Schema({
|
|
|
139
139
|
googleId: {
|
|
140
140
|
type: String,
|
|
141
141
|
required: false
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
// Host Profile (for event organizers)
|
|
145
|
+
hostProfile: {
|
|
146
|
+
organizationName: {
|
|
147
|
+
type: String,
|
|
148
|
+
required: false
|
|
149
|
+
},
|
|
150
|
+
role: {
|
|
151
|
+
type: String,
|
|
152
|
+
enum: ['event_organizer', 'venue_owner', 'authorized_rep', 'artist'],
|
|
153
|
+
required: false
|
|
154
|
+
},
|
|
155
|
+
contactPerson: {
|
|
156
|
+
name: {
|
|
157
|
+
type: String,
|
|
158
|
+
required: false
|
|
159
|
+
},
|
|
160
|
+
email: {
|
|
161
|
+
type: String,
|
|
162
|
+
required: false
|
|
163
|
+
},
|
|
164
|
+
phone: {
|
|
165
|
+
type: String,
|
|
166
|
+
required: false
|
|
167
|
+
},
|
|
168
|
+
designation: {
|
|
169
|
+
type: String,
|
|
170
|
+
required: false
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
|
|
175
|
+
// Verification (for hosts)
|
|
176
|
+
verification: {
|
|
177
|
+
status: {
|
|
178
|
+
type: String,
|
|
179
|
+
enum: ['unverified', 'pending', 'verified', 'rejected'],
|
|
180
|
+
default: 'unverified'
|
|
181
|
+
},
|
|
182
|
+
documents: [{
|
|
183
|
+
type: {
|
|
184
|
+
type: String,
|
|
185
|
+
enum: ['nid', 'trade_license', 'tax_certificate', 'other'],
|
|
186
|
+
required: true
|
|
187
|
+
},
|
|
188
|
+
url: {
|
|
189
|
+
type: String,
|
|
190
|
+
required: true
|
|
191
|
+
},
|
|
192
|
+
filename: {
|
|
193
|
+
type: String,
|
|
194
|
+
required: true
|
|
195
|
+
},
|
|
196
|
+
uploadedAt: {
|
|
197
|
+
type: Date,
|
|
198
|
+
default: Date.now
|
|
199
|
+
}
|
|
200
|
+
}],
|
|
201
|
+
submittedAt: {
|
|
202
|
+
type: Date,
|
|
203
|
+
required: false
|
|
204
|
+
},
|
|
205
|
+
reviewedAt: {
|
|
206
|
+
type: Date,
|
|
207
|
+
required: false
|
|
208
|
+
},
|
|
209
|
+
reviewedBy: {
|
|
210
|
+
type: mongoose.Schema.Types.ObjectId,
|
|
211
|
+
ref: 'User',
|
|
212
|
+
required: false
|
|
213
|
+
},
|
|
214
|
+
rejectionReason: {
|
|
215
|
+
type: String,
|
|
216
|
+
required: false
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
// Profile Completeness Tracking
|
|
221
|
+
profileCompleteness: {
|
|
222
|
+
hasContactInfo: {
|
|
223
|
+
type: Boolean,
|
|
224
|
+
default: false
|
|
225
|
+
},
|
|
226
|
+
hasPaymentDetails: {
|
|
227
|
+
type: Boolean,
|
|
228
|
+
default: false
|
|
229
|
+
},
|
|
230
|
+
hasVerificationDocs: {
|
|
231
|
+
type: Boolean,
|
|
232
|
+
default: false
|
|
233
|
+
},
|
|
234
|
+
isComplete: {
|
|
235
|
+
type: Boolean,
|
|
236
|
+
default: false
|
|
237
|
+
}
|
|
142
238
|
}
|
|
143
239
|
}, {
|
|
144
240
|
timestamps: true
|