@timardex/cluemart-server-shared 1.0.85 → 1.0.86
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-6TLM3TPY.mjs → chunk-FVFOQT5F.mjs} +188 -101
- package/dist/chunk-FVFOQT5F.mjs.map +1 -0
- package/dist/index.cjs +193 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.mjs +191 -104
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +189 -101
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +17 -2
- package/dist/mongoose/index.d.ts +17 -2
- package/dist/mongoose/index.mjs +3 -1
- package/dist/service/index.cjs +177 -91
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-6TLM3TPY.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -6790,6 +6790,15 @@ var EnumInviteStatus = /* @__PURE__ */ ((EnumInviteStatus22) => {
|
|
|
6790
6790
|
EnumInviteStatus22["WAITING"] = "Waiting";
|
|
6791
6791
|
return EnumInviteStatus22;
|
|
6792
6792
|
})(EnumInviteStatus || {});
|
|
6793
|
+
var EnumChatReportReason = /* @__PURE__ */ ((EnumChatReportReason22) => {
|
|
6794
|
+
EnumChatReportReason22["INAPPROPRIATE_CONTENT"] = "Inappropriate_Content";
|
|
6795
|
+
EnumChatReportReason22["HARASSMENT_OR_BULLYING"] = "Harassment_or_Bullying";
|
|
6796
|
+
EnumChatReportReason22["HATE_SPEECH"] = "Hate_Speech";
|
|
6797
|
+
EnumChatReportReason22["SPAM_OR_SCAM"] = "Spam_or_Scam";
|
|
6798
|
+
EnumChatReportReason22["VIOLENCE_OR_DANGEROUS_BEHAVIOR"] = "Violence_or_Dangerous_Behavior";
|
|
6799
|
+
EnumChatReportReason22["OTHER"] = "Other";
|
|
6800
|
+
return EnumChatReportReason22;
|
|
6801
|
+
})(EnumChatReportReason || {});
|
|
6793
6802
|
var EnumChatType = /* @__PURE__ */ ((EnumChatType22) => {
|
|
6794
6803
|
EnumChatType22["GROUP"] = "group";
|
|
6795
6804
|
EnumChatType22["PRIVATE"] = "private";
|
|
@@ -6818,23 +6827,23 @@ var EnumResourceType = /* @__PURE__ */ ((EnumResourceType22) => {
|
|
|
6818
6827
|
EnumResourceType22["PARTNER"] = "partner";
|
|
6819
6828
|
return EnumResourceType22;
|
|
6820
6829
|
})(EnumResourceType || {});
|
|
6821
|
-
var EnumEventType = /* @__PURE__ */ ((
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
return
|
|
6830
|
+
var EnumEventType = /* @__PURE__ */ ((EnumEventType3) => {
|
|
6831
|
+
EnumEventType3["MARKET"] = "Market";
|
|
6832
|
+
EnumEventType3["EXPO"] = "Expo";
|
|
6833
|
+
EnumEventType3["FAIR"] = "Fair";
|
|
6834
|
+
EnumEventType3["FESTIVAL"] = "Festival";
|
|
6835
|
+
return EnumEventType3;
|
|
6827
6836
|
})(EnumEventType || {});
|
|
6828
6837
|
var EnumVendorType = /* @__PURE__ */ ((EnumVendorType22) => {
|
|
6829
6838
|
EnumVendorType22["STALLHOLDER"] = "Stallholder";
|
|
6830
6839
|
EnumVendorType22["SHOP"] = "Shop";
|
|
6831
6840
|
return EnumVendorType22;
|
|
6832
6841
|
})(EnumVendorType || {});
|
|
6833
|
-
var EnumPartnerType = /* @__PURE__ */ ((
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
return
|
|
6842
|
+
var EnumPartnerType = /* @__PURE__ */ ((EnumPartnerType3) => {
|
|
6843
|
+
EnumPartnerType3["CHARITY_PARTNER"] = "Charity_Partner";
|
|
6844
|
+
EnumPartnerType3["MEDIA_PARTNER"] = "Media_Partner";
|
|
6845
|
+
EnumPartnerType3["SUPPORTING_PARTNER"] = "Supporting_Partner";
|
|
6846
|
+
return EnumPartnerType3;
|
|
6838
6847
|
})(EnumPartnerType || {});
|
|
6839
6848
|
var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
6840
6849
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
@@ -6882,6 +6891,7 @@ var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
|
|
|
6882
6891
|
return EnumNotificationType22;
|
|
6883
6892
|
})(EnumNotificationType || {});
|
|
6884
6893
|
var EnumRegions = /* @__PURE__ */ ((EnumRegions22) => {
|
|
6894
|
+
EnumRegions22["All"] = "All Regions";
|
|
6885
6895
|
EnumRegions22["Auckland"] = "Auckland";
|
|
6886
6896
|
EnumRegions22["BayOfPlentyGisborne"] = "Bay of Plenty & Gisborne";
|
|
6887
6897
|
EnumRegions22["CanterburyWestCoast"] = "Canterbury & West Coast";
|
|
@@ -9145,6 +9155,23 @@ var GET_CHATS_BY_REGION = gql`
|
|
|
9145
9155
|
}
|
|
9146
9156
|
${CHAT_FIELDS_FRAGMENT}
|
|
9147
9157
|
`;
|
|
9158
|
+
var GET_REPORTED_CHAT_USERS = gql`
|
|
9159
|
+
query getReportedChatUsers {
|
|
9160
|
+
reportedChatUsers {
|
|
9161
|
+
_id
|
|
9162
|
+
chatId
|
|
9163
|
+
createdAt
|
|
9164
|
+
reason {
|
|
9165
|
+
reasonType
|
|
9166
|
+
details
|
|
9167
|
+
}
|
|
9168
|
+
reportedUserId
|
|
9169
|
+
reporterUserId
|
|
9170
|
+
resolved
|
|
9171
|
+
updatedAt
|
|
9172
|
+
}
|
|
9173
|
+
}
|
|
9174
|
+
`;
|
|
9148
9175
|
var SEND_CHAT_MESSAGE_MUTATION = gql`
|
|
9149
9176
|
mutation sendChatMessage($_id: ID!, $input: ChatMessageInputType!) {
|
|
9150
9177
|
sendChatMessage(_id: $_id, input: $input) {
|
|
@@ -9190,6 +9217,13 @@ var MARK_CHAT_MESSAGES_SEEN_MUTATION = gql`
|
|
|
9190
9217
|
}
|
|
9191
9218
|
${CHAT_FIELDS_FRAGMENT}
|
|
9192
9219
|
`;
|
|
9220
|
+
var REPORT_CHAT_USER_MUTATION = gql`
|
|
9221
|
+
mutation reportChatUser($input: ReportChatUserInputType!) {
|
|
9222
|
+
reportChatUser(input: $input) {
|
|
9223
|
+
success
|
|
9224
|
+
}
|
|
9225
|
+
}
|
|
9226
|
+
`;
|
|
9193
9227
|
var GET_CHAT_MESSAGE = gql`
|
|
9194
9228
|
subscription {
|
|
9195
9229
|
getChatMessage {
|
|
@@ -9768,6 +9802,18 @@ var REMOVE_USER_PRESENT_RESOURCE_MUTATION = gql`
|
|
|
9768
9802
|
}
|
|
9769
9803
|
${USER_FIELDS_FRAGMENT}
|
|
9770
9804
|
`;
|
|
9805
|
+
var SELECT_STANDARD_PACKAGE_MUTATION = gql`
|
|
9806
|
+
mutation selectStandardPackage($selectedLicence: LicencesEnumType!) {
|
|
9807
|
+
selectStandardPackage(selectedLicence: $selectedLicence) {
|
|
9808
|
+
licences {
|
|
9809
|
+
...LicenceFields
|
|
9810
|
+
}
|
|
9811
|
+
userId
|
|
9812
|
+
message
|
|
9813
|
+
}
|
|
9814
|
+
}
|
|
9815
|
+
${LICENCE_FIELDS_FRAGMENT}
|
|
9816
|
+
`;
|
|
9771
9817
|
var AD_FIELDS_FRAGMENT = gql`
|
|
9772
9818
|
fragment AdFields on AdType {
|
|
9773
9819
|
_id
|
|
@@ -9918,13 +9964,11 @@ var CREATE_CUSTOMER_PORTAL = gql`
|
|
|
9918
9964
|
var SELECT_PACKAGE_MUTATION = gql`
|
|
9919
9965
|
mutation selectPackage(
|
|
9920
9966
|
$billingPeriod: BillingPeriodEnumType
|
|
9921
|
-
$removedLicence: LicencesEnumType
|
|
9922
9967
|
$selectedLicence: LicencesEnumType!
|
|
9923
9968
|
$useStripe: Boolean
|
|
9924
9969
|
) {
|
|
9925
9970
|
selectPackage(
|
|
9926
9971
|
billingPeriod: $billingPeriod
|
|
9927
|
-
removedLicence: $removedLicence
|
|
9928
9972
|
selectedLicence: $selectedLicence
|
|
9929
9973
|
useStripe: $useStripe
|
|
9930
9974
|
) {
|
|
@@ -10348,14 +10392,17 @@ var eventSchema = globalResourceSchema.shape({
|
|
|
10348
10392
|
return true;
|
|
10349
10393
|
}
|
|
10350
10394
|
),
|
|
10351
|
-
eventType: create$8().oneOf(Object.values(EnumEventType)).required("Please select an Event type"),
|
|
10395
|
+
eventType: create$8().oneOf(Object.values(EnumEventType), "Please select a valid Event type").required("Please select an Event type"),
|
|
10352
10396
|
location: locationSchema,
|
|
10353
10397
|
nzbn: create$6().required("NZBN is required").matches(nzbnRegex, "NZBN must be 13 digits and start with 94"),
|
|
10354
10398
|
rainOrShine: create$7().label("Rain or Shine").required("Please specify if the event is rain or shine"),
|
|
10355
10399
|
tags: create$2().of(create$6().defined()).min(1, "Tags are required").required("Tags are required")
|
|
10356
10400
|
});
|
|
10357
10401
|
var paymentInfoSchema = create$3({
|
|
10358
|
-
paymentMethod: create$8().oneOf(
|
|
10402
|
+
paymentMethod: create$8().oneOf(
|
|
10403
|
+
Object.values(EnumPaymentMethod),
|
|
10404
|
+
"Please select a valid Payment method"
|
|
10405
|
+
).required("Please select a Payment method"),
|
|
10359
10406
|
accountHolderName: create$6().when("paymentMethod", {
|
|
10360
10407
|
is: "bank_transfer",
|
|
10361
10408
|
then: (schema14) => schema14.required("Account holder name is required for bank transfer").trim(),
|
|
@@ -10388,7 +10435,7 @@ var eventInfoSchema = create$3().shape({
|
|
|
10388
10435
|
return value < applicationDeadlineHours;
|
|
10389
10436
|
}
|
|
10390
10437
|
),
|
|
10391
|
-
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment
|
|
10438
|
+
paymentInfo: create$2().of(paymentInfoSchema).min(1, "At least one payment method is required").required("Payment info is required")
|
|
10392
10439
|
});
|
|
10393
10440
|
var vendroMenuSchema = create$3().shape({
|
|
10394
10441
|
description: create$6().trim().nullable().defined().test(
|
|
@@ -10717,7 +10764,7 @@ var adSchema = create$3().shape({
|
|
|
10717
10764
|
var partnerSchema = globalResourceSchema.shape({
|
|
10718
10765
|
location: locationSchema,
|
|
10719
10766
|
nzbn: create$6().required("NZBN is required").matches(nzbnRegex, "NZBN must be 13 digits and start with 94"),
|
|
10720
|
-
partnerType: create$8().oneOf(Object.values(EnumPartnerType)).required("Please select a Partner type")
|
|
10767
|
+
partnerType: create$8().oneOf(Object.values(EnumPartnerType), "Please select a valid Partner type").required("Please select a Partner type")
|
|
10721
10768
|
});
|
|
10722
10769
|
var EnumPostType = /* @__PURE__ */ ((EnumPostType2) => {
|
|
10723
10770
|
EnumPostType2["DAILY_MEETS"] = "daily_meets";
|
|
@@ -10796,14 +10843,13 @@ var defaultPartnerFormValues = {
|
|
|
10796
10843
|
...globalDefaultValues,
|
|
10797
10844
|
location: defaultLocation,
|
|
10798
10845
|
nzbn: "",
|
|
10799
|
-
partnerType: "
|
|
10800
|
-
/* CHARITY_PARTNER */
|
|
10846
|
+
partnerType: ""
|
|
10801
10847
|
};
|
|
10802
10848
|
var defaultEventFormValues = {
|
|
10803
10849
|
...globalDefaultValues,
|
|
10804
10850
|
claimed: true,
|
|
10805
10851
|
dateTime: [],
|
|
10806
|
-
eventType: "
|
|
10852
|
+
eventType: "",
|
|
10807
10853
|
googlePlaceId: null,
|
|
10808
10854
|
location: defaultLocation,
|
|
10809
10855
|
nzbn: "",
|
|
@@ -11274,7 +11320,7 @@ schema2.index({
|
|
|
11274
11320
|
});
|
|
11275
11321
|
var AdModel = mongoose4.models.Ad || mongoose4.model("Ad", schema2);
|
|
11276
11322
|
|
|
11277
|
-
// src/mongoose/Chat.ts
|
|
11323
|
+
// src/mongoose/chat/Chat.ts
|
|
11278
11324
|
import mongoose5 from "mongoose";
|
|
11279
11325
|
var MongooseSchema5 = mongoose5.Schema;
|
|
11280
11326
|
var MessageReplyPreviewSchema = new MongooseSchema5(
|
|
@@ -11374,10 +11420,50 @@ ChatSchema.index({
|
|
|
11374
11420
|
});
|
|
11375
11421
|
var ChatModel = mongoose5.models.Chat || mongoose5.model("Chat", ChatSchema);
|
|
11376
11422
|
|
|
11377
|
-
// src/mongoose/
|
|
11423
|
+
// src/mongoose/chat/ChatReport.ts
|
|
11378
11424
|
import mongoose6 from "mongoose";
|
|
11379
11425
|
var MongooseSchema6 = mongoose6.Schema;
|
|
11380
|
-
var
|
|
11426
|
+
var ReasonSchema = new MongooseSchema6(
|
|
11427
|
+
{
|
|
11428
|
+
details: { default: null, required: false, type: String },
|
|
11429
|
+
reasonType: {
|
|
11430
|
+
enum: Object.values(EnumChatReportReason),
|
|
11431
|
+
required: true,
|
|
11432
|
+
type: String
|
|
11433
|
+
}
|
|
11434
|
+
},
|
|
11435
|
+
{ _id: false }
|
|
11436
|
+
);
|
|
11437
|
+
var ChatReportSchema = new MongooseSchema6(
|
|
11438
|
+
{
|
|
11439
|
+
chatId: {
|
|
11440
|
+
ref: "Chat",
|
|
11441
|
+
required: true,
|
|
11442
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
11443
|
+
},
|
|
11444
|
+
reason: { required: true, type: ReasonSchema },
|
|
11445
|
+
reportedUserId: {
|
|
11446
|
+
ref: "User",
|
|
11447
|
+
required: true,
|
|
11448
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
11449
|
+
},
|
|
11450
|
+
reporterUserId: {
|
|
11451
|
+
ref: "User",
|
|
11452
|
+
required: true,
|
|
11453
|
+
type: mongoose6.Schema.Types.ObjectId
|
|
11454
|
+
},
|
|
11455
|
+
resolved: { default: false, required: true, type: Boolean }
|
|
11456
|
+
},
|
|
11457
|
+
{ timestamps: true }
|
|
11458
|
+
);
|
|
11459
|
+
ChatReportSchema.index({ chatId: 1, reportedUserId: 1 });
|
|
11460
|
+
ChatReportSchema.index({ createdAt: -1, reporterUserId: 1 });
|
|
11461
|
+
var ChatReportModel = mongoose6.models.ChatReport || mongoose6.model("ChatReport", ChatReportSchema);
|
|
11462
|
+
|
|
11463
|
+
// src/mongoose/GoogleImportedMarket.ts
|
|
11464
|
+
import mongoose7 from "mongoose";
|
|
11465
|
+
var MongooseSchema7 = mongoose7.Schema;
|
|
11466
|
+
var addressComponentSchema = new MongooseSchema7(
|
|
11381
11467
|
{
|
|
11382
11468
|
longName: { required: false, type: String },
|
|
11383
11469
|
shortName: { required: false, type: String },
|
|
@@ -11385,7 +11471,7 @@ var addressComponentSchema = new MongooseSchema6(
|
|
|
11385
11471
|
},
|
|
11386
11472
|
{ _id: false }
|
|
11387
11473
|
);
|
|
11388
|
-
var schema3 = new
|
|
11474
|
+
var schema3 = new MongooseSchema7(
|
|
11389
11475
|
{
|
|
11390
11476
|
accessibilityOptions: { required: false, type: Object },
|
|
11391
11477
|
active: { default: false, required: true, type: Boolean },
|
|
@@ -11398,7 +11484,7 @@ var schema3 = new MongooseSchema6(
|
|
|
11398
11484
|
claimedByUserId: {
|
|
11399
11485
|
ref: "User",
|
|
11400
11486
|
required: false,
|
|
11401
|
-
type:
|
|
11487
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
11402
11488
|
},
|
|
11403
11489
|
cover: {
|
|
11404
11490
|
required: false,
|
|
@@ -11410,7 +11496,7 @@ var schema3 = new MongooseSchema6(
|
|
|
11410
11496
|
eventId: {
|
|
11411
11497
|
ref: "Event",
|
|
11412
11498
|
required: false,
|
|
11413
|
-
type:
|
|
11499
|
+
type: mongoose7.Schema.Types.ObjectId
|
|
11414
11500
|
},
|
|
11415
11501
|
eventType: {
|
|
11416
11502
|
enum: Object.values(EnumEventType),
|
|
@@ -11459,12 +11545,12 @@ var schema3 = new MongooseSchema6(
|
|
|
11459
11545
|
schema3.index({ "location.geo": "2dsphere" });
|
|
11460
11546
|
schema3.index({ name: 1 });
|
|
11461
11547
|
schema3.index({ region: 1 });
|
|
11462
|
-
var GoogleImportedMarketModel =
|
|
11548
|
+
var GoogleImportedMarketModel = mongoose7.models.GoogleImportedMarket || mongoose7.model("GoogleImportedMarket", schema3);
|
|
11463
11549
|
|
|
11464
11550
|
// src/mongoose/Notification.ts
|
|
11465
|
-
import
|
|
11466
|
-
var
|
|
11467
|
-
var schema4 = new
|
|
11551
|
+
import mongoose8 from "mongoose";
|
|
11552
|
+
var MongooseSchema8 = mongoose8.Schema;
|
|
11553
|
+
var schema4 = new MongooseSchema8(
|
|
11468
11554
|
{
|
|
11469
11555
|
data: {
|
|
11470
11556
|
resourceId: { required: true, type: String },
|
|
@@ -11487,16 +11573,16 @@ var schema4 = new MongooseSchema7(
|
|
|
11487
11573
|
userId: {
|
|
11488
11574
|
ref: "User",
|
|
11489
11575
|
required: true,
|
|
11490
|
-
type:
|
|
11576
|
+
type: mongoose8.Schema.Types.ObjectId
|
|
11491
11577
|
}
|
|
11492
11578
|
},
|
|
11493
11579
|
{ timestamps: true }
|
|
11494
11580
|
);
|
|
11495
11581
|
schema4.index({ isRead: 1, userId: 1 });
|
|
11496
11582
|
schema4.index({ createdAt: -1, userId: 1 });
|
|
11497
|
-
var NotificationModel =
|
|
11583
|
+
var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
|
|
11498
11584
|
|
|
11499
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
11585
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-Z6FJKHRH.mjs
|
|
11500
11586
|
var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
11501
11587
|
EnumOSPlatform22["ANDROID"] = "android";
|
|
11502
11588
|
EnumOSPlatform22["IOS"] = "ios";
|
|
@@ -11505,9 +11591,9 @@ var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
|
|
|
11505
11591
|
})(EnumOSPlatform2 || {});
|
|
11506
11592
|
|
|
11507
11593
|
// src/mongoose/PushToken.ts
|
|
11508
|
-
import
|
|
11509
|
-
var
|
|
11510
|
-
var schema5 = new
|
|
11594
|
+
import mongoose9 from "mongoose";
|
|
11595
|
+
var MongooseSchema9 = mongoose9.Schema;
|
|
11596
|
+
var schema5 = new MongooseSchema9(
|
|
11511
11597
|
{
|
|
11512
11598
|
platform: {
|
|
11513
11599
|
enum: Object.values(EnumOSPlatform2),
|
|
@@ -11515,16 +11601,16 @@ var schema5 = new MongooseSchema8(
|
|
|
11515
11601
|
type: String
|
|
11516
11602
|
},
|
|
11517
11603
|
token: { required: true, type: String },
|
|
11518
|
-
userId: { required: true, type:
|
|
11604
|
+
userId: { required: true, type: mongoose9.Schema.Types.ObjectId }
|
|
11519
11605
|
},
|
|
11520
11606
|
{ timestamps: true }
|
|
11521
11607
|
);
|
|
11522
|
-
var PushTokenModel =
|
|
11608
|
+
var PushTokenModel = mongoose9.models.PushToken || mongoose9.model("PushToken", schema5);
|
|
11523
11609
|
|
|
11524
11610
|
// src/mongoose/ResourceActivity.ts
|
|
11525
|
-
import
|
|
11526
|
-
var
|
|
11527
|
-
var ActivitySchema = new
|
|
11611
|
+
import mongoose10 from "mongoose";
|
|
11612
|
+
var MongooseSchema10 = mongoose10.Schema;
|
|
11613
|
+
var ActivitySchema = new MongooseSchema10(
|
|
11528
11614
|
{
|
|
11529
11615
|
activityType: {
|
|
11530
11616
|
enum: Object.values(EnumActivity),
|
|
@@ -11552,7 +11638,7 @@ var ActivitySchema = new MongooseSchema9(
|
|
|
11552
11638
|
},
|
|
11553
11639
|
{ _id: false }
|
|
11554
11640
|
);
|
|
11555
|
-
var schema6 = new
|
|
11641
|
+
var schema6 = new MongooseSchema10(
|
|
11556
11642
|
{
|
|
11557
11643
|
activity: { default: [], type: [ActivitySchema] },
|
|
11558
11644
|
resourceId: { required: true, type: String },
|
|
@@ -11566,12 +11652,12 @@ var schema6 = new MongooseSchema9(
|
|
|
11566
11652
|
);
|
|
11567
11653
|
schema6.index({ resourceId: 1, resourceType: 1 }, { unique: true });
|
|
11568
11654
|
schema6.index({ "views.location": "2dsphere" });
|
|
11569
|
-
var ResourceActivityModel =
|
|
11655
|
+
var ResourceActivityModel = mongoose10.models.ResourceActivity || mongoose10.model("ResourceActivity", schema6);
|
|
11570
11656
|
|
|
11571
11657
|
// src/mongoose/Tester.ts
|
|
11572
|
-
import
|
|
11573
|
-
var
|
|
11574
|
-
var TesterVendorQuestionarySchema = new
|
|
11658
|
+
import mongoose11 from "mongoose";
|
|
11659
|
+
var MongooseSchema11 = mongoose11.Schema;
|
|
11660
|
+
var TesterVendorQuestionarySchema = new MongooseSchema11(
|
|
11575
11661
|
{
|
|
11576
11662
|
appearInVideoIntroduction: {
|
|
11577
11663
|
default: false,
|
|
@@ -11598,7 +11684,7 @@ var TesterVendorQuestionarySchema = new MongooseSchema10(
|
|
|
11598
11684
|
},
|
|
11599
11685
|
{ _id: false }
|
|
11600
11686
|
);
|
|
11601
|
-
var TesterVendorSchema = new
|
|
11687
|
+
var TesterVendorSchema = new MongooseSchema11(
|
|
11602
11688
|
{
|
|
11603
11689
|
categories: { required: true, type: [CategorySchema] },
|
|
11604
11690
|
marketsAttended: {
|
|
@@ -11624,7 +11710,7 @@ var TesterVendorSchema = new MongooseSchema10(
|
|
|
11624
11710
|
},
|
|
11625
11711
|
{ _id: false }
|
|
11626
11712
|
);
|
|
11627
|
-
var TesterEventQuestionarySchema = new
|
|
11713
|
+
var TesterEventQuestionarySchema = new MongooseSchema11(
|
|
11628
11714
|
{
|
|
11629
11715
|
allowMarketingAppearance: {
|
|
11630
11716
|
default: false,
|
|
@@ -11659,7 +11745,7 @@ var TesterEventQuestionarySchema = new MongooseSchema10(
|
|
|
11659
11745
|
},
|
|
11660
11746
|
{ _id: false }
|
|
11661
11747
|
);
|
|
11662
|
-
var TesterEventsSchema = new
|
|
11748
|
+
var TesterEventsSchema = new MongooseSchema11(
|
|
11663
11749
|
{
|
|
11664
11750
|
markets: {
|
|
11665
11751
|
required: true,
|
|
@@ -11688,7 +11774,7 @@ var TesterEventsSchema = new MongooseSchema10(
|
|
|
11688
11774
|
},
|
|
11689
11775
|
{ _id: false }
|
|
11690
11776
|
);
|
|
11691
|
-
var TesterSchema = new
|
|
11777
|
+
var TesterSchema = new MongooseSchema11(
|
|
11692
11778
|
{
|
|
11693
11779
|
active: { default: false, required: true, type: Boolean },
|
|
11694
11780
|
approved: { default: false, required: true, type: Boolean },
|
|
@@ -11722,43 +11808,43 @@ var TesterSchema = new MongooseSchema10(
|
|
|
11722
11808
|
timestamps: true
|
|
11723
11809
|
}
|
|
11724
11810
|
);
|
|
11725
|
-
var TesterModel =
|
|
11811
|
+
var TesterModel = mongoose11.models.Tester || mongoose11.model("Tester", TesterSchema);
|
|
11726
11812
|
|
|
11727
11813
|
// src/mongoose/User.ts
|
|
11728
|
-
import
|
|
11729
|
-
var
|
|
11730
|
-
var userActivityEventSchema = new
|
|
11814
|
+
import mongoose12 from "mongoose";
|
|
11815
|
+
var MongooseSchema12 = mongoose12.Schema;
|
|
11816
|
+
var userActivityEventSchema = new MongooseSchema12(
|
|
11731
11817
|
{
|
|
11732
11818
|
dateTime: dateTimeSchema3,
|
|
11733
11819
|
resourceId: {
|
|
11734
11820
|
ref: "Event",
|
|
11735
11821
|
required: false,
|
|
11736
|
-
type:
|
|
11822
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
11737
11823
|
}
|
|
11738
11824
|
},
|
|
11739
11825
|
{ _id: false }
|
|
11740
11826
|
);
|
|
11741
|
-
var userActivityFavouritesSchema = new
|
|
11827
|
+
var userActivityFavouritesSchema = new MongooseSchema12(
|
|
11742
11828
|
{
|
|
11743
11829
|
events: {
|
|
11744
11830
|
ref: "Event",
|
|
11745
11831
|
required: false,
|
|
11746
|
-
type: [
|
|
11832
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
11747
11833
|
},
|
|
11748
11834
|
partners: {
|
|
11749
11835
|
ref: "Partner",
|
|
11750
11836
|
required: false,
|
|
11751
|
-
type: [
|
|
11837
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
11752
11838
|
},
|
|
11753
11839
|
vendors: {
|
|
11754
11840
|
ref: "Vendor",
|
|
11755
11841
|
required: false,
|
|
11756
|
-
type: [
|
|
11842
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
11757
11843
|
}
|
|
11758
11844
|
},
|
|
11759
11845
|
{ _id: false }
|
|
11760
11846
|
);
|
|
11761
|
-
var stripeSchema = new
|
|
11847
|
+
var stripeSchema = new MongooseSchema12(
|
|
11762
11848
|
{
|
|
11763
11849
|
currentPlan: {
|
|
11764
11850
|
enum: Object.values(EnumUserLicence),
|
|
@@ -11789,7 +11875,7 @@ var stripeSchema = new MongooseSchema11(
|
|
|
11789
11875
|
},
|
|
11790
11876
|
{ _id: false }
|
|
11791
11877
|
);
|
|
11792
|
-
var schema7 = new
|
|
11878
|
+
var schema7 = new MongooseSchema12(
|
|
11793
11879
|
{
|
|
11794
11880
|
active: { default: false, required: true, type: Boolean },
|
|
11795
11881
|
associates: {
|
|
@@ -11805,7 +11891,7 @@ var schema7 = new MongooseSchema11(
|
|
|
11805
11891
|
events: {
|
|
11806
11892
|
ref: "Event",
|
|
11807
11893
|
required: false,
|
|
11808
|
-
type: [
|
|
11894
|
+
type: [mongoose12.Schema.Types.ObjectId]
|
|
11809
11895
|
},
|
|
11810
11896
|
firstName: { required: true, type: String },
|
|
11811
11897
|
isTester: { default: false, required: true, type: Boolean },
|
|
@@ -11817,7 +11903,7 @@ var schema7 = new MongooseSchema11(
|
|
|
11817
11903
|
partner: {
|
|
11818
11904
|
ref: "Partner",
|
|
11819
11905
|
required: false,
|
|
11820
|
-
type:
|
|
11906
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
11821
11907
|
},
|
|
11822
11908
|
password: { required: true, type: String },
|
|
11823
11909
|
platform: {
|
|
@@ -11862,7 +11948,7 @@ var schema7 = new MongooseSchema11(
|
|
|
11862
11948
|
vendor: {
|
|
11863
11949
|
ref: "Vendor",
|
|
11864
11950
|
required: false,
|
|
11865
|
-
type:
|
|
11951
|
+
type: mongoose12.Schema.Types.ObjectId
|
|
11866
11952
|
}
|
|
11867
11953
|
},
|
|
11868
11954
|
{ strict: false, timestamps: true }
|
|
@@ -11870,12 +11956,12 @@ var schema7 = new MongooseSchema11(
|
|
|
11870
11956
|
schema7.index({ "associates.email": 1 });
|
|
11871
11957
|
schema7.index({ "licences.expiryDate": 1 });
|
|
11872
11958
|
schema7.index({ "licences.licenceType": 1 });
|
|
11873
|
-
var UserModel =
|
|
11959
|
+
var UserModel = mongoose12.models.User || mongoose12.model("User", schema7);
|
|
11874
11960
|
|
|
11875
11961
|
// src/mongoose/VerificationToken.ts
|
|
11876
|
-
import
|
|
11877
|
-
var
|
|
11878
|
-
var schema8 = new
|
|
11962
|
+
import mongoose13 from "mongoose";
|
|
11963
|
+
var MongooseSchema13 = mongoose13.Schema;
|
|
11964
|
+
var schema8 = new MongooseSchema13(
|
|
11879
11965
|
{
|
|
11880
11966
|
createdAt: {
|
|
11881
11967
|
default: Date.now,
|
|
@@ -11890,12 +11976,12 @@ var schema8 = new MongooseSchema12(
|
|
|
11890
11976
|
},
|
|
11891
11977
|
{ timestamps: true }
|
|
11892
11978
|
);
|
|
11893
|
-
var VerificationTokenModel =
|
|
11979
|
+
var VerificationTokenModel = mongoose13.models.VerificationToken || mongoose13.model("VerificationToken", schema8);
|
|
11894
11980
|
|
|
11895
11981
|
// src/mongoose/vendor/Vendor.ts
|
|
11896
|
-
import
|
|
11897
|
-
var
|
|
11898
|
-
var MenuTypeSchema = new
|
|
11982
|
+
import mongoose14 from "mongoose";
|
|
11983
|
+
var MongooseSchema14 = mongoose14.Schema;
|
|
11984
|
+
var MenuTypeSchema = new MongooseSchema14(
|
|
11899
11985
|
{
|
|
11900
11986
|
description: { required: false, type: String },
|
|
11901
11987
|
name: { required: false, type: String },
|
|
@@ -11905,7 +11991,7 @@ var MenuTypeSchema = new MongooseSchema13(
|
|
|
11905
11991
|
{ _id: false }
|
|
11906
11992
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11907
11993
|
);
|
|
11908
|
-
var LocationsSchema = new
|
|
11994
|
+
var LocationsSchema = new MongooseSchema14(
|
|
11909
11995
|
{
|
|
11910
11996
|
dateTime: {
|
|
11911
11997
|
dateStatus: {
|
|
@@ -11927,7 +12013,7 @@ var LocationsSchema = new MongooseSchema13(
|
|
|
11927
12013
|
{ _id: false }
|
|
11928
12014
|
// Prevents Mongoose from creating an additional _id field for subdocuments
|
|
11929
12015
|
);
|
|
11930
|
-
var schema9 = new
|
|
12016
|
+
var schema9 = new MongooseSchema14(
|
|
11931
12017
|
{
|
|
11932
12018
|
...baseResourceFields,
|
|
11933
12019
|
// Importing base resource fields from global.ts
|
|
@@ -11949,7 +12035,7 @@ var schema9 = new MongooseSchema13(
|
|
|
11949
12035
|
vendorInfoId: {
|
|
11950
12036
|
ref: "VendorInfo",
|
|
11951
12037
|
required: false,
|
|
11952
|
-
type:
|
|
12038
|
+
type: mongoose14.Schema.Types.ObjectId
|
|
11953
12039
|
},
|
|
11954
12040
|
vendorType: {
|
|
11955
12041
|
enum: Object.values(EnumVendorType),
|
|
@@ -11964,19 +12050,19 @@ schema9.index({ description: 1 });
|
|
|
11964
12050
|
schema9.index({ region: 1 });
|
|
11965
12051
|
schema9.index({ "categories.name": 1 });
|
|
11966
12052
|
schema9.index({ "associates.email": 1 });
|
|
11967
|
-
var VendorModel =
|
|
12053
|
+
var VendorModel = mongoose14.models.Vendor || mongoose14.model("Vendor", schema9);
|
|
11968
12054
|
|
|
11969
12055
|
// src/mongoose/vendor/VendorInfo.ts
|
|
11970
|
-
import
|
|
11971
|
-
var
|
|
11972
|
-
var AttributesSchema = new
|
|
12056
|
+
import mongoose15 from "mongoose";
|
|
12057
|
+
var MongooseSchema15 = mongoose15.Schema;
|
|
12058
|
+
var AttributesSchema = new MongooseSchema15(
|
|
11973
12059
|
{
|
|
11974
12060
|
details: { required: false, type: String },
|
|
11975
12061
|
isRequired: { default: false, required: true, type: Boolean }
|
|
11976
12062
|
},
|
|
11977
12063
|
{ _id: false }
|
|
11978
12064
|
);
|
|
11979
|
-
var schema10 = new
|
|
12065
|
+
var schema10 = new MongooseSchema15(
|
|
11980
12066
|
{
|
|
11981
12067
|
compliance: {
|
|
11982
12068
|
foodBeverageLicense: { default: false, required: false, type: Boolean },
|
|
@@ -12010,17 +12096,17 @@ var schema10 = new MongooseSchema14(
|
|
|
12010
12096
|
vendorId: {
|
|
12011
12097
|
ref: "Vendor",
|
|
12012
12098
|
required: true,
|
|
12013
|
-
type:
|
|
12099
|
+
type: mongoose15.Schema.Types.ObjectId
|
|
12014
12100
|
}
|
|
12015
12101
|
},
|
|
12016
12102
|
{ timestamps: true }
|
|
12017
12103
|
);
|
|
12018
|
-
var VendorInfoModel =
|
|
12104
|
+
var VendorInfoModel = mongoose15.models.VendorInfo || mongoose15.model("VendorInfo", schema10);
|
|
12019
12105
|
|
|
12020
12106
|
// src/mongoose/event/Event.ts
|
|
12021
|
-
import
|
|
12022
|
-
var
|
|
12023
|
-
var schema11 = new
|
|
12107
|
+
import mongoose16 from "mongoose";
|
|
12108
|
+
var MongooseSchema16 = mongoose16.Schema;
|
|
12109
|
+
var schema11 = new MongooseSchema16(
|
|
12024
12110
|
{
|
|
12025
12111
|
...baseResourceFields,
|
|
12026
12112
|
// Importing base resource fields from global.ts
|
|
@@ -12029,7 +12115,7 @@ var schema11 = new MongooseSchema15(
|
|
|
12029
12115
|
eventInfoId: {
|
|
12030
12116
|
ref: "EventInfo",
|
|
12031
12117
|
required: false,
|
|
12032
|
-
type:
|
|
12118
|
+
type: mongoose16.Schema.Types.ObjectId
|
|
12033
12119
|
},
|
|
12034
12120
|
eventType: {
|
|
12035
12121
|
enum: Object.values(EnumEventType),
|
|
@@ -12063,12 +12149,12 @@ schema11.index({ region: 1 });
|
|
|
12063
12149
|
schema11.index({ "location.geo": "2dsphere" });
|
|
12064
12150
|
schema11.index({ tags: 1 });
|
|
12065
12151
|
schema11.index({ "associates.email": 1 });
|
|
12066
|
-
var EventModel =
|
|
12152
|
+
var EventModel = mongoose16.models.Event || mongoose16.model("Event", schema11);
|
|
12067
12153
|
|
|
12068
12154
|
// src/mongoose/Partner.ts
|
|
12069
|
-
import
|
|
12070
|
-
var
|
|
12071
|
-
var schema12 = new
|
|
12155
|
+
import mongoose17 from "mongoose";
|
|
12156
|
+
var MongooseSchema17 = mongoose17.Schema;
|
|
12157
|
+
var schema12 = new MongooseSchema17(
|
|
12072
12158
|
{
|
|
12073
12159
|
...baseResourceFields,
|
|
12074
12160
|
location: {
|
|
@@ -12089,12 +12175,12 @@ schema12.index({ description: 1 });
|
|
|
12089
12175
|
schema12.index({ region: 1 });
|
|
12090
12176
|
schema12.index({ "location.geo": "2dsphere" });
|
|
12091
12177
|
schema12.index({ "associates.email": 1 });
|
|
12092
|
-
var PartnerModel =
|
|
12178
|
+
var PartnerModel = mongoose17.models.Partner || mongoose17.model("Partner", schema12);
|
|
12093
12179
|
|
|
12094
12180
|
// src/mongoose/Post.ts
|
|
12095
|
-
import
|
|
12096
|
-
var
|
|
12097
|
-
var contentSchema = new
|
|
12181
|
+
import mongoose18, { Schema as Schema2 } from "mongoose";
|
|
12182
|
+
var MongooseSchema18 = mongoose18.Schema;
|
|
12183
|
+
var contentSchema = new MongooseSchema18(
|
|
12098
12184
|
{
|
|
12099
12185
|
contentData: Schema2.Types.Mixed,
|
|
12100
12186
|
contentOrder: { required: true, type: Number },
|
|
@@ -12106,7 +12192,7 @@ var contentSchema = new MongooseSchema17(
|
|
|
12106
12192
|
},
|
|
12107
12193
|
{ _id: false }
|
|
12108
12194
|
);
|
|
12109
|
-
var schema13 = new
|
|
12195
|
+
var schema13 = new MongooseSchema18(
|
|
12110
12196
|
{
|
|
12111
12197
|
active: { default: true, required: true, type: Boolean },
|
|
12112
12198
|
caption: { required: true, type: String },
|
|
@@ -12124,13 +12210,13 @@ var schema13 = new MongooseSchema17(
|
|
|
12124
12210
|
);
|
|
12125
12211
|
schema13.index({ title: 1 });
|
|
12126
12212
|
schema13.index({ tags: 1 });
|
|
12127
|
-
var PostModel =
|
|
12213
|
+
var PostModel = mongoose18.models.Post || mongoose18.model("Post", schema13);
|
|
12128
12214
|
|
|
12129
12215
|
// src/mongoose/AppSetting.ts
|
|
12130
|
-
import
|
|
12131
|
-
var
|
|
12216
|
+
import mongoose19 from "mongoose";
|
|
12217
|
+
var MongooseSchema19 = mongoose19.Schema;
|
|
12132
12218
|
var APP_SETTINGS_ID = "APP_SETTINGS_DOCUMENT_ID";
|
|
12133
|
-
var AppSettingSchema = new
|
|
12219
|
+
var AppSettingSchema = new MongooseSchema19(
|
|
12134
12220
|
{
|
|
12135
12221
|
appVersion: { default: "1.0.1", required: true, type: String },
|
|
12136
12222
|
isOfflineMode: { default: false, required: true, type: Boolean },
|
|
@@ -12146,10 +12232,10 @@ var AppSettingSchema = new MongooseSchema18(
|
|
|
12146
12232
|
},
|
|
12147
12233
|
{ timestamps: true }
|
|
12148
12234
|
);
|
|
12149
|
-
var AppSettingModel =
|
|
12235
|
+
var AppSettingModel = mongoose19.models.AppSetting || mongoose19.model("AppSetting", AppSettingSchema);
|
|
12150
12236
|
|
|
12151
12237
|
// src/service/database.ts
|
|
12152
|
-
import
|
|
12238
|
+
import mongoose20 from "mongoose";
|
|
12153
12239
|
var connectToDatabase = async ({
|
|
12154
12240
|
appName,
|
|
12155
12241
|
dbName,
|
|
@@ -12162,7 +12248,7 @@ var connectToDatabase = async ({
|
|
|
12162
12248
|
// Fallback to MongoDB Atlas connection string
|
|
12163
12249
|
`mongodb+srv://${dbUser}:${dbPassword}@${dbName}.mongodb.net/?retryWrites=true&w=majority&appName=${appName}`
|
|
12164
12250
|
);
|
|
12165
|
-
await
|
|
12251
|
+
await mongoose20.connect(mongoUri);
|
|
12166
12252
|
const connectionType = mongodbUri ? "Local MongoDB" : "MongoDB Atlas";
|
|
12167
12253
|
console.log(
|
|
12168
12254
|
`${connectionType} connected from server/src/service/database.ts`
|
|
@@ -12341,7 +12427,7 @@ async function updateAdStatuses() {
|
|
|
12341
12427
|
|
|
12342
12428
|
// src/types/index.ts
|
|
12343
12429
|
import express from "express";
|
|
12344
|
-
import
|
|
12430
|
+
import mongoose21 from "mongoose";
|
|
12345
12431
|
var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
|
|
12346
12432
|
EnumPubSubEvents2["GET_CHAT_MESSAGE"] = "GET_CHAT_MESSAGE";
|
|
12347
12433
|
EnumPubSubEvents2["GET_NOTIFICATIONS"] = "GET_NOTIFICATIONS";
|
|
@@ -12355,6 +12441,7 @@ export {
|
|
|
12355
12441
|
AppSettingModel,
|
|
12356
12442
|
CategorySchema,
|
|
12357
12443
|
ChatModel,
|
|
12444
|
+
ChatReportModel,
|
|
12358
12445
|
EnumPubSubEvents,
|
|
12359
12446
|
EventInfoModel,
|
|
12360
12447
|
EventModel,
|
|
@@ -12382,7 +12469,7 @@ export {
|
|
|
12382
12469
|
express,
|
|
12383
12470
|
locationGeoSchema,
|
|
12384
12471
|
locationsSchema,
|
|
12385
|
-
|
|
12472
|
+
mongoose21 as mongoose,
|
|
12386
12473
|
relationDatesSchema,
|
|
12387
12474
|
resourceRelationsSchema,
|
|
12388
12475
|
saveNotificationsInDb,
|