@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.
@@ -3625,6 +3625,7 @@ var EnumAffiliateRewardType = /* @__PURE__ */ ((EnumAffiliateRewardType2) => {
3625
3625
  var EnumCouponQualificationType = /* @__PURE__ */ ((EnumCouponQualificationType2) => {
3626
3626
  EnumCouponQualificationType2["PURCHASE"] = "PURCHASE";
3627
3627
  EnumCouponQualificationType2["MARKET_VISIT"] = "MARKET_VISIT";
3628
+ EnumCouponQualificationType2["MARKET_PASSPORT"] = "MARKET_PASSPORT";
3628
3629
  return EnumCouponQualificationType2;
3629
3630
  })(EnumCouponQualificationType || {});
3630
3631
  var statusOptions = [
@@ -7765,20 +7766,22 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
7765
7766
  visits
7766
7767
  }
7767
7768
  `;
7768
- var COUPON_REWARD_FIELDS_FRAGMENT = gql`
7769
- fragment CouponRewardFields on CouponRewardType {
7769
+ var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
7770
+ fragment CouponVendorProductFields on CouponVendorProductType {
7771
+ couponId
7770
7772
  vendorId
7771
7773
  productId
7772
- quantity
7773
- unit
7774
+ vendorCouponId
7774
7775
  }
7775
7776
  `;
7776
7777
  var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
7777
7778
  fragment CouponDataProductsFields on CouponDataProductsType {
7778
7779
  active
7780
+ couponId
7779
7781
  productsList {
7780
7782
  ...VendorProductListFields
7781
7783
  }
7784
+ vendorId
7782
7785
  vendorLogo {
7783
7786
  ...ResourceImageFields
7784
7787
  }
@@ -7798,8 +7801,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
7798
7801
  couponOption {
7799
7802
  ...CouponOptionFields
7800
7803
  }
7801
- couponRewards {
7802
- ...CouponRewardFields
7804
+ couponVendorProducts {
7805
+ ...CouponVendorProductFields
7803
7806
  }
7804
7807
  createdAt
7805
7808
  endDate
@@ -7817,7 +7820,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
7817
7820
  ${COUPON_CODE_FIELDS_FRAGMENT}
7818
7821
  ${COUPON_OPTION_FIELDS_FRAGMENT}
7819
7822
  ${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
7820
- ${COUPON_REWARD_FIELDS_FRAGMENT}
7823
+ ${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
7821
7824
  ${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
7822
7825
  `;
7823
7826
  var COUPON = gql`
@@ -7838,8 +7841,8 @@ var COUPON = gql`
7838
7841
  ${COUPON_DATA_FIELDS_FRAGMENT}
7839
7842
  `;
7840
7843
  var GET_COUPONS = gql`
7841
- query getCoupons {
7842
- coupons {
7844
+ query getCoupons($region: String, $category: String) {
7845
+ coupons(region: $region, category: $category) {
7843
7846
  active {
7844
7847
  listName
7845
7848
  data {
@@ -7901,8 +7904,16 @@ var UPDATE_COUPON_MUTATION = gql`
7901
7904
  ${COUPON}
7902
7905
  `;
7903
7906
  var DELETE_COUPON_MUTATION = gql`
7904
- mutation deleteCoupon($couponDocumentId: ID!, $couponId: ID!) {
7905
- deleteCoupon(couponDocumentId: $couponDocumentId, couponId: $couponId) {
7907
+ mutation deleteCoupon($input: ProductCouponInputType!) {
7908
+ deleteCoupon(input: $input) {
7909
+ data
7910
+ message
7911
+ }
7912
+ }
7913
+ `;
7914
+ var SCAN_COUPON_MUTATION = gql`
7915
+ mutation scanCoupon($input: ProductCouponInputType!) {
7916
+ scanCoupon(input: $input) {
7906
7917
  data
7907
7918
  message
7908
7919
  }
@@ -9080,14 +9091,20 @@ var couponOptionSchema = new MongooseSchema13(
9080
9091
  },
9081
9092
  { _id: false }
9082
9093
  );
9083
- var couponRewardSchema = new MongooseSchema13(
9094
+ var couponVendorProductSchema = new MongooseSchema13(
9084
9095
  {
9096
+ couponId: {
9097
+ required: true,
9098
+ type: mongoose13.Schema.Types.ObjectId
9099
+ },
9085
9100
  productId: {
9086
9101
  required: true,
9087
9102
  type: mongoose13.Schema.Types.ObjectId
9088
9103
  },
9089
- quantity: { required: true, type: Number },
9090
- unit: { required: true, type: String },
9104
+ vendorCouponId: {
9105
+ required: false,
9106
+ type: mongoose13.Schema.Types.ObjectId
9107
+ },
9091
9108
  vendorId: {
9092
9109
  ref: "Vendor",
9093
9110
  required: true,
@@ -9122,7 +9139,10 @@ var couponDataSchema = new MongooseSchema13(
9122
9139
  couponCode: { required: true, type: couponCodeSchema },
9123
9140
  couponDescription: { required: true, type: String },
9124
9141
  couponOption: { required: true, type: couponOptionSchema },
9125
- couponRewards: { required: false, type: [couponRewardSchema] },
9142
+ couponVendorProducts: {
9143
+ required: false,
9144
+ type: [couponVendorProductSchema]
9145
+ },
9126
9146
  endDate: { required: true, type: Date },
9127
9147
  participantUsers: {
9128
9148
  default: null,
@@ -9909,4 +9929,4 @@ export {
9909
9929
  SchoolModel,
9910
9930
  AffiliateModel
9911
9931
  };
9912
- //# sourceMappingURL=chunk-3JRVRK2N.mjs.map
9932
+ //# sourceMappingURL=chunk-6LIZONJ6.mjs.map