@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.
package/dist/index.cjs CHANGED
@@ -71,6 +71,7 @@ __export(index_exports, {
71
71
  locationsSchema: () => locationsSchema,
72
72
  mongoose: () => import_mongoose33.default,
73
73
  refundPolicySchema: () => refundPolicySchema,
74
+ relatedPostSchema: () => relatedPostSchema,
74
75
  relationDatesSchema: () => relationDatesSchema,
75
76
  resourceRelationsSchema: () => resourceRelationsSchema,
76
77
  saveNotificationsInDb: () => saveNotificationsInDb,
@@ -3565,12 +3566,6 @@ var gameScreenIdentifierList = [
3565
3566
  match: "/visitors"
3566
3567
  }
3567
3568
  ];
3568
- var dateFormat = "DD-MM-YYYY";
3569
- var timeFormat = "HH:mm";
3570
- import_dayjs.default.extend(import_customParseFormat.default);
3571
- import_dayjs.default.extend(import_utc.default);
3572
- import_dayjs.default.extend(import_timezone.default);
3573
- import_dayjs.default.extend(import_isSameOrAfter.default);
3574
3569
  var EnumAdShowOn = /* @__PURE__ */ ((EnumAdShowOn2) => {
3575
3570
  EnumAdShowOn2["EVENTS_PAGE"] = "Events_page";
3576
3571
  EnumAdShowOn2["FRONT_PAGE"] = "Front_page";
@@ -3646,6 +3641,21 @@ var paymentMethodOptions = mapArrayToOptions(
3646
3641
  Object.values(EnumPaymentMethod)
3647
3642
  );
3648
3643
  var CLUEMART_MAIN_DOMAIN_URL = "https://cluemart.co.nz";
3644
+ var dateFormat = "DD-MM-YYYY";
3645
+ var timeFormat = "HH:mm";
3646
+ import_dayjs.default.extend(import_customParseFormat.default);
3647
+ import_dayjs.default.extend(import_utc.default);
3648
+ import_dayjs.default.extend(import_timezone.default);
3649
+ import_dayjs.default.extend(import_isSameOrAfter.default);
3650
+ var futureTimePeriods = mapArrayToOptions(
3651
+ Object.values(EnumEventDateStatus)
3652
+ ).filter(
3653
+ (period) => period.value !== "Starting_Soon" && period.value !== "Canceled" && period.value !== "Rescheduled" && period.value !== "Started" && period.value !== "Ended" && period.value !== "Invalid"
3654
+ /* INVALID */
3655
+ ).map((period) => ({
3656
+ label: period.value.replaceAll("_", " "),
3657
+ value: period.value
3658
+ }));
3649
3659
  var packagingTypes = [
3650
3660
  "Biodegradable",
3651
3661
  "Compostable",
@@ -5180,6 +5190,12 @@ var EVENT_LIST_ITEM = gql`
5180
5190
  ${RESOURCE_IMAGE_FIELDS_FRAGMENT}
5181
5191
  ${RELATION_DATES_FRAGMENT}
5182
5192
  `;
5193
+ var RELATED_POST_FIELDS_FRAGMENT = gql`
5194
+ fragment RelatedPostFields on RelatedPostType {
5195
+ postId
5196
+ postType
5197
+ }
5198
+ `;
5183
5199
  var EVENT_INFO = gql`
5184
5200
  fragment EventInfoFields on EventInfoType {
5185
5201
  _id
@@ -5269,6 +5285,9 @@ var EVENT = gql`
5269
5285
  rating
5270
5286
  reviewCount
5271
5287
  rainOrShine
5288
+ relatedPost {
5289
+ ...RelatedPostFields
5290
+ }
5272
5291
  socialMedia {
5273
5292
  ...SocialMediaFields
5274
5293
  }
@@ -5288,6 +5307,7 @@ var EVENT = gql`
5288
5307
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5289
5308
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5290
5309
  ${RELATION_DATES_FRAGMENT}
5310
+ ${RELATED_POST_FIELDS_FRAGMENT}
5291
5311
  `;
5292
5312
  var GET_EVENTS = gql`
5293
5313
  query getEvents($dateStatus: EventDateStatusEnumType) {
@@ -5454,6 +5474,9 @@ var VENDOR = gql`
5454
5474
  rating
5455
5475
  region
5456
5476
  reviewCount
5477
+ relatedPost {
5478
+ ...RelatedPostFields
5479
+ }
5457
5480
  relations {
5458
5481
  relationId
5459
5482
  relationDates {
@@ -5482,6 +5505,7 @@ var VENDOR = gql`
5482
5505
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5483
5506
  ${TERMS_AGREEMENT_FIELDS_FRAGMENT}
5484
5507
  ${RELATION_DATES_FRAGMENT}
5508
+ ${RELATED_POST_FIELDS_FRAGMENT}
5485
5509
  `;
5486
5510
  var VENDOR_ATTRIBUTES_FRAGMENT = gql`
5487
5511
  fragment VendorAttributesFields on VendorAttributesType {
@@ -5940,6 +5964,9 @@ var PARTNER = gql`
5940
5964
  rating
5941
5965
  region
5942
5966
  reviewCount
5967
+ relatedPost {
5968
+ ...RelatedPostFields
5969
+ }
5943
5970
  socialMedia {
5944
5971
  ...SocialMediaFields
5945
5972
  }
@@ -5956,6 +5983,7 @@ var PARTNER = gql`
5956
5983
  ${POSTER_USAGE_FIELDS_FRAGMENT}
5957
5984
  ${SOCIAL_MEDIA_FIELDS_FRAGMENT}
5958
5985
  ${CONTACT_DETAILS_FIELDS_FRAGMENT}
5986
+ ${RELATED_POST_FIELDS_FRAGMENT}
5959
5987
  `;
5960
5988
  var GET_PARTNERS = gql`
5961
5989
  query getPartners {
@@ -7864,6 +7892,22 @@ var locationsSchema = new MongooseSchema6(
7864
7892
  { _id: false }
7865
7893
  // Prevents Mongoose from creating an additional _id field for subdocuments
7866
7894
  );
7895
+ var relatedPostSchema = new MongooseSchema6(
7896
+ {
7897
+ postId: {
7898
+ ref: "Post",
7899
+ required: true,
7900
+ type: import_mongoose6.default.Schema.Types.ObjectId
7901
+ },
7902
+ postType: {
7903
+ enum: Object.values(EnumPostType),
7904
+ required: true,
7905
+ type: String
7906
+ }
7907
+ },
7908
+ { _id: false }
7909
+ // Prevents Mongoose from creating an additional _id field for subdocuments
7910
+ );
7867
7911
  var baseResourceFields = {
7868
7912
  active: { default: false, required: true, type: Boolean },
7869
7913
  adIds: {
@@ -7893,6 +7937,7 @@ var baseResourceFields = {
7893
7937
  promoCodes: { required: false, type: [String] },
7894
7938
  rating: { required: false, type: Number },
7895
7939
  region: { required: true, type: String },
7940
+ relatedPost: { required: false, type: relatedPostSchema },
7896
7941
  reviewCount: { required: false, type: Number },
7897
7942
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
7898
7943
  termsAgreement: { required: true, type: termsAgreementSchema }
@@ -9423,6 +9468,7 @@ var EnumPubSubEvents = /* @__PURE__ */ ((EnumPubSubEvents2) => {
9423
9468
  locationsSchema,
9424
9469
  mongoose,
9425
9470
  refundPolicySchema,
9471
+ relatedPostSchema,
9426
9472
  relationDatesSchema,
9427
9473
  resourceRelationsSchema,
9428
9474
  saveNotificationsInDb,