@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.
@@ -67,6 +67,7 @@ __export(mongoose_exports, {
67
67
  relatedPostSchema: () => relatedPostSchema,
68
68
  relationDatesSchema: () => relationDatesSchema,
69
69
  resourceRelationsSchema: () => resourceRelationsSchema,
70
+ socialShareResourceSchema: () => socialShareResourceSchema,
70
71
  termsAgreementSchema: () => termsAgreementSchema,
71
72
  userLicenseSchema: () => userLicenseSchema
72
73
  });
@@ -5158,6 +5159,17 @@ var RELATED_POST_FIELDS_FRAGMENT = gql`
5158
5159
  postType
5159
5160
  }
5160
5161
  `;
5162
+ var SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT = gql`
5163
+ fragment SocialShareResourceFields on SocialShareResourceType {
5164
+ qrCode {
5165
+ ...ResourceImageFields
5166
+ }
5167
+ socialImage {
5168
+ ...ResourceImageFields
5169
+ }
5170
+ }
5171
+ ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5172
+ `;
5161
5173
  var EVENT_INFO = gql`
5162
5174
  fragment EventInfoFields on EventInfoType {
5163
5175
  _id
@@ -5253,6 +5265,12 @@ var EVENT = gql`
5253
5265
  socialMedia {
5254
5266
  ...SocialMediaFields
5255
5267
  }
5268
+ sharePublic {
5269
+ ...SocialShareResourceFields
5270
+ }
5271
+ shareRelation {
5272
+ ...SocialShareResourceFields
5273
+ }
5256
5274
  slug
5257
5275
  tags
5258
5276
  termsAgreement {
@@ -5271,6 +5289,7 @@ var EVENT = gql`
5271
5289
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5272
5290
  ${RELATION_DATES_FRAGMENT}
5273
5291
  ${RELATED_POST_FIELDS_FRAGMENT}
5292
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5274
5293
  `;
5275
5294
  var GET_EVENTS = gql`
5276
5295
  query getEvents($dateStatus: EventDateStatusEnumType) {
@@ -5450,6 +5469,12 @@ var VENDOR = gql`
5450
5469
  socialMedia {
5451
5470
  ...SocialMediaFields
5452
5471
  }
5472
+ sharePublic {
5473
+ ...SocialShareResourceFields
5474
+ }
5475
+ shareRelation {
5476
+ ...SocialShareResourceFields
5477
+ }
5453
5478
  termsAgreement {
5454
5479
  ...TermsAgreementFields
5455
5480
  }
@@ -5470,6 +5495,7 @@ var VENDOR = gql`
5470
5495
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5471
5496
  ${RELATION_DATES_FRAGMENT}
5472
5497
  ${RELATED_POST_FIELDS_FRAGMENT}
5498
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5473
5499
  `;
5474
5500
  var VENDOR_ATTRIBUTES_FRAGMENT = gql`
5475
5501
  fragment VendorAttributesFields on VendorAttributesType {
@@ -5657,6 +5683,9 @@ var PARTNER = gql`
5657
5683
  ...SocialMediaFields
5658
5684
  }
5659
5685
  slug
5686
+ sharePublic {
5687
+ ...SocialShareResourceFields
5688
+ }
5660
5689
  termsAgreement {
5661
5690
  ...TermsAgreementFields
5662
5691
  }
@@ -5671,6 +5700,7 @@ var PARTNER = gql`
5671
5700
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5672
5701
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5673
5702
  ${RELATED_POST_FIELDS_FRAGMENT}
5703
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5674
5704
  `;
5675
5705
  var GET_PARTNERS = gql`
5676
5706
  query getPartners {
@@ -5839,6 +5869,14 @@ var POST_CONTENT_FIELDS_FRAGMENT = gql`
5839
5869
  }
5840
5870
  ${POST_CONTENT_DATA_FIELDS_FRAGMENT}
5841
5871
  `;
5872
+ var POST_RESOURCE_FIELDS_FRAGMENT = gql`
5873
+ fragment PostResourceFields on PostResourceType {
5874
+ resourceId
5875
+ resourceSlug
5876
+ resourceRegion
5877
+ resourceType
5878
+ }
5879
+ `;
5842
5880
  var POST_FIELDS_FRAGMENT = gql`
