@timardex/cluemart-server-shared 1.0.100 → 1.0.102

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