@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType,
|
|
2
|
+
import { AdType, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, ProductCoupon } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose__default from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-Wn7yfc3v.mjs';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-Wn7yfc3v.mjs';
|
|
@@ -296,12 +296,14 @@ declare const SchoolModel: mongoose__default.Model<SchoolDocument, {}, {}, {}, m
|
|
|
296
296
|
type SchemaCouponParticipantUserType = Omit<CouponParticipantUserType, "userId"> & {
|
|
297
297
|
userId: ObjectId;
|
|
298
298
|
};
|
|
299
|
-
type
|
|
299
|
+
type SchemaCouponVendorProductType = {
|
|
300
|
+
couponId: ObjectId;
|
|
300
301
|
productId: ObjectId;
|
|
302
|
+
vendorCouponId?: ObjectId;
|
|
301
303
|
vendorId: ObjectId;
|
|
302
304
|
};
|
|
303
|
-
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "
|
|
304
|
-
|
|
305
|
+
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "couponVendorProducts"> & {
|
|
306
|
+
couponVendorProducts?: SchemaCouponVendorProductType[];
|
|
305
307
|
participantUsers: SchemaCouponParticipantUserType[] | null;
|
|
306
308
|
};
|
|
307
309
|
type SchemaProductCouponType = Omit<ProductCoupon, "couponDocumentId" | "couponId"> & {
|
package/dist/mongoose/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType,
|
|
2
|
+
import { AdType, ReportChatUser, GoogleImportedMarket, PushTokenType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, CouponType, CouponDataType, CouponParticipantUserType, ProductCoupon } from '@timardex/cluemart-shared';
|
|
3
3
|
import mongoose__default from 'mongoose';
|
|
4
4
|
import { O as ObjectId } from '../Chat-Wn7yfc3v.js';
|
|
5
5
|
export { C as ChatModel, N as NotificationModel, a as SchemaChatMessageReactionType, S as SchemaChatMessageReplyPreviewType, b as SchemaChatMessageSeenType, c as SchemaChatMessageType, e as SchemaChatType, f as SchemaCreateBulkNotificationInput, g as SchemaNotificationType, d as SchemaParticipantType } from '../Chat-Wn7yfc3v.js';
|
|
@@ -296,12 +296,14 @@ declare const SchoolModel: mongoose__default.Model<SchoolDocument, {}, {}, {}, m
|
|
|
296
296
|
type SchemaCouponParticipantUserType = Omit<CouponParticipantUserType, "userId"> & {
|
|
297
297
|
userId: ObjectId;
|
|
298
298
|
};
|
|
299
|
-
type
|
|
299
|
+
type SchemaCouponVendorProductType = {
|
|
300
|
+
couponId: ObjectId;
|
|
300
301
|
productId: ObjectId;
|
|
302
|
+
vendorCouponId?: ObjectId;
|
|
301
303
|
vendorId: ObjectId;
|
|
302
304
|
};
|
|
303
|
-
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "
|
|
304
|
-
|
|
305
|
+
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "couponVendorProducts"> & {
|
|
306
|
+
couponVendorProducts?: SchemaCouponVendorProductType[];
|
|
305
307
|
participantUsers: SchemaCouponParticipantUserType[] | null;
|
|
306
308
|
};
|
|
307
309
|
type SchemaProductCouponType = Omit<ProductCoupon, "couponDocumentId" | "couponId"> & {
|
package/dist/mongoose/index.mjs
CHANGED
package/dist/service/index.cjs
CHANGED
|
@@ -3682,6 +3682,7 @@ var EnumAffiliateRewardType = /* @__PURE__ */ ((EnumAffiliateRewardType22) => {
|
|
|
3682
3682
|
var EnumCouponQualificationType = /* @__PURE__ */ ((EnumCouponQualificationType2) => {
|
|
3683
3683
|
EnumCouponQualificationType2["PURCHASE"] = "PURCHASE";
|
|
3684
3684
|
EnumCouponQualificationType2["MARKET_VISIT"] = "MARKET_VISIT";
|
|
3685
|
+
EnumCouponQualificationType2["MARKET_PASSPORT"] = "MARKET_PASSPORT";
|
|
3685
3686
|
return EnumCouponQualificationType2;
|
|
3686
3687
|
})(EnumCouponQualificationType || {});
|
|
3687
3688
|
var statusOptions = [
|
|
@@ -7822,20 +7823,22 @@ var COUPON_OPTION_FIELDS_FRAGMENT = gql`
|
|
|
7822
7823
|
visits
|
|
7823
7824
|
}
|
|
7824
7825
|
`;
|
|
7825
|
-
var
|
|
7826
|
-
fragment
|
|
7826
|
+
var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
|
|
7827
|
+
fragment CouponVendorProductFields on CouponVendorProductType {
|
|
7828
|
+
couponId
|
|
7827
7829
|
vendorId
|
|
7828
7830
|
productId
|
|
7829
|
-
|
|
7830
|
-
unit
|
|
7831
|
+
vendorCouponId
|
|
7831
7832
|
}
|
|
7832
7833
|
`;
|
|
7833
7834
|
var COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT = gql`
|
|
7834
7835
|
fragment CouponDataProductsFields on CouponDataProductsType {
|
|
7835
7836
|
active
|
|
7837
|
+
couponId
|
|
7836
7838
|
productsList {
|
|
7837
7839
|
...VendorProductListFields
|
|
7838
7840
|
}
|
|
7841
|
+
vendorId
|
|
7839
7842
|
vendorLogo {
|
|
7840
7843
|
...ResourceImageFields
|
|
7841
7844
|
}
|
|
@@ -7855,8 +7858,8 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7855
7858
|
couponOption {
|
|
7856
7859
|
...CouponOptionFields
|
|
7857
7860
|
}
|
|
7858
|
-
|
|
7859
|
-
...
|
|
7861
|
+
couponVendorProducts {
|
|
7862
|
+
...CouponVendorProductFields
|
|
7860
7863
|
}
|
|
7861
7864
|
createdAt
|
|
7862
7865
|
endDate
|
|
@@ -7874,7 +7877,7 @@ var COUPON_DATA_FIELDS_FRAGMENT = gql`
|
|
|
7874
7877
|
${COUPON_CODE_FIELDS_FRAGMENT}
|
|
7875
7878
|
${COUPON_OPTION_FIELDS_FRAGMENT}
|
|
7876
7879
|
${COUPON_PARTICIPANT_USER_FIELDS_FRAGMENT}
|
|
7877
|
-
${
|
|
7880
|
+
${COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT}
|
|
7878
7881
|
${COUPON_DATA_PRODUCTS_FIELDS_FRAGMENT}
|
|
7879
7882
|
`;
|
|
7880
7883
|
var COUPON = gql`
|
|
@@ -7895,8 +7898,8 @@ var COUPON = gql`
|
|
|
7895
7898
|
${COUPON_DATA_FIELDS_FRAGMENT}
|
|
7896
7899
|
`;
|
|
7897
7900
|
var GET_COUPONS = gql`
|
|
7898
|
-
query getCoupons {
|
|
7899
|
-
coupons {
|
|
7901
|
+
query getCoupons($region: String, $category: String) {
|
|
7902
|
+
coupons(region: $region, category: $category) {
|
|
7900
7903
|
active {
|
|
7901
7904
|
listName
|
|
7902
7905
|
data {
|
|
@@ -7958,8 +7961,16 @@ var UPDATE_COUPON_MUTATION = gql`
|
|
|
7958
7961
|
${COUPON}
|
|
7959
7962
|
`;
|
|
7960
7963
|
var DELETE_COUPON_MUTATION = gql`
|
|
7961
|
-
mutation deleteCoupon($
|
|
7962
|
-
deleteCoupon(
|
|
7964
|
+
mutation deleteCoupon($input: ProductCouponInputType!) {
|
|
7965
|
+
deleteCoupon(input: $input) {
|
|
7966
|
+
data
|
|
7967
|
+
message
|
|
7968
|
+
}
|
|
7969
|
+
}
|
|
7970
|
+
`;
|
|
7971
|
+
var SCAN_COUPON_MUTATION = gql`
|
|
7972
|
+
mutation scanCoupon($input: ProductCouponInputType!) {
|
|
7973
|
+
scanCoupon(input: $input) {
|
|
7963
7974
|
data
|
|
7964
7975
|
message
|
|
7965
7976
|
}
|
|
@@ -9137,14 +9148,20 @@ var couponOptionSchema = new MongooseSchema13(
|
|
|
9137
9148
|
},
|
|
9138
9149
|
{ _id: false }
|
|
9139
9150
|
);
|
|
9140
|
-
var
|
|
9151
|
+
var couponVendorProductSchema = new MongooseSchema13(
|
|
9141
9152
|
{
|
|
9153
|
+
couponId: {
|
|
9154
|
+
required: true,
|
|
9155
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9156
|
+
},
|
|
9142
9157
|
productId: {
|
|
9143
9158
|
required: true,
|
|
9144
9159
|
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9145
9160
|
},
|
|
9146
|
-
|
|
9147
|
-
|
|
9161
|
+
vendorCouponId: {
|
|
9162
|
+
required: false,
|
|
9163
|
+
type: import_mongoose13.default.Schema.Types.ObjectId
|
|
9164
|
+
},
|
|
9148
9165
|
vendorId: {
|
|
9149
9166
|
ref: "Vendor",
|
|
9150
9167
|
required: true,
|
|
@@ -9179,7 +9196,10 @@ var couponDataSchema = new MongooseSchema13(
|
|
|
9179
9196
|
couponCode: { required: true, type: couponCodeSchema },
|
|
9180
9197
|
couponDescription: { required: true, type: String },
|
|
9181
9198
|
couponOption: { required: true, type: couponOptionSchema },
|
|
9182
|
-
|
|
9199
|
+
couponVendorProducts: {
|
|
9200
|
+
required: false,
|
|
9201
|
+
type: [couponVendorProductSchema]
|
|
9202
|
+
},
|
|
9183
9203
|
endDate: { required: true, type: Date },
|
|
9184
9204
|
participantUsers: {
|
|
9185
9205
|
default: null,
|
|
@@ -9976,7 +9996,7 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
9976
9996
|
school: "School"
|
|
9977
9997
|
};
|
|
9978
9998
|
|
|
9979
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9999
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-LA47T6CY.mjs
|
|
9980
10000
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
9981
10001
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
9982
10002
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
@@ -10078,7 +10098,7 @@ var gameScreenIdentifierList2 = [
|
|
|
10078
10098
|
}
|
|
10079
10099
|
];
|
|
10080
10100
|
|
|
10081
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10101
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-Q2ZUHS2F.mjs
|
|
10082
10102
|
var import_dayjs4 = __toESM(require("dayjs"), 1);
|
|
10083
10103
|
var statusOptions2 = [
|
|
10084
10104
|
...Object.values(EnumInviteStatus2).map((status) => ({
|