@timardex/cluemart-server-shared 1.1.21 → 1.1.23

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
@@ -3728,6 +3728,7 @@ var EnumAffiliateRewardType = /* @__PURE__ */ ((EnumAffiliateRewardType22) => {
3728
3728
  var EnumCouponQualificationType = /* @__PURE__ */ ((EnumCouponQualificationType2) => {
3729
3729
  EnumCouponQualificationType2["PURCHASE"] = "PURCHASE";
3730
3730
  EnumCouponQualificationType2["MARKET_VISIT"] = "MARKET_VISIT";
3731
+ EnumCouponQualificationType2["MARKET_PASSPORT"] = "MARKET_PASSPORT";
3731
3732
  return EnumCouponQualificationType2;
3732
3733
  })(EnumCouponQualificationType || {});
3733
3734
  var statusOptions = [
@@ -7868,20 +7869,22 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
7868
7869
  visits
7869
7870
  }
7870
7871
  `;
7871
- var COUPON_REWARD_FIELDS_FRAGMENT = gql`
7872
- fragment CouponRewardFields on CouponRewardType {
7872
+ var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
7873
+ fragment CouponVendorProductFields on CouponVendorProductType {
7874
+ couponId
7873
7875
  vendorId
7874
7876
  productId
7875
- quantity
7876
- unit
7877
+ vendorCouponId
7877
7878
  }
7878
7879
  `;
7879
7880
  var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
7880
7881
  fragment CouponDataProductsFields on CouponDataProductsType {
7881
7882
  active
7883
+ couponId
7882
7884
  productsList {
7883
7885
  ...VendorProductListFields
7884
7886
  }
7887
+ vendorId
7885
7888
  vendorLogo {
7886
7889
  ...ResourceImageFields
7887
7890
  }
@@ -7901,8 +7904,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
7901
7904
  couponOption {
7902
7905
  ...CouponOptionFields
7903
7906
  }
7904
- couponRewards {
7905
- ...CouponRewardFields
7907
+ couponVendorProducts {
7908
+ ...CouponVendorProductFields
7906
7909
  }
7907
7910
  createdAt
7908
7911
  endDate
@@ -7920,7 +7923,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
7920
7923
  ${COUPON_CODE_FIELDS_FRAGMENT}
7921
7924
  ${COUPON_OPTION_FIELDS_FRAGMENT}
7922
7925
  ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
7923
- ${COUPON_REWARD_FIELDS_FRAGMENT}
7926
+ ${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
7924
7927
  ${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
7925
7928
  `;
7926
7929
  var COUPON = gql`
@@ -7941,8 +7944,8 @@ var COUPON = gql`
7941
7944
  ${COUPON_DATA_FIELDS_FRAGMENT}
7942
7945
  `;
7943
7946
  var GET_COUPONS = gql`
7944
- query getCoupons {
7945
- coupons {
7947
+ query getCoupons($region: String, $category: String) {
7948
+ coupons(region: $region, category: $category) {
7946
7949
  active {
7947
7950
  listName
7948
7951
  data {
@@ -8004,8 +8007,16 @@ var UPDATE_COUPON_MUTATION = gql`
8004
8007
  ${COUPON}
8005
8008
  `;
8006
8009
  var DELETE_COUPON_MUTATION = gql`
8007
- mutation deleteCoupon($couponDocumentId: ID!, $couponId: ID!) {
8008
- deleteCoupon(couponDocumentId: $couponDocumentId, couponId: $couponId) {
8010
+ mutation deleteCoupon($input: ProductCouponInputType!) {
8011
+ deleteCoupon(input: $input) {
8012
+ data
8013
+ message
8014
+ }
8015
+ }
8016
+ `;
8017
+ var SCAN_COUPON_MUTATION = gql`
8018
+ mutation scanCoupon($input: ProductCouponInputType!) {
8019
+ scanCoupon(input: $input) {
8009
8020
  data
8010
8021
  message
8011
8022
  }
@@ -9183,14 +9194,20 @@ var couponOptionSchema = new MongooseSchema13(
9183
9194
  },
9184
9195
  { _id: false }
9185
9196
  );
9186
- var couponRewardSchema = new MongooseSchema13(
9197
+ var couponVendorProductSchema = new MongooseSchema13(
9187
9198
  {
9199
+ couponId: {
9200
+ required: true,
9201
+ type: import_mongoose13.default.Schema.Types.ObjectId
9202
+ },
9188
9203
  productId: {
9189
9204
  required: true,
9190
9205
  type: import_mongoose13.default.Schema.Types.ObjectId
9191
9206
  },
9192
- quantity: { required: true, type: Number },
9193
- unit: { required: true, type: String },
9207
+ vendorCouponId: {
9208
+ required: false,
9209
+ type: import_mongoose13.default.Schema.Types.ObjectId
9210
+ },
9194
9211
  vendorId: {
9195
9212
  ref: "Vendor",
9196
9213
  required: true,
@@ -9225,7 +9242,10 @@ var couponDataSchema = new MongooseSchema13(
9225
9242
  couponCode: { required: true, type: couponCodeSchema },
9226
9243
  couponDescription: { required: true, type: String },
9227
9244
  couponOption: { required: true, type: couponOptionSchema },
9228
- couponRewards: { required: false, type: [couponRewardSchema] },
9245
+ couponVendorProducts: {
9246
+ required: false,
9247
+ type: [couponVendorProductSchema]
9248
+ },
9229
9249
  endDate: { required: true, type: Date },
9230
9250
  participantUsers: {
9231
9251
  default: null,
@@ -10022,7 +10042,7 @@ var SHARE_RESOURCE_LABEL2 = {
10022
10042
  school: "School"
10023
10043
  };
10024
10044
 
10025
- // node_modules/@timardex/cluemart-shared/dist/chunk-Q3X2EHHF.mjs
10045
+ // node_modules/@timardex/cluemart-shared/dist/chunk-LA47T6CY.mjs
10026
10046
  var PROMO_CODE_PREFIX2 = "CM-";
10027
10047
  var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
10028
10048
  var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
@@ -10124,7 +10144,7 @@ var gameScreenIdentifierList2 = [
10124
10144
  }
10125
10145
  ];
10126
10146
 
10127
- // node_modules/@timardex/cluemart-shared/dist/chunk-UGWEWOUM.mjs
10147
+ // node_modules/@timardex/cluemart-shared/dist/chunk-Q2ZUHS2F.mjs
10128
10148
  var import_dayjs4 = __toESM(require("dayjs"), 1);
10129
10149
  var statusOptions2 = [
10130
10150
  ...Object.values(EnumInviteStatus2).map((status) => ({