@timardex/cluemart-server-shared 1.1.20 → 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-WDKTIULG.mjs → chunk-6LIZONJ6.mjs} +41 -25
- package/dist/chunk-6LIZONJ6.mjs.map +1 -0
- package/dist/index.cjs +42 -26
- 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 +42 -26
- package/dist/index.mjs.map +1 -1
- package/dist/mongoose/index.cjs +40 -24
- 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 +42 -26
- 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-WDKTIULG.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 = [
|
|
@@ -7817,6 +7818,9 @@ var COUPON_CODE_FIELDS_FRAGMENT = gql`
|
|
|
7817
7818
|
qrCode {
|
|
7818
7819
|
...ResourceImageFields
|
|
7819
7820
|
}
|
|
7821
|
+
shareableQrCode {
|
|
7822
|
+
...ResourceImageFields
|
|
7823
|
+
}
|
|
7820
7824
|
}
|
|
7821
7825
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
7822
7826
|
`;
|
|
@@ -7838,20 +7842,22 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
|
|
|
7838
7842
|
visits
|
|
7839
7843
|
}
|
|
7840
7844
|
`;
|
|
7841
|
-
var
|
|
7842
|
-
fragment
|
|
7845
|
+
var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
|
|
7846
|
+
fragment CouponVendorProductFields on CouponVendorProductType {
|
|
7847
|
+
couponId
|
|
7843
7848
|
vendorId
|
|
7844
7849
|
productId
|
|
7845
|
-
|
|
7846
|
-
unit
|
|
7850
|
+
vendorCouponId
|
|
7847
7851
|
}
|
|
7848
7852
|
`;
|
|
7849
7853
|
var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
|
|
7850
7854
|
fragment CouponDataProductsFields on CouponDataProductsType {
|
|
7851
7855
|
active
|
|
7856
|
+
couponId
|
|
7852
7857
|
productsList {
|
|
7853
7858
|
...VendorProductListFields
|
|
7854
7859
|
}
|
|
7860
|
+
vendorId
|
|
7855
7861
|
vendorLogo {
|
|
7856
7862
|
...ResourceImageFields
|
|
7857
7863
|
}
|
|
@@ -7871,8 +7877,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7871
7877
|
couponOption {
|
|
7872
7878
|
...CouponOptionFields
|
|
7873
7879
|
}
|
|
7874
|
-
|
|
7875
|
-
...
|
|
7880
|
+
couponVendorProducts {
|
|
7881
|
+
...CouponVendorProductFields
|
|
7876
7882
|
}
|
|
7877
7883
|
createdAt
|
|
7878
7884
|
endDate
|
|
@@ -7890,7 +7896,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7890
7896
|
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
7891
7897
|
${COUPON_OPTION_FIELDS_FRAGMENT}
|
|
7892
7898
|
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
7893
|
-
${
|
|
7899
|
+
${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
|
|
7894
7900
|
${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
|
|
7895
7901
|
`;
|
|
7896
7902
|
var COUPON = gql`
|
|
@@ -7911,8 +7917,8 @@ var COUPON = gql`
|
|
|
7911
7917
|
${COUPON_DATA_FIELDS_FRAGMENT}
|
|
7912
7918
|
`;
|
|
7913
7919
|
var GET_COUPONS = gql`
|
|
7914
|
-
query getCoupons {
|
|
7915
|
-
coupons {
|
|
7920
|
+
query getCoupons($region: String, $category: String) {
|
|
7921
|
+
coupons(region: $region, category: $category) {
|
|
7916
7922
|
active {
|
|
7917
7923
|
listName
|
|
7918
7924
|
data {
|
|
@@ -7943,14 +7949,6 @@ var GET_COUPON = gql`
|
|
|
7943
7949
|
}
|
|
7944
7950
|
${COUPON}
|
|
7945
7951
|
`;
|
|
7946
|
-
var GET_RESOURCE_COUPONS = gql`
|
|
7947
|
-
query getResourceCoupons($resourceId: ID!, $resourceType: ResourceTypeEnum!) {
|
|
7948
|
-
resourceCoupons(resourceId: $resourceId, resourceType: $resourceType) {
|
|
7949
|
-
...CouponFields
|
|
7950
|
-
}
|
|
7951
|
-
}
|
|
7952
|
-
${COUPON}
|
|
7953
|
-
`;
|
|
7954
7952
|
var CREATE_COUPON_MUTATION = gql`
|
|
7955
7953
|
mutation createCoupon($input: CouponInputType!) {
|
|
7956
7954
|
createCoupon(input: $input) {
|
|
@@ -7982,8 +7980,16 @@ var UPDATE_COUPON_MUTATION = gql`
|
|
|
7982
7980
|
${COUPON}
|
|
7983
7981
|
`;
|
|
7984
7982
|
var DELETE_COUPON_MUTATION = gql`
|
|
7985
|
-
mutation deleteCoupon($
|
|
7986
|
-
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) {
|
|
7987
7993
|
data
|
|
7988
7994
|
message
|
|
7989
7995
|
}
|
|
@@ -9113,14 +9119,20 @@ var couponOptionSchema = new MongooseSchema13(
|
|
|
9113
9119
|
},
|
|
9114
9120
|
{ _id: false }
|
|
9115
9121
|
);
|
|
9116
|
-
var
|
|
9122
|
+
var couponVendorProductSchema = new MongooseSchema13(
|
|
9117
9123
|
{
|
|
9124
|
+
couponId: {
|
|
9125
|
+
required: true,
|
|
9126
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9127
|
+
},
|
|
9118
9128
|
productId: {
|
|
9119
9129
|
required: true,
|
|
9120
9130
|
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9121
9131
|
},
|
|
9122
|
-
|
|
9123
|
-
|
|
9132
|
+
vendorCouponId: {
|
|
9133
|
+
required: false,
|
|
9134
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9135
|
+
},
|
|
9124
9136
|
vendorId: {
|
|
9125
9137
|
ref: "Vendor",
|
|
9126
9138
|
required: true,
|
|
@@ -9132,7 +9144,8 @@ var couponRewardSchema = new MongooseSchema13(
|
|
|
9132
9144
|
var couponCodeSchema = new MongooseSchema13(
|
|
9133
9145
|
{
|
|
9134
9146
|
code: { required: true, type: String },
|
|
9135
|
-
qrCode: { required: true, type: ResourceImageTypeSchema }
|
|
9147
|
+
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
9148
|
+
shareableQrCode: { required: true, type: ResourceImageTypeSchema }
|
|
9136
9149
|
},
|
|
9137
9150
|
{ _id: false }
|
|
9138
9151
|
);
|
|
@@ -9154,7 +9167,10 @@ var couponDataSchema = new MongooseSchema13(
|
|
|
9154
9167
|
couponCode: { required: true, type: couponCodeSchema },
|
|
9155
9168
|
couponDescription: { required: true, type: String },
|
|
9156
9169
|
couponOption: { required: true, type: couponOptionSchema },
|
|
9157
|
-
|
|
9170
|
+
couponVendorProducts: {
|
|
9171
|
+
required: false,
|
|
9172
|
+
type: [couponVendorProductSchema]
|
|
9173
|
+
},
|
|
9158
9174
|
endDate: { required: true, type: Date },
|
|
9159
9175
|
participantUsers: {
|
|
9160
9176
|
default: null,
|