@timardex/cluemart-server-shared 1.0.101 → 1.0.102
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/{chunk-UXSMDLHK.mjs → chunk-SYUZ3JWK.mjs} +289 -316
- package/dist/chunk-SYUZ3JWK.mjs.map +1 -0
- package/dist/index.cjs +284 -311
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +284 -311
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +284 -311
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +3 -3
- package/dist/mongoose/index.d.ts +3 -3
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +284 -311
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-UXSMDLHK.mjs.map +0 -1
|
@@ -6956,7 +6956,7 @@ var loginFields = [
|
|
|
6956
6956
|
...emailField
|
|
6957
6957
|
},
|
|
6958
6958
|
{
|
|
6959
|
-
helperText: "Enter password
|
|
6959
|
+
helperText: "Enter password",
|
|
6960
6960
|
keyboardType: "default",
|
|
6961
6961
|
name: "password",
|
|
6962
6962
|
placeholder: "Password",
|
|
@@ -6965,13 +6965,13 @@ var loginFields = [
|
|
|
6965
6965
|
];
|
|
6966
6966
|
var registerFields = [
|
|
6967
6967
|
{
|
|
6968
|
-
helperText: "Enter first name
|
|
6968
|
+
helperText: "Enter first name",
|
|
6969
6969
|
keyboardType: "default",
|
|
6970
6970
|
name: "firstName",
|
|
6971
6971
|
placeholder: "First Name"
|
|
6972
6972
|
},
|
|
6973
6973
|
{
|
|
6974
|
-
helperText: "Enter last name
|
|
6974
|
+
helperText: "Enter last name",
|
|
6975
6975
|
keyboardType: "default",
|
|
6976
6976
|
name: "lastName",
|
|
6977
6977
|
placeholder: "Last Name"
|
|
@@ -6980,7 +6980,7 @@ var registerFields = [
|
|
|
6980
6980
|
...emailField
|
|
6981
6981
|
},
|
|
6982
6982
|
{
|
|
6983
|
-
helperText: "Enter password
|
|
6983
|
+
helperText: "Enter password",
|
|
6984
6984
|
keyboardType: "default",
|
|
6985
6985
|
name: "password",
|
|
6986
6986
|
placeholder: "Password",
|
|
@@ -6990,17 +6990,17 @@ var registerFields = [
|
|
|
6990
6990
|
var requestPasswordResetFields = [
|
|
6991
6991
|
{
|
|
6992
6992
|
...emailField,
|
|
6993
|
-
helperText: "Enter email address to reset your password
|
|
6993
|
+
helperText: "Enter email address to reset your password"
|
|
6994
6994
|
}
|
|
6995
6995
|
];
|
|
6996
6996
|
var validateVerificationTokenFields = [
|
|
6997
6997
|
{
|
|
6998
6998
|
...emailField,
|
|
6999
6999
|
disabled: true,
|
|
7000
|
-
helperText: "Your email address
|
|
7000
|
+
helperText: "Your email address"
|
|
7001
7001
|
},
|
|
7002
7002
|
{
|
|
7003
|
-
helperText: "Enter the Verification code sent to you by email
|
|
7003
|
+
helperText: "Enter the Verification code sent to you by email",
|
|
7004
7004
|
keyboardType: "number-pad",
|
|
7005
7005
|
name: "verificationToken",
|
|
7006
7006
|
placeholder: "Verification code"
|
|
@@ -9576,29 +9576,25 @@ var AD_FIELDS_FRAGMENT = gql`
|
|
|
9576
9576
|
fragment AdFields on AdType {
|
|
9577
9577
|
_id
|
|
9578
9578
|
active
|
|
9579
|
-
adStyle
|
|
9580
|
-
adType
|
|
9581
9579
|
clicks
|
|
9582
9580
|
createdAt
|
|
9583
9581
|
end
|
|
9584
9582
|
impressions
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
socialMedia {
|
|
9594
|
-
...SocialMediaFields
|
|
9583
|
+
resource {
|
|
9584
|
+
adDescription
|
|
9585
|
+
adImage
|
|
9586
|
+
adStyle
|
|
9587
|
+
adTitle
|
|
9588
|
+
adType
|
|
9589
|
+
resourceId
|
|
9590
|
+
resourceType
|
|
9595
9591
|
}
|
|
9592
|
+
showOn
|
|
9596
9593
|
start
|
|
9597
9594
|
status
|
|
9598
9595
|
targetRegion
|
|
9599
9596
|
updatedAt
|
|
9600
9597
|
}
|
|
9601
|
-
${SOCIAL_MEDIA_FIELDS_FRAGMENT}
|
|
9602
9598
|
`;
|
|
9603
9599
|
var GET_ADS = gql`
|
|
9604
9600
|
query getAds {
|
|
@@ -10221,32 +10217,19 @@ var eventInfoSchema = create$3().shape({
|
|
|
10221
10217
|
}
|
|
10222
10218
|
).required("Refund policy is required")
|
|
10223
10219
|
});
|
|
10224
|
-
var
|
|
10225
|
-
description: create$6().
|
|
10226
|
-
name: create$6().
|
|
10227
|
-
|
|
10228
|
-
|
|
10229
|
-
|
|
10230
|
-
return value !== null && value !== void 0;
|
|
10231
|
-
}),
|
|
10232
|
-
priceUnit: create$6().trim().nullable().defined().test("unit-required", "Product unit is required", function(value) {
|
|
10233
|
-
return value !== null && value !== void 0 && value.trim().length > 0;
|
|
10234
|
-
}),
|
|
10235
|
-
productGroups: create$2().of(create$6().defined()).transform(
|
|
10236
|
-
(value, originalValue) => originalValue === void 0 ? null : value
|
|
10237
|
-
).nullable().test(
|
|
10238
|
-
"productGroups-required",
|
|
10239
|
-
"Product groups are required",
|
|
10240
|
-
function(value) {
|
|
10241
|
-
return value !== null && Array.isArray(value) && value.length > 0;
|
|
10242
|
-
}
|
|
10243
|
-
).defined()
|
|
10220
|
+
var vendorMenuSchema = create$3({
|
|
10221
|
+
description: create$6().nullable().optional(),
|
|
10222
|
+
name: create$6().nullable().required("Product name is required"),
|
|
10223
|
+
price: create$5().transform((v, o3) => o3 === "" ? null : v).min(1, "Product price must be greater than 0").required("Product price is required"),
|
|
10224
|
+
priceUnit: create$6().required("Product unit is required"),
|
|
10225
|
+
productGroups: create$2().of(create$6().defined()).min(1, "Product groups are required").required("Product groups are required")
|
|
10244
10226
|
});
|
|
10245
10227
|
var vendorSchema = globalResourceSchema.shape({
|
|
10246
10228
|
categories: categorySchema.min(1, "Category list must contain at least one item").required("Categories are required"),
|
|
10247
10229
|
foodTruck: create$7().label("Food Truck").required("Please specify if the vendor is a food truck"),
|
|
10248
10230
|
products: create$3().shape({
|
|
10249
|
-
|
|
10231
|
+
active: create$7().nullable().optional(),
|
|
10232
|
+
productsList: create$2().of(vendorMenuSchema).nullable().optional()
|
|
10250
10233
|
}).nullable().optional(),
|
|
10251
10234
|
vendorType: create$8().oneOf(Object.values(EnumVendorType)).required("Please select a Vendor type")
|
|
10252
10235
|
});
|
|
@@ -10390,12 +10373,12 @@ var validateVerificationTokenSchema = create$3().shape({
|
|
|
10390
10373
|
email: emailRequiredSchema,
|
|
10391
10374
|
verificationToken: create$6().required("Verification code is required").matches(/^\d{6}$/, "Verification code must be exactly 6 digits")
|
|
10392
10375
|
});
|
|
10393
|
-
var EnumAdShowOn = /* @__PURE__ */ ((
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
return
|
|
10376
|
+
var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn3) => {
|
|
10377
|
+
EnumAdShowOn3["EVENTS_PAGE"] = "Events_page";
|
|
10378
|
+
EnumAdShowOn3["FRONT_PAGE"] = "Front_page";
|
|
10379
|
+
EnumAdShowOn3["PARTNERS_PAGE"] = "Partners_page";
|
|
10380
|
+
EnumAdShowOn3["VENDORS_PAGE"] = "Vendors_page";
|
|
10381
|
+
return EnumAdShowOn3;
|
|
10399
10382
|
})(EnumAdShowOn || {});
|
|
10400
10383
|
var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
|
|
10401
10384
|
EnumAdStatus2["ACTIVE"] = "Active";
|
|
@@ -10403,21 +10386,18 @@ var EnumAdStatus = /* @__PURE__ */ ((EnumAdStatus2) => {
|
|
|
10403
10386
|
EnumAdStatus2["EXPIRED"] = "Expired";
|
|
10404
10387
|
return EnumAdStatus2;
|
|
10405
10388
|
})(EnumAdStatus || {});
|
|
10406
|
-
var EnumAdType = /* @__PURE__ */ ((
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
return
|
|
10389
|
+
var EnumAdType = /* @__PURE__ */ ((EnumAdType3) => {
|
|
10390
|
+
EnumAdType3["SPONSORED"] = "Sponsored";
|
|
10391
|
+
EnumAdType3["FREE"] = "Free";
|
|
10392
|
+
return EnumAdType3;
|
|
10410
10393
|
})(EnumAdType || {});
|
|
10411
|
-
var EnumAdStyle = /* @__PURE__ */ ((
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
return
|
|
10394
|
+
var EnumAdStyle = /* @__PURE__ */ ((EnumAdStyle3) => {
|
|
10395
|
+
EnumAdStyle3["BLOOM"] = "Bloom";
|
|
10396
|
+
EnumAdStyle3["RISE"] = "Rise";
|
|
10397
|
+
return EnumAdStyle3;
|
|
10415
10398
|
})(EnumAdStyle || {});
|
|
10416
10399
|
var adSchema = create$3().shape({
|
|
10417
10400
|
active: create$7().required("Active status is required"),
|
|
10418
|
-
adStyle: create$8().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
|
|
10419
|
-
adType: create$8().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
|
|
10420
|
-
clui: create$6().nullable().notRequired(),
|
|
10421
10401
|
end: create$4().required("End date is required").test("is-future-date", "End date must be in the future", (value) => {
|
|
10422
10402
|
if (!value) return false;
|
|
10423
10403
|
const endDate = new Date(value);
|
|
@@ -10435,18 +10415,16 @@ var adSchema = create$3().shape({
|
|
|
10435
10415
|
}
|
|
10436
10416
|
)
|
|
10437
10417
|
}),
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
).required("Display location is required"),
|
|
10449
|
-
socialMedia: create$2().of(socialMediaSchema).nullable().optional(),
|
|
10418
|
+
resource: create$3().shape({
|
|
10419
|
+
adDescription: create$6().trim().required("Ad description is required").max(100, "Ad description must be at most 100 characters"),
|
|
10420
|
+
adImage: create$6().required("Ad image is required"),
|
|
10421
|
+
adStyle: create$8().oneOf(Object.values(EnumAdStyle), "Please select a valid ad style").required("Ad style is required"),
|
|
10422
|
+
adTitle: create$6().trim().required("Ad title is required").max(50, "Ad title must be at most 50 characters"),
|
|
10423
|
+
adType: create$8().oneOf(Object.values(EnumAdType), "Please select a valid ad type").required("Ad type is required"),
|
|
10424
|
+
resourceId: create$6().required("Resource ID is required"),
|
|
10425
|
+
resourceType: create$8().oneOf(Object.values(EnumResourceType), "Please select Event or Vendor").required("Resource Type is required")
|
|
10426
|
+
}).required("Resource information is required"),
|
|
10427
|
+
showOn: create$2().of(create$8().oneOf(Object.values(EnumAdShowOn)).required()).min(1, "At least one display location is required").required("Display location is required"),
|
|
10450
10428
|
status: create$8().oneOf(Object.values(EnumAdStatus)).required("Ad status is required"),
|
|
10451
10429
|
start: create$4().when("status", {
|
|
10452
10430
|
is: (status) => status !== "Active",
|
|
@@ -10456,7 +10434,7 @@ var adSchema = create$3().shape({
|
|
|
10456
10434
|
}),
|
|
10457
10435
|
otherwise: () => create$4().nullable().notRequired()
|
|
10458
10436
|
}),
|
|
10459
|
-
targetRegion: create$6().
|
|
10437
|
+
targetRegion: create$2().of(create$6().required()).min(1, "At least one target region is required").required("Target region is required")
|
|
10460
10438
|
});
|
|
10461
10439
|
var partnerSchema = globalResourceSchema.shape({
|
|
10462
10440
|
location: locationSchema,
|
|
@@ -10588,18 +10566,214 @@ var EnumActivity = /* @__PURE__ */ ((EnumActivity2) => {
|
|
|
10588
10566
|
})(EnumActivity || {});
|
|
10589
10567
|
|
|
10590
10568
|
// src/mongoose/Ad.ts
|
|
10591
|
-
import
|
|
10569
|
+
import mongoose from "mongoose";
|
|
10570
|
+
var MongooseSchema = mongoose.Schema;
|
|
10571
|
+
var schemaAdresource = new MongooseSchema({
|
|
10572
|
+
adDescription: { required: true, type: String },
|
|
10573
|
+
adImage: { required: true, type: String },
|
|
10574
|
+
adStyle: {
|
|
10575
|
+
default: EnumAdStyle.BLOOM,
|
|
10576
|
+
enum: Object.values(EnumAdStyle),
|
|
10577
|
+
required: true,
|
|
10578
|
+
type: String
|
|
10579
|
+
},
|
|
10580
|
+
adTitle: { required: true, type: String },
|
|
10581
|
+
adType: {
|
|
10582
|
+
default: EnumAdType.SPONSORED,
|
|
10583
|
+
enum: Object.values(EnumAdType),
|
|
10584
|
+
required: true,
|
|
10585
|
+
type: String
|
|
10586
|
+
},
|
|
10587
|
+
resourceId: { required: true, type: String },
|
|
10588
|
+
resourceType: {
|
|
10589
|
+
enum: Object.values(EnumResourceType),
|
|
10590
|
+
required: true,
|
|
10591
|
+
type: String
|
|
10592
|
+
}
|
|
10593
|
+
});
|
|
10594
|
+
var schema = new MongooseSchema(
|
|
10595
|
+
{
|
|
10596
|
+
active: { default: true, type: Boolean },
|
|
10597
|
+
clicks: { default: 0, required: true, type: Number },
|
|
10598
|
+
end: { required: true, type: Date },
|
|
10599
|
+
impressions: { default: 0, required: true, type: Number },
|
|
10600
|
+
resource: { required: true, type: schemaAdresource },
|
|
10601
|
+
showOn: {
|
|
10602
|
+
default: [EnumAdShowOn.FRONT_PAGE],
|
|
10603
|
+
enum: Object.values(EnumAdShowOn),
|
|
10604
|
+
required: true,
|
|
10605
|
+
type: [String]
|
|
10606
|
+
},
|
|
10607
|
+
start: { required: true, type: Date },
|
|
10608
|
+
status: {
|
|
10609
|
+
default: EnumAdStatus.ACTIVE,
|
|
10610
|
+
enum: Object.values(EnumAdStatus),
|
|
10611
|
+
required: true,
|
|
10612
|
+
type: String
|
|
10613
|
+
},
|
|
10614
|
+
targetRegion: { required: false, type: [String] }
|
|
10615
|
+
},
|
|
10616
|
+
{
|
|
10617
|
+
timestamps: true
|
|
10618
|
+
}
|
|
10619
|
+
);
|
|
10620
|
+
schema.index({
|
|
10621
|
+
end: 1,
|
|
10622
|
+
start: 1,
|
|
10623
|
+
status: 1
|
|
10624
|
+
});
|
|
10625
|
+
var AdModel = mongoose.models.Ad || mongoose.model("Ad", schema);
|
|
10592
10626
|
|
|
10593
|
-
// src/mongoose/
|
|
10627
|
+
// src/mongoose/chat/Chat.ts
|
|
10628
|
+
import mongoose2 from "mongoose";
|
|
10629
|
+
var MongooseSchema2 = mongoose2.Schema;
|
|
10630
|
+
var MessageReplyPreviewSchema = new MongooseSchema2(
|
|
10631
|
+
{
|
|
10632
|
+
contentPreview: { required: true, type: String },
|
|
10633
|
+
senderId: {
|
|
10634
|
+
ref: "User",
|
|
10635
|
+
required: true,
|
|
10636
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
10637
|
+
},
|
|
10638
|
+
senderName: { required: true, type: String }
|
|
10639
|
+
},
|
|
10640
|
+
{ _id: false }
|
|
10641
|
+
);
|
|
10642
|
+
var MessageReactionSchema = new MongooseSchema2(
|
|
10643
|
+
{
|
|
10644
|
+
createdAt: { required: true, type: Date },
|
|
10645
|
+
userId: {
|
|
10646
|
+
ref: "User",
|
|
10647
|
+
required: true,
|
|
10648
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
10649
|
+
}
|
|
10650
|
+
},
|
|
10651
|
+
{ _id: false }
|
|
10652
|
+
);
|
|
10653
|
+
var MessageSeenSchema = new MongooseSchema2(
|
|
10654
|
+
{
|
|
10655
|
+
seenAt: { required: true, type: Date },
|
|
10656
|
+
userId: {
|
|
10657
|
+
ref: "User",
|
|
10658
|
+
required: true,
|
|
10659
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
10660
|
+
}
|
|
10661
|
+
},
|
|
10662
|
+
{ _id: false }
|
|
10663
|
+
);
|
|
10664
|
+
var MessageSchema = new MongooseSchema2(
|
|
10665
|
+
{
|
|
10666
|
+
content: { required: true, type: String },
|
|
10667
|
+
likedBy: { default: [], required: false, type: [MessageReactionSchema] },
|
|
10668
|
+
replyPreview: {
|
|
10669
|
+
required: false,
|
|
10670
|
+
type: MessageReplyPreviewSchema
|
|
10671
|
+
},
|
|
10672
|
+
replyToMessageId: {
|
|
10673
|
+
ref: "Chat.messages",
|
|
10674
|
+
required: false,
|
|
10675
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
10676
|
+
},
|
|
10677
|
+
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
10678
|
+
senderId: {
|
|
10679
|
+
ref: "User",
|
|
10680
|
+
required: true,
|
|
10681
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
10682
|
+
}
|
|
10683
|
+
},
|
|
10684
|
+
{ timestamps: true }
|
|
10685
|
+
);
|
|
10686
|
+
var ParticipantSchema = new MongooseSchema2(
|
|
10687
|
+
{
|
|
10688
|
+
active: { default: true, required: true, type: Boolean },
|
|
10689
|
+
userAvatar: { required: false, type: String },
|
|
10690
|
+
userEmail: { required: true, type: String },
|
|
10691
|
+
userId: {
|
|
10692
|
+
ref: "User",
|
|
10693
|
+
required: true,
|
|
10694
|
+
type: mongoose2.Schema.Types.ObjectId
|
|
10695
|
+
},
|
|
10696
|
+
userName: { required: true, type: String }
|
|
10697
|
+
},
|
|
10698
|
+
{ _id: false }
|
|
10699
|
+
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10700
|
+
);
|
|
10701
|
+
var ChatSchema = new MongooseSchema2(
|
|
10702
|
+
{
|
|
10703
|
+
active: { default: true, required: true, type: Boolean },
|
|
10704
|
+
chatDescription: { required: false, type: String },
|
|
10705
|
+
chatName: { required: true, type: String },
|
|
10706
|
+
chatType: {
|
|
10707
|
+
enum: Object.values(EnumChatType),
|
|
10708
|
+
required: true,
|
|
10709
|
+
type: String
|
|
10710
|
+
},
|
|
10711
|
+
deletedAt: { default: null, required: false, type: Date },
|
|
10712
|
+
messages: [MessageSchema],
|
|
10713
|
+
participants: [ParticipantSchema],
|
|
10714
|
+
region: { default: null, required: false, type: String }
|
|
10715
|
+
},
|
|
10716
|
+
{
|
|
10717
|
+
timestamps: true
|
|
10718
|
+
}
|
|
10719
|
+
);
|
|
10720
|
+
ChatSchema.index({
|
|
10721
|
+
"participants.active": 1,
|
|
10722
|
+
"participants.userId": 1,
|
|
10723
|
+
updatedAt: -1
|
|
10724
|
+
});
|
|
10725
|
+
var ChatModel = mongoose2.models.Chat || mongoose2.model("Chat", ChatSchema);
|
|
10726
|
+
|
|
10727
|
+
// src/mongoose/chat/ChatReport.ts
|
|
10594
10728
|
import mongoose3 from "mongoose";
|
|
10729
|
+
var MongooseSchema3 = mongoose3.Schema;
|
|
10730
|
+
var ReasonSchema = new MongooseSchema3(
|
|
10731
|
+
{
|
|
10732
|
+
details: { default: null, required: false, type: String },
|
|
10733
|
+
reasonType: {
|
|
10734
|
+
enum: Object.values(EnumChatReportReason),
|
|
10735
|
+
required: true,
|
|
10736
|
+
type: String
|
|
10737
|
+
}
|
|
10738
|
+
},
|
|
10739
|
+
{ _id: false }
|
|
10740
|
+
);
|
|
10741
|
+
var ChatReportSchema = new MongooseSchema3(
|
|
10742
|
+
{
|
|
10743
|
+
chatId: {
|
|
10744
|
+
ref: "Chat",
|
|
10745
|
+
required: true,
|
|
10746
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
10747
|
+
},
|
|
10748
|
+
reason: { required: true, type: ReasonSchema },
|
|
10749
|
+
reportedUserId: {
|
|
10750
|
+
ref: "User",
|
|
10751
|
+
required: true,
|
|
10752
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
10753
|
+
},
|
|
10754
|
+
reporterUserId: {
|
|
10755
|
+
ref: "User",
|
|
10756
|
+
required: true,
|
|
10757
|
+
type: mongoose3.Schema.Types.ObjectId
|
|
10758
|
+
},
|
|
10759
|
+
resolved: { default: false, required: true, type: Boolean }
|
|
10760
|
+
},
|
|
10761
|
+
{ timestamps: true }
|
|
10762
|
+
);
|
|
10763
|
+
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
10764
|
+
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
10765
|
+
var ChatReportModel = mongoose3.models.ChatReport || mongoose3.model("ChatReport", ChatReportSchema);
|
|
10766
|
+
|
|
10767
|
+
// src/mongoose/global.ts
|
|
10768
|
+
import mongoose6 from "mongoose";
|
|
10595
10769
|
|
|
10596
10770
|
// src/mongoose/Relation.ts
|
|
10597
|
-
import
|
|
10771
|
+
import mongoose5 from "mongoose";
|
|
10598
10772
|
|
|
10599
10773
|
// src/mongoose/event/EventInfo.ts
|
|
10600
|
-
import
|
|
10601
|
-
var
|
|
10602
|
-
var StallTypeSchema = new
|
|
10774
|
+
import mongoose4 from "mongoose";
|
|
10775
|
+
var MongooseSchema4 = mongoose4.Schema;
|
|
10776
|
+
var StallTypeSchema = new MongooseSchema4(
|
|
10603
10777
|
{
|
|
10604
10778
|
electricity: {
|
|
10605
10779
|
price: { required: false, type: Number },
|
|
@@ -10614,7 +10788,7 @@ var StallTypeSchema = new MongooseSchema(
|
|
|
10614
10788
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10615
10789
|
}
|
|
10616
10790
|
);
|
|
10617
|
-
var dateTimeSchema2 = new
|
|
10791
|
+
var dateTimeSchema2 = new MongooseSchema4(
|
|
10618
10792
|
{
|
|
10619
10793
|
dateStatus: {
|
|
10620
10794
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -10630,7 +10804,7 @@ var dateTimeSchema2 = new MongooseSchema(
|
|
|
10630
10804
|
{ _id: false }
|
|
10631
10805
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10632
10806
|
);
|
|
10633
|
-
var paymentInfoSchema2 = new
|
|
10807
|
+
var paymentInfoSchema2 = new MongooseSchema4(
|
|
10634
10808
|
{
|
|
10635
10809
|
accountHolderName: { required: false, type: String },
|
|
10636
10810
|
accountNumber: { required: false, type: String },
|
|
@@ -10644,7 +10818,7 @@ var paymentInfoSchema2 = new MongooseSchema(
|
|
|
10644
10818
|
{ _id: false }
|
|
10645
10819
|
// Prevents Mongoose from creating an additional _id field
|
|
10646
10820
|
);
|
|
10647
|
-
var requirementsSchema = new
|
|
10821
|
+
var requirementsSchema = new MongooseSchema4(
|
|
10648
10822
|
{
|
|
10649
10823
|
category: { required: true, type: String },
|
|
10650
10824
|
label: { required: true, type: String },
|
|
@@ -10655,7 +10829,7 @@ var requirementsSchema = new MongooseSchema(
|
|
|
10655
10829
|
// Prevents Mongoose from creating an additional _id field for
|
|
10656
10830
|
}
|
|
10657
10831
|
);
|
|
10658
|
-
var refundPolicySchema = new
|
|
10832
|
+
var refundPolicySchema = new MongooseSchema4(
|
|
10659
10833
|
{
|
|
10660
10834
|
category: { required: true, type: String },
|
|
10661
10835
|
label: { required: true, type: String },
|
|
@@ -10663,14 +10837,14 @@ var refundPolicySchema = new MongooseSchema(
|
|
|
10663
10837
|
},
|
|
10664
10838
|
{ _id: false }
|
|
10665
10839
|
);
|
|
10666
|
-
var
|
|
10840
|
+
var schema2 = new MongooseSchema4(
|
|
10667
10841
|
{
|
|
10668
10842
|
applicationDeadlineHours: { required: true, type: Number },
|
|
10669
10843
|
dateTime: { required: true, type: [dateTimeSchema2] },
|
|
10670
10844
|
eventId: {
|
|
10671
10845
|
ref: "Event",
|
|
10672
10846
|
required: true,
|
|
10673
|
-
type:
|
|
10847
|
+
type: mongoose4.Schema.Types.ObjectId
|
|
10674
10848
|
},
|
|
10675
10849
|
packInTime: { required: true, type: Number },
|
|
10676
10850
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -10680,11 +10854,11 @@ var schema = new MongooseSchema(
|
|
|
10680
10854
|
},
|
|
10681
10855
|
{ timestamps: true }
|
|
10682
10856
|
);
|
|
10683
|
-
var EventInfoModel =
|
|
10857
|
+
var EventInfoModel = mongoose4.models.EventInfo || mongoose4.model("EventInfo", schema2);
|
|
10684
10858
|
|
|
10685
10859
|
// src/mongoose/Relation.ts
|
|
10686
|
-
var
|
|
10687
|
-
var relationDateTimeSchema = new
|
|
10860
|
+
var MongooseSchema5 = mongoose5.Schema;
|
|
10861
|
+
var relationDateTimeSchema = new MongooseSchema5(
|
|
10688
10862
|
{
|
|
10689
10863
|
dateStatus: {
|
|
10690
10864
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -10699,7 +10873,7 @@ var relationDateTimeSchema = new MongooseSchema2(
|
|
|
10699
10873
|
},
|
|
10700
10874
|
{ _id: false }
|
|
10701
10875
|
);
|
|
10702
|
-
var relationDatesSchema = new
|
|
10876
|
+
var relationDatesSchema = new MongooseSchema5(
|
|
10703
10877
|
{
|
|
10704
10878
|
dateTime: {
|
|
10705
10879
|
required: true,
|
|
@@ -10718,19 +10892,19 @@ var relationDatesSchema = new MongooseSchema2(
|
|
|
10718
10892
|
},
|
|
10719
10893
|
{ _id: false }
|
|
10720
10894
|
);
|
|
10721
|
-
var RelationTypeSchema = new
|
|
10895
|
+
var RelationTypeSchema = new MongooseSchema5(
|
|
10722
10896
|
{
|
|
10723
10897
|
active: { default: true, required: true, type: Boolean },
|
|
10724
10898
|
chatId: {
|
|
10725
10899
|
ref: "Chat",
|
|
10726
10900
|
required: true,
|
|
10727
|
-
type:
|
|
10901
|
+
type: mongoose5.Schema.Types.ObjectId
|
|
10728
10902
|
},
|
|
10729
10903
|
deletedAt: { default: null, required: false, type: Date },
|
|
10730
10904
|
eventId: {
|
|
10731
10905
|
ref: "Event",
|
|
10732
10906
|
required: true,
|
|
10733
|
-
type:
|
|
10907
|
+
type: mongoose5.Schema.Types.ObjectId
|
|
10734
10908
|
},
|
|
10735
10909
|
lastUpdateBy: {
|
|
10736
10910
|
enum: Object.values(EnumResourceType),
|
|
@@ -10746,7 +10920,7 @@ var RelationTypeSchema = new MongooseSchema2(
|
|
|
10746
10920
|
vendorId: {
|
|
10747
10921
|
ref: "Vendor",
|
|
10748
10922
|
required: true,
|
|
10749
|
-
type:
|
|
10923
|
+
type: mongoose5.Schema.Types.ObjectId
|
|
10750
10924
|
}
|
|
10751
10925
|
},
|
|
10752
10926
|
{ timestamps: true }
|
|
@@ -10758,23 +10932,23 @@ RelationTypeSchema.index({
|
|
|
10758
10932
|
"relationDates.status": 1,
|
|
10759
10933
|
vendorId: 1
|
|
10760
10934
|
});
|
|
10761
|
-
var RelationModel =
|
|
10935
|
+
var RelationModel = mongoose5.models.Relation || mongoose5.model("Relation", RelationTypeSchema);
|
|
10762
10936
|
|
|
10763
10937
|
// src/mongoose/global.ts
|
|
10764
|
-
var
|
|
10765
|
-
var OwnerTypeSchema = new
|
|
10938
|
+
var MongooseSchema6 = mongoose6.Schema;
|
|
10939
|
+
var OwnerTypeSchema = new MongooseSchema6(
|
|
10766
10940
|
{
|
|
10767
10941
|
email: { required: true, type: String },
|
|
10768
10942
|
userId: {
|
|
10769
10943
|
ref: "User",
|
|
10770
10944
|
required: true,
|
|
10771
|
-
type:
|
|
10945
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
10772
10946
|
}
|
|
10773
10947
|
},
|
|
10774
10948
|
{ _id: false }
|
|
10775
10949
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10776
10950
|
);
|
|
10777
|
-
var SocialMediaTypeSchema = new
|
|
10951
|
+
var SocialMediaTypeSchema = new MongooseSchema6(
|
|
10778
10952
|
{
|
|
10779
10953
|
link: { required: true, type: String },
|
|
10780
10954
|
name: { required: true, type: String }
|
|
@@ -10782,7 +10956,7 @@ var SocialMediaTypeSchema = new MongooseSchema3(
|
|
|
10782
10956
|
{ _id: false }
|
|
10783
10957
|
// Prevents Mongoose from creating an additional _id field
|
|
10784
10958
|
);
|
|
10785
|
-
var ResourceImageTypeSchema = new
|
|
10959
|
+
var ResourceImageTypeSchema = new MongooseSchema6(
|
|
10786
10960
|
{
|
|
10787
10961
|
active: { default: true, type: Boolean },
|
|
10788
10962
|
source: { required: false, type: String },
|
|
@@ -10791,7 +10965,7 @@ var ResourceImageTypeSchema = new MongooseSchema3(
|
|
|
10791
10965
|
{ _id: false }
|
|
10792
10966
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10793
10967
|
);
|
|
10794
|
-
var SubCategorySchema = new
|
|
10968
|
+
var SubCategorySchema = new MongooseSchema6(
|
|
10795
10969
|
{
|
|
10796
10970
|
id: { required: false, type: String },
|
|
10797
10971
|
items: [
|
|
@@ -10805,7 +10979,7 @@ var SubCategorySchema = new MongooseSchema3(
|
|
|
10805
10979
|
{ _id: false }
|
|
10806
10980
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10807
10981
|
);
|
|
10808
|
-
var CategorySchema = new
|
|
10982
|
+
var CategorySchema = new MongooseSchema6(
|
|
10809
10983
|
{
|
|
10810
10984
|
id: { required: true, type: String },
|
|
10811
10985
|
name: { required: true, type: String },
|
|
@@ -10814,7 +10988,7 @@ var CategorySchema = new MongooseSchema3(
|
|
|
10814
10988
|
{ _id: false }
|
|
10815
10989
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10816
10990
|
);
|
|
10817
|
-
var PosterUsageTypeSchema = new
|
|
10991
|
+
var PosterUsageTypeSchema = new MongooseSchema6(
|
|
10818
10992
|
{
|
|
10819
10993
|
count: { default: 0, required: false, type: Number },
|
|
10820
10994
|
month: { required: false, type: String }
|
|
@@ -10822,7 +10996,7 @@ var PosterUsageTypeSchema = new MongooseSchema3(
|
|
|
10822
10996
|
{ _id: false }
|
|
10823
10997
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10824
10998
|
);
|
|
10825
|
-
var userLicenseSchema = new
|
|
10999
|
+
var userLicenseSchema = new MongooseSchema6(
|
|
10826
11000
|
{
|
|
10827
11001
|
expiryDate: { required: true, type: Date },
|
|
10828
11002
|
issuedDate: { required: true, type: Date },
|
|
@@ -10839,7 +11013,7 @@ var userLicenseSchema = new MongooseSchema3(
|
|
|
10839
11013
|
},
|
|
10840
11014
|
{ _id: false, timestamps: false }
|
|
10841
11015
|
);
|
|
10842
|
-
var associatesSchema = new
|
|
11016
|
+
var associatesSchema = new MongooseSchema6(
|
|
10843
11017
|
{
|
|
10844
11018
|
email: { required: true, type: String },
|
|
10845
11019
|
licence: {
|
|
@@ -10859,7 +11033,7 @@ var associatesSchema = new MongooseSchema3(
|
|
|
10859
11033
|
{ _id: false }
|
|
10860
11034
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10861
11035
|
);
|
|
10862
|
-
var ContactDetailsSchema = new
|
|
11036
|
+
var ContactDetailsSchema = new MongooseSchema6(
|
|
10863
11037
|
{
|
|
10864
11038
|
email: { required: false, type: String },
|
|
10865
11039
|
landlinePhone: { required: false, type: String },
|
|
@@ -10868,7 +11042,7 @@ var ContactDetailsSchema = new MongooseSchema3(
|
|
|
10868
11042
|
{ _id: false }
|
|
10869
11043
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10870
11044
|
);
|
|
10871
|
-
var termsAgreementSchema = new
|
|
11045
|
+
var termsAgreementSchema = new MongooseSchema6(
|
|
10872
11046
|
{
|
|
10873
11047
|
appBuildNumber: { required: true, type: String },
|
|
10874
11048
|
appId: { required: true, type: String },
|
|
@@ -10885,7 +11059,7 @@ var termsAgreementSchema = new MongooseSchema3(
|
|
|
10885
11059
|
},
|
|
10886
11060
|
{ _id: false }
|
|
10887
11061
|
);
|
|
10888
|
-
var resourceRelationsSchema = new
|
|
11062
|
+
var resourceRelationsSchema = new MongooseSchema6(
|
|
10889
11063
|
{
|
|
10890
11064
|
relationDates: {
|
|
10891
11065
|
default: [],
|
|
@@ -10895,12 +11069,12 @@ var resourceRelationsSchema = new MongooseSchema3(
|
|
|
10895
11069
|
relationId: {
|
|
10896
11070
|
ref: "Relation",
|
|
10897
11071
|
required: false,
|
|
10898
|
-
type:
|
|
11072
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
10899
11073
|
}
|
|
10900
11074
|
},
|
|
10901
11075
|
{ _id: false }
|
|
10902
11076
|
);
|
|
10903
|
-
var dateTimeSchema3 = new
|
|
11077
|
+
var dateTimeSchema3 = new MongooseSchema6(
|
|
10904
11078
|
{
|
|
10905
11079
|
dateStatus: {
|
|
10906
11080
|
enum: Object.values(EnumEventDateStatus),
|
|
@@ -10915,7 +11089,7 @@ var dateTimeSchema3 = new MongooseSchema3(
|
|
|
10915
11089
|
{ _id: false }
|
|
10916
11090
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10917
11091
|
);
|
|
10918
|
-
var locationGeoSchema = new
|
|
11092
|
+
var locationGeoSchema = new MongooseSchema6(
|
|
10919
11093
|
{
|
|
10920
11094
|
coordinates: { required: true, type: [Number] },
|
|
10921
11095
|
// [longitude, latitude]
|
|
@@ -10924,7 +11098,7 @@ var locationGeoSchema = new MongooseSchema3(
|
|
|
10924
11098
|
{ _id: false }
|
|
10925
11099
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
10926
11100
|
);
|
|
10927
|
-
var locationsSchema = new
|
|
11101
|
+
var locationsSchema = new MongooseSchema6(
|
|
10928
11102
|
{
|
|
10929
11103
|
city: { required: true, type: String },
|
|
10930
11104
|
country: { required: true, type: String },
|
|
@@ -10945,7 +11119,7 @@ var baseResourceFields = {
|
|
|
10945
11119
|
adIds: {
|
|
10946
11120
|
ref: "Ad",
|
|
10947
11121
|
required: false,
|
|
10948
|
-
type: [
|
|
11122
|
+
type: [mongoose6.Schema.Types.ObjectId]
|
|
10949
11123
|
},
|
|
10950
11124
|
associates: {
|
|
10951
11125
|
required: false,
|
|
@@ -10974,207 +11148,6 @@ var baseResourceFields = {
|
|
|
10974
11148
|
termsAgreement: termsAgreementSchema
|
|
10975
11149
|
};
|
|
10976
11150
|
|
|
10977
|
-
// src/mongoose/Ad.ts
|
|
10978
|
-
var MongooseSchema4 = mongoose4.Schema;
|
|
10979
|
-
var schema2 = new MongooseSchema4(
|
|
10980
|
-
{
|
|
10981
|
-
active: { default: true, type: Boolean },
|
|
10982
|
-
adStyle: {
|
|
10983
|
-
default: EnumAdStyle.BLOOM,
|
|
10984
|
-
enum: Object.values(EnumAdStyle),
|
|
10985
|
-
required: true,
|
|
10986
|
-
type: String
|
|
10987
|
-
},
|
|
10988
|
-
adType: {
|
|
10989
|
-
default: EnumAdType.SPONSORED,
|
|
10990
|
-
enum: Object.values(EnumAdType),
|
|
10991
|
-
required: true,
|
|
10992
|
-
type: String
|
|
10993
|
-
},
|
|
10994
|
-
// TODO: similar to ViewSchema
|
|
10995
|
-
clicks: { default: 0, required: true, type: Number },
|
|
10996
|
-
clui: { required: false, type: String },
|
|
10997
|
-
end: { required: true, type: Date },
|
|
10998
|
-
// TODO: similar to ViewSchema
|
|
10999
|
-
impressions: { default: 0, required: true, type: Number },
|
|
11000
|
-
resourceCover: { required: true, type: String },
|
|
11001
|
-
resourceDescription: { required: true, type: String },
|
|
11002
|
-
resourceId: { required: true, type: String },
|
|
11003
|
-
resourceLogo: { required: false, type: String },
|
|
11004
|
-
resourceName: { required: true, type: String },
|
|
11005
|
-
resourceRegion: { required: true, type: String },
|
|
11006
|
-
resourceType: {
|
|
11007
|
-
enum: Object.values(EnumResourceType),
|
|
11008
|
-
required: true,
|
|
11009
|
-
type: String
|
|
11010
|
-
},
|
|
11011
|
-
showOn: {
|
|
11012
|
-
default: EnumAdShowOn.FRONT_PAGE,
|
|
11013
|
-
enum: Object.values(EnumAdShowOn),
|
|
11014
|
-
required: true,
|
|
11015
|
-
type: String
|
|
11016
|
-
},
|
|
11017
|
-
socialMedia: [SocialMediaTypeSchema],
|
|
11018
|
-
start: { required: true, type: Date },
|
|
11019
|
-
status: {
|
|
11020
|
-
default: EnumAdStatus.ACTIVE,
|
|
11021
|
-
enum: Object.values(EnumAdStatus),
|
|
11022
|
-
required: true,
|
|
11023
|
-
type: String
|
|
11024
|
-
},
|
|
11025
|
-
targetRegion: { required: false, type: String }
|
|
11026
|
-
},
|
|
11027
|
-
{
|
|
11028
|
-
timestamps: true
|
|
11029
|
-
}
|
|
11030
|
-
);
|
|
11031
|
-
schema2.index({
|
|
11032
|
-
end: 1,
|
|
11033
|
-
start: 1,
|
|
11034
|
-
status: 1
|
|
11035
|
-
});
|
|
11036
|
-
var AdModel = mongoose4.models.Ad || mongoose4.model("Ad", schema2);
|
|
11037
|
-
|
|
11038
|
-
// src/mongoose/chat/Chat.ts
|
|
11039
|
-
import mongoose5 from "mongoose";
|
|
11040
|
-
var MongooseSchema5 = mongoose5.Schema;
|
|
11041
|
-
var MessageReplyPreviewSchema = new MongooseSchema5(
|
|
11042
|
-
{
|
|
11043
|
-
contentPreview: { required: true, type: String },
|
|
11044
|
-
senderId: {
|
|
11045
|
-
ref: "User",
|
|
11046
|
-
required: true,
|
|
11047
|
-
type: mongoose5.Schema.Types.ObjectId
|
|
11048
|
-
},
|
|
11049
|
-
senderName: { required: true, type: String }
|
|
11050
|
-
},
|
|
11051
|
-
{ _id: false }
|
|
11052
|
-
);
|
|
11053
|
-
var MessageReactionSchema = new MongooseSchema5(
|
|
11054
|
-
{
|
|
11055
|
-
createdAt: { required: true, type: Date },
|
|
11056
|
-
userId: {
|
|
11057
|
-
ref: "User",
|
|
11058
|
-
required: true,
|
|
11059
|
-
type: mongoose5.Schema.Types.ObjectId
|
|
11060
|
-
}
|
|
11061
|
-
},
|
|
11062
|
-
{ _id: false }
|
|
11063
|
-
);
|
|
11064
|
-
var MessageSeenSchema = new MongooseSchema5(
|
|
11065
|
-
{
|
|
11066
|
-
seenAt: { required: true, type: Date },
|
|
11067
|
-
userId: {
|
|
11068
|
-
ref: "User",
|
|
11069
|
-
required: true,
|
|
11070
|
-
type: mongoose5.Schema.Types.ObjectId
|
|
11071
|
-
}
|
|
11072
|
-
},
|
|
11073
|
-
{ _id: false }
|
|
11074
|
-
);
|
|
11075
|
-
var MessageSchema = new MongooseSchema5(
|
|
11076
|
-
{
|
|
11077
|
-
content: { required: true, type: String },
|
|
11078
|
-
likedBy: { default: [], required: false, type: [MessageReactionSchema] },
|
|
11079
|
-
replyPreview: {
|
|
11080
|
-
required: false,
|
|
11081
|
-
type: MessageReplyPreviewSchema
|
|
11082
|
-
},
|
|
11083
|
-
replyToMessageId: {
|
|
11084
|
-
ref: "Chat.messages",
|
|
11085
|
-
required: false,
|
|
11086
|
-
type: mongoose5.Schema.Types.ObjectId
|
|
11087
|
-
},
|
|
11088
|
-
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
11089
|
-
senderId: {
|
|
11090
|
-
ref: "User",
|
|
11091
|
-
required: true,
|
|
11092
|
-
type: mongoose5.Schema.Types.ObjectId
|
|
11093
|
-
}
|
|
11094
|
-
},
|
|
11095
|
-
{ timestamps: true }
|
|
11096
|
-
);
|
|
11097
|
-
var ParticipantSchema = new MongooseSchema5(
|
|
11098
|
-
{
|
|
11099
|
-
active: { default: true, required: true, type: Boolean },
|
|
11100
|
-
userAvatar: { required: false, type: String },
|
|
11101
|
-
userEmail: { required: true, type: String },
|
|
11102
|
-
userId: {
|
|
11103
|
-
ref: "User",
|
|
11104
|
-
required: true,
|
|
11105
|
-
type: mongoose5.Schema.Types.ObjectId
|
|
11106
|
-
},
|
|
11107
|
-
userName: { required: true, type: String }
|
|
11108
|
-
},
|
|
11109
|
-
{ _id: false }
|
|
11110
|
-
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11111
|
-
);
|
|
11112
|
-
var ChatSchema = new MongooseSchema5(
|
|
11113
|
-
{
|
|
11114
|
-
active: { default: true, required: true, type: Boolean },
|
|
11115
|
-
chatDescription: { required: false, type: String },
|
|
11116
|
-
chatName: { required: true, type: String },
|
|
11117
|
-
chatType: {
|
|
11118
|
-
enum: Object.values(EnumChatType),
|
|
11119
|
-
required: true,
|
|
11120
|
-
type: String
|
|
11121
|
-
},
|
|
11122
|
-
deletedAt: { default: null, required: false, type: Date },
|
|
11123
|
-
messages: [MessageSchema],
|
|
11124
|
-
participants: [ParticipantSchema],
|
|
11125
|
-
region: { default: null, required: false, type: String }
|
|
11126
|
-
},
|
|
11127
|
-
{
|
|
11128
|
-
timestamps: true
|
|
11129
|
-
}
|
|
11130
|
-
);
|
|
11131
|
-
ChatSchema.index({
|
|
11132
|
-
"participants.active": 1,
|
|
11133
|
-
"participants.userId": 1,
|
|
11134
|
-
updatedAt: -1
|
|
11135
|
-
});
|
|
11136
|
-
var ChatModel = mongoose5.models.Chat || mongoose5.model("Chat", ChatSchema);
|
|
11137
|
-
|
|
11138
|
-
// src/mongoose/chat/ChatReport.ts
|
|
11139
|
-
import mongoose6 from "mongoose";
|
|
11140
|
-
var MongooseSchema6 = mongoose6.Schema;
|
|
11141
|
-
var ReasonSchema = new MongooseSchema6(
|
|
11142
|
-
{
|
|
11143
|
-
details: { default: null, required: false, type: String },
|
|
11144
|
-
reasonType: {
|
|
11145
|
-
enum: Object.values(EnumChatReportReason),
|
|
11146
|
-
required: true,
|
|
11147
|
-
type: String
|
|
11148
|
-
}
|
|
11149
|
-
},
|
|
11150
|
-
{ _id: false }
|
|
11151
|
-
);
|
|
11152
|
-
var ChatReportSchema = new MongooseSchema6(
|
|
11153
|
-
{
|
|
11154
|
-
chatId: {
|
|
11155
|
-
ref: "Chat",
|
|
11156
|
-
required: true,
|
|
11157
|
-
type: mongoose6.Schema.Types.ObjectId
|
|
11158
|
-
},
|
|
11159
|
-
reason: { required: true, type: ReasonSchema },
|
|
11160
|
-
reportedUserId: {
|
|
11161
|
-
ref: "User",
|
|
11162
|
-
required: true,
|
|
11163
|
-
type: mongoose6.Schema.Types.ObjectId
|
|
11164
|
-
},
|
|
11165
|
-
reporterUserId: {
|
|
11166
|
-
ref: "User",
|
|
11167
|
-
required: true,
|
|
11168
|
-
type: mongoose6.Schema.Types.ObjectId
|
|
11169
|
-
},
|
|
11170
|
-
resolved: { default: false, required: true, type: Boolean }
|
|
11171
|
-
},
|
|
11172
|
-
{ timestamps: true }
|
|
11173
|
-
);
|
|
11174
|
-
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
11175
|
-
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
11176
|
-
var ChatReportModel = mongoose6.models.ChatReport || mongoose6.model("ChatReport", ChatReportSchema);
|
|
11177
|
-
|
|
11178
11151
|
// src/mongoose/GoogleImportedMarket.ts
|
|
11179
11152
|
import mongoose7 from "mongoose";
|
|
11180
11153
|
var MongooseSchema7 = mongoose7.Schema;
|
|
@@ -11830,6 +11803,10 @@ var AppSettingModel = mongoose18.models.AppSetting || mongoose18.model("AppSetti
|
|
|
11830
11803
|
export {
|
|
11831
11804
|
EnumUserLicence,
|
|
11832
11805
|
EnumAdStatus,
|
|
11806
|
+
AdModel,
|
|
11807
|
+
ParticipantSchema,
|
|
11808
|
+
ChatModel,
|
|
11809
|
+
ChatReportModel,
|
|
11833
11810
|
StallTypeSchema,
|
|
11834
11811
|
refundPolicySchema,
|
|
11835
11812
|
EventInfoModel,
|
|
@@ -11847,10 +11824,6 @@ export {
|
|
|
11847
11824
|
locationGeoSchema,
|
|
11848
11825
|
locationsSchema,
|
|
11849
11826
|
baseResourceFields,
|
|
11850
|
-
AdModel,
|
|
11851
|
-
ParticipantSchema,
|
|
11852
|
-
ChatModel,
|
|
11853
|
-
ChatReportModel,
|
|
11854
11827
|
GoogleImportedMarketModel,
|
|
11855
11828
|
NotificationModel,
|
|
11856
11829
|
PushTokenModel,
|
|
@@ -11889,4 +11862,4 @@ react/cjs/react.development.js:
|
|
|
11889
11862
|
* LICENSE file in the root directory of this source tree.
|
|
11890
11863
|
*)
|
|
11891
11864
|
*/
|
|
11892
|
-
//# sourceMappingURL=chunk-
|
|
11865
|
+
//# sourceMappingURL=chunk-SYUZ3JWK.mjs.map
|