@timardex/cluemart-server-shared 1.1.27 → 1.1.29

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
@@ -7776,9 +7776,12 @@ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
7776
7776
  fragment CouponParticipantUserFields on CouponParticipantUserType {
7777
7777
  couponCollectedCount
7778
7778
  couponRedeemedAt
7779
+ couponRedeemedCount
7780
+ couponCycleRedeemed
7779
7781
  createdAt
7780
7782
  updatedAt
7781
7783
  userId
7784
+ nickName
7782
7785
  }
7783
7786
  `;
7784
7787
  var COUPON_OPTION_FIELDS_FRAGMENT = gql`
@@ -7788,6 +7791,7 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
7788
7791
  get
7789
7792
  unit
7790
7793
  visits
7794
+ maxCouponCount
7791
7795
  }
7792
7796
  `;
7793
7797
  var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
@@ -7865,8 +7869,18 @@ var COUPON = gql`
7865
7869
  ${COUPON_DATA_FIELDS_FRAGMENT}
7866
7870
  `;
7867
7871
  var GET_COUPONS = gql`
7868
- query getCoupons($region: String, $category: String) {
7869
- coupons(region: $region, category: $category) {
7872
+ query getCoupons(
7873
+ $region: String
7874
+ $category: String
7875
+ $resourceId: String
7876
+ $resourceType: ResourceTypeEnum
7877
+ ) {
7878
+ coupons(
7879
+ region: $region
7880
+ category: $category
7881
+ resourceId: $resourceId
7882
+ resourceType: $resourceType
7883
+ ) {
7870
7884
  active {
7871
7885
  listName
7872
7886
  data {
@@ -7943,6 +7957,14 @@ var SCAN_COUPON_MUTATION = gql`
7943
7957
  }
7944
7958
  }
7945
7959
  `;
7960
+ var REWARD_COUPON_MUTATION = gql`
7961
+ mutation rewardCoupon($input: ProductCouponInputType!, $userId: ID!) {
7962
+ rewardCoupon(input: $input, userId: $userId) {
7963
+ data
7964
+ message
7965
+ }
7966
+ }
7967
+ `;
7946
7968
  var PKG = "@timardex/cluemart-shared";
7947
7969
  var IMAGE_EXTENSION = ".webp";
7948
7970
  var posterIds = [
@@ -9806,6 +9828,7 @@ var couponOptionSchema = new MongooseSchema26(
9806
9828
  {
9807
9829
  buy: { required: false, type: Number },
9808
9830
  get: { required: false, type: Number },
9831
+ maxCouponCount: { required: false, type: Number },
9809
9832
  type: {
9810
9833
  enum: Object.values(EnumCouponQualificationType),
9811
9834
  required: true,
@@ -9849,7 +9872,9 @@ var couponCodeSchema = new MongooseSchema26(
9849
9872
  var couponParticipantUserSchema = new MongooseSchema26(
9850
9873
  {
9851
9874
  couponCollectedCount: { default: 0, required: true, type: Number },
9875
+ couponCycleRedeemed: { default: false, required: true, type: Boolean },
9852
9876
  couponRedeemedAt: { default: null, required: false, type: Date },
9877
+ couponRedeemedCount: { default: 0, required: true, type: Number },
9853
9878
  userId: {
9854
9879
  ref: "User",
9855
9880
  required: true,
@@ -9968,7 +9993,7 @@ var SHARE_RESOURCE_LABEL2 = {
9968
9993
  school: "School"
9969
9994
  };
9970
9995
 
9971
- // node_modules/@timardex/cluemart-shared/dist/chunk-GR2JH7DC.mjs
9996
+ // node_modules/@timardex/cluemart-shared/dist/chunk-WS47NSTO.mjs
9972
9997
  var PROMO_CODE_PREFIX2 = "CM-";
9973
9998
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
9974
9999
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -10070,7 +10095,7 @@ var gameScreenIdentifierList2 = [
10070
10095
  }
10071
10096
  ];
10072
10097
 
10073
- // node_modules/@timardex/cluemart-shared/dist/chunk-5YXMWX5D.mjs
10098
+ // node_modules/@timardex/cluemart-shared/dist/chunk-G5T3Z6WT.mjs
10074
10099
  import dayjs4 from "dayjs";
10075
10100
  var statusOptions2 = [
10076
10101
  ...Object.values(EnumInviteStatus2).map((status) => ({