@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/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 = [
|
|
@@ -7844,6 +7845,9 @@ var COUPON_CODE_FIELDS_FRAGMENT = gql`
|
|
|
7844
7845
|
qrCode {
|
|
7845
7846
|
...ResourceImageFields
|
|
7846
7847
|
}
|
|
7848
|
+
shareableQrCode {
|
|
7849
|
+
...ResourceImageFields
|
|
7850
|
+
}
|
|
7847
7851
|
}
|
|
7848
7852
|
${RESOURCE_IMAGE_FIELDS_FRAGMENT}
|
|
7849
7853
|
`;
|
|
@@ -7865,20 +7869,22 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
|
|
|
7865
7869
|
visits
|
|
7866
7870
|
}
|
|
7867
7871
|
`;
|
|
7868
|
-
var
|
|
7869
|
-
fragment
|
|
7872
|
+
var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
|
|
7873
|
+
fragment CouponVendorProductFields on CouponVendorProductType {
|
|
7874
|
+
couponId
|
|
7870
7875
|
vendorId
|
|
7871
7876
|
productId
|
|
7872
|
-
|
|
7873
|
-
unit
|
|
7877
|
+
vendorCouponId
|
|
7874
7878
|
}
|
|
7875
7879
|
`;
|
|
7876
7880
|
var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
|
|
7877
7881
|
fragment CouponDataProductsFields on CouponDataProductsType {
|
|
7878
7882
|
active
|
|
7883
|
+
couponId
|
|
7879
7884
|
productsList {
|
|
7880
7885
|
...VendorProductListFields
|
|
7881
7886
|
}
|
|
7887
|
+
vendorId
|
|
7882
7888
|
vendorLogo {
|
|
7883
7889
|
...ResourceImageFields
|
|
7884
7890
|
}
|
|
@@ -7898,8 +7904,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7898
7904
|
couponOption {
|
|
7899
7905
|
...CouponOptionFields
|
|
7900
7906
|
}
|
|
7901
|
-
|
|
7902
|
-
...
|
|
7907
|
+
couponVendorProducts {
|
|
7908
|
+
...CouponVendorProductFields
|
|
7903
7909
|
}
|
|
7904
7910
|
createdAt
|
|
7905
7911
|
endDate
|
|
@@ -7917,7 +7923,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7917
7923
|
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
7918
7924
|
${COUPON_OPTION_FIELDS_FRAGMENT}
|
|
7919
7925
|
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
7920
|
-
${
|
|
7926
|
+
${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
|
|
7921
7927
|
${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
|
|
7922
7928
|
`;
|
|
7923
7929
|
var COUPON = gql`
|
|
@@ -7938,8 +7944,8 @@ var COUPON = gql`
|
|
|
7938
7944
|
${COUPON_DATA_FIELDS_FRAGMENT}
|
|
7939
7945
|
`;
|
|
7940
7946
|
var GET_COUPONS = gql`
|
|
7941
|
-
query getCoupons {
|
|
7942
|
-
coupons {
|
|
7947
|
+
query getCoupons($region: String, $category: String) {
|
|
7948
|
+
coupons(region: $region, category: $category) {
|
|
7943
7949
|
active {
|
|
7944
7950
|
listName
|
|
7945
7951
|
data {
|
|
@@ -7970,14 +7976,6 @@ var GET_COUPON = gql`
|
|
|
7970
7976
|
}
|
|
7971
7977
|
${COUPON}
|
|
7972
7978
|
`;
|
|
7973
|
-
var GET_RESOURCE_COUPONS = gql`
|
|
7974
|
-
query getResourceCoupons($resourceId: ID!, $resourceType: ResourceTypeEnum!) {
|
|
7975
|
-
resourceCoupons(resourceId: $resourceId, resourceType: $resourceType) {
|
|
7976
|
-
...CouponFields
|
|
7977
|
-
}
|
|
7978
|
-
}
|
|
7979
|
-
${COUPON}
|
|
7980
|
-
`;
|
|
7981
7979
|
var CREATE_COUPON_MUTATION = gql`
|
|
7982
7980
|
mutation createCoupon($input: CouponInputType!) {
|
|
7983
7981
|
createCoupon(input: $input) {
|
|
@@ -8009,8 +8007,16 @@ var UPDATE_COUPON_MUTATION = gql`
|
|
|
8009
8007
|
${COUPON}
|
|
8010
8008
|
`;
|
|
8011
8009
|
var DELETE_COUPON_MUTATION = gql`
|
|
8012
|
-
mutation deleteCoupon($
|
|
8013
|
-
deleteCoupon(
|
|
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) {
|
|
8014
8020
|
data
|
|
8015
8021
|
message
|
|
8016
8022
|
}
|
|
@@ -9188,14 +9194,20 @@ var couponOptionSchema = new MongooseSchema13(
|
|
|
9188
9194
|
},
|
|
9189
9195
|
{ _id: false }
|
|
9190
9196
|
);
|
|
9191
|
-
var
|
|
9197
|
+
var couponVendorProductSchema = new MongooseSchema13(
|
|
9192
9198
|
{
|
|
9199
|
+
couponId: {
|
|
9200
|
+
required: true,
|
|
9201
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9202
|
+
},
|
|
9193
9203
|
productId: {
|
|
9194
9204
|
required: true,
|
|
9195
9205
|
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9196
9206
|
},
|
|
9197
|
-
|
|
9198
|
-
|
|
9207
|
+
vendorCouponId: {
|
|
9208
|
+
required: false,
|
|
9209
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9210
|
+
},
|
|
9199
9211
|
vendorId: {
|
|
9200
9212
|
ref: "Vendor",
|
|
9201
9213
|
required: true,
|
|
@@ -9207,7 +9219,8 @@ var couponRewardSchema = new MongooseSchema13(
|
|
|
9207
9219
|
var couponCodeSchema = new MongooseSchema13(
|
|
9208
9220
|
{
|
|
9209
9221
|
code: { required: true, type: String },
|
|
9210
|
-
qrCode: { required: true, type: ResourceImageTypeSchema }
|
|
9222
|
+
qrCode: { required: true, type: ResourceImageTypeSchema },
|
|
9223
|
+
shareableQrCode: { required: true, type: ResourceImageTypeSchema }
|
|
9211
9224
|
},
|
|
9212
9225
|
{ _id: false }
|
|
9213
9226
|
);
|
|
@@ -9229,7 +9242,10 @@ var couponDataSchema = new MongooseSchema13(
|
|
|
9229
9242
|
couponCode: { required: true, type: couponCodeSchema },
|
|
9230
9243
|
couponDescription: { required: true, type: String },
|
|
9231
9244
|
couponOption: { required: true, type: couponOptionSchema },
|
|
9232
|
-
|
|
9245
|
+
couponVendorProducts: {
|
|
9246
|
+
required: false,
|
|
9247
|
+
type: [couponVendorProductSchema]
|
|
9248
|
+
},
|
|
9233
9249
|
endDate: { required: true, type: Date },
|
|
9234
9250
|
participantUsers: {
|
|
9235
9251
|
default: null,
|
|
@@ -10026,7 +10042,7 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
10026
10042
|
school: "School"
|
|
10027
10043
|
};
|
|
10028
10044
|
|
|
10029
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10045
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-LA47T6CY.mjs
|
|
10030
10046
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
10031
10047
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
10032
10048
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
@@ -10128,7 +10144,7 @@ var gameScreenIdentifierList2 = [
|
|
|
10128
10144
|
}
|
|
10129
10145
|
];
|
|
10130
10146
|
|
|
10131
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10147
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-Q2ZUHS2F.mjs
|
|
10132
10148
|
var import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
10133
10149
|
var statusOptions2 = [
|
|
10134
10150
|
...Object.values(EnumInviteStatus2).map((status) => ({
|