@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/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, CouponType, CouponDataType,
|
|
2
|
+
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, CouponType, CouponDataType, CouponParticipantUserType, ProductCoupon, PromoCodeType, EnumAffiliateRewardType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
|
|
3
3
|
import * as mongoose from 'mongoose';
|
|
4
4
|
import mongoose__default from 'mongoose';
|
|
5
5
|
export { default as mongoose } from 'mongoose';
|
|
@@ -761,12 +761,14 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
|
|
|
761
761
|
type SchemaCouponParticipantUserType = Omit<CouponParticipantUserType, "userId"> & {
|
|
762
762
|
userId: ObjectId;
|
|
763
763
|
};
|
|
764
|
-
type
|
|
764
|
+
type SchemaCouponVendorProductType = {
|
|
765
|
+
couponId: ObjectId;
|
|
765
766
|
productId: ObjectId;
|
|
767
|
+
vendorCouponId?: ObjectId;
|
|
766
768
|
vendorId: ObjectId;
|
|
767
769
|
};
|
|
768
|
-
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "
|
|
769
|
-
|
|
770
|
+
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "couponVendorProducts"> & {
|
|
771
|
+
couponVendorProducts?: SchemaCouponVendorProductType[];
|
|
770
772
|
participantUsers: SchemaCouponParticipantUserType[] | null;
|
|
771
773
|
};
|
|
772
774
|
type SchemaProductCouponType = Omit<ProductCoupon, "couponDocumentId" | "couponId"> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _timardex_cluemart_shared from '@timardex/cluemart-shared';
|
|
2
|
-
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, CouponType, CouponDataType,
|
|
2
|
+
import { AdType, CreateBulkNotificationInput, NotificationType, EnumUserRole, ChatMessageType, ParticipantType, ChatType, ReportChatUser, RelatedPostType, OwnerType, SocialMediaType, ResourceImageType, Category, UserLicenceType, ResourceContactDetailsType, TermsAgreement, RelationDate, DateTimeType, LocationGeoType, LocationType, SocialShareResourceType, PosterUsageType, GoogleImportedMarket, PushTokenType, RelationType, ResourceActivityType, UserActivityEvent, UserType, VendorProductList, VendorType, VendorInfoType, UnregisteredVendorInvitationType, UnregisteredVendorType, EventType, StallType, RefundPolicy, EventInfoType, PartnerType, PostType, PostContentType, PostResource, AppSettingsType, GameType, GameDocType, SchoolType, AffiliateRewardType, AffiliateResourceType, AffiliateType, CouponType, CouponDataType, CouponParticipantUserType, ProductCoupon, PromoCodeType, EnumAffiliateRewardType, EnumUserLicence, EventListItemType, DateTimeWithPriceType } from '@timardex/cluemart-shared';
|
|
3
3
|
import * as mongoose from 'mongoose';
|
|
4
4
|
import mongoose__default from 'mongoose';
|
|
5
5
|
export { default as mongoose } from 'mongoose';
|
|
@@ -761,12 +761,14 @@ declare const AffiliateModel: mongoose__default.Model<AffiliateDocument, {}, {},
|
|
|
761
761
|
type SchemaCouponParticipantUserType = Omit<CouponParticipantUserType, "userId"> & {
|
|
762
762
|
userId: ObjectId;
|
|
763
763
|
};
|
|
764
|
-
type
|
|
764
|
+
type SchemaCouponVendorProductType = {
|
|
765
|
+
couponId: ObjectId;
|
|
765
766
|
productId: ObjectId;
|
|
767
|
+
vendorCouponId?: ObjectId;
|
|
766
768
|
vendorId: ObjectId;
|
|
767
769
|
};
|
|
768
|
-
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "
|
|
769
|
-
|
|
770
|
+
type SchemaCouponDataType = Omit<CouponDataType, "participantUsers" | "couponVendorProducts"> & {
|
|
771
|
+
couponVendorProducts?: SchemaCouponVendorProductType[];
|
|
770
772
|
participantUsers: SchemaCouponParticipantUserType[] | null;
|
|
771
773
|
};
|
|
772
774
|
type SchemaProductCouponType = Omit<ProductCoupon, "couponDocumentId" | "couponId"> & {
|
package/dist/index.mjs
CHANGED
|
@@ -3625,6 +3625,7 @@ var EnumAffiliateRewardType = /* @__PURE__ */ ((EnumAffiliateRewardType22) => {
|
|
|
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
|
|
7769
|
-
fragment
|
|
7769
|
+
var COUPON_VENDOR_PRODUCT_FIELDS_FRAGMENT = gql`
|
|
7770
|
+
fragment CouponVendorProductFields on CouponVendorProductType {
|
|
7771
|
+
couponId
|
|
7770
7772
|
vendorId
|
|
7771
7773
|
productId
|
|
7772
|
-
|
|
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
|
-
|
|
7802
|
-
...
|
|
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
|
-
${
|
|
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($
|
|
7905
|
-
deleteCoupon(
|
|
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
|
|
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
|
-
|
|
9090
|
-
|
|
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
|
-
|
|
9142
|
+
couponVendorProducts: {
|
|
9143
|
+
required: false,
|
|
9144
|
+
type: [couponVendorProductSchema]
|
|
9145
|
+
},
|
|
9126
9146
|
endDate: { required: true, type: Date },
|
|
9127
9147
|
participantUsers: {
|
|
9128
9148
|
default: null,
|
|
@@ -9919,7 +9939,7 @@ var SHARE_RESOURCE_LABEL2 = {
|
|
|
9919
9939
|
school: "School"
|
|
9920
9940
|
};
|
|
9921
9941
|
|
|
9922
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
9942
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-LA47T6CY.mjs
|
|
9923
9943
|
var PROMO_CODE_PREFIX2 = "CM-";
|
|
9924
9944
|
var OBJECT_ID_PATH_SEGMENT2 = "[a-f0-9]{24}";
|
|
9925
9945
|
var OBJECT_ID_PATH_SEGMENT_END2 = `${OBJECT_ID_PATH_SEGMENT2}$`;
|
|
@@ -10021,7 +10041,7 @@ var gameScreenIdentifierList2 = [
|
|
|
10021
10041
|
}
|
|
10022
10042
|
];
|
|
10023
10043
|
|
|
10024
|
-
// node_modules/@timardex/cluemart-shared/dist/chunk-
|
|
10044
|
+
// node_modules/@timardex/cluemart-shared/dist/chunk-Q2ZUHS2F.mjs
|
|
10025
10045
|
import dayjs4 from "dayjs";
|
|
10026
10046
|
var statusOptions2 = [
|
|
10027
10047
|
...Object.values(EnumInviteStatus2).map((status) => ({
|