@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/{chunk-3JRVRK2N.mjs → chunk-6LIZONJ6.mjs} +36 -16
- package/dist/chunk-6LIZONJ6.mjs.map +1 -0
- package/dist/index.cjs +37 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.mjs +37 -17
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +35 -15
- package/dist/mongoose/index.cjs.map +1 -1
- package/dist/mongoose/index.d.mts +6 -4
- package/dist/mongoose/index.d.ts +6 -4
- package/dist/mongoose/index.mjs +1 -1
- package/dist/service/index.cjs +37 -17
- package/dist/service/index.cjs.map +1 -1
- package/dist/service/index.mjs +3 -3
- package/dist/service/index.mjs.map +1 -1
- package/package.json +3 -2
- package/dist/chunk-3JRVRK2N.mjs.map +0 -1
package/dist/mongoose/index.cjs
CHANGED
|
@@ -3701,6 +3701,7 @@ var EnumAffiliateRewardType = /* @__PURE__ */ ((EnumAffiliateRewardType2) => {
|
|
|
3701
3701
|
var EnumCouponQualificationType = /* @__PURE__ */ ((EnumCouponQualificationType2) => {
|
|
3702
3702
|
EnumCouponQualificationType2["PURCHASE"] = "PURCHASE";
|
|
3703
3703
|
EnumCouponQualificationType2["MARKET_VISIT"] = "MARKET_VISIT";
|
|
3704
|
+
EnumCouponQualificationType2["MARKET_PASSPORT"] = "MARKET_PASSPORT";
|
|
3704
3705
|
return EnumCouponQualificationType2;
|
|
3705
3706
|
})(EnumCouponQualificationType || {});
|
|
3706
3707
|
var statusOptions = [
|
|
@@ -7841,20 +7842,22 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
|
|
|
7841
7842
|
visits
|
|
7842
7843
|
}
|
|
7843
7844
|
`;
|
|
7844
|
-
var
|
|
7845
|
-
fragment
|
|
7845
|
+
var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
|
|
7846
|
+
fragment CouponVendorProductFields on CouponVendorProductType {
|
|
7847
|
+
couponId
|
|
7846
7848
|
vendorId
|
|
7847
7849
|
productId
|
|
7848
|
-
|
|
7849
|
-
unit
|
|
7850
|
+
vendorCouponId
|
|
7850
7851
|
}
|
|
7851
7852
|
`;
|
|
7852
7853
|
var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
|
|
7853
7854
|
fragment CouponDataProductsFields on CouponDataProductsType {
|
|
7854
7855
|
active
|
|
7856
|
+
couponId
|
|
7855
7857
|
productsList {
|
|
7856
7858
|
...VendorProductListFields
|
|
7857
7859
|
}
|
|
7860
|
+
vendorId
|
|
7858
7861
|
vendorLogo {
|
|
7859
7862
|
...ResourceImageFields
|
|
7860
7863
|
}
|
|
@@ -7874,8 +7877,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7874
7877
|
couponOption {
|
|
7875
7878
|
...CouponOptionFields
|
|
7876
7879
|
}
|
|
7877
|
-
|
|
7878
|
-
...
|
|
7880
|
+
couponVendorProducts {
|
|
7881
|
+
...CouponVendorProductFields
|
|
7879
7882
|
}
|
|
7880
7883
|
createdAt
|
|
7881
7884
|
endDate
|
|
@@ -7893,7 +7896,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7893
7896
|
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
7894
7897
|
${COUPON_OPTION_FIELDS_FRAGMENT}
|
|
7895
7898
|
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
7896
|
-
${
|
|
7899
|
+
${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
|
|
7897
7900
|
${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
|
|
7898
7901
|
`;
|
|
7899
7902
|
var COUPON = gql`
|
|
@@ -7914,8 +7917,8 @@ var COUPON = gql`
|
|
|
7914
7917
|
${COUPON_DATA_FIELDS_FRAGMENT}
|
|
7915
7918
|
`;
|
|
7916
7919
|
var GET_COUPONS = gql`
|
|
7917
|
-
query getCoupons {
|
|
7918
|
-
coupons {
|
|
7920
|
+
query getCoupons($region: String, $category: String) {
|
|
7921
|
+
coupons(region: $region, category: $category) {
|
|
7919
7922
|
active {
|
|
7920
7923
|
listName
|
|
7921
7924
|
data {
|
|
@@ -7977,8 +7980,16 @@ var UPDATE_COUPON_MUTATION = gql`
|
|
|
7977
7980
|
${COUPON}
|
|
7978
7981
|
`;
|
|
7979
7982
|
var DELETE_COUPON_MUTATION = gql`
|
|
7980
|
-
mutation deleteCoupon($
|
|
7981
|
-
deleteCoupon(
|
|
7983
|
+
mutation deleteCoupon($input: ProductCouponInputType!) {
|
|
7984
|
+
deleteCoupon(input: $input) {
|
|
7985
|
+
data
|
|
7986
|
+
message
|
|
7987
|
+
}
|
|
7988
|
+
}
|
|
7989
|
+
`;
|
|
7990
|
+
var SCAN_COUPON_MUTATION = gql`
|
|
7991
|
+
mutation scanCoupon($input: ProductCouponInputType!) {
|
|
7992
|
+
scanCoupon(input: $input) {
|
|
7982
7993
|
data
|
|
7983
7994
|
message
|
|
7984
7995
|
}
|
|
@@ -9108,14 +9119,20 @@ var couponOptionSchema = new MongooseSchema13(
|
|
|
9108
9119
|
},
|
|
9109
9120
|
{ _id: false }
|
|
9110
9121
|
);
|
|
9111
|
-
var
|
|
9122
|
+
var couponVendorProductSchema = new MongooseSchema13(
|
|
9112
9123
|
{
|
|
9124
|
+
couponId: {
|
|
9125
|
+
required: true,
|
|
9126
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9127
|
+
},
|
|
9113
9128
|
productId: {
|
|
9114
9129
|
required: true,
|
|
9115
9130
|
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9116
9131
|
},
|
|
9117
|
-
|
|
9118
|
-
|
|
9132
|
+
vendorCouponId: {
|
|
9133
|
+
required: false,
|
|
9134
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9135
|
+
},
|
|
9119
9136
|
vendorId: {
|
|
9120
9137
|
ref: "Vendor",
|
|
9121
9138
|
required: true,
|
|
@@ -9150,7 +9167,10 @@ var couponDataSchema = new MongooseSchema13(
|
|
|
9150
9167
|
couponCode: { required: true, type: couponCodeSchema },
|
|
9151
9168
|
couponDescription: { required: true, type: String },
|
|
9152
9169
|
couponOption: { required: true, type: couponOptionSchema },
|
|
9153
|
-
|
|
9170
|
+
couponVendorProducts: {
|
|
9171
|
+
required: false,
|
|
9172
|
+
type: [couponVendorProductSchema]
|
|
9173
|
+
},
|
|
9154
9174
|
endDate: { required: true, type: Date },
|
|
9155
9175
|
participantUsers: {
|
|
9156
9176
|
default: null,
|