@timardex/cluemart-server-shared 1.0.257 → 1.0.260

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/index.cjs CHANGED
@@ -76,6 +76,7 @@ __export(index_exports, {
76
76
  resourceRelationsSchema: () => resourceRelationsSchema,
77
77
  saveNotificationsInDb: () => saveNotificationsInDb,
78
78
  sendPushNotifications: () => sendPushNotifications,
79
+ socialShareResourceSchema: () => socialShareResourceSchema,
79
80
  termsAgreementSchema: () => termsAgreementSchema,
80
81
  updateAdStatuses: () => updateAdStatuses,
81
82
  updateAllEventDateTimeStatuses: () => updateAllEventDateTimeStatuses,
@@ -5174,6 +5175,17 @@ var RELATED_POST_FIELDS_FRAGMENT = gql`
5174
5175
  postType
5175
5176
  }
5176
5177
  `;
5178
+ var SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT = gql`
5179
+ fragment SocialShareResourceFields on SocialShareResourceType {
5180
+ qrCode {
5181
+ ...ResourceImageFields
5182
+ }
5183
+ socialImage {
5184
+ ...ResourceImageFields
5185
+ }
5186
+ }
5187
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5188
+ `;
5177
5189
  var EVENT_INFO = gql`
5178
5190
  fragment EventInfoFields on EventInfoType {
5179
5191
  _id
@@ -5269,6 +5281,12 @@ var EVENT = gql`
5269
5281
  socialMedia {
5270
5282
  ...SocialMediaFields
5271
5283
  }
5284
+ sharePublic {
5285
+ ...SocialShareResourceFields
5286
+ }
5287
+ shareRelation {
5288
+ ...SocialShareResourceFields
5289
+ }
5272
5290
  slug
5273
5291
  tags
5274
5292
  termsAgreement {
@@ -5287,6 +5305,7 @@ var EVENT = gql`
5287
5305
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5288
5306
  ${RELATION_DATES_FRAGMENT}
5289
5307
  ${RELATED_POST_FIELDS_FRAGMENT}
5308
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5290
5309
  `;
5291
5310
  var GET_EVENTS = gql`
5292
5311
  query getEvents($dateStatus: EventDateStatusEnumType) {
@@ -5466,6 +5485,12 @@ var VENDOR = gql`
5466
5485
  socialMedia {
5467
5486
  ...SocialMediaFields
5468
5487
  }
5488
+ sharePublic {
5489
+ ...SocialShareResourceFields
5490
+ }
5491
+ shareRelation {
5492
+ ...SocialShareResourceFields
5493
+ }
5469
5494
  termsAgreement {
5470
5495
  ...TermsAgreementFields
5471
5496
  }
@@ -5486,6 +5511,7 @@ var VENDOR = gql`
5486
5511
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5487
5512
  ${RELATION_DATES_FRAGMENT}
5488
5513
  ${RELATED_POST_FIELDS_FRAGMENT}
5514
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5489
5515
  `;
5490
5516
  var VENDOR_ATTRIBUTES_FRAGMENT = gql`
5491
5517
  fragment VendorAttributesFields on VendorAttributesType {
@@ -5673,6 +5699,9 @@ var PARTNER = gql`
5673
5699
  ...SocialMediaFields
5674
5700
  }
5675
5701
  slug
5702
+ sharePublic {
5703
+ ...SocialShareResourceFields
5704
+ }
5676
5705
  termsAgreement {
5677
5706
  ...TermsAgreementFields
5678
5707
  }
@@ -5687,6 +5716,7 @@ var PARTNER = gql`
5687
5716
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5688
5717
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5689
5718
  ${RELATED_POST_FIELDS_FRAGMENT}
5719
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5690
5720
  `;
5691
5721
  var GET_PARTNERS = gql`
5692
5722
  query getPartners {
@@ -5855,6 +5885,14 @@ var POST_CONTENT_FIELDS_FRAGMENT = gql`
5855
5885
  }
5856
5886
  ${POST_CONTENT_DATA_FIELDS_FRAGMENT}
5857
5887
  `;
5888
+ var POST_RESOURCE_FIELDS_FRAGMENT = gql`
5889
+ fragment PostResourceFields on PostResourceType {
5890
+ resourceId
5891
+ resourceSlug
5892
+ resourceRegion
5893
+ resourceType
5894
+ }
5895
+ `;
5858
5896
  var POST_FIELDS_FRAGMENT = gql`
5859
5897
  fragment PostFields on PostType {
5860
5898
  _id
@@ -5870,18 +5908,20 @@ var POST_FIELDS_FRAGMENT = gql`
5870
5908
  deletedAt
5871
5909
  postType
5872
5910
  resource {
5873
- resourceId
5874
- resourceSlug
5875
- resourceRegion
5876
- resourceType
5911
+ ...PostResourceFields
5877
5912
  }
5878
5913
  tags
5879
5914
  title
5880
5915
  slug
5916
+ sharePublic {
5917
+ ...SocialShareResourceFields
5918
+ }
5881
5919
  updatedAt
5882
5920
  }
5883
5921
  ${POST_CONTENT_FIELDS_FRAGMENT}
5884
5922
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5923
+ ${POST_RESOURCE_FIELDS_FRAGMENT}
5924
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5885
5925
  `;
5886
5926
  var GET_POSTS = gql`
5887
5927
  query getPosts {
@@ -7921,7 +7961,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
7921
7961
  );
7922
7962
  var ResourceImageTypeSchema = new MongooseSchema6(
7923
7963
  {
7924
- active: { default: true, type: Boolean },
7964
+ active: { default: true, required: true, type: Boolean },
7925
7965
  source: { required: false, type: String },
7926
7966
  title: { required: false, type: String }
7927
7967
  },
@@ -8129,6 +8169,14 @@ var baseResourceFields = {
8129
8169
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
8130
8170
  termsAgreement: { required: true, type: termsAgreementSchema }
8131
8171
  };
8172
+ var socialShareResourceSchema = new MongooseSchema6(
8173
+ {
8174
+ qrCode: { required: true, type: ResourceImageTypeSchema },
8175
+ socialImage: { required: true, type: ResourceImageTypeSchema }
8176
+ },
8177
+ { _id: false }
8178
+ // Prevents Mongoose from creating an additional _id field for subdocuments
8179
+ );
8132
8180
 
8133
8181
  // src/mongoose/GoogleImportedMarket.ts
8134
8182
  var import_mongoose7 = __toESM(require("mongoose"));
@@ -8595,6 +8643,8 @@ var schema9 = new MongooseSchema13(
8595
8643
  required: false,
8596
8644
  type: [resourceRelationsSchema]
8597
8645
  },
8646
+ sharePublic: { required: false, type: socialShareResourceSchema },
8647
+ shareRelation: { required: false, type: socialShareResourceSchema },
8598
8648
  unregisteredVendorId: {
8599
8649
  ref: "UnregisteredVendor",
8600
8650
  required: false,
@@ -8746,6 +8796,8 @@ var schema12 = new MongooseSchema16(
8746
8796
  required: false,
8747
8797
  type: [resourceRelationsSchema]
8748
8798
  },
8799
+ sharePublic: { required: false, type: socialShareResourceSchema },
8800
+ shareRelation: { required: false, type: socialShareResourceSchema },
8749
8801
  tags: { required: true, type: [String] }
8750
8802
  },
8751
8803
  { timestamps: true }
@@ -8776,7 +8828,8 @@ var schema13 = new MongooseSchema17(
8776
8828
  enum: Object.values(EnumPartnerType),
8777
8829
  required: true,
8778
8830
  type: String
8779
- }
8831
+ },
8832
+ sharePublic: { required: false, type: socialShareResourceSchema }
8780
8833
  },
8781
8834
  { timestamps: true }
8782
8835
  );
@@ -8839,6 +8892,7 @@ var schema14 = new MongooseSchema18(
8839
8892
  required: false,
8840
8893
  type: resourceSchema
8841
8894
  },
8895
+ sharePublic: { required: false, type: socialShareResourceSchema },
8842
8896
  slug: { required: true, type: String },
8843
8897
  tags: { default: [], required: false, type: [String] },
8844
8898
  title: { required: true, type: String }
@@ -8847,7 +8901,7 @@ var schema14 = new MongooseSchema18(
8847
8901
  );
8848
8902
  schema14.index({ title: 1 });
8849
8903
  schema14.index({ tags: 1 });
8850
- schema14.index({ postType: 1, slug: 1 });
8904
+ schema14.index({ postType: 1, slug: 1 }, { unique: true });
8851
8905
  var PostModel = import_mongoose18.default.models.Post || import_mongoose18.default.model("Post", schema14);
8852
8906
 
8853
8907
  // src/mongoose/AppSetting.ts
@@ -9671,6 +9725,7 @@ var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
9671
9725
  resourceRelationsSchema,
9672
9726
  saveNotificationsInDb,
9673
9727
  sendPushNotifications,
9728
+ socialShareResourceSchema,
9674
9729
  termsAgreementSchema,
9675
9730
  updateAdStatuses,
9676
9731
  updateAllEventDateTimeStatuses,