@timardex/cluemart-server-shared 3.0.1 → 3.0.2
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-GDXPPYDN.mjs → chunk-7JWQ7WKJ.mjs} +275 -233
- package/dist/chunk-7JWQ7WKJ.mjs.map +1 -0
- package/dist/index.cjs +283 -240
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.mjs +281 -239
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +276 -233
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +7 -1
- package/dist/mongoose/index.d.ts +7 -1
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +280 -239
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-GDXPPYDN.mjs.map +0 -1
|
@@ -280,14 +280,53 @@ schema3.index(
|
|
|
280
280
|
);
|
|
281
281
|
var AdBookingModel = mongoose3.models.AdBooking || mongoose3.model("AdBooking", schema3);
|
|
282
282
|
|
|
283
|
+
// src/mongoose/ad/AdPurchase.ts
|
|
284
|
+
import mongoose4 from "mongoose";
|
|
285
|
+
var schema4 = new mongoose4.Schema(
|
|
286
|
+
{
|
|
287
|
+
_id: { required: true, type: String },
|
|
288
|
+
approvalRequired: { type: Boolean },
|
|
289
|
+
bookingIds: { required: true, type: [String] },
|
|
290
|
+
checkoutAttemptId: { required: true, type: String },
|
|
291
|
+
checkoutLeaseUntil: { type: Date },
|
|
292
|
+
checkoutLeaseToken: { type: String },
|
|
293
|
+
createdAt: { default: Date.now, required: true, type: Date },
|
|
294
|
+
expiresAt: { required: true, type: Date },
|
|
295
|
+
holdsReleased: { type: Boolean },
|
|
296
|
+
quote: { required: true, type: mongoose4.Schema.Types.Mixed },
|
|
297
|
+
resource: { required: true, type: schemaAdresource },
|
|
298
|
+
selectionKey: { required: true, type: String },
|
|
299
|
+
state: {
|
|
300
|
+
enum: ["reserving", "checkout", "paid", "failed", "cancelled"],
|
|
301
|
+
required: true,
|
|
302
|
+
type: String
|
|
303
|
+
},
|
|
304
|
+
stripeCheckoutSessionId: { default: null, type: String },
|
|
305
|
+
stripePaymentIntentId: { default: null, type: String },
|
|
306
|
+
stripeRequestStartedAt: { type: Date },
|
|
307
|
+
userId: { required: true, type: String }
|
|
308
|
+
},
|
|
309
|
+
{ collection: "adPurchases" }
|
|
310
|
+
);
|
|
311
|
+
schema4.index({ userId: 1, checkoutAttemptId: 1 }, { unique: true });
|
|
312
|
+
schema4.index(
|
|
313
|
+
{ stripeCheckoutSessionId: 1 },
|
|
314
|
+
{
|
|
315
|
+
unique: true,
|
|
316
|
+
partialFilterExpression: { stripeCheckoutSessionId: { $type: "string" } }
|
|
317
|
+
}
|
|
318
|
+
);
|
|
319
|
+
schema4.index({ state: 1, expiresAt: 1 });
|
|
320
|
+
var AdPurchaseModel = mongoose4.models.AdPurchase || mongoose4.model("AdPurchase", schema4);
|
|
321
|
+
|
|
283
322
|
// src/mongoose/ad/AdMetrics.ts
|
|
284
323
|
import {
|
|
285
324
|
EnumAdPlatform,
|
|
286
325
|
EnumAdShowOn as EnumAdShowOn4,
|
|
287
326
|
isUtcMidnight as isUtcMidnight3
|
|
288
327
|
} from "@timardex/cluemart-shared";
|
|
289
|
-
import
|
|
290
|
-
var ResourceMetricsSchema = new
|
|
328
|
+
import mongoose5 from "mongoose";
|
|
329
|
+
var ResourceMetricsSchema = new mongoose5.Schema(
|
|
291
330
|
{
|
|
292
331
|
clicks: { default: 0, required: true, type: Number },
|
|
293
332
|
date: {
|
|
@@ -315,15 +354,15 @@ var ResourceMetricsSchema = new mongoose4.Schema(
|
|
|
315
354
|
},
|
|
316
355
|
{ _id: false }
|
|
317
356
|
);
|
|
318
|
-
var
|
|
357
|
+
var schema5 = new mongoose5.Schema(
|
|
319
358
|
{
|
|
320
359
|
adId: { ref: "Ad", required: true, type: String },
|
|
321
360
|
resource: { default: [], type: [ResourceMetricsSchema] }
|
|
322
361
|
},
|
|
323
362
|
{ timestamps: true }
|
|
324
363
|
);
|
|
325
|
-
|
|
326
|
-
|
|
364
|
+
schema5.index({ adId: 1 }, { unique: true });
|
|
365
|
+
schema5.index(
|
|
327
366
|
{
|
|
328
367
|
adId: 1,
|
|
329
368
|
"resource.date": 1,
|
|
@@ -332,7 +371,7 @@ schema4.index(
|
|
|
332
371
|
},
|
|
333
372
|
{ unique: true }
|
|
334
373
|
);
|
|
335
|
-
var AdMetricsModel =
|
|
374
|
+
var AdMetricsModel = mongoose5.models.AdMetrics || mongoose5.model("AdMetrics", schema5);
|
|
336
375
|
|
|
337
376
|
// src/mongoose/BillingCatalog.ts
|
|
338
377
|
import {
|
|
@@ -344,8 +383,8 @@ import {
|
|
|
344
383
|
EnumUserLicence,
|
|
345
384
|
INITIAL_BILLING_CATALOG
|
|
346
385
|
} from "@timardex/cluemart-shared";
|
|
347
|
-
import
|
|
348
|
-
var MongooseSchema2 =
|
|
386
|
+
import mongoose6 from "mongoose";
|
|
387
|
+
var MongooseSchema2 = mongoose6.Schema;
|
|
349
388
|
var BILLING_CATALOG_COLLECTION_NAME = "billingCatalog";
|
|
350
389
|
var paidVendorLicences = [
|
|
351
390
|
EnumUserLicence.PRO_VENDOR,
|
|
@@ -392,7 +431,7 @@ var priceHistorySchema = new MongooseSchema2(
|
|
|
392
431
|
default: null,
|
|
393
432
|
ref: "User",
|
|
394
433
|
required: false,
|
|
395
|
-
type:
|
|
434
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
396
435
|
},
|
|
397
436
|
currency: currencyField,
|
|
398
437
|
effectiveFrom: { required: true, type: Date },
|
|
@@ -403,7 +442,7 @@ var priceHistorySchema = new MongooseSchema2(
|
|
|
403
442
|
},
|
|
404
443
|
{ _id: false }
|
|
405
444
|
);
|
|
406
|
-
var
|
|
445
|
+
var schema6 = new MongooseSchema2(
|
|
407
446
|
{
|
|
408
447
|
active: { default: true, required: true, type: Boolean },
|
|
409
448
|
billingPeriod: {
|
|
@@ -459,7 +498,7 @@ var schema5 = new MongooseSchema2(
|
|
|
459
498
|
default: null,
|
|
460
499
|
ref: "User",
|
|
461
500
|
required: false,
|
|
462
|
-
type:
|
|
501
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
463
502
|
}
|
|
464
503
|
},
|
|
465
504
|
{
|
|
@@ -468,7 +507,7 @@ var schema5 = new MongooseSchema2(
|
|
|
468
507
|
timestamps: true
|
|
469
508
|
}
|
|
470
509
|
);
|
|
471
|
-
|
|
510
|
+
schema6.pre("validate", function validateDefinition() {
|
|
472
511
|
if (!billingCatalogDefinitionMatches(this)) {
|
|
473
512
|
this.invalidate(
|
|
474
513
|
"key",
|
|
@@ -476,18 +515,18 @@ schema5.pre("validate", function validateDefinition() {
|
|
|
476
515
|
);
|
|
477
516
|
}
|
|
478
517
|
});
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
518
|
+
schema6.index({ billingPeriod: 1, licenceType: 1 }, { unique: true });
|
|
519
|
+
schema6.index({ active: 1, licenceType: 1 });
|
|
520
|
+
schema6.index(
|
|
482
521
|
{ stripePriceId: 1 },
|
|
483
522
|
{
|
|
484
523
|
partialFilterExpression: { stripePriceId: { $type: "string" } },
|
|
485
524
|
unique: true
|
|
486
525
|
}
|
|
487
526
|
);
|
|
488
|
-
var BillingCatalogModel =
|
|
527
|
+
var BillingCatalogModel = mongoose6.models.BillingCatalogEntry || mongoose6.model(
|
|
489
528
|
"BillingCatalogEntry",
|
|
490
|
-
|
|
529
|
+
schema6,
|
|
491
530
|
BILLING_CATALOG_COLLECTION_NAME
|
|
492
531
|
);
|
|
493
532
|
function buildInitialBillingCatalogEntries(now = /* @__PURE__ */ new Date()) {
|
|
@@ -515,15 +554,15 @@ function getBillingCatalogDefinition(key) {
|
|
|
515
554
|
import {
|
|
516
555
|
EnumChatType
|
|
517
556
|
} from "@timardex/cluemart-shared";
|
|
518
|
-
import
|
|
519
|
-
var MongooseSchema3 =
|
|
557
|
+
import mongoose7 from "mongoose";
|
|
558
|
+
var MongooseSchema3 = mongoose7.Schema;
|
|
520
559
|
var MessageReplyPreviewSchema = new MongooseSchema3(
|
|
521
560
|
{
|
|
522
561
|
contentPreview: { required: true, type: String },
|
|
523
562
|
senderId: {
|
|
524
563
|
ref: "User",
|
|
525
564
|
required: true,
|
|
526
|
-
type:
|
|
565
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
527
566
|
},
|
|
528
567
|
senderName: { required: true, type: String }
|
|
529
568
|
},
|
|
@@ -535,7 +574,7 @@ var MessageReactionSchema = new MongooseSchema3(
|
|
|
535
574
|
userId: {
|
|
536
575
|
ref: "User",
|
|
537
576
|
required: true,
|
|
538
|
-
type:
|
|
577
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
539
578
|
}
|
|
540
579
|
},
|
|
541
580
|
{ _id: false }
|
|
@@ -546,7 +585,7 @@ var MessageSeenSchema = new MongooseSchema3(
|
|
|
546
585
|
userId: {
|
|
547
586
|
ref: "User",
|
|
548
587
|
required: true,
|
|
549
|
-
type:
|
|
588
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
550
589
|
}
|
|
551
590
|
},
|
|
552
591
|
{ _id: false }
|
|
@@ -562,13 +601,13 @@ var MessageSchema = new MongooseSchema3(
|
|
|
562
601
|
replyToMessageId: {
|
|
563
602
|
ref: "Chat.messages",
|
|
564
603
|
required: false,
|
|
565
|
-
type:
|
|
604
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
566
605
|
},
|
|
567
606
|
seenBy: { default: [], required: false, type: [MessageSeenSchema] },
|
|
568
607
|
senderId: {
|
|
569
608
|
ref: "User",
|
|
570
609
|
required: true,
|
|
571
|
-
type:
|
|
610
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
572
611
|
}
|
|
573
612
|
},
|
|
574
613
|
{ timestamps: true }
|
|
@@ -581,7 +620,7 @@ var ParticipantSchema = new MongooseSchema3(
|
|
|
581
620
|
userId: {
|
|
582
621
|
ref: "User",
|
|
583
622
|
required: true,
|
|
584
|
-
type:
|
|
623
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
585
624
|
},
|
|
586
625
|
userName: { required: true, type: String }
|
|
587
626
|
},
|
|
@@ -612,14 +651,14 @@ ChatSchema.index({
|
|
|
612
651
|
"participants.userId": 1,
|
|
613
652
|
updatedAt: -1
|
|
614
653
|
});
|
|
615
|
-
var ChatModel =
|
|
654
|
+
var ChatModel = mongoose7.models.Chat || mongoose7.model("Chat", ChatSchema);
|
|
616
655
|
|
|
617
656
|
// src/mongoose/chat/ChatReport.ts
|
|
618
657
|
import {
|
|
619
658
|
EnumChatReportReason
|
|
620
659
|
} from "@timardex/cluemart-shared";
|
|
621
|
-
import
|
|
622
|
-
var MongooseSchema4 =
|
|
660
|
+
import mongoose8 from "mongoose";
|
|
661
|
+
var MongooseSchema4 = mongoose8.Schema;
|
|
623
662
|
var ReasonSchema = new MongooseSchema4(
|
|
624
663
|
{
|
|
625
664
|
details: { default: null, required: false, type: String },
|
|
@@ -636,18 +675,18 @@ var ChatReportSchema = new MongooseSchema4(
|
|
|
636
675
|
chatId: {
|
|
637
676
|
ref: "Chat",
|
|
638
677
|
required: true,
|
|
639
|
-
type:
|
|
678
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
640
679
|
},
|
|
641
680
|
reason: { required: true, type: ReasonSchema },
|
|
642
681
|
reportedUserId: {
|
|
643
682
|
ref: "User",
|
|
644
683
|
required: true,
|
|
645
|
-
type:
|
|
684
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
646
685
|
},
|
|
647
686
|
reporterUserId: {
|
|
648
687
|
ref: "User",
|
|
649
688
|
required: true,
|
|
650
|
-
type:
|
|
689
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
651
690
|
},
|
|
652
691
|
resolved: { default: false, required: true, type: Boolean }
|
|
653
692
|
},
|
|
@@ -655,7 +694,7 @@ var ChatReportSchema = new MongooseSchema4(
|
|
|
655
694
|
);
|
|
656
695
|
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
657
696
|
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
658
|
-
var ChatReportModel =
|
|
697
|
+
var ChatReportModel = mongoose8.models.ChatReport || mongoose8.model("ChatReport", ChatReportSchema);
|
|
659
698
|
|
|
660
699
|
// src/mongoose/global.ts
|
|
661
700
|
import {
|
|
@@ -663,15 +702,15 @@ import {
|
|
|
663
702
|
EnumPostType,
|
|
664
703
|
EnumUserLicence as EnumUserLicence2
|
|
665
704
|
} from "@timardex/cluemart-shared";
|
|
666
|
-
import
|
|
667
|
-
var MongooseSchema5 =
|
|
705
|
+
import mongoose9 from "mongoose";
|
|
706
|
+
var MongooseSchema5 = mongoose9.Schema;
|
|
668
707
|
var OwnerTypeSchema = new MongooseSchema5(
|
|
669
708
|
{
|
|
670
709
|
email: { required: true, type: String },
|
|
671
710
|
userId: {
|
|
672
711
|
ref: "User",
|
|
673
712
|
required: true,
|
|
674
|
-
type:
|
|
713
|
+
type: mongoose9.Schema.Types.ObjectId
|
|
675
714
|
}
|
|
676
715
|
},
|
|
677
716
|
{ _id: false }
|
|
@@ -814,7 +853,7 @@ var relatedPostSchema = new MongooseSchema5(
|
|
|
814
853
|
postId: {
|
|
815
854
|
ref: "Post",
|
|
816
855
|
required: true,
|
|
817
|
-
type:
|
|
856
|
+
type: mongoose9.Schema.Types.ObjectId
|
|
818
857
|
},
|
|
819
858
|
postSlug: { required: true, type: String },
|
|
820
859
|
postType: {
|
|
@@ -839,7 +878,7 @@ var baseResourceFields = {
|
|
|
839
878
|
adIds: {
|
|
840
879
|
ref: "Ad",
|
|
841
880
|
required: false,
|
|
842
|
-
type: [
|
|
881
|
+
type: [mongoose9.Schema.Types.ObjectId]
|
|
843
882
|
},
|
|
844
883
|
approvedAt: { default: null, required: false, type: Date },
|
|
845
884
|
contactDetails: { required: false, type: ContactDetailsSchema },
|
|
@@ -872,7 +911,7 @@ var baseResourceFields = {
|
|
|
872
911
|
import {
|
|
873
912
|
EnumEventType
|
|
874
913
|
} from "@timardex/cluemart-shared";
|
|
875
|
-
import
|
|
914
|
+
import mongoose10 from "mongoose";
|
|
876
915
|
|
|
877
916
|
// src/mongoose/searchNamePlugin.ts
|
|
878
917
|
function deriveSearchName(name) {
|
|
@@ -918,15 +957,15 @@ function syncSearchNameInUpdate(update) {
|
|
|
918
957
|
}
|
|
919
958
|
return null;
|
|
920
959
|
}
|
|
921
|
-
function searchNamePlugin(
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
960
|
+
function searchNamePlugin(schema26) {
|
|
961
|
+
schema26.add({ searchName: { default: "", required: false, type: String } });
|
|
962
|
+
schema26.index({ searchName: 1 });
|
|
963
|
+
schema26.pre("save", function syncSearchNameOnSave(next) {
|
|
925
964
|
const doc = this;
|
|
926
965
|
doc.searchName = deriveSearchName(doc.name);
|
|
927
966
|
next();
|
|
928
967
|
});
|
|
929
|
-
|
|
968
|
+
schema26.pre("insertMany", function syncSearchNameOnInsertMany(next, docs) {
|
|
930
969
|
const list = Array.isArray(docs) ? docs : [docs];
|
|
931
970
|
for (const doc of list) {
|
|
932
971
|
if (doc && typeof doc.name === "string") {
|
|
@@ -935,7 +974,7 @@ function searchNamePlugin(schema25) {
|
|
|
935
974
|
}
|
|
936
975
|
next();
|
|
937
976
|
});
|
|
938
|
-
|
|
977
|
+
schema26.pre("bulkWrite", function syncSearchNameOnBulkWrite(next, ops) {
|
|
939
978
|
for (const op of ops) {
|
|
940
979
|
const doc = op.insertOne?.document ?? op.replaceOne?.replacement;
|
|
941
980
|
if (doc && typeof doc.name === "string") {
|
|
@@ -961,14 +1000,14 @@ function searchNamePlugin(schema25) {
|
|
|
961
1000
|
}
|
|
962
1001
|
next();
|
|
963
1002
|
};
|
|
964
|
-
|
|
1003
|
+
schema26.pre(
|
|
965
1004
|
["findOneAndUpdate", "updateOne", "updateMany"],
|
|
966
1005
|
syncSearchNameOnUpdate
|
|
967
1006
|
);
|
|
968
1007
|
}
|
|
969
1008
|
|
|
970
1009
|
// src/mongoose/GoogleImportedMarket.ts
|
|
971
|
-
var MongooseSchema6 =
|
|
1010
|
+
var MongooseSchema6 = mongoose10.Schema;
|
|
972
1011
|
var addressComponentSchema = new MongooseSchema6(
|
|
973
1012
|
{
|
|
974
1013
|
longName: { required: false, type: String },
|
|
@@ -977,7 +1016,7 @@ var addressComponentSchema = new MongooseSchema6(
|
|
|
977
1016
|
},
|
|
978
1017
|
{ _id: false }
|
|
979
1018
|
);
|
|
980
|
-
var
|
|
1019
|
+
var schema7 = new MongooseSchema6(
|
|
981
1020
|
{
|
|
982
1021
|
active: { default: false, required: true, type: Boolean },
|
|
983
1022
|
address: { required: true, type: String },
|
|
@@ -989,7 +1028,7 @@ var schema6 = new MongooseSchema6(
|
|
|
989
1028
|
claimedByUserId: {
|
|
990
1029
|
ref: "User",
|
|
991
1030
|
required: false,
|
|
992
|
-
type:
|
|
1031
|
+
type: mongoose10.Schema.Types.ObjectId
|
|
993
1032
|
},
|
|
994
1033
|
cover: {
|
|
995
1034
|
required: false,
|
|
@@ -1001,7 +1040,7 @@ var schema6 = new MongooseSchema6(
|
|
|
1001
1040
|
eventId: {
|
|
1002
1041
|
ref: "Event",
|
|
1003
1042
|
required: false,
|
|
1004
|
-
type:
|
|
1043
|
+
type: mongoose10.Schema.Types.ObjectId
|
|
1005
1044
|
},
|
|
1006
1045
|
eventType: {
|
|
1007
1046
|
enum: Object.values(EnumEventType),
|
|
@@ -1035,23 +1074,23 @@ var schema6 = new MongooseSchema6(
|
|
|
1035
1074
|
},
|
|
1036
1075
|
{ timestamps: true }
|
|
1037
1076
|
);
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
var GoogleImportedMarketModel =
|
|
1077
|
+
schema7.index({ "location.geo": "2dsphere" });
|
|
1078
|
+
schema7.index({ name: 1 });
|
|
1079
|
+
schema7.index({ region: 1 });
|
|
1080
|
+
schema7.index({ deletedAt: 1 });
|
|
1081
|
+
schema7.index({ "dateTime.dateStatus": 1 });
|
|
1082
|
+
schema7.index({ slug: 1 });
|
|
1083
|
+
schema7.index({ description: "text", name: "text" });
|
|
1084
|
+
schema7.plugin(searchNamePlugin);
|
|
1085
|
+
var GoogleImportedMarketModel = mongoose10.models.GoogleImportedMarket || mongoose10.model("GoogleImportedMarket", schema7);
|
|
1047
1086
|
|
|
1048
1087
|
// src/mongoose/Notification.ts
|
|
1049
1088
|
import {
|
|
1050
1089
|
EnumNotificationResourceType,
|
|
1051
1090
|
EnumNotificationType
|
|
1052
1091
|
} from "@timardex/cluemart-shared";
|
|
1053
|
-
import
|
|
1054
|
-
var MongooseSchema7 =
|
|
1092
|
+
import mongoose11 from "mongoose";
|
|
1093
|
+
var MongooseSchema7 = mongoose11.Schema;
|
|
1055
1094
|
var notificationDataSchema = new MongooseSchema7(
|
|
1056
1095
|
{
|
|
1057
1096
|
resourceId: { required: true, type: String },
|
|
@@ -1064,7 +1103,7 @@ var notificationDataSchema = new MongooseSchema7(
|
|
|
1064
1103
|
},
|
|
1065
1104
|
{ _id: false }
|
|
1066
1105
|
);
|
|
1067
|
-
var
|
|
1106
|
+
var schema8 = new MongooseSchema7(
|
|
1068
1107
|
{
|
|
1069
1108
|
data: {
|
|
1070
1109
|
default: null,
|
|
@@ -1083,20 +1122,20 @@ var schema7 = new MongooseSchema7(
|
|
|
1083
1122
|
userId: {
|
|
1084
1123
|
ref: "User",
|
|
1085
1124
|
required: true,
|
|
1086
|
-
type:
|
|
1125
|
+
type: mongoose11.Schema.Types.ObjectId
|
|
1087
1126
|
}
|
|
1088
1127
|
},
|
|
1089
1128
|
{ timestamps: true }
|
|
1090
1129
|
);
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
var NotificationModel =
|
|
1130
|
+
schema8.index({ isRead: 1, userId: 1 });
|
|
1131
|
+
schema8.index({ createdAt: -1, userId: 1 });
|
|
1132
|
+
var NotificationModel = mongoose11.models.Notification || mongoose11.model("Notification", schema8);
|
|
1094
1133
|
|
|
1095
1134
|
// src/mongoose/PushToken.ts
|
|
1096
1135
|
import { EnumOSPlatform } from "@timardex/cluemart-shared/enums";
|
|
1097
|
-
import
|
|
1098
|
-
var MongooseSchema8 =
|
|
1099
|
-
var
|
|
1136
|
+
import mongoose12 from "mongoose";
|
|
1137
|
+
var MongooseSchema8 = mongoose12.Schema;
|
|
1138
|
+
var schema9 = new MongooseSchema8(
|
|
1100
1139
|
{
|
|
1101
1140
|
platform: {
|
|
1102
1141
|
enum: Object.values(EnumOSPlatform),
|
|
@@ -1107,12 +1146,12 @@ var schema8 = new MongooseSchema8(
|
|
|
1107
1146
|
userId: {
|
|
1108
1147
|
ref: "User",
|
|
1109
1148
|
required: true,
|
|
1110
|
-
type:
|
|
1149
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
1111
1150
|
}
|
|
1112
1151
|
},
|
|
1113
1152
|
{ timestamps: true }
|
|
1114
1153
|
);
|
|
1115
|
-
var PushTokenModel =
|
|
1154
|
+
var PushTokenModel = mongoose12.models.PushToken || mongoose12.model("PushToken", schema9);
|
|
1116
1155
|
|
|
1117
1156
|
// src/mongoose/Relation.ts
|
|
1118
1157
|
import {
|
|
@@ -1121,15 +1160,15 @@ import {
|
|
|
1121
1160
|
EnumRelationResource,
|
|
1122
1161
|
EnumResourceType as EnumResourceType2
|
|
1123
1162
|
} from "@timardex/cluemart-shared";
|
|
1124
|
-
import
|
|
1163
|
+
import mongoose14 from "mongoose";
|
|
1125
1164
|
|
|
1126
1165
|
// src/mongoose/event/EventInfo.ts
|
|
1127
1166
|
import {
|
|
1128
1167
|
EnumEventDateStatus as EnumEventDateStatus2,
|
|
1129
1168
|
EnumPaymentMethod
|
|
1130
1169
|
} from "@timardex/cluemart-shared";
|
|
1131
|
-
import
|
|
1132
|
-
var MongooseSchema9 =
|
|
1170
|
+
import mongoose13 from "mongoose";
|
|
1171
|
+
var MongooseSchema9 = mongoose13.Schema;
|
|
1133
1172
|
var StallTypeSchema = new MongooseSchema9(
|
|
1134
1173
|
{
|
|
1135
1174
|
label: { required: false, type: String },
|
|
@@ -1190,7 +1229,7 @@ var refundPolicySchema = new MongooseSchema9(
|
|
|
1190
1229
|
},
|
|
1191
1230
|
{ _id: false }
|
|
1192
1231
|
);
|
|
1193
|
-
var
|
|
1232
|
+
var schema10 = new MongooseSchema9(
|
|
1194
1233
|
{
|
|
1195
1234
|
active: { default: true, type: Boolean },
|
|
1196
1235
|
applicationDeadlineHours: { required: true, type: Number },
|
|
@@ -1198,7 +1237,7 @@ var schema9 = new MongooseSchema9(
|
|
|
1198
1237
|
eventId: {
|
|
1199
1238
|
ref: "Event",
|
|
1200
1239
|
required: true,
|
|
1201
|
-
type:
|
|
1240
|
+
type: mongoose13.Schema.Types.ObjectId
|
|
1202
1241
|
},
|
|
1203
1242
|
packInTime: { required: true, type: Number },
|
|
1204
1243
|
paymentDueHours: { required: true, type: Number },
|
|
@@ -1208,11 +1247,11 @@ var schema9 = new MongooseSchema9(
|
|
|
1208
1247
|
},
|
|
1209
1248
|
{ timestamps: true }
|
|
1210
1249
|
);
|
|
1211
|
-
|
|
1212
|
-
var EventInfoModel =
|
|
1250
|
+
schema10.index({ eventId: 1 });
|
|
1251
|
+
var EventInfoModel = mongoose13.models.EventInfo || mongoose13.model("EventInfo", schema10);
|
|
1213
1252
|
|
|
1214
1253
|
// src/mongoose/Relation.ts
|
|
1215
|
-
var MongooseSchema10 =
|
|
1254
|
+
var MongooseSchema10 = mongoose14.Schema;
|
|
1216
1255
|
var relationDateTimeSchema = new MongooseSchema10(
|
|
1217
1256
|
{
|
|
1218
1257
|
dateStatus: {
|
|
@@ -1253,13 +1292,13 @@ var RelationTypeSchema = new MongooseSchema10(
|
|
|
1253
1292
|
chatId: {
|
|
1254
1293
|
ref: "Chat",
|
|
1255
1294
|
required: true,
|
|
1256
|
-
type:
|
|
1295
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
1257
1296
|
},
|
|
1258
1297
|
deletedAt: { default: null, required: false, type: Date },
|
|
1259
1298
|
eventId: {
|
|
1260
1299
|
ref: "Event",
|
|
1261
1300
|
required: true,
|
|
1262
|
-
type:
|
|
1301
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
1263
1302
|
},
|
|
1264
1303
|
lastUpdateBy: {
|
|
1265
1304
|
enum: Object.values(EnumResourceType2),
|
|
@@ -1275,7 +1314,7 @@ var RelationTypeSchema = new MongooseSchema10(
|
|
|
1275
1314
|
vendorId: {
|
|
1276
1315
|
ref: "Vendor",
|
|
1277
1316
|
required: true,
|
|
1278
|
-
type:
|
|
1317
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
1279
1318
|
}
|
|
1280
1319
|
},
|
|
1281
1320
|
{ timestamps: true }
|
|
@@ -1287,7 +1326,7 @@ RelationTypeSchema.index({
|
|
|
1287
1326
|
"relationDates.status": 1,
|
|
1288
1327
|
vendorId: 1
|
|
1289
1328
|
});
|
|
1290
|
-
var RelationModel =
|
|
1329
|
+
var RelationModel = mongoose14.models.Relation || mongoose14.model("Relation", RelationTypeSchema);
|
|
1291
1330
|
|
|
1292
1331
|
// src/mongoose/ResourceActivity.ts
|
|
1293
1332
|
import {
|
|
@@ -1296,8 +1335,8 @@ import {
|
|
|
1296
1335
|
EnumOSPlatform as EnumOSPlatform2,
|
|
1297
1336
|
EnumResourceType as EnumResourceType3
|
|
1298
1337
|
} from "@timardex/cluemart-shared";
|
|
1299
|
-
import
|
|
1300
|
-
var MongooseSchema11 =
|
|
1338
|
+
import mongoose15 from "mongoose";
|
|
1339
|
+
var MongooseSchema11 = mongoose15.Schema;
|
|
1301
1340
|
var ActivitySchema = new MongooseSchema11(
|
|
1302
1341
|
{
|
|
1303
1342
|
activityType: {
|
|
@@ -1326,7 +1365,7 @@ var ActivitySchema = new MongooseSchema11(
|
|
|
1326
1365
|
},
|
|
1327
1366
|
{ _id: false }
|
|
1328
1367
|
);
|
|
1329
|
-
var
|
|
1368
|
+
var schema11 = new MongooseSchema11(
|
|
1330
1369
|
{
|
|
1331
1370
|
activity: { default: [], type: [ActivitySchema] },
|
|
1332
1371
|
resourceId: { required: true, type: String },
|
|
@@ -1338,9 +1377,9 @@ var schema10 = new MongooseSchema11(
|
|
|
1338
1377
|
},
|
|
1339
1378
|
{ timestamps: true }
|
|
1340
1379
|
);
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
var ResourceActivityModel =
|
|
1380
|
+
schema11.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
1381
|
+
schema11.index({ "views.location": "2dsphere" });
|
|
1382
|
+
var ResourceActivityModel = mongoose15.models.ResourceActivity || mongoose15.model("ResourceActivity", schema11);
|
|
1344
1383
|
|
|
1345
1384
|
// src/mongoose/User.ts
|
|
1346
1385
|
import {
|
|
@@ -1354,15 +1393,15 @@ import {
|
|
|
1354
1393
|
EnumUserLicence as EnumUserLicence3,
|
|
1355
1394
|
EnumUserRole
|
|
1356
1395
|
} from "@timardex/cluemart-shared";
|
|
1357
|
-
import
|
|
1358
|
-
var MongooseSchema12 =
|
|
1396
|
+
import mongoose16 from "mongoose";
|
|
1397
|
+
var MongooseSchema12 = mongoose16.Schema;
|
|
1359
1398
|
var userActivityEventSchema = new MongooseSchema12(
|
|
1360
1399
|
{
|
|
1361
1400
|
dateTime: dateTimeSchema,
|
|
1362
1401
|
resourceId: {
|
|
1363
1402
|
ref: "Event",
|
|
1364
1403
|
required: false,
|
|
1365
|
-
type:
|
|
1404
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1366
1405
|
}
|
|
1367
1406
|
},
|
|
1368
1407
|
{ _id: false }
|
|
@@ -1372,17 +1411,17 @@ var userActivityFavouritesSchema = new MongooseSchema12(
|
|
|
1372
1411
|
events: {
|
|
1373
1412
|
ref: "Event",
|
|
1374
1413
|
required: false,
|
|
1375
|
-
type: [
|
|
1414
|
+
type: [mongoose16.Schema.Types.ObjectId]
|
|
1376
1415
|
},
|
|
1377
1416
|
partners: {
|
|
1378
1417
|
ref: "Partner",
|
|
1379
1418
|
required: false,
|
|
1380
|
-
type: [
|
|
1419
|
+
type: [mongoose16.Schema.Types.ObjectId]
|
|
1381
1420
|
},
|
|
1382
1421
|
vendors: {
|
|
1383
1422
|
ref: "Vendor",
|
|
1384
1423
|
required: false,
|
|
1385
|
-
type: [
|
|
1424
|
+
type: [mongoose16.Schema.Types.ObjectId]
|
|
1386
1425
|
}
|
|
1387
1426
|
},
|
|
1388
1427
|
{ _id: false }
|
|
@@ -1494,13 +1533,13 @@ var userOverallPointsSchema = new MongooseSchema12(
|
|
|
1494
1533
|
},
|
|
1495
1534
|
{ _id: false }
|
|
1496
1535
|
);
|
|
1497
|
-
var
|
|
1536
|
+
var schema12 = new MongooseSchema12(
|
|
1498
1537
|
{
|
|
1499
1538
|
active: { default: false, required: true, type: Boolean },
|
|
1500
1539
|
affiliate: {
|
|
1501
1540
|
ref: "Affiliate",
|
|
1502
1541
|
required: false,
|
|
1503
|
-
type:
|
|
1542
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1504
1543
|
},
|
|
1505
1544
|
avatar: {
|
|
1506
1545
|
required: false,
|
|
@@ -1509,7 +1548,7 @@ var schema11 = new MongooseSchema12(
|
|
|
1509
1548
|
coupon: {
|
|
1510
1549
|
ref: "Coupon",
|
|
1511
1550
|
required: false,
|
|
1512
|
-
type:
|
|
1551
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1513
1552
|
},
|
|
1514
1553
|
deletedAt: { default: null, required: false, type: Date },
|
|
1515
1554
|
email: { required: true, type: String },
|
|
@@ -1521,13 +1560,13 @@ var schema11 = new MongooseSchema12(
|
|
|
1521
1560
|
events: {
|
|
1522
1561
|
ref: "Event",
|
|
1523
1562
|
required: false,
|
|
1524
|
-
type: [
|
|
1563
|
+
type: [mongoose16.Schema.Types.ObjectId]
|
|
1525
1564
|
},
|
|
1526
1565
|
firstName: { required: true, type: String },
|
|
1527
1566
|
game: {
|
|
1528
1567
|
ref: "Game",
|
|
1529
1568
|
required: false,
|
|
1530
|
-
type:
|
|
1569
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1531
1570
|
},
|
|
1532
1571
|
interests: {
|
|
1533
1572
|
enum: Object.values(EnumResourceType4),
|
|
@@ -1553,7 +1592,7 @@ var schema11 = new MongooseSchema12(
|
|
|
1553
1592
|
partner: {
|
|
1554
1593
|
ref: "Partner",
|
|
1555
1594
|
required: false,
|
|
1556
|
-
type:
|
|
1595
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1557
1596
|
},
|
|
1558
1597
|
password: { required: true, type: String },
|
|
1559
1598
|
platform: {
|
|
@@ -1594,7 +1633,7 @@ var schema11 = new MongooseSchema12(
|
|
|
1594
1633
|
school: {
|
|
1595
1634
|
ref: "School",
|
|
1596
1635
|
required: false,
|
|
1597
|
-
type:
|
|
1636
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1598
1637
|
},
|
|
1599
1638
|
stripe: {
|
|
1600
1639
|
required: false,
|
|
@@ -1619,21 +1658,21 @@ var schema11 = new MongooseSchema12(
|
|
|
1619
1658
|
vendor: {
|
|
1620
1659
|
ref: "Vendor",
|
|
1621
1660
|
required: false,
|
|
1622
|
-
type:
|
|
1661
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
1623
1662
|
}
|
|
1624
1663
|
},
|
|
1625
1664
|
{ strict: false, timestamps: true }
|
|
1626
1665
|
);
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
var UserModel =
|
|
1666
|
+
schema12.index({ "licences.expiryDate": 1 });
|
|
1667
|
+
schema12.index({ "licences.licenceType": 1 });
|
|
1668
|
+
schema12.index({ promoCodes: 1, active: 1, deletedAt: 1 });
|
|
1669
|
+
schema12.index({ email: "text", firstName: "text", lastName: "text" });
|
|
1670
|
+
var UserModel = mongoose16.models.User || mongoose16.model("User", schema12);
|
|
1632
1671
|
|
|
1633
1672
|
// src/mongoose/VerificationToken.ts
|
|
1634
|
-
import
|
|
1635
|
-
var MongooseSchema13 =
|
|
1636
|
-
var
|
|
1673
|
+
import mongoose17 from "mongoose";
|
|
1674
|
+
var MongooseSchema13 = mongoose17.Schema;
|
|
1675
|
+
var schema13 = new MongooseSchema13(
|
|
1637
1676
|
{
|
|
1638
1677
|
createdAt: {
|
|
1639
1678
|
default: Date.now,
|
|
@@ -1648,15 +1687,15 @@ var schema12 = new MongooseSchema13(
|
|
|
1648
1687
|
},
|
|
1649
1688
|
{ timestamps: true }
|
|
1650
1689
|
);
|
|
1651
|
-
var VerificationTokenModel =
|
|
1690
|
+
var VerificationTokenModel = mongoose17.models.VerificationToken || mongoose17.model("VerificationToken", schema13);
|
|
1652
1691
|
|
|
1653
1692
|
// src/mongoose/vendor/Vendor.ts
|
|
1654
1693
|
import {
|
|
1655
1694
|
EnumEventDateStatus as EnumEventDateStatus5,
|
|
1656
1695
|
EnumVendorType
|
|
1657
1696
|
} from "@timardex/cluemart-shared";
|
|
1658
|
-
import
|
|
1659
|
-
var MongooseSchema14 =
|
|
1697
|
+
import mongoose18 from "mongoose";
|
|
1698
|
+
var MongooseSchema14 = mongoose18.Schema;
|
|
1660
1699
|
var vendorProductTypeSchema = new MongooseSchema14(
|
|
1661
1700
|
{
|
|
1662
1701
|
description: { required: false, type: String },
|
|
@@ -1719,7 +1758,7 @@ var downgradeSnapshotSchema = new MongooseSchema14(
|
|
|
1719
1758
|
},
|
|
1720
1759
|
{ _id: false }
|
|
1721
1760
|
);
|
|
1722
|
-
var
|
|
1761
|
+
var schema14 = new MongooseSchema14(
|
|
1723
1762
|
{
|
|
1724
1763
|
...baseResourceFields,
|
|
1725
1764
|
// Importing base resource fields from global.ts
|
|
@@ -1738,12 +1777,12 @@ var schema13 = new MongooseSchema14(
|
|
|
1738
1777
|
unregisteredVendorId: {
|
|
1739
1778
|
ref: "UnregisteredVendor",
|
|
1740
1779
|
required: false,
|
|
1741
|
-
type:
|
|
1780
|
+
type: mongoose18.Schema.Types.ObjectId
|
|
1742
1781
|
},
|
|
1743
1782
|
vendorInfoId: {
|
|
1744
1783
|
ref: "VendorInfo",
|
|
1745
1784
|
required: false,
|
|
1746
|
-
type:
|
|
1785
|
+
type: mongoose18.Schema.Types.ObjectId
|
|
1747
1786
|
},
|
|
1748
1787
|
vendorType: {
|
|
1749
1788
|
enum: Object.values(EnumVendorType),
|
|
@@ -1753,26 +1792,26 @@ var schema13 = new MongooseSchema14(
|
|
|
1753
1792
|
},
|
|
1754
1793
|
{ timestamps: true }
|
|
1755
1794
|
);
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1795
|
+
schema14.index({ name: 1 });
|
|
1796
|
+
schema14.index({ description: 1 });
|
|
1797
|
+
schema14.index({ region: 1 });
|
|
1798
|
+
schema14.index({ "categories.name": 1 });
|
|
1799
|
+
schema14.index({ slug: 1 });
|
|
1800
|
+
schema14.index({
|
|
1762
1801
|
categoriesNames: "text",
|
|
1763
1802
|
description: "text",
|
|
1764
1803
|
name: "text"
|
|
1765
1804
|
});
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
var VendorModel =
|
|
1805
|
+
schema14.index({ deletedAt: 1, "owner.userId": 1 });
|
|
1806
|
+
schema14.plugin(searchNamePlugin);
|
|
1807
|
+
var VendorModel = mongoose18.models.Vendor || mongoose18.model("Vendor", schema14);
|
|
1769
1808
|
|
|
1770
1809
|
// src/mongoose/vendor/VendorInfo.ts
|
|
1771
1810
|
import {
|
|
1772
1811
|
EnumFoodFlavor
|
|
1773
1812
|
} from "@timardex/cluemart-shared";
|
|
1774
|
-
import
|
|
1775
|
-
var MongooseSchema15 =
|
|
1813
|
+
import mongoose19 from "mongoose";
|
|
1814
|
+
var MongooseSchema15 = mongoose19.Schema;
|
|
1776
1815
|
var AttributesSchema = new MongooseSchema15(
|
|
1777
1816
|
{
|
|
1778
1817
|
details: { required: false, type: String },
|
|
@@ -1780,7 +1819,7 @@ var AttributesSchema = new MongooseSchema15(
|
|
|
1780
1819
|
},
|
|
1781
1820
|
{ _id: false }
|
|
1782
1821
|
);
|
|
1783
|
-
var
|
|
1822
|
+
var schema15 = new MongooseSchema15(
|
|
1784
1823
|
{
|
|
1785
1824
|
active: { default: true, type: Boolean },
|
|
1786
1825
|
compliance: {
|
|
@@ -1815,29 +1854,29 @@ var schema14 = new MongooseSchema15(
|
|
|
1815
1854
|
vendorId: {
|
|
1816
1855
|
ref: "Vendor",
|
|
1817
1856
|
required: true,
|
|
1818
|
-
type:
|
|
1857
|
+
type: mongoose19.Schema.Types.ObjectId
|
|
1819
1858
|
}
|
|
1820
1859
|
},
|
|
1821
1860
|
{ timestamps: true }
|
|
1822
1861
|
);
|
|
1823
|
-
|
|
1824
|
-
var VendorInfoModel =
|
|
1862
|
+
schema15.index({ vendorId: 1 });
|
|
1863
|
+
var VendorInfoModel = mongoose19.models.VendorInfo || mongoose19.model("VendorInfo", schema15);
|
|
1825
1864
|
|
|
1826
1865
|
// src/mongoose/vendor/UnregisteredVendor.ts
|
|
1827
|
-
import
|
|
1828
|
-
var MongooseSchema16 =
|
|
1866
|
+
import mongoose20 from "mongoose";
|
|
1867
|
+
var MongooseSchema16 = mongoose20.Schema;
|
|
1829
1868
|
var invitationSchema = new MongooseSchema16(
|
|
1830
1869
|
{
|
|
1831
1870
|
dateTime: { required: true, type: [dateTimeSchema] },
|
|
1832
1871
|
inviterId: {
|
|
1833
1872
|
ref: "Event",
|
|
1834
1873
|
required: true,
|
|
1835
|
-
type:
|
|
1874
|
+
type: mongoose20.Schema.Types.ObjectId
|
|
1836
1875
|
}
|
|
1837
1876
|
},
|
|
1838
1877
|
{ _id: false }
|
|
1839
1878
|
);
|
|
1840
|
-
var
|
|
1879
|
+
var schema16 = new MongooseSchema16(
|
|
1841
1880
|
{
|
|
1842
1881
|
active: { default: true, required: true, type: Boolean },
|
|
1843
1882
|
categoryIds: { required: true, type: [String] },
|
|
@@ -1846,7 +1885,7 @@ var schema15 = new MongooseSchema16(
|
|
|
1846
1885
|
claimedByUserId: {
|
|
1847
1886
|
ref: "User",
|
|
1848
1887
|
required: false,
|
|
1849
|
-
type:
|
|
1888
|
+
type: mongoose20.Schema.Types.ObjectId
|
|
1850
1889
|
},
|
|
1851
1890
|
claimInitiatedAt: { default: null, required: false, type: Date },
|
|
1852
1891
|
claimToken: { default: null, required: false, type: String },
|
|
@@ -1859,15 +1898,15 @@ var schema15 = new MongooseSchema16(
|
|
|
1859
1898
|
},
|
|
1860
1899
|
{ timestamps: true }
|
|
1861
1900
|
);
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
var UnregisteredVendorModel =
|
|
1901
|
+
schema16.index({ name: 1 });
|
|
1902
|
+
schema16.index({ email: 1 });
|
|
1903
|
+
var UnregisteredVendorModel = mongoose20.models.UnregisteredVendor || mongoose20.model("UnregisteredVendor", schema16);
|
|
1865
1904
|
|
|
1866
1905
|
// src/mongoose/event/Event.ts
|
|
1867
1906
|
import { EnumEventType as EnumEventType2 } from "@timardex/cluemart-shared";
|
|
1868
|
-
import
|
|
1869
|
-
var MongooseSchema17 =
|
|
1870
|
-
var
|
|
1907
|
+
import mongoose21 from "mongoose";
|
|
1908
|
+
var MongooseSchema17 = mongoose21.Schema;
|
|
1909
|
+
var schema17 = new MongooseSchema17(
|
|
1871
1910
|
{
|
|
1872
1911
|
...baseResourceFields,
|
|
1873
1912
|
// Importing base resource fields from global.ts
|
|
@@ -1876,7 +1915,7 @@ var schema16 = new MongooseSchema17(
|
|
|
1876
1915
|
eventInfoId: {
|
|
1877
1916
|
ref: "EventInfo",
|
|
1878
1917
|
required: false,
|
|
1879
|
-
type:
|
|
1918
|
+
type: mongoose21.Schema.Types.ObjectId
|
|
1880
1919
|
},
|
|
1881
1920
|
eventType: {
|
|
1882
1921
|
enum: Object.values(EnumEventType2),
|
|
@@ -1900,40 +1939,40 @@ var schema16 = new MongooseSchema17(
|
|
|
1900
1939
|
},
|
|
1901
1940
|
{ timestamps: true }
|
|
1902
1941
|
);
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
var EventModel =
|
|
1942
|
+
schema17.index({ name: 1 });
|
|
1943
|
+
schema17.index({ description: 1 });
|
|
1944
|
+
schema17.index({ region: 1 });
|
|
1945
|
+
schema17.index({ "location.geo": "2dsphere" });
|
|
1946
|
+
schema17.index({ tags: 1 });
|
|
1947
|
+
schema17.index({ deletedAt: 1 });
|
|
1948
|
+
schema17.index({ "dateTime.dateStatus": 1 });
|
|
1949
|
+
schema17.index({ slug: 1 });
|
|
1950
|
+
schema17.index({ description: "text", name: "text", tags: "text" });
|
|
1951
|
+
schema17.index({ deletedAt: 1, "owner.userId": 1 });
|
|
1952
|
+
schema17.plugin(searchNamePlugin);
|
|
1953
|
+
var EventModel = mongoose21.models.Event || mongoose21.model("Event", schema17);
|
|
1915
1954
|
|
|
1916
1955
|
// src/mongoose/event/EventDateArchive.ts
|
|
1917
|
-
import
|
|
1918
|
-
var
|
|
1956
|
+
import mongoose22 from "mongoose";
|
|
1957
|
+
var schema18 = new mongoose22.Schema(
|
|
1919
1958
|
{
|
|
1920
1959
|
dateTime: { required: true, type: [dateTimeSchema] },
|
|
1921
1960
|
eventId: {
|
|
1922
1961
|
ref: "Event",
|
|
1923
1962
|
required: true,
|
|
1924
|
-
type:
|
|
1963
|
+
type: mongoose22.Schema.Types.ObjectId
|
|
1925
1964
|
}
|
|
1926
1965
|
},
|
|
1927
1966
|
{ timestamps: true }
|
|
1928
1967
|
);
|
|
1929
|
-
|
|
1930
|
-
var EventDateArchiveModel =
|
|
1968
|
+
schema18.index({ eventId: 1 }, { unique: true });
|
|
1969
|
+
var EventDateArchiveModel = mongoose22.models.EventDateArchive || mongoose22.model("EventDateArchive", schema18);
|
|
1931
1970
|
|
|
1932
1971
|
// src/mongoose/Partner.ts
|
|
1933
1972
|
import { EnumPartnerType } from "@timardex/cluemart-shared";
|
|
1934
|
-
import
|
|
1935
|
-
var MongooseSchema18 =
|
|
1936
|
-
var
|
|
1973
|
+
import mongoose23 from "mongoose";
|
|
1974
|
+
var MongooseSchema18 = mongoose23.Schema;
|
|
1975
|
+
var schema19 = new MongooseSchema18(
|
|
1937
1976
|
{
|
|
1938
1977
|
...baseResourceFields,
|
|
1939
1978
|
location: {
|
|
@@ -1949,15 +1988,15 @@ var schema18 = new MongooseSchema18(
|
|
|
1949
1988
|
},
|
|
1950
1989
|
{ timestamps: true }
|
|
1951
1990
|
);
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
var PartnerModel =
|
|
1991
|
+
schema19.index({ name: 1 });
|
|
1992
|
+
schema19.index({ description: 1 });
|
|
1993
|
+
schema19.index({ region: 1 });
|
|
1994
|
+
schema19.index({ "location.geo": "2dsphere" });
|
|
1995
|
+
schema19.index({ slug: 1 });
|
|
1996
|
+
schema19.index({ name: "text", description: "text" });
|
|
1997
|
+
schema19.index({ "owner.userId": 1, deletedAt: 1 });
|
|
1998
|
+
schema19.plugin(searchNamePlugin);
|
|
1999
|
+
var PartnerModel = mongoose23.models.Partner || mongoose23.model("Partner", schema19);
|
|
1961
2000
|
|
|
1962
2001
|
// src/mongoose/Post.ts
|
|
1963
2002
|
import {
|
|
@@ -1965,8 +2004,8 @@ import {
|
|
|
1965
2004
|
EnumPostType as EnumPostType2,
|
|
1966
2005
|
EnumResourceType as EnumResourceType5
|
|
1967
2006
|
} from "@timardex/cluemart-shared";
|
|
1968
|
-
import
|
|
1969
|
-
var MongooseSchema19 =
|
|
2007
|
+
import mongoose24, { Schema } from "mongoose";
|
|
2008
|
+
var MongooseSchema19 = mongoose24.Schema;
|
|
1970
2009
|
var contentSchema = new MongooseSchema19(
|
|
1971
2010
|
{
|
|
1972
2011
|
contentData: Schema.Types.Mixed,
|
|
@@ -1992,7 +2031,7 @@ var resourceSchema = new MongooseSchema19(
|
|
|
1992
2031
|
},
|
|
1993
2032
|
{ _id: false }
|
|
1994
2033
|
);
|
|
1995
|
-
var
|
|
2034
|
+
var schema20 = new MongooseSchema19(
|
|
1996
2035
|
{
|
|
1997
2036
|
active: { default: false, required: true, type: Boolean },
|
|
1998
2037
|
approvedAt: { default: null, required: false, type: Date },
|
|
@@ -2023,14 +2062,14 @@ var schema19 = new MongooseSchema19(
|
|
|
2023
2062
|
},
|
|
2024
2063
|
{ timestamps: true }
|
|
2025
2064
|
);
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
var PostModel =
|
|
2065
|
+
schema20.index({ title: 1 });
|
|
2066
|
+
schema20.index({ tags: 1 });
|
|
2067
|
+
schema20.index({ postType: 1, slug: 1 }, { unique: true });
|
|
2068
|
+
var PostModel = mongoose24.models.Post || mongoose24.model("Post", schema20);
|
|
2030
2069
|
|
|
2031
2070
|
// src/mongoose/AppSetting.ts
|
|
2032
|
-
import
|
|
2033
|
-
var MongooseSchema20 =
|
|
2071
|
+
import mongoose25 from "mongoose";
|
|
2072
|
+
var MongooseSchema20 = mongoose25.Schema;
|
|
2034
2073
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
2035
2074
|
var AppSettingSchema = new MongooseSchema20(
|
|
2036
2075
|
{
|
|
@@ -2054,6 +2093,8 @@ var AppSettingSchema = new MongooseSchema20(
|
|
|
2054
2093
|
validate: Number.isInteger
|
|
2055
2094
|
},
|
|
2056
2095
|
mobileDisplayEnabled: { default: false, required: true, type: Boolean },
|
|
2096
|
+
purchasePricing: { type: MongooseSchema20.Types.Mixed },
|
|
2097
|
+
regionPricing: { type: MongooseSchema20.Types.Mixed },
|
|
2057
2098
|
paidSlotsPerPlacement: { enum: [30], type: Number },
|
|
2058
2099
|
reservedSlotsPerPlacement: { enum: [7], type: Number },
|
|
2059
2100
|
rotationSeconds: { enum: [8], type: Number },
|
|
@@ -2078,12 +2119,12 @@ var AppSettingSchema = new MongooseSchema20(
|
|
|
2078
2119
|
},
|
|
2079
2120
|
{ timestamps: true }
|
|
2080
2121
|
);
|
|
2081
|
-
var AppSettingModel =
|
|
2122
|
+
var AppSettingModel = mongoose25.models.AppSetting || mongoose25.model("AppSetting", AppSettingSchema);
|
|
2082
2123
|
|
|
2083
2124
|
// src/mongoose/AuthHandoffToken.ts
|
|
2084
|
-
import
|
|
2085
|
-
var MongooseSchema21 =
|
|
2086
|
-
var
|
|
2125
|
+
import mongoose26 from "mongoose";
|
|
2126
|
+
var MongooseSchema21 = mongoose26.Schema;
|
|
2127
|
+
var schema21 = new MongooseSchema21(
|
|
2087
2128
|
{
|
|
2088
2129
|
expiresAt: { required: true, type: Date },
|
|
2089
2130
|
jti: { index: true, required: true, type: String, unique: true },
|
|
@@ -2092,27 +2133,27 @@ var schema20 = new MongooseSchema21(
|
|
|
2092
2133
|
index: true,
|
|
2093
2134
|
ref: "User",
|
|
2094
2135
|
required: true,
|
|
2095
|
-
type:
|
|
2136
|
+
type: mongoose26.Schema.Types.ObjectId
|
|
2096
2137
|
}
|
|
2097
2138
|
},
|
|
2098
2139
|
{ timestamps: true }
|
|
2099
2140
|
);
|
|
2100
|
-
|
|
2101
|
-
var AuthHandoffTokenModel =
|
|
2141
|
+
schema21.index({ expiresAt: 1 }, { expireAfterSeconds: 0 });
|
|
2142
|
+
var AuthHandoffTokenModel = mongoose26.models.AuthHandoffToken || mongoose26.model("AuthHandoffToken", schema21);
|
|
2102
2143
|
|
|
2103
2144
|
// src/mongoose/game/Game.ts
|
|
2104
2145
|
import {
|
|
2105
2146
|
EnumGameStatus,
|
|
2106
2147
|
EnumGameType
|
|
2107
2148
|
} from "@timardex/cluemart-shared";
|
|
2108
|
-
import
|
|
2149
|
+
import mongoose30 from "mongoose";
|
|
2109
2150
|
|
|
2110
2151
|
// src/mongoose/game/DailyClue.ts
|
|
2111
|
-
import
|
|
2152
|
+
import mongoose28 from "mongoose";
|
|
2112
2153
|
|
|
2113
2154
|
// src/mongoose/game/utils.ts
|
|
2114
|
-
import
|
|
2115
|
-
var MongooseSchema22 =
|
|
2155
|
+
import mongoose27 from "mongoose";
|
|
2156
|
+
var MongooseSchema22 = mongoose27.Schema;
|
|
2116
2157
|
var schemaGameDate = new MongooseSchema22(
|
|
2117
2158
|
{
|
|
2118
2159
|
endDate: { required: true, type: Date },
|
|
@@ -2122,7 +2163,7 @@ var schemaGameDate = new MongooseSchema22(
|
|
|
2122
2163
|
);
|
|
2123
2164
|
|
|
2124
2165
|
// src/mongoose/game/DailyClue.ts
|
|
2125
|
-
var MongooseSchema23 =
|
|
2166
|
+
var MongooseSchema23 = mongoose28.Schema;
|
|
2126
2167
|
var schemaLetters = new MongooseSchema23(
|
|
2127
2168
|
{
|
|
2128
2169
|
collected: { required: false, type: [String] },
|
|
@@ -2153,8 +2194,8 @@ var schemaDailyClueGameData = new MongooseSchema23(
|
|
|
2153
2194
|
);
|
|
2154
2195
|
|
|
2155
2196
|
// src/mongoose/game/PuzzleGame.ts
|
|
2156
|
-
import
|
|
2157
|
-
var MongooseSchema24 =
|
|
2197
|
+
import mongoose29 from "mongoose";
|
|
2198
|
+
var MongooseSchema24 = mongoose29.Schema;
|
|
2158
2199
|
var schemaPuzzleAnswer = new MongooseSchema24(
|
|
2159
2200
|
{
|
|
2160
2201
|
answer: { required: true, type: String },
|
|
@@ -2199,16 +2240,16 @@ var schemaPuzzleGameData = new MongooseSchema24(
|
|
|
2199
2240
|
);
|
|
2200
2241
|
|
|
2201
2242
|
// src/mongoose/game/Game.ts
|
|
2202
|
-
var MongooseSchema25 =
|
|
2243
|
+
var MongooseSchema25 = mongoose30.Schema;
|
|
2203
2244
|
var gameDataSchemas = {
|
|
2204
2245
|
[EnumGameType.DAILY_CLUE]: schemaDailyClueGameData,
|
|
2205
2246
|
[EnumGameType.MINI_QUIZ]: schemaPuzzleGameData,
|
|
2206
2247
|
[EnumGameType.ODD_ONE_OUT]: schemaPuzzleGameData
|
|
2207
2248
|
};
|
|
2208
2249
|
var gameDataDefinition = Object.fromEntries(
|
|
2209
|
-
Object.entries(gameDataSchemas).map(([key,
|
|
2250
|
+
Object.entries(gameDataSchemas).map(([key, schema26]) => [
|
|
2210
2251
|
key,
|
|
2211
|
-
{ default: null, required: false, type:
|
|
2252
|
+
{ default: null, required: false, type: schema26 }
|
|
2212
2253
|
])
|
|
2213
2254
|
);
|
|
2214
2255
|
var gameHistorySchema = new MongooseSchema25(
|
|
@@ -2249,7 +2290,7 @@ var gameTypeSchema = new MongooseSchema25(
|
|
|
2249
2290
|
},
|
|
2250
2291
|
{ timestamps: true }
|
|
2251
2292
|
);
|
|
2252
|
-
var
|
|
2293
|
+
var schema22 = new MongooseSchema25(
|
|
2253
2294
|
{
|
|
2254
2295
|
active: { default: false, required: true, type: Boolean },
|
|
2255
2296
|
deletedAt: { default: null, required: false, type: Date },
|
|
@@ -2262,11 +2303,11 @@ var schema21 = new MongooseSchema25(
|
|
|
2262
2303
|
},
|
|
2263
2304
|
{ timestamps: true }
|
|
2264
2305
|
);
|
|
2265
|
-
var GameModel =
|
|
2306
|
+
var GameModel = mongoose30.models.Game || mongoose30.model("Game", schema22);
|
|
2266
2307
|
|
|
2267
2308
|
// src/mongoose/School.ts
|
|
2268
|
-
import
|
|
2269
|
-
var MongooseSchema26 =
|
|
2309
|
+
import mongoose31 from "mongoose";
|
|
2310
|
+
var MongooseSchema26 = mongoose31.Schema;
|
|
2270
2311
|
var campaignsSchema = new MongooseSchema26(
|
|
2271
2312
|
{
|
|
2272
2313
|
endDate: { required: true, type: Date },
|
|
@@ -2275,7 +2316,7 @@ var campaignsSchema = new MongooseSchema26(
|
|
|
2275
2316
|
},
|
|
2276
2317
|
{ _id: false }
|
|
2277
2318
|
);
|
|
2278
|
-
var
|
|
2319
|
+
var schema23 = new MongooseSchema26(
|
|
2279
2320
|
{
|
|
2280
2321
|
// New schools are active by default
|
|
2281
2322
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -2302,14 +2343,14 @@ var schema22 = new MongooseSchema26(
|
|
|
2302
2343
|
},
|
|
2303
2344
|
{ timestamps: true }
|
|
2304
2345
|
);
|
|
2305
|
-
|
|
2346
|
+
schema23.index(
|
|
2306
2347
|
{ schoolCode: 1 },
|
|
2307
2348
|
{
|
|
2308
2349
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
2309
2350
|
unique: true
|
|
2310
2351
|
}
|
|
2311
2352
|
);
|
|
2312
|
-
var SchoolModel =
|
|
2353
|
+
var SchoolModel = mongoose31.models.School || mongoose31.model("School", schema23);
|
|
2313
2354
|
|
|
2314
2355
|
// src/mongoose/Affiliate.ts
|
|
2315
2356
|
import {
|
|
@@ -2317,8 +2358,8 @@ import {
|
|
|
2317
2358
|
EnumAffiliateRewardType,
|
|
2318
2359
|
EnumResourceType as EnumResourceType6
|
|
2319
2360
|
} from "@timardex/cluemart-shared";
|
|
2320
|
-
import
|
|
2321
|
-
var MongooseSchema27 =
|
|
2361
|
+
import mongoose32 from "mongoose";
|
|
2362
|
+
var MongooseSchema27 = mongoose32.Schema;
|
|
2322
2363
|
var affiliateRewardSchema = new MongooseSchema27(
|
|
2323
2364
|
{
|
|
2324
2365
|
createdAt: { required: true, type: Date },
|
|
@@ -2339,7 +2380,7 @@ var affiliateResourceSchema = new MongooseSchema27(
|
|
|
2339
2380
|
resourceDeletedAt: { default: null, required: false, type: Date },
|
|
2340
2381
|
resourceId: {
|
|
2341
2382
|
required: true,
|
|
2342
|
-
type:
|
|
2383
|
+
type: mongoose32.Schema.Types.ObjectId
|
|
2343
2384
|
},
|
|
2344
2385
|
resourceName: { required: true, type: String },
|
|
2345
2386
|
resourceOwner: {
|
|
@@ -2402,7 +2443,7 @@ var redeemHistorySchema = new MongooseSchema27(
|
|
|
2402
2443
|
},
|
|
2403
2444
|
{ _id: false }
|
|
2404
2445
|
);
|
|
2405
|
-
var
|
|
2446
|
+
var schema24 = new MongooseSchema27(
|
|
2406
2447
|
{
|
|
2407
2448
|
active: { default: false, required: true, type: Boolean },
|
|
2408
2449
|
affiliateBonusRewards: {
|
|
@@ -2432,22 +2473,22 @@ var schema23 = new MongooseSchema27(
|
|
|
2432
2473
|
},
|
|
2433
2474
|
{ timestamps: true }
|
|
2434
2475
|
);
|
|
2435
|
-
|
|
2476
|
+
schema24.index(
|
|
2436
2477
|
{ affiliateCode: 1 },
|
|
2437
2478
|
{
|
|
2438
2479
|
partialFilterExpression: { active: true, deletedAt: null },
|
|
2439
2480
|
unique: true
|
|
2440
2481
|
}
|
|
2441
2482
|
);
|
|
2442
|
-
var AffiliateModel =
|
|
2483
|
+
var AffiliateModel = mongoose32.models.Affiliate || mongoose32.model("Affiliate", schema24);
|
|
2443
2484
|
|
|
2444
2485
|
// src/mongoose/Coupon.ts
|
|
2445
2486
|
import {
|
|
2446
2487
|
EnumCouponQualificationType,
|
|
2447
2488
|
EnumResourceType as EnumResourceType7
|
|
2448
2489
|
} from "@timardex/cluemart-shared";
|
|
2449
|
-
import
|
|
2450
|
-
var MongooseSchema28 =
|
|
2490
|
+
import mongoose33 from "mongoose";
|
|
2491
|
+
var MongooseSchema28 = mongoose33.Schema;
|
|
2451
2492
|
var couponOptionSchema = new MongooseSchema28(
|
|
2452
2493
|
{
|
|
2453
2494
|
buy: { required: false, type: Number },
|
|
@@ -2467,20 +2508,20 @@ var couponVendorProductSchema = new MongooseSchema28(
|
|
|
2467
2508
|
{
|
|
2468
2509
|
couponId: {
|
|
2469
2510
|
required: true,
|
|
2470
|
-
type:
|
|
2511
|
+
type: mongoose33.Schema.Types.ObjectId
|
|
2471
2512
|
},
|
|
2472
2513
|
productId: {
|
|
2473
2514
|
required: true,
|
|
2474
|
-
type:
|
|
2515
|
+
type: mongoose33.Schema.Types.ObjectId
|
|
2475
2516
|
},
|
|
2476
2517
|
vendorCouponId: {
|
|
2477
2518
|
required: false,
|
|
2478
|
-
type:
|
|
2519
|
+
type: mongoose33.Schema.Types.ObjectId
|
|
2479
2520
|
},
|
|
2480
2521
|
vendorId: {
|
|
2481
2522
|
ref: "Vendor",
|
|
2482
2523
|
required: true,
|
|
2483
|
-
type:
|
|
2524
|
+
type: mongoose33.Schema.Types.ObjectId
|
|
2484
2525
|
}
|
|
2485
2526
|
},
|
|
2486
2527
|
{ _id: false }
|
|
@@ -2502,7 +2543,7 @@ var couponParticipantUserSchema = new MongooseSchema28(
|
|
|
2502
2543
|
userId: {
|
|
2503
2544
|
ref: "User",
|
|
2504
2545
|
required: true,
|
|
2505
|
-
type:
|
|
2546
|
+
type: mongoose33.Schema.Types.ObjectId
|
|
2506
2547
|
}
|
|
2507
2548
|
},
|
|
2508
2549
|
{ timestamps: true }
|
|
@@ -2534,7 +2575,7 @@ var couponDataSchema = new MongooseSchema28(
|
|
|
2534
2575
|
},
|
|
2535
2576
|
{ timestamps: true }
|
|
2536
2577
|
);
|
|
2537
|
-
var
|
|
2578
|
+
var schema25 = new MongooseSchema28(
|
|
2538
2579
|
{
|
|
2539
2580
|
active: { default: true, required: true, type: Boolean },
|
|
2540
2581
|
couponData: { default: [], required: false, type: [couponDataSchema] },
|
|
@@ -2546,14 +2587,14 @@ var schema24 = new MongooseSchema28(
|
|
|
2546
2587
|
},
|
|
2547
2588
|
{ timestamps: true }
|
|
2548
2589
|
);
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
var CouponModel =
|
|
2590
|
+
schema25.index({ active: 1, deletedAt: 1, "owner.userId": 1 });
|
|
2591
|
+
schema25.index({ "couponData.participantUsers.userId": 1 });
|
|
2592
|
+
var CouponModel = mongoose33.models.Coupon || mongoose33.model("Coupon", schema25);
|
|
2552
2593
|
|
|
2553
2594
|
// src/mongoose/Impersonation.ts
|
|
2554
2595
|
import { EnumResourceType as EnumResourceType8 } from "@timardex/cluemart-shared";
|
|
2555
|
-
import
|
|
2556
|
-
var MongooseSchema29 =
|
|
2596
|
+
import mongoose34 from "mongoose";
|
|
2597
|
+
var MongooseSchema29 = mongoose34.Schema;
|
|
2557
2598
|
var impersonationSessionSchema = new MongooseSchema29(
|
|
2558
2599
|
{
|
|
2559
2600
|
expiresAt: { expires: 0, required: true, type: Date },
|
|
@@ -2561,19 +2602,19 @@ var impersonationSessionSchema = new MongooseSchema29(
|
|
|
2561
2602
|
index: true,
|
|
2562
2603
|
ref: "User",
|
|
2563
2604
|
required: true,
|
|
2564
|
-
type:
|
|
2605
|
+
type: mongoose34.Schema.Types.ObjectId
|
|
2565
2606
|
},
|
|
2566
2607
|
impersonatorUserId: {
|
|
2567
2608
|
index: true,
|
|
2568
2609
|
ref: "User",
|
|
2569
2610
|
required: true,
|
|
2570
|
-
type:
|
|
2611
|
+
type: mongoose34.Schema.Types.ObjectId
|
|
2571
2612
|
},
|
|
2572
2613
|
refreshToken: { required: true, type: String }
|
|
2573
2614
|
},
|
|
2574
2615
|
{ timestamps: true }
|
|
2575
2616
|
);
|
|
2576
|
-
var ImpersonationSessionModel =
|
|
2617
|
+
var ImpersonationSessionModel = mongoose34.models.ImpersonationSession || mongoose34.model(
|
|
2577
2618
|
"ImpersonationSession",
|
|
2578
2619
|
impersonationSessionSchema
|
|
2579
2620
|
);
|
|
@@ -2584,24 +2625,24 @@ var impersonationAuditSchema = new MongooseSchema29(
|
|
|
2584
2625
|
impersonatedUserId: {
|
|
2585
2626
|
ref: "User",
|
|
2586
2627
|
required: true,
|
|
2587
|
-
type:
|
|
2628
|
+
type: mongoose34.Schema.Types.ObjectId
|
|
2588
2629
|
},
|
|
2589
2630
|
impersonatorUserId: {
|
|
2590
2631
|
ref: "User",
|
|
2591
2632
|
required: true,
|
|
2592
|
-
type:
|
|
2633
|
+
type: mongoose34.Schema.Types.ObjectId
|
|
2593
2634
|
},
|
|
2594
|
-
resourceId: { type:
|
|
2635
|
+
resourceId: { type: mongoose34.Schema.Types.ObjectId },
|
|
2595
2636
|
resourceType: { enum: Object.values(EnumResourceType8), type: String },
|
|
2596
2637
|
sessionId: {
|
|
2597
2638
|
ref: "ImpersonationSession",
|
|
2598
2639
|
required: true,
|
|
2599
|
-
type:
|
|
2640
|
+
type: mongoose34.Schema.Types.ObjectId
|
|
2600
2641
|
}
|
|
2601
2642
|
},
|
|
2602
2643
|
{ timestamps: true }
|
|
2603
2644
|
);
|
|
2604
|
-
var ImpersonationAuditModel =
|
|
2645
|
+
var ImpersonationAuditModel = mongoose34.models.ImpersonationAudit || mongoose34.model(
|
|
2605
2646
|
"ImpersonationAudit",
|
|
2606
2647
|
impersonationAuditSchema
|
|
2607
2648
|
);
|
|
@@ -2612,6 +2653,7 @@ export {
|
|
|
2612
2653
|
AD_BILLING_CATALOG_COLLECTION_NAME,
|
|
2613
2654
|
AdBillingCatalogModel,
|
|
2614
2655
|
AdBookingModel,
|
|
2656
|
+
AdPurchaseModel,
|
|
2615
2657
|
AdMetricsModel,
|
|
2616
2658
|
BILLING_CATALOG_COLLECTION_NAME,
|
|
2617
2659
|
BillingCatalogModel,
|
|
@@ -2662,4 +2704,4 @@ export {
|
|
|
2662
2704
|
ImpersonationSessionModel,
|
|
2663
2705
|
ImpersonationAuditModel
|
|
2664
2706
|
};
|
|
2665
|
-
//# sourceMappingURL=chunk-
|
|
2707
|
+
//# sourceMappingURL=chunk-7JWQ7WKJ.mjs.map
|