5843
5881
  fragment PostFields on PostType {
5844
5882
  _id
@@ -5854,18 +5892,20 @@ var POST_FIELDS_FRAGMENT = gql`
5854
5892
  deletedAt
5855
5893
  postType
5856
5894
  resource {
5857
- resourceId
5858
- resourceSlug
5859
- resourceRegion
5860
- resourceType
5895
+ ...PostResourceFields
5861
5896
  }
5862
5897
  tags
5863
5898
  title
5864
5899
  slug
5900
+ sharePublic {
5901
+ ...SocialShareResourceFields
5902
+ }
5865
5903
  updatedAt
5866
5904
  }
5867
5905
  ${POST_CONTENT_FIELDS_FRAGMENT}
5868
5906
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5907
+ ${POST_RESOURCE_FIELDS_FRAGMENT}
5908
+ ${SOCIAL_SHARE_RESOURCE_FIELDS_FRAGMENT}
5869
5909
  `;
5870
5910
  var GET_POSTS = gql`
5871
5911
  query getPosts {
@@ -7905,7 +7945,7 @@ var SocialMediaTypeSchema = new MongooseSchema6(
7905
7945
  );
7906
7946
  var ResourceImageTypeSchema = new MongooseSchema6(
7907
7947
  {
7908
- active: { default: true, type: Boolean },
7948
+ active: { default: true, required: true, type: Boolean },
7909
7949
  source: { required: false, type: String },
7910
7950
  title: { required: false, type: String }
7911
7951
  },
@@ -8113,6 +8153,14 @@ var baseResourceFields = {
8113
8153
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
8114
8154
  termsAgreement: { required: true, type: termsAgreementSchema }
8115
8155
  };
8156
+ var socialShareResourceSchema = new MongooseSchema6(
8157
+ {
8158
+ qrCode: { required: true, type: ResourceImageTypeSchema },
8159
+ socialImage: { required: true, type: ResourceImageTypeSchema }
8160
+ },
8161
+ { _id: false }
8162
+ // Prevents Mongoose from creating an additional _id field for subdocuments
8163
+ );
8116
8164
 
8117
8165
  // src/mongoose/GoogleImportedMarket.ts
8118
8166
  var import_mongoose7 = __toESM(require("mongoose"));
@@ -8579,6 +8627,8 @@ var schema9 = new MongooseSchema13(
8579
8627
  required: false,
8580
8628
  type: [resourceRelationsSchema]
8581
8629
  },
8630
+ sharePublic: { required: false, type: socialShareResourceSchema },
8631
+ shareRelation: { required: false, type: socialShareResourceSchema },
8582
8632
  unregisteredVendorId: {
8583
8633
  ref: "UnregisteredVendor",
8584
8634
  required: false,
@@ -8730,6 +8780,8 @@ var schema12 = new MongooseSchema16(
8730
8780
  required: false,
8731
8781
  type: [resourceRelationsSchema]
8732
8782
  },
8783
+ sharePublic: { required: false, type: socialShareResourceSchema },
8784
+ shareRelation: { required: false, type: socialShareResourceSchema },
8733
8785
  tags: { required: true, type: [String] }
8734
8786
  },
8735
8787
  { timestamps: true }
@@ -8760,7 +8812,8 @@ var schema13 = new MongooseSchema17(
8760
8812
  enum: Object.values(EnumPartnerType),
8761
8813
  required: true,
8762
8814
  type: String
8763
- }
8815
+ },
8816
+ sharePublic: { required: false, type: socialShareResourceSchema }
8764
8817
  },
8765
8818
  { timestamps: true }
8766
8819
  );
@@ -8823,6 +8876,7 @@ var schema14 = new MongooseSchema18(
8823
8876
  required: false,
8824
8877
  type: resourceSchema
8825
8878
  },
8879
+ sharePublic: { required: false, type: socialShareResourceSchema },
8826
8880
  slug: { required: true, type: String },
8827
8881
  tags: { default: [], required: false, type: [String] },
8828
8882
  title: { required: true, type: String }
@@ -8831,7 +8885,7 @@ var schema14 = new MongooseSchema18(
8831
8885
  );
8832
8886
  schema14.index({ title: 1 });
8833
8887
  schema14.index({ tags: 1 });
8834
- schema14.index({ postType: 1, slug: 1 });
8888
+ schema14.index({ postType: 1, slug: 1 }, { unique: true });
8835
8889
  var PostModel = import_mongoose18.default.models.Post || import_mongoose18.default.model("Post", schema14);
8836
8890
 
8837
8891
  // src/mongoose/AppSetting.ts
@@ -9100,6 +9154,7 @@ var SchoolModel = import_mongoose24.default.models.School || import_mongoose24.d
9100
9154
  relatedPostSchema,
9101
9155
  relationDatesSchema,
9102
9156
  resourceRelationsSchema,
9157
+ socialShareResourceSchema,
9103
9158
  termsAgreementSchema,
9104
9159
  userLicenseSchema
9105
9160
  });