@timardex/cluemart-server-shared 1.0.308 → 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-MTFOFVHB.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 {
@@ -9378,7 +9392,7 @@ var SHARE_RESOURCE_LABEL2 = {
9378
9392
  school: "School"
9379
9393
  };
9380
9394
 
9381
- // node_modules/@timardex/cluemart-shared/dist/chunk-QMJB5OJ4.mjs
9395
+ // node_modules/@timardex/cluemart-shared/dist/chunk-2V7QKRQE.mjs
9382
9396
  var PROMO_CODE_PREFIX2 = "CM-";
9383
9397
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9384
9398
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -9480,7 +9494,7 @@ var gameScreenIdentifierList2 = [
9480
9494
  }
9481
9495
  ];
9482
9496
 
9483
- // node_modules/@timardex/cluemart-shared/dist/chunk-A7IXLYYS.mjs
9497
+ // node_modules/@timardex/cluemart-shared/dist/chunk-THXLJFLL.mjs
9484
9498
  var import_dayjs4 = __toESM(require("dayjs"), 1);
9485
9499
  var statusOptions2 = [
9486
9500
  ...Object.values(EnumInviteStatus2).map((status) => ({
@@ -10666,7 +10680,7 @@ async function sendPushNotifications({
10666
10680
  // src/service/affiliate/vendorSubscriptionRewards.ts
10667
10681
  function isPayingStripeSubscription(stripe) {
10668
10682
  if (!stripe?.subscriptionId) return false;
10669
- 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);
10670
10684
  }
10671
10685
  function mapVendorLicenceToSubscriptionRewardType(licences, now = /* @__PURE__ */ new Date(), stripe) {
10672
10686
  const validTypes = new Set(