@timardex/cluemart-server-shared 1.0.306 → 1.0.309

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.mjs CHANGED
@@ -5027,6 +5027,16 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
5027
5027
  redeemedAt
5028
5028
  }
5029
5029
  `;
5030
+ var STRIPE_FIELDS_FRAGMENT = gql`
5031
+ fragment StripeSubscriptionFields on StripeSubscriptionType {
5032
+ customerId
5033
+ subscriptionId
5034
+ status
5035
+ currentPlan
5036
+ startDate
5037
+ endDate
5038
+ }
5039
+ `;
5030
5040
  var USER_FIELDS_FRAGMENT = gql`
5031
5041
  fragment UserFields on UserType {
5032
5042
  _id
@@ -5060,6 +5070,9 @@ var USER_FIELDS_FRAGMENT = gql`
5060
5070
  ...RedeemedRewardFields
5061
5071
  }
5062
5072
  school
5073
+ stripe {
5074
+ ...StripeSubscriptionFields
5075
+ }
5063
5076
  termsAgreement {
5064
5077
  ...TermsAgreementFields
5065
5078
  }
@@ -5075,6 +5088,7 @@ var USER_FIELDS_FRAGMENT = gql`
5075
5088
  ${LICENCE_FIELDS_FRAGMENT}
5076
5089
  ${LOCATION_FIELDS_FRAGMENT}
5077
5090
  ${REDEEMED_REWARD_FIELDS_FRAGMENT}
5091
+ ${STRIPE_FIELDS_FRAGMENT}
5078
5092
  `;
5079
5093
  var STALL_TYPE_FIELDS_FRAGMENT = gql`
5080
5094
  fragment StallTypeFields on StallTypeType {
@@ -7315,7 +7329,6 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = gql`
7315
7329
  location {
7316
7330
  ...LocationFields
7317
7331
  }
7318
- region
7319
7332
  socialMedia {
7320
7333
  ...SocialMediaFields
7321
7334
  }
@@ -9200,7 +9213,6 @@ var affiliateDetailsSchema = new MongooseSchema25(
9200
9213
  required: true,
9201
9214
  type: String
9202
9215
  },
9203
- region: { required: true, type: String },
9204
9216
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
9205
9217
  termsAgreement: { required: true, type: termsAgreementSchema }
9206
9218
  },
@@ -9323,7 +9335,7 @@ var SHARE_RESOURCE_LABEL2 = {
9323
9335
  school: "School"
9324
9336
  };
9325
9337
 
9326
- // node_modules/@timardex/cluemart-shared/dist/chunk-OBZTGPBJ.mjs
9338
+ // node_modules/@timardex/cluemart-shared/dist/chunk-2V7QKRQE.mjs
9327
9339
  var PROMO_CODE_PREFIX2 = "CM-";
9328
9340
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9329
9341
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -9425,7 +9437,7 @@ var gameScreenIdentifierList2 = [
9425
9437
  }
9426
9438
  ];
9427
9439
 
9428
- // node_modules/@timardex/cluemart-shared/dist/chunk-QBU7N4P2.mjs
9440
+ // node_modules/@timardex/cluemart-shared/dist/chunk-THXLJFLL.mjs
9429
9441
  import dayjs4 from "dayjs";
9430
9442
  var statusOptions2 = [
9431
9443
  ...Object.values(EnumInviteStatus2).map((status) => ({
@@ -10611,7 +10623,7 @@ async function sendPushNotifications({
10611
10623
  // src/service/affiliate/vendorSubscriptionRewards.ts
10612
10624
  function isPayingStripeSubscription(stripe) {
10613
10625
  if (!stripe?.subscriptionId) return false;
10614
- return stripe.status === EnumSubscriptionStatus.ACTIVE || stripe.status === EnumSubscriptionStatus.TRIALING;
10626
+ return (stripe.status === EnumSubscriptionStatus.ACTIVE || stripe.status === EnumSubscriptionStatus.TRIALING) && (stripe.currentPlan === EnumUserLicence.PRO_VENDOR || stripe.currentPlan === EnumUserLicence.PRO_PLUS_VENDOR);
10615
10627
  }
10616
10628
  function mapVendorLicenceToSubscriptionRewardType(licences, now = /* @__PURE__ */ new Date(), stripe) {
10617
10629
  const validTypes = new Set(