@timardex/cluemart-server-shared 1.0.213 → 1.0.214

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.
@@ -64,6 +64,7 @@ __export(mongoose_exports, {
64
64
  locationGeoSchema: () => locationGeoSchema,
65
65
  locationsSchema: () => locationsSchema,
66
66
  refundPolicySchema: () => refundPolicySchema,
67
+ relatedPostSchema: () => relatedPostSchema,
67
68
  relationDatesSchema: () => relationDatesSchema,
68
69
  resourceRelationsSchema: () => resourceRelationsSchema,
69
70
  termsAgreementSchema: () => termsAgreementSchema,
@@ -3551,10 +3552,6 @@ var gameScreenIdentifierList = [
3551
3552
  match: "/visitors"
3552
3553
  }
3553
3554
  ];
3554
- import_dayjs.default.extend(import_customParseFormat.default);
3555
- import_dayjs.default.extend(import_utc.default);
3556
- import_dayjs.default.extend(import_timezone.default);
3557
- import_dayjs.default.extend(import_isSameOrAfter.default);
3558
3555
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
3559
3556
  EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
3560
3557
  EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
@@ -3630,6 +3627,19 @@ var paymentMethodOptions = mapArrayToOptions(
3630
3627
  Object.values(EnumPaymentMethod)
3631
3628
  );
3632
3629
  var CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
3630
+ import_dayjs.default.extend(import_customParseFormat.default);
3631
+ import_dayjs.default.extend(import_utc.default);
3632
+ import_dayjs.default.extend(import_timezone.default);
3633
+ import_dayjs.default.extend(import_isSameOrAfter.default);
3634
+ var futureTimePeriods = mapArrayToOptions(
3635
+ Object.values(EnumEventDateStatus)
3636
+ ).filter(
3637
+ (period) => period.value !== "Starting_Soon" && period.value !== "Canceled" && period.value !== "Rescheduled" && period.value !== "Started" && period.value !== "Ended" && period.value !== "Invalid"
3638
+ /* INVALID */
3639
+ ).map((period) => ({
3640
+ label: period.value.replaceAll("_", " "),
3641
+ value: period.value
3642
+ }));
3633
3643
  var packagingTypes = [
3634
3644
  "Biodegradable",
3635
3645
  "Compostable",
@@ -5164,6 +5174,12 @@ var EVENT_LIST_ITEM = gql`
5164
5174
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5165
5175
  ${RELATION_DATES_FRAGMENT}
5166
5176
  `;
5177
+ var RELATED_POST_FIELDS_FRAGMENT = gql`
5178
+ fragment RelatedPostFields on RelatedPostType {
5179
+ postId
5180
+ postType
5181
+ }
5182
+ `;
5167
5183
  var EVENT_INFO = gql`
5168
5184
  fragment EventInfoFields on EventInfoType {
5169
5185
  _id
@@ -5253,6 +5269,9 @@ var EVENT = gql`
5253
5269
  rating
5254
5270
  reviewCount
5255
5271
  rainOrShine
5272
+ relatedPost {
5273
+ ...RelatedPostFields
5274
+ }
5256
5275
  socialMedia {
5257
5276
  ...SocialMediaFields
5258
5277
  }
@@ -5272,6 +5291,7 @@ var EVENT = gql`
5272
5291
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5273
5292
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5274
5293
  ${RELATION_DATES_FRAGMENT}
5294
+ ${RELATED_POST_FIELDS_FRAGMENT}
5275
5295
  `;
5276
5296
  var GET_EVENTS = gql`
5277
5297
  query getEvents($dateStatus: EventDateStatusEnumType) {
@@ -5438,6 +5458,9 @@ var VENDOR = gql`
5438
5458
  rating
5439
5459
  region
5440
5460
  reviewCount
5461
+ relatedPost {
5462
+ ...RelatedPostFields
5463
+ }
5441
5464
  relations {
5442
5465
  relationId
5443
5466
  relationDates {
@@ -5466,6 +5489,7 @@ var VENDOR = gql`
5466
5489
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5467
5490
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5468
5491
  ${RELATION_DATES_FRAGMENT}
5492
+ ${RELATED_POST_FIELDS_FRAGMENT}
5469
5493
  `;
5470
5494
  var VENDOR_ATTRIBUTES_FRAGMENT = gql`
5471
5495
  fragment VendorAttributesFields on VendorAttributesType {
@@ -5924,6 +5948,9 @@ var PARTNER = gql`
5924
5948
  rating
5925
5949
  region
5926
5950
  reviewCount
5951
+ relatedPost {
5952
+ ...RelatedPostFields
5953
+ }
5927
5954
  socialMedia {
5928
5955
  ...SocialMediaFields
5929
5956
  }
@@ -5940,6 +5967,7 @@ var PARTNER = gql`
5940
5967
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5941
5968
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5942
5969
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5970
+ ${RELATED_POST_FIELDS_FRAGMENT}
5943
5971
  `;
5944
5972
  var GET_PARTNERS = gql`
5945
5973
  query getPartners {
@@ -7848,6 +7876,22 @@ var locationsSchema = new MongooseSchema6(
7848
7876
  { _id: false }
7849
7877
  // Prevents Mongoose from creating an additional _id field for subdocuments
7850
7878
  );
7879
+ var relatedPostSchema = new MongooseSchema6(
7880
+ {
7881
+ postId: {
7882
+ ref: "Post",
7883
+ required: true,
7884
+ type: import_mongoose6.default.Schema.Types.ObjectId
7885
+ },
7886
+ postType: {
7887
+ enum: Object.values(EnumPostType),
7888
+ required: true,
7889
+ type: String
7890
+ }
7891
+ },
7892
+ { _id: false }
7893
+ // Prevents Mongoose from creating an additional _id field for subdocuments
7894
+ );
7851
7895
  var baseResourceFields = {
7852
7896
  active: { default: false, required: true, type: Boolean },
7853
7897
  adIds: {
@@ -7877,6 +7921,7 @@ var baseResourceFields = {
7877
7921
  promoCodes: { required: false, type: [String] },
7878
7922
  rating: { required: false, type: Number },
7879
7923
  region: { required: true, type: String },
7924
+ relatedPost: { required: false, type: relatedPostSchema },
7880
7925
  reviewCount: { required: false, type: Number },
7881
7926
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
7882
7927
  termsAgreement: { required: true, type: termsAgreementSchema }
@@ -8854,6 +8899,7 @@ var SchoolModel = import_mongoose24.default.models.School || import_mongoose24.d
8854
8899
  locationGeoSchema,
8855
8900
  locationsSchema,
8856
8901
  refundPolicySchema,
8902
+ relatedPostSchema,
8857
8903
  relationDatesSchema,
8858
8904
  resourceRelationsSchema,
8859
8905
  termsAgreementSchema,