@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.
@@ -39,7 +39,7 @@ import {
39
39
  socialShareResourceSchema,
40
40
  termsAgreementSchema,
41
41
  userLicenseSchema
42
- } from "../chunk-SY7T26IW.mjs";
42
+ } from "../chunk-S3OCZCET.mjs";
43
43
  export {
44
44
  APP_SETTINGS_ID,
45
45
  AdModel,
@@ -5084,6 +5084,16 @@ var REDEEMED_REWARD_FIELDS_FRAGMENT = gql`
5084
5084
  redeemedAt
5085
5085
  }
5086
5086
  `;
5087
+ var STRIPE_FIELDS_FRAGMENT = gql`
5088
+ fragment StripeSubscriptionFields on StripeSubscriptionType {
5089
+ customerId
5090
+ subscriptionId
5091
+ status
5092
+ currentPlan
5093
+ startDate
5094
+ endDate
5095
+ }
5096
+ `;
5087
5097
  var USER_FIELDS_FRAGMENT = gql`
5088
5098
  fragment UserFields on UserType {
5089
5099
  _id
@@ -5117,6 +5127,9 @@ var USER_FIELDS_FRAGMENT = gql`
5117
5127
  ...RedeemedRewardFields
5118
5128
  }
5119
5129
  school
5130
+ stripe {
5131
+ ...StripeSubscriptionFields
5132
+ }
5120
5133
  termsAgreement {
5121
5134
  ...TermsAgreementFields
5122
5135
  }
@@ -5132,6 +5145,7 @@ var USER_FIELDS_FRAGMENT = gql`
5132
5145
  ${LICENCE_FIELDS_FRAGMENT}
5133
5146
  ${LOCATION_FIELDS_FRAGMENT}
5134
5147
  ${REDEEMED_REWARD_FIELDS_FRAGMENT}
5148
+ ${STRIPE_FIELDS_FRAGMENT}
5135
5149
  `;
5136
5150
  var STALL_TYPE_FIELDS_FRAGMENT = gql`
5137
5151
  fragment StallTypeFields on StallTypeType {
@@ -7372,7 +7386,6 @@ var AFFILIATE_DETAILS_FIELDS_FRAGMENT = gql`
7372
7386
  location {
7373
7387
  ...LocationFields
7374
7388
  }
7375
- region
7376
7389
  socialMedia {
7377
7390
  ...SocialMediaFields
7378
7391
  }
@@ -9257,7 +9270,6 @@ var affiliateDetailsSchema = new MongooseSchema25(
9257
9270
  required: true,
9258
9271
  type: String
9259
9272
  },
9260
- region: { required: true, type: String },
9261
9273
  socialMedia: { required: false, type: [SocialMediaTypeSchema] },
9262
9274
  termsAgreement: { required: true, type: termsAgreementSchema }
9263
9275
  },
@@ -9380,7 +9392,7 @@ var SHARE_RESOURCE_LABEL2 = {
9380
9392
  school: "School"
9381
9393
  };
9382
9394
 
9383
- // node_modules/@timardex/cluemart-shared/dist/chunk-OBZTGPBJ.mjs
9395
+ // node_modules/@timardex/cluemart-shared/dist/chunk-2V7QKRQE.mjs
9384
9396
  var PROMO_CODE_PREFIX2 = "CM-";
9385
9397
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9386
9398
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -9482,7 +9494,7 @@ var gameScreenIdentifierList2 = [
9482
9494
  }
9483
9495
  ];
9484
9496
 
9485
- // node_modules/@timardex/cluemart-shared/dist/chunk-QBU7N4P2.mjs
9497
+ // node_modules/@timardex/cluemart-shared/dist/chunk-THXLJFLL.mjs
9486
9498
  var import_dayjs4 = __toESM(require("dayjs"), 1);
9487
9499
  var statusOptions2 = [
9488
9500
  ...Object.values(EnumInviteStatus2).map((status) => ({
@@ -10668,7 +10680,7 @@ async function sendPushNotifications({
10668
10680
  // src/service/affiliate/vendorSubscriptionRewards.ts
10669
10681
  function isPayingStripeSubscription(stripe) {
10670
10682
  if (!stripe?.subscriptionId) return false;
10671
- return stripe.status === EnumSubscriptionStatus.ACTIVE || stripe.status === EnumSubscriptionStatus.TRIALING;
10683
+ return (stripe.status === EnumSubscriptionStatus.ACTIVE || stripe.status === EnumSubscriptionStatus.TRIALING) && (stripe.currentPlan === EnumUserLicence.PRO_VENDOR || stripe.currentPlan === EnumUserLicence.PRO_PLUS_VENDOR);
10672
10684
  }
10673
10685
  function mapVendorLicenceToSubscriptionRewardType(licences, now = /* @__PURE__ */ new Date(), stripe) {
10674
10686
  const validTypes = new Set(