@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.cjs CHANGED
@@ -7881,9 +7881,12 @@ var COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT = gql`
7881
7881
  fragment CouponParticipantUserFields on CouponParticipantUserType {
7882
7882
  couponCollectedCount
7883
7883
  couponRedeemedAt
7884
+ couponRedeemedCount
7885
+ couponCycleRedeemed
7884
7886
  createdAt
7885
7887
  updatedAt
7886
7888
  userId
7889
+ nickName
7887
7890
  }
7888
7891
  `;
7889
7892
  var COUPON_OPTION_FIELDS_FRAGMENT = gql`
@@ -7893,6 +7896,7 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
7893
7896
  get
7894
7897
  unit
7895
7898
  visits
7899
+ maxCouponCount
7896
7900
  }
7897
7901
  `;
7898
7902
  var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
@@ -7970,8 +7974,18 @@ var COUPON = gql`
7970
7974
  ${COUPON_DATA_FIELDS_FRAGMENT}
7971
7975
  `;
7972
7976
  var GET_COUPONS = gql`
7973
- query getCoupons($region: String, $category: String) {
7974
- coupons(region: $region, category: $category) {
7977
+ query getCoupons(
7978
+ $region: String
7979
+ $category: String
7980
+ $resourceId: String
7981
+ $resourceType: ResourceTypeEnum
7982
+ ) {
7983
+ coupons(
7984
+ region: $region
7985
+ category: $category
7986
+ resourceId: $resourceId
7987
+ resourceType: $resourceType
7988
+ ) {
7975
7989
  active {
7976
7990
  listName
7977
7991
  data {
@@ -8048,6 +8062,14 @@ var SCAN_COUPON_MUTATION = gql`
8048
8062
  }
8049
8063
  }
8050
8064
  `;
8065
+ var REWARD_COUPON_MUTATION = gql`
8066
+ mutation rewardCoupon($input: ProductCouponInputType!, $userId: ID!) {
8067
+ rewardCoupon(input: $input, userId: $userId) {
8068
+ data
8069
+ message
8070
+ }
8071
+ }
8072
+ `;
8051
8073
  var PKG = "@timardex/cluemart-shared";
8052
8074
  var IMAGE_EXTENSION = ".webp";
8053
8075
  var posterIds = [
@@ -9911,6 +9933,7 @@ var couponOptionSchema = new MongooseSchema26(
9911
9933
  {
9912
9934
  buy: { required: false, type: Number },
9913
9935
  get: { required: false, type: Number },
9936
+ maxCouponCount: { required: false, type: Number },
9914
9937
  type: {
9915
9938
  enum: Object.values(EnumCouponQualificationType),
9916
9939
  required: true,
@@ -9954,7 +9977,9 @@ var couponCodeSchema = new MongooseSchema26(
9954
9977
  var couponParticipantUserSchema = new MongooseSchema26(
9955
9978
  {
9956
9979
  couponCollectedCount: { default: 0, required: true, type: Number },
9980
+ couponCycleRedeemed: { default: false, required: true, type: Boolean },
9957
9981
  couponRedeemedAt: { default: null, required: false, type: Date },
9982
+ couponRedeemedCount: { default: 0, required: true, type: Number },
9958
9983
  userId: {
9959
9984
  ref: "User",
9960
9985
  required: true,
@@ -10073,7 +10098,7 @@ var SHARE_RESOURCE_LABEL2 = {
10073
10098
  school: "School"
10074
10099
  };
10075
10100
 
10076
- // node_modules/@timardex/cluemart-shared/dist/chunk-GR2JH7DC.mjs
10101
+ // node_modules/@timardex/cluemart-shared/dist/chunk-WS47NSTO.mjs
10077
10102
  var PROMO_CODE_PREFIX2 = "CM-";
10078
10103
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
10079
10104
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -10175,7 +10200,7 @@ var gameScreenIdentifierList2 = [
10175
10200
  }
10176
10201
  ];
10177
10202
 
10178
- // node_modules/@timardex/cluemart-shared/dist/chunk-5YXMWX5D.mjs
10203
+ // node_modules/@timardex/cluemart-shared/dist/chunk-G5T3Z6WT.mjs
10179
10204
  var import_dayjs4 = __toESM(require("dayjs"), 1);
10180
10205
  var statusOptions2 = [
10181
10206
  ...Object.values(EnumInviteStatus2).map((status) => ({