@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.cjs CHANGED
@@ -5127,6 +5127,16 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
5127
5127
  redeemedAt
5128
5128
  }
5129
5129
  `;
5130
+ var STRIPE_FIELDS_FRAGMENT = gql`
5131
+ fragment StripeSubscriptionFields on StripeSubscriptionType {
5132
+ customerId
5133
+ subscriptionId
5134
+ status
5135
+ currentPlan
5136
+ startDate
5137
+ endDate
5138
+ }
5139
+ `;
5130
5140
  var USER_FIELDS_FRAGMENT = gql`
5131
5141
  fragment UserFields on UserType {
5132
5142
  _id
@@ -5160,6 +5170,9 @@ var USER_FIELDS_FRAGMENT = gql`
5160
5170
  ...RedeemedRewardFields
5161
5171
  }
5162
5172
  school
5173
+ stripe {
5174
+ ...StripeSubscriptionFields
5175
+ }
5163
5176
  termsAgreement {
5164
5177
  ...TermsAgreementFields
5165
5178
  }
@@ -5175,6 +5188,7 @@ var USER_FIELDS_FRAGMENT = gql`
5175
5188
  ${LICENCE_FIELDS_FRAGMENT}
5176
5189
  ${LOCATION_FIELDS_FRAGMENT}
5177
5190
  ${REDEEMED_REWARD_FIELDS_FRAGMENT}
5191
+ ${STRIPE_FIELDS_FRAGMENT}
5178
5192
  `;
5179
5193
  var STALL_TYPE_FIELDS_FRAGMENT = gql`
5180
5194
  fragment StallTypeFields on StallTypeType {
@@ -7415,7 +7429,6 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = gql`
7415
7429
  location {
7416
7430
  ...LocationFields
7417
7431
  }
7418
- region
7419
7432
  socialMedia {
7420
7433
  ...SocialMediaFields
7421
7434
  }
@@ -9300,7 +9313,6 @@ var affiliateDetailsSchema = new MongooseSchema25(
9300
9313
  required: true,
9301
9314
  type: String
9302
9315
  },
9303
- region: { required: true, type: String },
9304
9316
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
9305
9317
  termsAgreement: { required: true, type: termsAgreementSchema }
9306
9318
  },
@@ -9423,7 +9435,7 @@ var SHARE_RESOURCE_LABEL2 = {
9423
9435
  school: "School"
9424
9436
  };
9425
9437
 
9426
- // node_modules/@timardex/cluemart-shared/dist/chunk-OBZTGPBJ.mjs
9438
+ // node_modules/@timardex/cluemart-shared/dist/chunk-2V7QKRQE.mjs
9427
9439
  var PROMO_CODE_PREFIX2 = "CM-";
9428
9440
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9429
9441
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -9525,7 +9537,7 @@ var gameScreenIdentifierList2 = [
9525
9537
  }
9526
9538
  ];
9527
9539
 
9528
- // node_modules/@timardex/cluemart-shared/dist/chunk-QBU7N4P2.mjs
9540
+ // node_modules/@timardex/cluemart-shared/dist/chunk-THXLJFLL.mjs
9529
9541
  var import_dayjs4 = __toESM(require("dayjs"), 1);
9530
9542
  var statusOptions2 = [
9531
9543
  ...Object.values(EnumInviteStatus2).map((status) => ({
@@ -10711,7 +10723,7 @@ async function sendPushNotifications({
10711
10723
  // src/service/affiliate/vendorSubscriptionRewards.ts
10712
10724
  function isPayingStripeSubscription(stripe) {
10713
10725
  if (!stripe?.subscriptionId) return false;
10714
- return stripe.status === EnumSubscriptionStatus.ACTIVE || stripe.status === EnumSubscriptionStatus.TRIALING;
10726
+ return (stripe.status === EnumSubscriptionStatus.ACTIVE || stripe.status === EnumSubscriptionStatus.TRIALING) && (stripe.currentPlan === EnumUserLicence.PRO_VENDOR || stripe.currentPlan === EnumUserLicence.PRO_PLUS_VENDOR);
10715
10727
  }
10716
10728
  function mapVendorLicenceToSubscriptionRewardType(licences, now = /* @__PURE__ */ new Date(), stripe) {
10717
10729
  const validTypes = new Set(