@timardex/cluemart-server-shared 2.5.0 → 2.5.1
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-T5TP2XMR.mjs → chunk-X76LYIOC.mjs} +232 -247
- package/dist/chunk-X76LYIOC.mjs.map +1 -0
- package/dist/index.cjs +239 -256
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +12 -20
- package/dist/index.d.ts +12 -20
- package/dist/index.mjs +238 -253
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +232 -249
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +12 -20
- package/dist/mongoose/index.d.ts +12 -20
- package/dist/mongoose/index.mjs +1 -5
- package/dist/service/index.cjs +238 -247
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-T5TP2XMR.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -319,30 +319,6 @@ var schema4 = new mongoose4.Schema(
|
|
|
319
319
|
schema4.index({ adId: 1, date: 1, placement: 1, platform: 1 }, { unique: true });
|
|
320
320
|
var AdMetricsModel = mongoose4.models.AdMetrics || mongoose4.model("AdMetrics", schema4);
|
|
321
321
|
|
|
322
|
-
// src/mongoose/ad/AdSettings.ts
|
|
323
|
-
import mongoose5 from "mongoose";
|
|
324
|
-
var DEFAULT_AD_SETTINGS = {
|
|
325
|
-
_id: "default",
|
|
326
|
-
approvalRequired: true
|
|
327
|
-
};
|
|
328
|
-
var schema5 = new mongoose5.Schema(
|
|
329
|
-
{
|
|
330
|
-
_id: { default: "default", enum: ["default"], type: String },
|
|
331
|
-
approvalRequired: { default: true, required: true, type: Boolean },
|
|
332
|
-
minAppearancesPerHour: {
|
|
333
|
-
max: 12,
|
|
334
|
-
min: 1,
|
|
335
|
-
type: Number,
|
|
336
|
-
validate: Number.isInteger
|
|
337
|
-
},
|
|
338
|
-
paidSlotsPerPlacement: { enum: [30], immutable: true, type: Number },
|
|
339
|
-
reservedSlotsPerPlacement: { enum: [7], immutable: true, type: Number },
|
|
340
|
-
rotationSeconds: { enum: [8], immutable: true, type: Number }
|
|
341
|
-
},
|
|
342
|
-
{ collection: "adSettings", timestamps: true }
|
|
343
|
-
);
|
|
344
|
-
var AdSettingsModel = mongoose5.models.AdSettings || mongoose5.model("AdSettings", schema5, "adSettings");
|
|
345
|
-
|
|
346
322
|
// src/mongoose/BillingCatalog.ts
|
|
347
323
|
import {
|
|
348
324
|
BILLING_CATALOG_CURRENCY,
|
|
@@ -353,8 +329,8 @@ import {
|
|
|
353
329
|
EnumUserLicence,
|
|
354
330
|
INITIAL_BILLING_CATALOG
|
|
355
331
|
} from "@timardex/cluemart-shared";
|
|
356
|
-
import
|
|
357
|
-
var MongooseSchema2 =
|
|
332
|
+
import mongoose5 from "mongoose";
|
|
333
|
+
var MongooseSchema2 = mongoose5.Schema;
|
|
358
334
|
var BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
|
|
359
335
|
var paidVendorLicences = [
|
|
360
336
|
EnumUserLicence.PRO_VENDOR,
|
|
@@ -401,7 +377,7 @@ var priceHistorySchema = new MongooseSchema2(
|
|
|
401
377
|
default: null,
|
|
402
378
|
ref: "User",
|
|
403
379
|
required: false,
|
|
404
|
-
type:
|
|
380
|
+
type: mongoose5.Schema.Types.ObjectId
|
|
405
381
|
},
|
|
406
382
|
currency: currencyField,
|
|
407
383
|
effectiveFrom: { required: true, type: Date },
|
|
@@ -412,7 +388,7 @@ var priceHistorySchema = new MongooseSchema2(
|
|
|
412
388
|
},
|
|
413
389
|
{ _id: false }
|
|
414
390
|
);
|
|
415
|
-
var
|
|
391
|
+
var schema5 = new MongooseSchema2(
|
|
416
392
|
{
|
|
417
393
|
active: { default: true, required: true, type: Boolean },
|
|
418
394
|
billingPeriod: {
|
|
@@ -468,7 +444,7 @@ var schema6 = new MongooseSchema2(
|
|
|
468
444
|
default: null,
|
|
469
445
|
ref: "User",
|
|
470
446
|
required: false,
|
|
471
|
-
type:
|
|
447
|
+
type: mongoose5.Schema.Types.ObjectId
|
|
472
448
|
}
|
|
473
449
|
},
|
|
474
450
|
{
|
|
@@ -477,7 +453,7 @@ var schema6 = new MongooseSchema2(
|
|
|
477
453
|
timestamps: true
|
|
478
454
|
}
|
|
479
455
|
);
|
|
480
|
-
|
|
456
|
+
schema5.pre("validate", function validateDefinition() {
|
|
481
457
|
if (!billingCatalogDefinitionMatches(this)) {
|
|
482
458
|
this.invalidate(
|
|
483
459
|
"key",
|
|
@@ -485,18 +461,18 @@ schema6.pre("validate", function validateDefinition() {
|
|
|
485
461
|
);
|
|
486
462
|
}
|
|
487
463
|
});
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
464
|
+
schema5.index({ billingPeriod: 1, licenceType: 1 }, { unique: true });
|
|
465
|
+
schema5.index({ active: 1, licenceType: 1 });
|
|
466
|
+
schema5.index(
|
|
491
467
|
{ stripePriceId: 1 },
|
|
492
468
|
{
|
|
493
469
|
partialFilterExpression: { stripePriceId: { $type: "string" } },
|
|
494
470
|
unique: true
|
|
495
471
|
}
|
|
496
472
|
);
|
|
497
|
-
var BillingCatalogModel =
|
|
473
|
+
var BillingCatalogModel = mongoose5.models.BillingCatalogEntry || mongoose5.model(
|
|
498
474
|
"BillingCatalogEntry",
|
|
499
|
-
|
|
475
|
+
schema5,
|
|
500
476
|
BILLING_CATALOG_COLLECTION_NAME
|
|
501
477
|
);
|
|
502
478
|
function buildInitialBillingCatalogEntries(now = /* @__PURE__ */ new Date()) {
|
|
@@ -524,15 +500,15 @@ function getBillingCatalogDefinition(key) {
|
|
|
524
500
|
import {
|
|
525
501
|
EnumChatType
|
|
526
502
|
} from "@timardex/cluemart-shared";
|
|
527
|
-
import
|
|
528
|
-
var MongooseSchema3 =
|
|
503
|
+
import mongoose6 from "mongoose";
|
|
504
|
+
var MongooseSchema3 = mongoose6.Schema;
|
|
529
505
|
var MessageReplyPreviewSchema = new MongooseSchema3(
|
|
530
506
|
{
|
|
531
507
|
contentPreview: { required: true, type: String },
|
|
532
508
|
senderId: {
|
|
533
509
|
ref: "User",
|
|
534
510
|
required: true,
|
|
535
|
-
type:
|
|
511
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
536
512
|
},
|
|
537
513
|
senderName: { required: true, type: String }
|
|
538
514
|
},
|
|
@@ -544,7 +520,7 @@ var MessageReactionSchema = new MongooseSchema3(
|
|
|
544
520
|
userId: {
|
|
545
521
|
ref: "User",
|
|
546
522
|
required: true,
|
|
547
|
-
type:
|
|
523
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
548
524
|
}
|
|
549
525
|
},
|
|
550
526
|
{ _id: false }
|
|
@@ -555,7 +531,7 @@ var MessageSeenSchema = new MongooseSchema3(
|
|
|
555
531
|
userId: {
|
|
556
532
|
ref: "User",
|
|
557
533
|
required: true,
|
|
558
|
-
type:
|
|
534
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
559
535
|
}
|
|
560
536
|
},
|
|
561
537
|
{ _id: false }
|
|
@@ -571,13 +547,13 @@ var MessageSchema = new MongooseSchema3(
|
|
|
571
547
|
replyToMessageId: {
|
|
572
548
|
ref: "Chat.messages",
|
|
573
549
|
required: false,
|
|
574
|
-
type:
|
|
550
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
575
551
|
},
|
|
576
552
|
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
577
553
|
senderId: {
|
|
578
554
|
ref: "User",
|
|
579
555
|
required: true,
|
|
580
|
-
type:
|
|
556
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
581
557
|
}
|
|
582
558
|
},
|
|
583
559
|
{ timestamps: true }
|
|
@@ -590,7 +566,7 @@ var ParticipantSchema = new MongooseSchema3(
|
|
|
590
566
|
userId: {
|
|
591
567
|
ref: "User",
|
|
592
568
|
required: true,
|
|
593
|
-
type:
|
|
569
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
594
570
|
},
|
|
595
571
|
userName: { required: true, type: String }
|
|
596
572
|
},
|
|
@@ -621,14 +597,14 @@ ChatSchema.index({
|
|
|
621
597
|
"participants.userId": 1,
|
|
622
598
|
updatedAt: -1
|
|
623
599
|
});
|
|
624
|
-
var ChatModel =
|
|
600
|
+
var ChatModel = mongoose6.models.Chat || mongoose6.model("Chat", ChatSchema);
|
|
625
601
|
|
|
626
602
|
// src/mongoose/chat/ChatReport.ts
|
|
627
603
|
import {
|
|
628
604
|
EnumChatReportReason
|
|
629
605
|
} from "@timardex/cluemart-shared";
|
|
630
|
-
import
|
|
631
|
-
var MongooseSchema4 =
|
|
606
|
+
import mongoose7 from "mongoose";
|
|
607
|
+
var MongooseSchema4 = mongoose7.Schema;
|
|
632
608
|
var ReasonSchema = new MongooseSchema4(
|
|
633
609
|
{
|
|
634
610
|
details: { default: null, required: false, type: String },
|
|
@@ -645,18 +621,18 @@ var ChatReportSchema = new MongooseSchema4(
|
|
|
645
621
|
chatId: {
|
|
646
622
|
ref: "Chat",
|
|
647
623
|
required: true,
|
|
648
|
-
type:
|
|
624
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
649
625
|
},
|
|
650
626
|
reason: { required: true, type: ReasonSchema },
|
|
651
627
|
reportedUserId: {
|
|
652
628
|
ref: "User",
|
|
653
629
|
required: true,
|
|
654
|
-
type:
|
|
630
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
655
631
|
},
|
|
656
632
|
reporterUserId: {
|
|
657
633
|
ref: "User",
|
|
658
634
|
required: true,
|
|
659
|
-
type:
|
|
635
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
660
636
|
},
|
|
661
637
|
resolved: { default: false, required: true, type: Boolean }
|
|
662
638
|
},
|
|
@@ -664,7 +640,7 @@ var ChatReportSchema = new MongooseSchema4(
|
|
|
664
640
|
);
|
|
665
641
|
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
666
642
|
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
667
|
-
var ChatReportModel =
|
|
643
|
+
var ChatReportModel = mongoose7.models.ChatReport || mongoose7.model("ChatReport", ChatReportSchema);
|
|
668
644
|
|
|
669
645
|
// src/mongoose/global.ts
|
|
670
646
|
import {
|
|
@@ -672,15 +648,15 @@ import {
|
|
|
672
648
|
EnumPostType,
|
|
673
649
|
EnumUserLicence as EnumUserLicence2
|
|
674
650
|
} from "@timardex/cluemart-shared";
|
|
675
|
-
import
|
|
676
|
-
var MongooseSchema5 =
|
|
651
|
+
import mongoose8 from "mongoose";
|
|
652
|
+
var MongooseSchema5 = mongoose8.Schema;
|
|
677
653
|
var OwnerTypeSchema = new MongooseSchema5(
|
|
678
654
|
{
|
|
679
655
|
email: { required: true, type: String },
|
|
680
656
|
userId: {
|
|
681
657
|
ref: "User",
|
|
682
658
|
required: true,
|
|
683
|
-
type:
|
|
659
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
684
660
|
}
|
|
685
661
|
},
|
|
686
662
|
{ _id: false }
|
|
@@ -823,7 +799,7 @@ var relatedPostSchema = new MongooseSchema5(
|
|
|
823
799
|
postId: {
|
|
824
800
|
ref: "Post",
|
|
825
801
|
required: true,
|
|
826
|
-
type:
|
|
802
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
827
803
|
},
|
|
828
804
|
postSlug: { required: true, type: String },
|
|
829
805
|
postType: {
|
|
@@ -848,7 +824,7 @@ var baseResourceFields = {
|
|
|
848
824
|
adIds: {
|
|
849
825
|
ref: "Ad",
|
|
850
826
|
required: false,
|
|
851
|
-
type: [
|
|
827
|
+
type: [mongoose8.Schema.Types.ObjectId]
|
|
852
828
|
},
|
|
853
829
|
approvedAt: { default: null, required: false, type: Date },
|
|
854
830
|
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
@@ -881,7 +857,7 @@ var baseResourceFields = {
|
|
|
881
857
|
import {
|
|
882
858
|
EnumEventType
|
|
883
859
|
} from "@timardex/cluemart-shared";
|
|
884
|
-
import
|
|
860
|
+
import mongoose9 from "mongoose";
|
|
885
861
|
|
|
886
862
|
// src/mongoose/searchNamePlugin.ts
|
|
887
863
|
function deriveSearchName(name) {
|
|
@@ -927,15 +903,15 @@ function syncSearchNameInUpdate(update) {
|
|
|
927
903
|
}
|
|
928
904
|
return null;
|
|
929
905
|
}
|
|
930
|
-
function searchNamePlugin(
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
906
|
+
function searchNamePlugin(schema24) {
|
|
907
|
+
schema24.add({ searchName: { default: "", required: false, type: String } });
|
|
908
|
+
schema24.index({ searchName: 1 });
|
|
909
|
+
schema24.pre("save", function syncSearchNameOnSave(next) {
|
|
934
910
|
const doc = this;
|
|
935
911
|
doc.searchName = deriveSearchName(doc.name);
|
|
936
912
|
next();
|
|
937
913
|
});
|
|
938
|
-
|
|
914
|
+
schema24.pre("insertMany", function syncSearchNameOnInsertMany(next, docs) {
|
|
939
915
|
const list = Array.isArray(docs) ? docs : [docs];
|
|
940
916
|
for (const doc of list) {
|
|
941
917
|
if (doc && typeof doc.name === "string") {
|
|
@@ -944,7 +920,7 @@ function searchNamePlugin(schema25) {
|
|
|
944
920
|
}
|
|
945
921
|
next();
|
|
946
922
|
});
|
|
947
|
-
|
|
923
|
+
schema24.pre("bulkWrite", function syncSearchNameOnBulkWrite(next, ops) {
|
|
948
924
|
for (const op of ops) {
|
|
949
925
|
const doc = op.insertOne?.document ?? op.replaceOne?.replacement;
|
|
950
926
|
if (doc && typeof doc.name === "string") {
|
|
@@ -970,14 +946,14 @@ function searchNamePlugin(schema25) {
|
|
|
970
946
|
}
|
|
971
947
|
next();
|
|
972
948
|
};
|
|
973
|
-
|
|
949
|
+
schema24.pre(
|
|
974
950
|
["findOneAndUpdate", "updateOne", "updateMany"],
|
|
975
951
|
syncSearchNameOnUpdate
|
|
976
952
|
);
|
|
977
953
|
}
|
|
978
954
|
|
|
979
955
|
// src/mongoose/GoogleImportedMarket.ts
|
|
980
|
-
var MongooseSchema6 =
|
|
956
|
+
var MongooseSchema6 = mongoose9.Schema;
|
|
981
957
|
var addressComponentSchema = new MongooseSchema6(
|
|
982
958
|
{
|
|
983
959
|
longName: { required: false, type: String },
|
|
@@ -986,7 +962,7 @@ var addressComponentSchema = new MongooseSchema6(
|
|
|
986
962
|
},
|
|
987
963
|
{ _id: false }
|
|
988
964
|
);
|
|
989
|
-
var
|
|
965
|
+
var schema6 = new MongooseSchema6(
|
|
990
966
|
{
|
|
991
967
|
active: { default: false, required: true, type: Boolean },
|
|
992
968
|
address: { required: true, type: String },
|
|
@@ -998,7 +974,7 @@ var schema7 = new MongooseSchema6(
|
|
|
998
974
|
claimedByUserId: {
|
|
999
975
|
ref: "User",
|
|
1000
976
|
required: false,
|
|
1001
|
-
type:
|
|
977
|
+
type: mongoose9.Schema.Types.ObjectId
|
|
1002
978
|
},
|
|
1003
979
|
cover: {
|
|
1004
980
|
required: false,
|
|
@@ -1010,7 +986,7 @@ var schema7 = new MongooseSchema6(
|
|
|
1010
986
|
eventId: {
|
|
1011
987
|
ref: "Event",
|
|
1012
988
|
required: false,
|
|
1013
|
-
type:
|
|
989
|
+
type: mongoose9.Schema.Types.ObjectId
|
|
1014
990
|
},
|
|
1015
991
|
eventType: {
|
|
1016
992
|
enum: Object.values(EnumEventType),
|
|
@@ -1044,23 +1020,23 @@ var schema7 = new MongooseSchema6(
|
|
|
1044
1020
|
},
|
|
1045
1021
|
{ timestamps: true }
|
|
1046
1022
|
);
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
var GoogleImportedMarketModel =
|
|
1023
|
+
schema6.index({ "location.geo": "2dsphere" });
|
|
1024
|
+
schema6.index({ name: 1 });
|
|
1025
|
+
schema6.index({ region: 1 });
|
|
1026
|
+
schema6.index({ deletedAt: 1 });
|
|
1027
|
+
schema6.index({ "dateTime.dateStatus": 1 });
|
|
1028
|
+
schema6.index({ slug: 1 });
|
|
1029
|
+
schema6.index({ description: "text", name: "text" });
|
|
1030
|
+
schema6.plugin(searchNamePlugin);
|
|
1031
|
+
var GoogleImportedMarketModel = mongoose9.models.GoogleImportedMarket || mongoose9.model("GoogleImportedMarket", schema6);
|
|
1056
1032
|
|
|
1057
1033
|
// src/mongoose/Notification.ts
|
|
1058
1034
|
import {
|
|
1059
1035
|
EnumNotificationResourceType,
|
|
1060
1036
|
EnumNotificationType
|
|
1061
1037
|
} from "@timardex/cluemart-shared";
|
|
1062
|
-
import
|
|
1063
|
-
var MongooseSchema7 =
|
|
1038
|
+
import mongoose10 from "mongoose";
|
|
1039
|
+
var MongooseSchema7 = mongoose10.Schema;
|
|
1064
1040
|
var notificationDataSchema = new MongooseSchema7(
|
|
1065
1041
|
{
|
|
1066
1042
|
resourceId: { required: true, type: String },
|
|
@@ -1073,7 +1049,7 @@ var notificationDataSchema = new MongooseSchema7(
|
|
|
1073
1049
|
},
|
|
1074
1050
|
{ _id: false }
|
|
1075
1051
|
);
|
|
1076
|
-
var
|
|
1052
|
+
var schema7 = new MongooseSchema7(
|
|
1077
1053
|
{
|
|
1078
1054
|
data: {
|
|
1079
1055
|
default: null,
|
|
@@ -1092,20 +1068,20 @@ var schema8 = new MongooseSchema7(
|
|
|
1092
1068
|
userId: {
|
|
1093
1069
|
ref: "User",
|
|
1094
1070
|
required: true,
|
|
1095
|
-
type:
|
|
1071
|
+
type: mongoose10.Schema.Types.ObjectId
|
|
1096
1072
|
}
|
|
1097
1073
|
},
|
|
1098
1074
|
{ timestamps: true }
|
|
1099
1075
|
);
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
var NotificationModel =
|
|
1076
|
+
schema7.index({ isRead: 1, userId: 1 });
|
|
1077
|
+
schema7.index({ createdAt: -1, userId: 1 });
|
|
1078
|
+
var NotificationModel = mongoose10.models.Notification || mongoose10.model("Notification", schema7);
|
|
1103
1079
|
|
|
1104
1080
|
// src/mongoose/PushToken.ts
|
|
1105
1081
|
import { EnumOSPlatform } from "@timardex/cluemart-shared/enums";
|
|
1106
|
-
import
|
|
1107
|
-
var MongooseSchema8 =
|
|
1108
|
-
var
|
|
1082
|
+
import mongoose11 from "mongoose";
|
|
1083
|
+
var MongooseSchema8 = mongoose11.Schema;
|
|
1084
|
+
var schema8 = new MongooseSchema8(
|
|
1109
1085
|
{
|
|
1110
1086
|
platform: {
|
|
1111
1087
|
enum: Object.values(EnumOSPlatform),
|
|
@@ -1116,12 +1092,12 @@ var schema9 = new MongooseSchema8(
|
|
|
1116
1092
|
userId: {
|
|
1117
1093
|
ref: "User",
|
|
1118
1094
|
required: true,
|
|
1119
|
-
type:
|
|
1095
|
+
type: mongoose11.Schema.Types.ObjectId
|
|
1120
1096
|
}
|
|
1121
1097
|
},
|
|
1122
1098
|
{ timestamps: true }
|
|
1123
1099
|
);
|
|
1124
|
-
var PushTokenModel =
|
|
1100
|
+
var PushTokenModel = mongoose11.models.PushToken || mongoose11.model("PushToken", schema8);
|
|
1125
1101
|
|
|
1126
1102
|
// src/mongoose/Relation.ts
|
|
1127
1103
|
import {
|
|
@@ -1130,15 +1106,15 @@ import {
|
|
|
1130
1106
|
EnumRelationResource,
|
|
1131
1107
|
EnumResourceType as EnumResourceType2
|
|
1132
1108
|
} from "@timardex/cluemart-shared";
|
|
1133
|
-
import
|
|
1109
|
+
import mongoose13 from "mongoose";
|
|
1134
1110
|
|
|
1135
1111
|
// src/mongoose/event/EventInfo.ts
|
|
1136
1112
|
import {
|
|
1137
1113
|
EnumEventDateStatus as EnumEventDateStatus2,
|
|
1138
1114
|
EnumPaymentMethod
|
|
1139
1115
|
} from "@timardex/cluemart-shared";
|
|
1140
|
-
import
|
|
1141
|
-
var MongooseSchema9 =
|
|
1116
|
+
import mongoose12 from "mongoose";
|
|
1117
|
+
var MongooseSchema9 = mongoose12.Schema;
|
|
1142
1118
|
var StallTypeSchema = new MongooseSchema9(
|
|
1143
1119
|
{
|
|
1144
1120
|
label: { required: false, type: String },
|
|
@@ -1199,7 +1175,7 @@ var refundPolicySchema = new MongooseSchema9(
|
|
|
1199
1175
|
},
|
|
1200
1176
|
{ _id: false }
|
|
1201
1177
|
);
|
|
1202
|
-
var
|
|
1178
|
+
var schema9 = new MongooseSchema9(
|
|
1203
1179
|
{
|
|
1204
1180
|
active: { default: true, type: Boolean },
|
|
1205
1181
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -1207,7 +1183,7 @@ var schema10 = new MongooseSchema9(
|
|
|
1207
1183
|
eventId: {
|
|
1208
1184
|
ref: "Event",
|
|
1209
1185
|
required: true,
|
|
1210
|
-
type:
|
|
1186
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
1211
1187
|
},
|
|
1212
1188
|
packInTime: { required: true, type: Number },
|
|
1213
1189
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -1217,11 +1193,11 @@ var schema10 = new MongooseSchema9(
|
|
|
1217
1193
|
},
|
|
1218
1194
|
{ timestamps: true }
|
|
1219
1195
|
);
|
|
1220
|
-
|
|
1221
|
-
var EventInfoModel =
|
|
1196
|
+
schema9.index({ eventId: 1 });
|
|
1197
|
+
var EventInfoModel = mongoose12.models.EventInfo || mongoose12.model("EventInfo", schema9);
|
|
1222
1198
|
|
|
1223
1199
|
// src/mongoose/Relation.ts
|
|
1224
|
-
var MongooseSchema10 =
|
|
1200
|
+
var MongooseSchema10 = mongoose13.Schema;
|
|
1225
1201
|
var relationDateTimeSchema = new MongooseSchema10(
|
|
1226
1202
|
{
|
|
1227
1203
|
dateStatus: {
|
|
@@ -1262,13 +1238,13 @@ var RelationTypeSchema = new MongooseSchema10(
|
|
|
1262
1238
|
chatId: {
|
|
1263
1239
|
ref: "Chat",
|
|
1264
1240
|
required: true,
|
|
1265
|
-
type:
|
|
1241
|
+
type: mongoose13.Schema.Types.ObjectId
|
|
1266
1242
|
},
|
|
1267
1243
|
deletedAt: { default: null, required: false, type: Date },
|
|
1268
1244
|
eventId: {
|
|
1269
1245
|
ref: "Event",
|
|
1270
1246
|
required: true,
|
|
1271
|
-
type:
|
|
1247
|
+
type: mongoose13.Schema.Types.ObjectId
|
|
1272
1248
|
},
|
|
1273
1249
|
lastUpdateBy: {
|
|
1274
1250
|
enum: Object.values(EnumResourceType2),
|
|
@@ -1284,7 +1260,7 @@ var RelationTypeSchema = new MongooseSchema10(
|
|
|
1284
1260
|
vendorId: {
|
|
1285
1261
|
ref: "Vendor",
|
|
1286
1262
|
required: true,
|
|
1287
|
-
type:
|
|
1263
|
+
type: mongoose13.Schema.Types.ObjectId
|
|
1288
1264
|
}
|
|
1289
1265
|
},
|
|
1290
1266
|
{ timestamps: true }
|
|
@@ -1296,7 +1272,7 @@ RelationTypeSchema.index({
|
|
|
1296
1272
|
"relationDates.status": 1,
|
|
1297
1273
|
vendorId: 1
|
|
1298
1274
|
});
|
|
1299
|
-
var RelationModel =
|
|
1275
|
+
var RelationModel = mongoose13.models.Relation || mongoose13.model("Relation", RelationTypeSchema);
|
|
1300
1276
|
|
|
1301
1277
|
// src/mongoose/ResourceActivity.ts
|
|
1302
1278
|
import {
|
|
@@ -1305,8 +1281,8 @@ import {
|
|
|
1305
1281
|
EnumOSPlatform as EnumOSPlatform2,
|
|
1306
1282
|
EnumResourceType as EnumResourceType3
|
|
1307
1283
|
} from "@timardex/cluemart-shared";
|
|
1308
|
-
import
|
|
1309
|
-
var MongooseSchema11 =
|
|
1284
|
+
import mongoose14 from "mongoose";
|
|
1285
|
+
var MongooseSchema11 = mongoose14.Schema;
|
|
1310
1286
|
var ActivitySchema = new MongooseSchema11(
|
|
1311
1287
|
{
|
|
1312
1288
|
activityType: {
|
|
@@ -1335,7 +1311,7 @@ var ActivitySchema = new MongooseSchema11(
|
|
|
1335
1311
|
},
|
|
1336
1312
|
{ _id: false }
|
|
1337
1313
|
);
|
|
1338
|
-
var
|
|
1314
|
+
var schema10 = new MongooseSchema11(
|
|
1339
1315
|
{
|
|
1340
1316
|
activity: { default: [], type: [ActivitySchema] },
|
|
1341
1317
|
resourceId: { required: true, type: String },
|
|
@@ -1347,9 +1323,9 @@ var schema11 = new MongooseSchema11(
|
|
|
1347
1323
|
},
|
|
1348
1324
|
{ timestamps: true }
|
|
1349
1325
|
);
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
var ResourceActivityModel =
|
|
1326
|
+
schema10.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
1327
|
+
schema10.index({ "views.location": "2dsphere" });
|
|
1328
|
+
var ResourceActivityModel = mongoose14.models.ResourceActivity || mongoose14.model("ResourceActivity", schema10);
|
|
1353
1329
|
|
|
1354
1330
|
// src/mongoose/User.ts
|
|
1355
1331
|
import {
|
|
@@ -1363,15 +1339,15 @@ import {
|
|
|
1363
1339
|
EnumUserLicence as EnumUserLicence3,
|
|
1364
1340
|
EnumUserRole
|
|
1365
1341
|
} from "@timardex/cluemart-shared";
|
|
1366
|
-
import
|
|
1367
|
-
var MongooseSchema12 =
|
|
1342
|
+
import mongoose15 from "mongoose";
|
|
1343
|
+
var MongooseSchema12 = mongoose15.Schema;
|
|
1368
1344
|
var userActivityEventSchema = new MongooseSchema12(
|
|
1369
1345
|
{
|
|
1370
1346
|
dateTime: dateTimeSchema,
|
|
1371
1347
|
resourceId: {
|
|
1372
1348
|
ref: "Event",
|
|
1373
1349
|
required: false,
|
|
1374
|
-
type:
|
|
1350
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1375
1351
|
}
|
|
1376
1352
|
},
|
|
1377
1353
|
{ _id: false }
|
|
@@ -1381,17 +1357,17 @@ var userActivityFavouritesSchema = new MongooseSchema12(
|
|
|
1381
1357
|
events: {
|
|
1382
1358
|
ref: "Event",
|
|
1383
1359
|
required: false,
|
|
1384
|
-
type: [
|
|
1360
|
+
type: [mongoose15.Schema.Types.ObjectId]
|
|
1385
1361
|
},
|
|
1386
1362
|
partners: {
|
|
1387
1363
|
ref: "Partner",
|
|
1388
1364
|
required: false,
|
|
1389
|
-
type: [
|
|
1365
|
+
type: [mongoose15.Schema.Types.ObjectId]
|
|
1390
1366
|
},
|
|
1391
1367
|
vendors: {
|
|
1392
1368
|
ref: "Vendor",
|
|
1393
1369
|
required: false,
|
|
1394
|
-
type: [
|
|
1370
|
+
type: [mongoose15.Schema.Types.ObjectId]
|
|
1395
1371
|
}
|
|
1396
1372
|
},
|
|
1397
1373
|
{ _id: false }
|
|
@@ -1503,13 +1479,13 @@ var userOverallPointsSchema = new MongooseSchema12(
|
|
|
1503
1479
|
},
|
|
1504
1480
|
{ _id: false }
|
|
1505
1481
|
);
|
|
1506
|
-
var
|
|
1482
|
+
var schema11 = new MongooseSchema12(
|
|
1507
1483
|
{
|
|
1508
1484
|
active: { default: false, required: true, type: Boolean },
|
|
1509
1485
|
affiliate: {
|
|
1510
1486
|
ref: "Affiliate",
|
|
1511
1487
|
required: false,
|
|
1512
|
-
type:
|
|
1488
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1513
1489
|
},
|
|
1514
1490
|
avatar: {
|
|
1515
1491
|
required: false,
|
|
@@ -1518,7 +1494,7 @@ var schema12 = new MongooseSchema12(
|
|
|
1518
1494
|
coupon: {
|
|
1519
1495
|
ref: "Coupon",
|
|
1520
1496
|
required: false,
|
|
1521
|
-
type:
|
|
1497
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1522
1498
|
},
|
|
1523
1499
|
deletedAt: { default: null, required: false, type: Date },
|
|
1524
1500
|
email: { required: true, type: String },
|
|
@@ -1530,13 +1506,13 @@ var schema12 = new MongooseSchema12(
|
|
|
1530
1506
|
events: {
|
|
1531
1507
|
ref: "Event",
|
|
1532
1508
|
required: false,
|
|
1533
|
-
type: [
|
|
1509
|
+
type: [mongoose15.Schema.Types.ObjectId]
|
|
1534
1510
|
},
|
|
1535
1511
|
firstName: { required: true, type: String },
|
|
1536
1512
|
game: {
|
|
1537
1513
|
ref: "Game",
|
|
1538
1514
|
required: false,
|
|
1539
|
-
type:
|
|
1515
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1540
1516
|
},
|
|
1541
1517
|
interests: {
|
|
1542
1518
|
enum: Object.values(EnumResourceType4),
|
|
@@ -1562,7 +1538,7 @@ var schema12 = new MongooseSchema12(
|
|
|
1562
1538
|
partner: {
|
|
1563
1539
|
ref: "Partner",
|
|
1564
1540
|
required: false,
|
|
1565
|
-
type:
|
|
1541
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1566
1542
|
},
|
|
1567
1543
|
password: { required: true, type: String },
|
|
1568
1544
|
platform: {
|
|
@@ -1595,7 +1571,7 @@ var schema12 = new MongooseSchema12(
|
|
|
1595
1571
|
school: {
|
|
1596
1572
|
ref: "School",
|
|
1597
1573
|
required: false,
|
|
1598
|
-
type:
|
|
1574
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1599
1575
|
},
|
|
1600
1576
|
stripe: {
|
|
1601
1577
|
required: false,
|
|
@@ -1620,21 +1596,21 @@ var schema12 = new MongooseSchema12(
|
|
|
1620
1596
|
vendor: {
|
|
1621
1597
|
ref: "Vendor",
|
|
1622
1598
|
required: false,
|
|
1623
|
-
type:
|
|
1599
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
1624
1600
|
}
|
|
1625
1601
|
},
|
|
1626
1602
|
{ strict: false, timestamps: true }
|
|
1627
1603
|
);
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
var UserModel =
|
|
1604
|
+
schema11.index({ "licences.expiryDate": 1 });
|
|
1605
|
+
schema11.index({ "licences.licenceType": 1 });
|
|
1606
|
+
schema11.index({ promoCodes: 1, active: 1, deletedAt: 1 });
|
|
1607
|
+
schema11.index({ email: "text", firstName: "text", lastName: "text" });
|
|
1608
|
+
var UserModel = mongoose15.models.User || mongoose15.model("User", schema11);
|
|
1633
1609
|
|
|
1634
1610
|
// src/mongoose/VerificationToken.ts
|
|
1635
|
-
import
|
|
1636
|
-
var MongooseSchema13 =
|
|
1637
|
-
var
|
|
1611
|
+
import mongoose16 from "mongoose";
|
|
1612
|
+
var MongooseSchema13 = mongoose16.Schema;
|
|
1613
|
+
var schema12 = new MongooseSchema13(
|
|
1638
1614
|
{
|
|
1639
1615
|
createdAt: {
|
|
1640
1616
|
default: Date.now,
|
|
@@ -1649,15 +1625,15 @@ var schema13 = new MongooseSchema13(
|
|
|
1649
1625
|
},
|
|
1650
1626
|
{ timestamps: true }
|
|
1651
1627
|
);
|
|
1652
|
-
var VerificationTokenModel =
|
|
1628
|
+
var VerificationTokenModel = mongoose16.models.VerificationToken || mongoose16.model("VerificationToken", schema12);
|
|
1653
1629
|
|
|
1654
1630
|
// src/mongoose/vendor/Vendor.ts
|
|
1655
1631
|
import {
|
|
1656
1632
|
EnumEventDateStatus as EnumEventDateStatus5,
|
|
1657
1633
|
EnumVendorType
|
|
1658
1634
|
} from "@timardex/cluemart-shared";
|
|
1659
|
-
import
|
|
1660
|
-
var MongooseSchema14 =
|
|
1635
|
+
import mongoose17 from "mongoose";
|
|
1636
|
+
var MongooseSchema14 = mongoose17.Schema;
|
|
1661
1637
|
var vendorProductTypeSchema = new MongooseSchema14(
|
|
1662
1638
|
{
|
|
1663
1639
|
description: { required: false, type: String },
|
|
@@ -1720,7 +1696,7 @@ var downgradeSnapshotSchema = new MongooseSchema14(
|
|
|
1720
1696
|
},
|
|
1721
1697
|
{ _id: false }
|
|
1722
1698
|
);
|
|
1723
|
-
var
|
|
1699
|
+
var schema13 = new MongooseSchema14(
|
|
1724
1700
|
{
|
|
1725
1701
|
...baseResourceFields,
|
|
1726
1702
|
// Importing base resource fields from global.ts
|
|
@@ -1739,12 +1715,12 @@ var schema14 = new MongooseSchema14(
|
|
|
1739
1715
|
unregisteredVendorId: {
|
|
1740
1716
|
ref: "UnregisteredVendor",
|
|
1741
1717
|
required: false,
|
|
1742
|
-
type:
|
|
1718
|
+
type: mongoose17.Schema.Types.ObjectId
|
|
1743
1719
|
},
|
|
1744
1720
|
vendorInfoId: {
|
|
1745
1721
|
ref: "VendorInfo",
|
|
1746
1722
|
required: false,
|
|
1747
|
-
type:
|
|
1723
|
+
type: mongoose17.Schema.Types.ObjectId
|
|
1748
1724
|
},
|
|
1749
1725
|
vendorType: {
|
|
1750
1726
|
enum: Object.values(EnumVendorType),
|
|
@@ -1754,26 +1730,26 @@ var schema14 = new MongooseSchema14(
|
|
|
1754
1730
|
},
|
|
1755
1731
|
{ timestamps: true }
|
|
1756
1732
|
);
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1733
|
+
schema13.index({ name: 1 });
|
|
1734
|
+
schema13.index({ description: 1 });
|
|
1735
|
+
schema13.index({ region: 1 });
|
|
1736
|
+
schema13.index({ "categories.name": 1 });
|
|
1737
|
+
schema13.index({ slug: 1 });
|
|
1738
|
+
schema13.index({
|
|
1763
1739
|
categoriesNames: "text",
|
|
1764
1740
|
description: "text",
|
|
1765
1741
|
name: "text"
|
|
1766
1742
|
});
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
var VendorModel =
|
|
1743
|
+
schema13.index({ deletedAt: 1, "owner.userId": 1 });
|
|
1744
|
+
schema13.plugin(searchNamePlugin);
|
|
1745
|
+
var VendorModel = mongoose17.models.Vendor || mongoose17.model("Vendor", schema13);
|
|
1770
1746
|
|
|
1771
1747
|
// src/mongoose/vendor/VendorInfo.ts
|
|
1772
1748
|
import {
|
|
1773
1749
|
EnumFoodFlavor
|
|
1774
1750
|
} from "@timardex/cluemart-shared";
|
|
1775
|
-
import
|
|
1776
|
-
var MongooseSchema15 =
|
|
1751
|
+
import mongoose18 from "mongoose";
|
|
1752
|
+
var MongooseSchema15 = mongoose18.Schema;
|
|
1777
1753
|
var AttributesSchema = new MongooseSchema15(
|
|
1778
1754
|
{
|
|
1779
1755
|
details: { required: false, type: String },
|
|
@@ -1781,7 +1757,7 @@ var AttributesSchema = new MongooseSchema15(
|
|
|
1781
1757
|
},
|
|
1782
1758
|
{ _id: false }
|
|
1783
1759
|
);
|
|
1784
|
-
var
|
|
1760
|
+
var schema14 = new MongooseSchema15(
|
|
1785
1761
|
{
|
|
1786
1762
|
active: { default: true, type: Boolean },
|
|
1787
1763
|
compliance: {
|
|
@@ -1816,29 +1792,29 @@ var schema15 = new MongooseSchema15(
|
|
|
1816
1792
|
vendorId: {
|
|
1817
1793
|
ref: "Vendor",
|
|
1818
1794
|
required: true,
|
|
1819
|
-
type:
|
|
1795
|
+
type: mongoose18.Schema.Types.ObjectId
|
|
1820
1796
|
}
|
|
1821
1797
|
},
|
|
1822
1798
|
{ timestamps: true }
|
|
1823
1799
|
);
|
|
1824
|
-
|
|
1825
|
-
var VendorInfoModel =
|
|
1800
|
+
schema14.index({ vendorId: 1 });
|
|
1801
|
+
var VendorInfoModel = mongoose18.models.VendorInfo || mongoose18.model("VendorInfo", schema14);
|
|
1826
1802
|
|
|
1827
1803
|
// src/mongoose/vendor/UnregisteredVendor.ts
|
|
1828
|
-
import
|
|
1829
|
-
var MongooseSchema16 =
|
|
1804
|
+
import mongoose19 from "mongoose";
|
|
1805
|
+
var MongooseSchema16 = mongoose19.Schema;
|
|
1830
1806
|
var invitationSchema = new MongooseSchema16(
|
|
1831
1807
|
{
|
|
1832
1808
|
dateTime: { required: true, type: [dateTimeSchema] },
|
|
1833
1809
|
inviterId: {
|
|
1834
1810
|
ref: "Event",
|
|
1835
1811
|
required: true,
|
|
1836
|
-
type:
|
|
1812
|
+
type: mongoose19.Schema.Types.ObjectId
|
|
1837
1813
|
}
|
|
1838
1814
|
},
|
|
1839
1815
|
{ _id: false }
|
|
1840
1816
|
);
|
|
1841
|
-
var
|
|
1817
|
+
var schema15 = new MongooseSchema16(
|
|
1842
1818
|
{
|
|
1843
1819
|
active: { default: true, required: true, type: Boolean },
|
|
1844
1820
|
categoryIds: { required: true, type: [String] },
|
|
@@ -1847,7 +1823,7 @@ var schema16 = new MongooseSchema16(
|
|
|
1847
1823
|
claimedByUserId: {
|
|
1848
1824
|
ref: "User",
|
|
1849
1825
|
required: false,
|
|
1850
|
-
type:
|
|
1826
|
+
type: mongoose19.Schema.Types.ObjectId
|
|
1851
1827
|
},
|
|
1852
1828
|
claimInitiatedAt: { default: null, required: false, type: Date },
|
|
1853
1829
|
claimToken: { default: null, required: false, type: String },
|
|
@@ -1860,15 +1836,15 @@ var schema16 = new MongooseSchema16(
|
|
|
1860
1836
|
},
|
|
1861
1837
|
{ timestamps: true }
|
|
1862
1838
|
);
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
var UnregisteredVendorModel =
|
|
1839
|
+
schema15.index({ name: 1 });
|
|
1840
|
+
schema15.index({ email: 1 });
|
|
1841
|
+
var UnregisteredVendorModel = mongoose19.models.UnregisteredVendor || mongoose19.model("UnregisteredVendor", schema15);
|
|
1866
1842
|
|
|
1867
1843
|
// src/mongoose/event/Event.ts
|
|
1868
1844
|
import { EnumEventType as EnumEventType2 } from "@timardex/cluemart-shared";
|
|
1869
|
-
import
|
|
1870
|
-
var MongooseSchema17 =
|
|
1871
|
-
var
|
|
1845
|
+
import mongoose20 from "mongoose";
|
|
1846
|
+
var MongooseSchema17 = mongoose20.Schema;
|
|
1847
|
+
var schema16 = new MongooseSchema17(
|
|
1872
1848
|
{
|
|
1873
1849
|
...baseResourceFields,
|
|
1874
1850
|
// Importing base resource fields from global.ts
|
|
@@ -1877,7 +1853,7 @@ var schema17 = new MongooseSchema17(
|
|
|
1877
1853
|
eventInfoId: {
|
|
1878
1854
|
ref: "EventInfo",
|
|
1879
1855
|
required: false,
|
|
1880
|
-
type:
|
|
1856
|
+
type: mongoose20.Schema.Types.ObjectId
|
|
1881
1857
|
},
|
|
1882
1858
|
eventType: {
|
|
1883
1859
|
enum: Object.values(EnumEventType2),
|
|
@@ -1901,40 +1877,40 @@ var schema17 = new MongooseSchema17(
|
|
|
1901
1877
|
},
|
|
1902
1878
|
{ timestamps: true }
|
|
1903
1879
|
);
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
var EventModel =
|
|
1880
|
+
schema16.index({ name: 1 });
|
|
1881
|
+
schema16.index({ description: 1 });
|
|
1882
|
+
schema16.index({ region: 1 });
|
|
1883
|
+
schema16.index({ "location.geo": "2dsphere" });
|
|
1884
|
+
schema16.index({ tags: 1 });
|
|
1885
|
+
schema16.index({ deletedAt: 1 });
|
|
1886
|
+
schema16.index({ "dateTime.dateStatus": 1 });
|
|
1887
|
+
schema16.index({ slug: 1 });
|
|
1888
|
+
schema16.index({ description: "text", name: "text", tags: "text" });
|
|
1889
|
+
schema16.index({ deletedAt: 1, "owner.userId": 1 });
|
|
1890
|
+
schema16.plugin(searchNamePlugin);
|
|
1891
|
+
var EventModel = mongoose20.models.Event || mongoose20.model("Event", schema16);
|
|
1916
1892
|
|
|
1917
1893
|
// src/mongoose/event/EventDateArchive.ts
|
|
1918
|
-
import
|
|
1919
|
-
var
|
|
1894
|
+
import mongoose21 from "mongoose";
|
|
1895
|
+
var schema17 = new mongoose21.Schema(
|
|
1920
1896
|
{
|
|
1921
1897
|
dateTime: { required: true, type: [dateTimeSchema] },
|
|
1922
1898
|
eventId: {
|
|
1923
1899
|
ref: "Event",
|
|
1924
1900
|
required: true,
|
|
1925
|
-
type:
|
|
1901
|
+
type: mongoose21.Schema.Types.ObjectId
|
|
1926
1902
|
}
|
|
1927
1903
|
},
|
|
1928
1904
|
{ timestamps: true }
|
|
1929
1905
|
);
|
|
1930
|
-
|
|
1931
|
-
var EventDateArchiveModel =
|
|
1906
|
+
schema17.index({ eventId: 1 }, { unique: true });
|
|
1907
|
+
var EventDateArchiveModel = mongoose21.models.EventDateArchive || mongoose21.model("EventDateArchive", schema17);
|
|
1932
1908
|
|
|
1933
1909
|
// src/mongoose/Partner.ts
|
|
1934
1910
|
import { EnumPartnerType } from "@timardex/cluemart-shared";
|
|
1935
|
-
import
|
|
1936
|
-
var MongooseSchema18 =
|
|
1937
|
-
var
|
|
1911
|
+
import mongoose22 from "mongoose";
|
|
1912
|
+
var MongooseSchema18 = mongoose22.Schema;
|
|
1913
|
+
var schema18 = new MongooseSchema18(
|
|
1938
1914
|
{
|
|
1939
1915
|
...baseResourceFields,
|
|
1940
1916
|
location: {
|
|
@@ -1950,15 +1926,15 @@ var schema19 = new MongooseSchema18(
|
|
|
1950
1926
|
},
|
|
1951
1927
|
{ timestamps: true }
|
|
1952
1928
|
);
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
var PartnerModel =
|
|
1929
|
+
schema18.index({ name: 1 });
|
|
1930
|
+
schema18.index({ description: 1 });
|
|
1931
|
+
schema18.index({ region: 1 });
|
|
1932
|
+
schema18.index({ "location.geo": "2dsphere" });
|
|
1933
|
+
schema18.index({ slug: 1 });
|
|
1934
|
+
schema18.index({ name: "text", description: "text" });
|
|
1935
|
+
schema18.index({ "owner.userId": 1, deletedAt: 1 });
|
|
1936
|
+
schema18.plugin(searchNamePlugin);
|
|
1937
|
+
var PartnerModel = mongoose22.models.Partner || mongoose22.model("Partner", schema18);
|
|
1962
1938
|
|
|
1963
1939
|
// src/mongoose/Post.ts
|
|
1964
1940
|
import {
|
|
@@ -1966,8 +1942,8 @@ import {
|
|
|
1966
1942
|
EnumPostType as EnumPostType2,
|
|
1967
1943
|
EnumResourceType as EnumResourceType5
|
|
1968
1944
|
} from "@timardex/cluemart-shared";
|
|
1969
|
-
import
|
|
1970
|
-
var MongooseSchema19 =
|
|
1945
|
+
import mongoose23, { Schema } from "mongoose";
|
|
1946
|
+
var MongooseSchema19 = mongoose23.Schema;
|
|
1971
1947
|
var contentSchema = new MongooseSchema19(
|
|
1972
1948
|
{
|
|
1973
1949
|
contentData: Schema.Types.Mixed,
|
|
@@ -1993,7 +1969,7 @@ var resourceSchema = new MongooseSchema19(
|
|
|
1993
1969
|
},
|
|
1994
1970
|
{ _id: false }
|
|
1995
1971
|
);
|
|
1996
|
-
var
|
|
1972
|
+
var schema19 = new MongooseSchema19(
|
|
1997
1973
|
{
|
|
1998
1974
|
active: { default: false, required: true, type: Boolean },
|
|
1999
1975
|
approvedAt: { default: null, required: false, type: Date },
|
|
@@ -2024,14 +2000,14 @@ var schema20 = new MongooseSchema19(
|
|
|
2024
2000
|
},
|
|
2025
2001
|
{ timestamps: true }
|
|
2026
2002
|
);
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
var PostModel =
|
|
2003
|
+
schema19.index({ title: 1 });
|
|
2004
|
+
schema19.index({ tags: 1 });
|
|
2005
|
+
schema19.index({ postType: 1, slug: 1 }, { unique: true });
|
|
2006
|
+
var PostModel = mongoose23.models.Post || mongoose23.model("Post", schema19);
|
|
2031
2007
|
|
|
2032
2008
|
// src/mongoose/AppSetting.ts
|
|
2033
|
-
import
|
|
2034
|
-
var MongooseSchema20 =
|
|
2009
|
+
import mongoose24 from "mongoose";
|
|
2010
|
+
var MongooseSchema20 = mongoose24.Schema;
|
|
2035
2011
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
2036
2012
|
var AppSettingSchema = new MongooseSchema20(
|
|
2037
2013
|
{
|
|
@@ -2046,7 +2022,18 @@ var AppSettingSchema = new MongooseSchema20(
|
|
|
2046
2022
|
type: Date
|
|
2047
2023
|
},
|
|
2048
2024
|
adSettings: {
|
|
2025
|
+
approvalRequired: { default: true, required: true, type: Boolean },
|
|
2026
|
+
// Kept for older API clients; these fields do not control ad delivery.
|
|
2027
|
+
minAppearancesPerHour: {
|
|
2028
|
+
max: 12,
|
|
2029
|
+
min: 1,
|
|
2030
|
+
type: Number,
|
|
2031
|
+
validate: Number.isInteger
|
|
2032
|
+
},
|
|
2049
2033
|
mobileDisplayEnabled: { default: false, required: true, type: Boolean },
|
|
2034
|
+
paidSlotsPerPlacement: { enum: [30], type: Number },
|
|
2035
|
+
reservedSlotsPerPlacement: { enum: [7], type: Number },
|
|
2036
|
+
rotationSeconds: { enum: [8], type: Number },
|
|
2050
2037
|
webDisplayEnabled: { default: false, required: true, type: Boolean }
|
|
2051
2038
|
},
|
|
2052
2039
|
appVersion: { default: "1.0.1", required: true, type: String },
|
|
@@ -2068,21 +2055,21 @@ var AppSettingSchema = new MongooseSchema20(
|
|
|
2068
2055
|
},
|
|
2069
2056
|
{ timestamps: true }
|
|
2070
2057
|
);
|
|
2071
|
-
var AppSettingModel =
|
|
2058
|
+
var AppSettingModel = mongoose24.models.AppSetting || mongoose24.model("AppSetting", AppSettingSchema);
|
|
2072
2059
|
|
|
2073
2060
|
// src/mongoose/game/Game.ts
|
|
2074
2061
|
import {
|
|
2075
2062
|
EnumGameStatus,
|
|
2076
2063
|
EnumGameType
|
|
2077
2064
|
} from "@timardex/cluemart-shared";
|
|
2078
|
-
import
|
|
2065
|
+
import mongoose28 from "mongoose";
|
|
2079
2066
|
|
|
2080
2067
|
// src/mongoose/game/DailyClue.ts
|
|
2081
|
-
import
|
|
2068
|
+
import mongoose26 from "mongoose";
|
|
2082
2069
|
|
|
2083
2070
|
// src/mongoose/game/utils.ts
|
|
2084
|
-
import
|
|
2085
|
-
var MongooseSchema21 =
|
|
2071
|
+
import mongoose25 from "mongoose";
|
|
2072
|
+
var MongooseSchema21 = mongoose25.Schema;
|
|
2086
2073
|
var schemaGameDate = new MongooseSchema21(
|
|
2087
2074
|
{
|
|
2088
2075
|
endDate: { required: true, type: Date },
|
|
@@ -2092,7 +2079,7 @@ var schemaGameDate = new MongooseSchema21(
|
|
|
2092
2079
|
);
|
|
2093
2080
|
|
|
2094
2081
|
// src/mongoose/game/DailyClue.ts
|
|
2095
|
-
var MongooseSchema22 =
|
|
2082
|
+
var MongooseSchema22 = mongoose26.Schema;
|
|
2096
2083
|
var schemaLetters = new MongooseSchema22(
|
|
2097
2084
|
{
|
|
2098
2085
|
collected: { required: false, type: [String] },
|
|
@@ -2123,8 +2110,8 @@ var schemaDailyClueGameData = new MongooseSchema22(
|
|
|
2123
2110
|
);
|
|
2124
2111
|
|
|
2125
2112
|
// src/mongoose/game/PuzzleGame.ts
|
|
2126
|
-
import
|
|
2127
|
-
var MongooseSchema23 =
|
|
2113
|
+
import mongoose27 from "mongoose";
|
|
2114
|
+
var MongooseSchema23 = mongoose27.Schema;
|
|
2128
2115
|
var schemaPuzzleAnswer = new MongooseSchema23(
|
|
2129
2116
|
{
|
|
2130
2117
|
answer: { required: true, type: String },
|
|
@@ -2169,16 +2156,16 @@ var schemaPuzzleGameData = new MongooseSchema23(
|
|
|
2169
2156
|
);
|
|
2170
2157
|
|
|
2171
2158
|
// src/mongoose/game/Game.ts
|
|
2172
|
-
var MongooseSchema24 =
|
|
2159
|
+
var MongooseSchema24 = mongoose28.Schema;
|
|
2173
2160
|
var gameDataSchemas = {
|
|
2174
2161
|
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
2175
2162
|
[EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,
|
|
2176
2163
|
[EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData
|
|
2177
2164
|
};
|
|
2178
2165
|
var gameDataDefinition = Object.fromEntries(
|
|
2179
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
2166
|
+
Object.entries(gameDataSchemas).map(([key, schema24]) => [
|
|
2180
2167
|
key,
|
|
2181
|
-
{ default: null, required: false, type:
|
|
2168
|
+
{ default: null, required: false, type: schema24 }
|
|
2182
2169
|
])
|
|
2183
2170
|
);
|
|
2184
2171
|
var gameHistorySchema = new MongooseSchema24(
|
|
@@ -2219,7 +2206,7 @@ var gameTypeSchema = new MongooseSchema24(
|
|
|
2219
2206
|
},
|
|
2220
2207
|
{ timestamps: true }
|
|
2221
2208
|
);
|
|
2222
|
-
var
|
|
2209
|
+
var schema20 = new MongooseSchema24(
|
|
2223
2210
|
{
|
|
2224
2211
|
active: { default: false, required: true, type: Boolean },
|
|
2225
2212
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -2232,11 +2219,11 @@ var schema21 = new MongooseSchema24(
|
|
|
2232
2219
|
},
|
|
2233
2220
|
{ timestamps: true }
|
|
2234
2221
|
);
|
|
2235
|
-
var GameModel =
|
|
2222
|
+
var GameModel = mongoose28.models.Game || mongoose28.model("Game", schema20);
|
|
2236
2223
|
|
|
2237
2224
|
// src/mongoose/School.ts
|
|
2238
|
-
import
|
|
2239
|
-
var MongooseSchema25 =
|
|
2225
|
+
import mongoose29 from "mongoose";
|
|
2226
|
+
var MongooseSchema25 = mongoose29.Schema;
|
|
2240
2227
|
var campaignsSchema = new MongooseSchema25(
|
|
2241
2228
|
{
|
|
2242
2229
|
endDate: { required: true, type: Date },
|
|
@@ -2245,7 +2232,7 @@ var campaignsSchema = new MongooseSchema25(
|
|
|
2245
2232
|
},
|
|
2246
2233
|
{ _id: false }
|
|
2247
2234
|
);
|
|
2248
|
-
var
|
|
2235
|
+
var schema21 = new MongooseSchema25(
|
|
2249
2236
|
{
|
|
2250
2237
|
// New schools are active by default
|
|
2251
2238
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -2272,14 +2259,14 @@ var schema22 = new MongooseSchema25(
|
|
|
2272
2259
|
},
|
|
2273
2260
|
{ timestamps: true }
|
|
2274
2261
|
);
|
|
2275
|
-
|
|
2262
|
+
schema21.index(
|
|
2276
2263
|
{ schoolCode: 1 },
|
|
2277
2264
|
{
|
|
2278
2265
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
2279
2266
|
unique: true
|
|
2280
2267
|
}
|
|
2281
2268
|
);
|
|
2282
|
-
var SchoolModel =
|
|
2269
|
+
var SchoolModel = mongoose29.models.School || mongoose29.model("School", schema21);
|
|
2283
2270
|
|
|
2284
2271
|
// src/mongoose/Affiliate.ts
|
|
2285
2272
|
import {
|
|
@@ -2287,8 +2274,8 @@ import {
|
|
|
2287
2274
|
EnumAffiliateRewardType,
|
|
2288
2275
|
EnumResourceType as EnumResourceType6
|
|
2289
2276
|
} from "@timardex/cluemart-shared";
|
|
2290
|
-
import
|
|
2291
|
-
var MongooseSchema26 =
|
|
2277
|
+
import mongoose30 from "mongoose";
|
|
2278
|
+
var MongooseSchema26 = mongoose30.Schema;
|
|
2292
2279
|
var affiliateRewardSchema = new MongooseSchema26(
|
|
2293
2280
|
{
|
|
2294
2281
|
createdAt: { required: true, type: Date },
|
|
@@ -2309,7 +2296,7 @@ var affiliateResourceSchema = new MongooseSchema26(
|
|
|
2309
2296
|
resourceDeletedAt: { default: null, required: false, type: Date },
|
|
2310
2297
|
resourceId: {
|
|
2311
2298
|
required: true,
|
|
2312
|
-
type:
|
|
2299
|
+
type: mongoose30.Schema.Types.ObjectId
|
|
2313
2300
|
},
|
|
2314
2301
|
resourceName: { required: true, type: String },
|
|
2315
2302
|
resourceOwner: {
|
|
@@ -2372,7 +2359,7 @@ var redeemHistorySchema = new MongooseSchema26(
|
|
|
2372
2359
|
},
|
|
2373
2360
|
{ _id: false }
|
|
2374
2361
|
);
|
|
2375
|
-
var
|
|
2362
|
+
var schema22 = new MongooseSchema26(
|
|
2376
2363
|
{
|
|
2377
2364
|
active: { default: false, required: true, type: Boolean },
|
|
2378
2365
|
affiliateBonusRewards: {
|
|
@@ -2402,22 +2389,22 @@ var schema23 = new MongooseSchema26(
|
|
|
2402
2389
|
},
|
|
2403
2390
|
{ timestamps: true }
|
|
2404
2391
|
);
|
|
2405
|
-
|
|
2392
|
+
schema22.index(
|
|
2406
2393
|
{ affiliateCode: 1 },
|
|
2407
2394
|
{
|
|
2408
2395
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
2409
2396
|
unique: true
|
|
2410
2397
|
}
|
|
2411
2398
|
);
|
|
2412
|
-
var AffiliateModel =
|
|
2399
|
+
var AffiliateModel = mongoose30.models.Affiliate || mongoose30.model("Affiliate", schema22);
|
|
2413
2400
|
|
|
2414
2401
|
// src/mongoose/Coupon.ts
|
|
2415
2402
|
import {
|
|
2416
2403
|
EnumCouponQualificationType,
|
|
2417
2404
|
EnumResourceType as EnumResourceType7
|
|
2418
2405
|
} from "@timardex/cluemart-shared";
|
|
2419
|
-
import
|
|
2420
|
-
var MongooseSchema27 =
|
|
2406
|
+
import mongoose31 from "mongoose";
|
|
2407
|
+
var MongooseSchema27 = mongoose31.Schema;
|
|
2421
2408
|
var couponOptionSchema = new MongooseSchema27(
|
|
2422
2409
|
{
|
|
2423
2410
|
buy: { required: false, type: Number },
|
|
@@ -2437,20 +2424,20 @@ var couponVendorProductSchema = new MongooseSchema27(
|
|
|
2437
2424
|
{
|
|
2438
2425
|
couponId: {
|
|
2439
2426
|
required: true,
|
|
2440
|
-
type:
|
|
2427
|
+
type: mongoose31.Schema.Types.ObjectId
|
|
2441
2428
|
},
|
|
2442
2429
|
productId: {
|
|
2443
2430
|
required: true,
|
|
2444
|
-
type:
|
|
2431
|
+
type: mongoose31.Schema.Types.ObjectId
|
|
2445
2432
|
},
|
|
2446
2433
|
vendorCouponId: {
|
|
2447
2434
|
required: false,
|
|
2448
|
-
type:
|
|
2435
|
+
type: mongoose31.Schema.Types.ObjectId
|
|
2449
2436
|
},
|
|
2450
2437
|
vendorId: {
|
|
2451
2438
|
ref: "Vendor",
|
|
2452
2439
|
required: true,
|
|
2453
|
-
type:
|
|
2440
|
+
type: mongoose31.Schema.Types.ObjectId
|
|
2454
2441
|
}
|
|
2455
2442
|
},
|
|
2456
2443
|
{ _id: false }
|
|
@@ -2472,7 +2459,7 @@ var couponParticipantUserSchema = new MongooseSchema27(
|
|
|
2472
2459
|
userId: {
|
|
2473
2460
|
ref: "User",
|
|
2474
2461
|
required: true,
|
|
2475
|
-
type:
|
|
2462
|
+
type: mongoose31.Schema.Types.ObjectId
|
|
2476
2463
|
}
|
|
2477
2464
|
},
|
|
2478
2465
|
{ timestamps: true }
|
|
@@ -2504,7 +2491,7 @@ var couponDataSchema = new MongooseSchema27(
|
|
|
2504
2491
|
},
|
|
2505
2492
|
{ timestamps: true }
|
|
2506
2493
|
);
|
|
2507
|
-
var
|
|
2494
|
+
var schema23 = new MongooseSchema27(
|
|
2508
2495
|
{
|
|
2509
2496
|
active: { default: true, required: true, type: Boolean },
|
|
2510
2497
|
couponData: { default: [], required: false, type: [couponDataSchema] },
|
|
@@ -2516,14 +2503,14 @@ var schema24 = new MongooseSchema27(
|
|
|
2516
2503
|
},
|
|
2517
2504
|
{ timestamps: true }
|
|
2518
2505
|
);
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
var CouponModel =
|
|
2506
|
+
schema23.index({ active: 1, deletedAt: 1, "owner.userId": 1 });
|
|
2507
|
+
schema23.index({ "couponData.participantUsers.userId": 1 });
|
|
2508
|
+
var CouponModel = mongoose31.models.Coupon || mongoose31.model("Coupon", schema23);
|
|
2522
2509
|
|
|
2523
2510
|
// src/mongoose/Impersonation.ts
|
|
2524
2511
|
import { EnumResourceType as EnumResourceType8 } from "@timardex/cluemart-shared";
|
|
2525
|
-
import
|
|
2526
|
-
var MongooseSchema28 =
|
|
2512
|
+
import mongoose32 from "mongoose";
|
|
2513
|
+
var MongooseSchema28 = mongoose32.Schema;
|
|
2527
2514
|
var impersonationSessionSchema = new MongooseSchema28(
|
|
2528
2515
|
{
|
|
2529
2516
|
expiresAt: { expires: 0, required: true, type: Date },
|
|
@@ -2531,19 +2518,19 @@ var impersonationSessionSchema = new MongooseSchema28(
|
|
|
2531
2518
|
index: true,
|
|
2532
2519
|
ref: "User",
|
|
2533
2520
|
required: true,
|
|
2534
|
-
type:
|
|
2521
|
+
type: mongoose32.Schema.Types.ObjectId
|
|
2535
2522
|
},
|
|
2536
2523
|
impersonatorUserId: {
|
|
2537
2524
|
index: true,
|
|
2538
2525
|
ref: "User",
|
|
2539
2526
|
required: true,
|
|
2540
|
-
type:
|
|
2527
|
+
type: mongoose32.Schema.Types.ObjectId
|
|
2541
2528
|
},
|
|
2542
2529
|
refreshToken: { required: true, type: String }
|
|
2543
2530
|
},
|
|
2544
2531
|
{ timestamps: true }
|
|
2545
2532
|
);
|
|
2546
|
-
var ImpersonationSessionModel =
|
|
2533
|
+
var ImpersonationSessionModel = mongoose32.models.ImpersonationSession || mongoose32.model(
|
|
2547
2534
|
"ImpersonationSession",
|
|
2548
2535
|
impersonationSessionSchema
|
|
2549
2536
|
);
|
|
@@ -2554,24 +2541,24 @@ var impersonationAuditSchema = new MongooseSchema28(
|
|
|
2554
2541
|
impersonatedUserId: {
|
|
2555
2542
|
ref: "User",
|
|
2556
2543
|
required: true,
|
|
2557
|
-
type:
|
|
2544
|
+
type: mongoose32.Schema.Types.ObjectId
|
|
2558
2545
|
},
|
|
2559
2546
|
impersonatorUserId: {
|
|
2560
2547
|
ref: "User",
|
|
2561
2548
|
required: true,
|
|
2562
|
-
type:
|
|
2549
|
+
type: mongoose32.Schema.Types.ObjectId
|
|
2563
2550
|
},
|
|
2564
|
-
resourceId: { type:
|
|
2551
|
+
resourceId: { type: mongoose32.Schema.Types.ObjectId },
|
|
2565
2552
|
resourceType: { enum: Object.values(EnumResourceType8), type: String },
|
|
2566
2553
|
sessionId: {
|
|
2567
2554
|
ref: "ImpersonationSession",
|
|
2568
2555
|
required: true,
|
|
2569
|
-
type:
|
|
2556
|
+
type: mongoose32.Schema.Types.ObjectId
|
|
2570
2557
|
}
|
|
2571
2558
|
},
|
|
2572
2559
|
{ timestamps: true }
|
|
2573
2560
|
);
|
|
2574
|
-
var ImpersonationAuditModel =
|
|
2561
|
+
var ImpersonationAuditModel = mongoose32.models.ImpersonationAudit || mongoose32.model(
|
|
2575
2562
|
"ImpersonationAudit",
|
|
2576
2563
|
impersonationAuditSchema
|
|
2577
2564
|
);
|
|
@@ -3015,7 +3002,7 @@ function normalizeAffiliatePromoCodes(promoCodes) {
|
|
|
3015
3002
|
}
|
|
3016
3003
|
|
|
3017
3004
|
// src/service/database.ts
|
|
3018
|
-
import
|
|
3005
|
+
import mongoose33 from "mongoose";
|
|
3019
3006
|
var connectToDatabase = async ({
|
|
3020
3007
|
appName,
|
|
3021
3008
|
dbName,
|
|
@@ -3028,7 +3015,7 @@ var connectToDatabase = async ({
|
|
|
3028
3015
|
// Fallback to MongoDB Atlas connection string
|
|
3029
3016
|
`mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
|
|
3030
3017
|
);
|
|
3031
|
-
await
|
|
3018
|
+
await mongoose33.connect(mongoUri);
|
|
3032
3019
|
const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
|
|
3033
3020
|
console.log(
|
|
3034
3021
|
`${connectionType} connected from server/src/service/database.ts`
|
|
@@ -3041,7 +3028,7 @@ var connectToDatabase = async ({
|
|
|
3041
3028
|
|
|
3042
3029
|
// src/types/index.ts
|
|
3043
3030
|
import express from "express";
|
|
3044
|
-
import
|
|
3031
|
+
import mongoose34 from "mongoose";
|
|
3045
3032
|
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
3046
3033
|
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
3047
3034
|
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
@@ -3163,15 +3150,15 @@ async function updateAdStatuses() {
|
|
|
3163
3150
|
}
|
|
3164
3151
|
|
|
3165
3152
|
// src/service/objectIdToString.ts
|
|
3166
|
-
import
|
|
3153
|
+
import mongoose35 from "mongoose";
|
|
3167
3154
|
function isValidObjectId(value) {
|
|
3168
|
-
return
|
|
3155
|
+
return mongoose35.Types.ObjectId.isValid(value);
|
|
3169
3156
|
}
|
|
3170
3157
|
function convertObjectIdsToStrings(obj) {
|
|
3171
3158
|
if (obj === null || obj === void 0) {
|
|
3172
3159
|
return obj;
|
|
3173
3160
|
}
|
|
3174
|
-
if (obj instanceof
|
|
3161
|
+
if (obj instanceof mongoose35.Types.ObjectId) {
|
|
3175
3162
|
return obj.toString();
|
|
3176
3163
|
}
|
|
3177
3164
|
if (obj instanceof Date) {
|
|
@@ -4810,7 +4797,6 @@ export {
|
|
|
4810
4797
|
AdBookingModel,
|
|
4811
4798
|
AdMetricsModel,
|
|
4812
4799
|
AdModel,
|
|
4813
|
-
AdSettingsModel,
|
|
4814
4800
|
AffiliateModel,
|
|
4815
4801
|
AppSettingModel,
|
|
4816
4802
|
BILLING_CATALOG_COLLECTION_NAME,
|
|
@@ -4820,7 +4806,6 @@ export {
|
|
|
4820
4806
|
ChatReportModel,
|
|
4821
4807
|
ContactDetailsSchema,
|
|
4822
4808
|
CouponModel,
|
|
4823
|
-
DEFAULT_AD_SETTINGS,
|
|
4824
4809
|
EnumPubSubEvents,
|
|
4825
4810
|
EventDateArchiveModel,
|
|
4826
4811
|
EventInfoModel,
|
|
@@ -4897,7 +4882,7 @@ export {
|
|
|
4897
4882
|
locationGeoSchema,
|
|
4898
4883
|
locationsSchema,
|
|
4899
4884
|
mapVendorLicenceToSubscriptionRewardType,
|
|
4900
|
-
|
|
4885
|
+
mongoose34 as mongoose,
|
|
4901
4886
|
normalizeAffiliatePromoCodes,
|
|
4902
4887
|
normalizePromoCode,
|
|
4903
4888
|
notifyUsers,
|