@lyxa.ai/marketing 1.0.38 → 1.0.41
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/lib/index.d.ts +89 -9
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +4 -0
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts +3 -0
- package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.js +111 -6
- package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts +28 -2
- package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/custom-coupon.service.js +13 -33
- package/dist/lib/modules/coupon/services/custom-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/helper.service.d.ts +30 -2
- package/dist/lib/modules/coupon/services/helper.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/helper.service.js +112 -4
- package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts +29 -3
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.js +10 -62
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +16 -6
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.d.ts +9 -0
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.js +96 -29
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts +29 -3
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js +10 -63
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +13 -0
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +6 -14
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js +4 -4
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js.map +1 -1
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts +39 -0
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts.map +1 -0
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.js +539 -0
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.js.map +1 -0
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts +85 -9
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.js +26 -8
- package/dist/lib/modules/marketing/routers/marketing.router.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +2 -8
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +35 -354
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts +1 -0
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.js +4 -0
- package/dist/lib/modules/marketing/services/product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +28 -7
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +12 -12
- package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +12 -12
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +106 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.js +31 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.js.map +1 -1
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts.map +1 -1
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.js +19 -1
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.js.map +1 -1
- package/dist/lib/utility/utils.d.ts +3 -0
- package/dist/lib/utility/utils.d.ts.map +1 -0
- package/dist/lib/utility/utils.js +31 -0
- package/dist/lib/utility/utils.js.map +1 -0
- package/dist/types/index.d.ts +89 -9
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +4 -0
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +3 -0
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/custom-coupon.service.d.ts +28 -2
- package/dist/types/modules/coupon/services/custom-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/helper.service.d.ts +30 -2
- package/dist/types/modules/coupon/services/helper.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts +29 -3
- package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts +57 -0
- package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts +29 -3
- package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +13 -0
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts +39 -0
- package/dist/types/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts.map +1 -0
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +85 -9
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +2 -8
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts +1 -0
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +12 -12
- package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +12 -12
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts +106 -1
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts.map +1 -1
- package/dist/types/utility/utils.d.ts +15 -0
- package/dist/types/utility/utils.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/lib/index.d.ts
CHANGED
|
@@ -666,6 +666,11 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
666
666
|
output: string;
|
|
667
667
|
meta: object;
|
|
668
668
|
}>;
|
|
669
|
+
syncAllProductsMarketingInfoLocal: import("@trpc/server").TRPCMutationProcedure<{
|
|
670
|
+
input: void;
|
|
671
|
+
output: any;
|
|
672
|
+
meta: object;
|
|
673
|
+
}>;
|
|
669
674
|
syncProductMarketingInfoByProductId: import("@trpc/server").TRPCQueryProcedure<{
|
|
670
675
|
input: void;
|
|
671
676
|
output: string;
|
|
@@ -678,18 +683,19 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
678
683
|
output: string;
|
|
679
684
|
meta: object;
|
|
680
685
|
}>;
|
|
681
|
-
|
|
682
|
-
input:
|
|
683
|
-
marketings: (string | import("mongoose").Types.ObjectId)[];
|
|
684
|
-
};
|
|
686
|
+
calculateMarketingSpent: import("@trpc/server").TRPCMutationProcedure<{
|
|
687
|
+
input: string | import("mongoose").Types.ObjectId;
|
|
685
688
|
output: {
|
|
686
689
|
success: boolean;
|
|
687
690
|
message: string;
|
|
688
|
-
data:
|
|
691
|
+
data: {
|
|
692
|
+
amount: number;
|
|
693
|
+
marketingType: import("@lyxa.ai/core/dist/utilities/enum").MarketingType;
|
|
694
|
+
} | undefined;
|
|
689
695
|
};
|
|
690
696
|
meta: object;
|
|
691
697
|
}>;
|
|
692
|
-
|
|
698
|
+
incrementMarketingSpentFromOrder: import("@trpc/server").TRPCMutationProcedure<{
|
|
693
699
|
input: string | import("mongoose").Types.ObjectId;
|
|
694
700
|
output: {
|
|
695
701
|
success: boolean;
|
|
@@ -698,7 +704,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
698
704
|
};
|
|
699
705
|
meta: object;
|
|
700
706
|
}>;
|
|
701
|
-
|
|
707
|
+
decrementMarketingSpentFromOrder: import("@trpc/server").TRPCMutationProcedure<{
|
|
702
708
|
input: string | import("mongoose").Types.ObjectId;
|
|
703
709
|
output: {
|
|
704
710
|
success: boolean;
|
|
@@ -707,12 +713,82 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
707
713
|
};
|
|
708
714
|
meta: object;
|
|
709
715
|
}>;
|
|
710
|
-
|
|
716
|
+
recomputeAndSyncAllMarketingSpent: import("@trpc/server").TRPCMutationProcedure<{
|
|
717
|
+
input: void;
|
|
718
|
+
output: {
|
|
719
|
+
success: boolean;
|
|
720
|
+
message: string;
|
|
721
|
+
data: void | undefined;
|
|
722
|
+
};
|
|
723
|
+
meta: object;
|
|
724
|
+
}>;
|
|
725
|
+
getMetrics: import("@trpc/server").TRPCQueryProcedure<{
|
|
711
726
|
input: string | import("mongoose").Types.ObjectId;
|
|
712
727
|
output: {
|
|
713
728
|
success: boolean;
|
|
714
729
|
message: string;
|
|
715
|
-
data:
|
|
730
|
+
data: {
|
|
731
|
+
numberOfItems?: number | undefined;
|
|
732
|
+
orderIncreaseWithDiscount?: {
|
|
733
|
+
count: number;
|
|
734
|
+
percentageIncrease: number;
|
|
735
|
+
} | undefined;
|
|
736
|
+
customerIncreaseWithDiscount?: {
|
|
737
|
+
count: number;
|
|
738
|
+
percentageIncrease: number;
|
|
739
|
+
} | undefined;
|
|
740
|
+
} | undefined;
|
|
741
|
+
};
|
|
742
|
+
meta: object;
|
|
743
|
+
}>;
|
|
744
|
+
getOrdersGraph: import("@trpc/server").TRPCQueryProcedure<{
|
|
745
|
+
input: {
|
|
746
|
+
startDate: string | Date;
|
|
747
|
+
marketingId: string | import("mongoose").Types.ObjectId;
|
|
748
|
+
endDate: string | Date;
|
|
749
|
+
type?: import("@lyxa.ai/core/dist/utilities/enum").GraphType | undefined;
|
|
750
|
+
};
|
|
751
|
+
output: {
|
|
752
|
+
success: boolean;
|
|
753
|
+
message: string;
|
|
754
|
+
data: {
|
|
755
|
+
date: string;
|
|
756
|
+
orders: number;
|
|
757
|
+
}[] | undefined;
|
|
758
|
+
};
|
|
759
|
+
meta: object;
|
|
760
|
+
}>;
|
|
761
|
+
getCustomersGraph: import("@trpc/server").TRPCQueryProcedure<{
|
|
762
|
+
input: {
|
|
763
|
+
startDate: string | Date;
|
|
764
|
+
marketingId: string | import("mongoose").Types.ObjectId;
|
|
765
|
+
endDate: string | Date;
|
|
766
|
+
type?: import("@lyxa.ai/core/dist/utilities/enum").GraphType | undefined;
|
|
767
|
+
};
|
|
768
|
+
output: {
|
|
769
|
+
success: boolean;
|
|
770
|
+
message: string;
|
|
771
|
+
data: {
|
|
772
|
+
date: string;
|
|
773
|
+
users: number;
|
|
774
|
+
}[] | undefined;
|
|
775
|
+
};
|
|
776
|
+
meta: object;
|
|
777
|
+
}>;
|
|
778
|
+
getAmountSpentGraph: import("@trpc/server").TRPCQueryProcedure<{
|
|
779
|
+
input: {
|
|
780
|
+
startDate: string | Date;
|
|
781
|
+
marketingId: string | import("mongoose").Types.ObjectId;
|
|
782
|
+
endDate: string | Date;
|
|
783
|
+
type?: import("@lyxa.ai/core/dist/utilities/enum").GraphType | undefined;
|
|
784
|
+
};
|
|
785
|
+
output: {
|
|
786
|
+
success: boolean;
|
|
787
|
+
message: string;
|
|
788
|
+
data: {
|
|
789
|
+
date: string;
|
|
790
|
+
amount: number;
|
|
791
|
+
}[] | undefined;
|
|
716
792
|
};
|
|
717
793
|
meta: object;
|
|
718
794
|
}>;
|
|
@@ -5940,6 +6016,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
5940
6016
|
shopCut?: number | undefined;
|
|
5941
6017
|
secondaryShopCut?: number | undefined;
|
|
5942
6018
|
} | undefined;
|
|
6019
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5943
6020
|
} | {
|
|
5944
6021
|
documents: {
|
|
5945
6022
|
message?: string | undefined;
|
|
@@ -5954,6 +6031,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
5954
6031
|
shopCut?: number | undefined;
|
|
5955
6032
|
secondaryShopCut?: number | undefined;
|
|
5956
6033
|
} | undefined;
|
|
6034
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5957
6035
|
}[];
|
|
5958
6036
|
metadata?: {
|
|
5959
6037
|
page: number;
|
|
@@ -5990,6 +6068,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
5990
6068
|
shopCut?: number | undefined;
|
|
5991
6069
|
secondaryShopCut?: number | undefined;
|
|
5992
6070
|
} | undefined;
|
|
6071
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5993
6072
|
} | {
|
|
5994
6073
|
documents: {
|
|
5995
6074
|
message?: string | undefined;
|
|
@@ -6004,6 +6083,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
|
|
|
6004
6083
|
shopCut?: number | undefined;
|
|
6005
6084
|
secondaryShopCut?: number | undefined;
|
|
6006
6085
|
} | undefined;
|
|
6086
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
6007
6087
|
}[];
|
|
6008
6088
|
metadata?: {
|
|
6009
6089
|
page: number;
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAkBA,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAeD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAR/B,CAAC;AAoCH,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAC"}
|
|
@@ -5223,6 +5223,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5223
5223
|
shopCut?: number | undefined;
|
|
5224
5224
|
secondaryShopCut?: number | undefined;
|
|
5225
5225
|
} | undefined;
|
|
5226
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5226
5227
|
} | {
|
|
5227
5228
|
documents: {
|
|
5228
5229
|
message?: string | undefined;
|
|
@@ -5237,6 +5238,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5237
5238
|
shopCut?: number | undefined;
|
|
5238
5239
|
secondaryShopCut?: number | undefined;
|
|
5239
5240
|
} | undefined;
|
|
5241
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5240
5242
|
}[];
|
|
5241
5243
|
metadata?: {
|
|
5242
5244
|
page: number;
|
|
@@ -5273,6 +5275,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5273
5275
|
shopCut?: number | undefined;
|
|
5274
5276
|
secondaryShopCut?: number | undefined;
|
|
5275
5277
|
} | undefined;
|
|
5278
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5276
5279
|
} | {
|
|
5277
5280
|
documents: {
|
|
5278
5281
|
message?: string | undefined;
|
|
@@ -5287,6 +5290,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
5287
5290
|
shopCut?: number | undefined;
|
|
5288
5291
|
secondaryShopCut?: number | undefined;
|
|
5289
5292
|
} | undefined;
|
|
5293
|
+
couponDetails?: Record<string, unknown> | undefined;
|
|
5290
5294
|
}[];
|
|
5291
5295
|
metadata?: {
|
|
5292
5296
|
page: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupon.router.d.ts","sourceRoot":"/","sources":["modules/coupon/routers/coupon.router.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;4BAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAkOokxB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GADvmxB,CAAC"}
|
|
@@ -15,6 +15,7 @@ export declare class CouponService {
|
|
|
15
15
|
private punchHistoryService;
|
|
16
16
|
private _coreUserModel;
|
|
17
17
|
private couponHelper;
|
|
18
|
+
private readonly referralSettingsModel;
|
|
18
19
|
constructor();
|
|
19
20
|
private get coreUserModel();
|
|
20
21
|
create(data: AllCouponsValidationDTO): Promise<DocumentType<Model>>;
|
|
@@ -51,9 +52,11 @@ export declare class CouponService {
|
|
|
51
52
|
getUserCouponList(data?: Partial<FilterDTO>): Promise<PaginatedResponse<AllCouponsDTO>>;
|
|
52
53
|
addExistingCouponsToNewUser(userId: mongoose.Types.ObjectId): Promise<void>;
|
|
53
54
|
getActiveNewUserCoupon(): Promise<DocumentType<BaseCoupon> | null>;
|
|
55
|
+
getActiveNewUserCouponWithSecondaryCurrency(): Promise<DocumentType<BaseCoupon> | null>;
|
|
54
56
|
checkExistingNewUserCoupon(): Promise<CheckExistingNewUserCouponOutputDTO>;
|
|
55
57
|
private getAllOrders;
|
|
56
58
|
handleCouponGiftBox(deviceId: string, userId: mongoose.Types.ObjectId | null): Promise<DocumentType<GlobalCoupon>[]>;
|
|
59
|
+
private updateNewUserCouponField;
|
|
57
60
|
updateCouponGiftBoxShown(userId: mongoose.Types.ObjectId, data: any): Promise<number>;
|
|
58
61
|
}
|
|
59
62
|
export declare const couponService: CouponService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAgC,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAKN,YAAY,EAGZ,MAAM,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAgC,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAKN,YAAY,EAGZ,MAAM,IAAI,KAAK,EAaf,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACN,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,mCAAmC,EACnC,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACN,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,MAAM,yCAAyC,CAAC;AAMjD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAS3D,OAAO,EAMN,MAAM,EAEN,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAmB,MAAM,2CAA2C,CAAC;AAsBxF,qBACa,aAAa;IACzB,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,eAAe,CAAuD;IAC9E,OAAO,CAAC,SAAS,CAA2C;IAC5D,OAAO,CAAC,U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AAE,CAAC;YAkD1B,wBAAwB;IAczB,wBAAwB,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,CAAC;CAsBlG;AAED,eAAO,MAAM,aAAa,eAA+B,CAAC"}
|
|
@@ -58,6 +58,9 @@ const error_common_1 = require("@lyxa.ai/core/dist/utilities/error-common");
|
|
|
58
58
|
const shops_categories_coupon_service_1 = require("./shops-categories-coupon.service");
|
|
59
59
|
const helper_service_1 = require("./helper.service");
|
|
60
60
|
const dayjs_1 = require("@lyxa.ai/core/dist/utilities/dayjs");
|
|
61
|
+
const currency_1 = require("@lyxa.ai/core/dist/utilities/currency");
|
|
62
|
+
const shared_1 = require("@lyxa.ai/core/dist/utilities/shared");
|
|
63
|
+
const common_pipeline_functions_1 = require("@lyxa.ai/core/dist/utilities/pipelines/common-pipeline-functions");
|
|
61
64
|
let CouponService = class CouponService {
|
|
62
65
|
model;
|
|
63
66
|
baseCouponModel;
|
|
@@ -68,6 +71,7 @@ let CouponService = class CouponService {
|
|
|
68
71
|
punchHistoryService;
|
|
69
72
|
_coreUserModel = null;
|
|
70
73
|
couponHelper;
|
|
74
|
+
referralSettingsModel;
|
|
71
75
|
constructor() {
|
|
72
76
|
this.model = models_1.CouponModel;
|
|
73
77
|
this.baseCouponModel = models_2.BaseCouponModel;
|
|
@@ -77,6 +81,7 @@ let CouponService = class CouponService {
|
|
|
77
81
|
this.referralRewardModel = models_1.ReferralRewardCouponModel;
|
|
78
82
|
this.punchHistoryService = services_1.punchMarketingHistoryService;
|
|
79
83
|
this.couponHelper = helper_service_1.couponHelperService;
|
|
84
|
+
this.referralSettingsModel = models_1.ReferralSettingModel;
|
|
80
85
|
}
|
|
81
86
|
get coreUserModel() {
|
|
82
87
|
if (!this._coreUserModel) {
|
|
@@ -479,6 +484,9 @@ let CouponService = class CouponService {
|
|
|
479
484
|
if (!coupon) {
|
|
480
485
|
(0, error_common_1.notFoundError)('Coupon not found');
|
|
481
486
|
}
|
|
487
|
+
this.userModel.findByIdAndUpdate(user._id, {
|
|
488
|
+
$addToSet: { coupons: coupon._id },
|
|
489
|
+
});
|
|
482
490
|
}
|
|
483
491
|
if (coupon.couponType == enum_1.CouponType.REFERRAL_CODE) {
|
|
484
492
|
return await _1.referralCodeCouponService.validateCoupon(data, coupon);
|
|
@@ -543,7 +551,7 @@ let CouponService = class CouponService {
|
|
|
543
551
|
const orderLimitPerUser = coupon.orderLimitPerUser;
|
|
544
552
|
if (forNewUserOnly) {
|
|
545
553
|
if (isOrderLimitPerUserEnabled && orderLimitPerUser) {
|
|
546
|
-
const orderCount = await helper_service_1.couponHelperService.
|
|
554
|
+
const orderCount = await helper_service_1.couponHelperService.getSameDeviceOrdersWithCoupon(user, coupon);
|
|
547
555
|
return orderLimitPerUser > orderCount;
|
|
548
556
|
}
|
|
549
557
|
return await helper_service_1.couponHelperService.isNewUser(user);
|
|
@@ -957,6 +965,86 @@ let CouponService = class CouponService {
|
|
|
957
965
|
});
|
|
958
966
|
return activeForNewUserCoupon;
|
|
959
967
|
}
|
|
968
|
+
async getActiveNewUserCouponWithSecondaryCurrency() {
|
|
969
|
+
const exchangeRate = await (0, currency_1.getExchangeRate)();
|
|
970
|
+
const currentDate = (0, dayjs_1.dayjs)().toDate();
|
|
971
|
+
const referralSettings = await this.referralSettingsModel.findOne();
|
|
972
|
+
const secondaryReferralReceiverValue = referralSettings?.receiver?.valueType == enum_1.ValueType.PERCENTAGE
|
|
973
|
+
? null
|
|
974
|
+
: (0, shared_1.roundSecondaryCurrency)((referralSettings?.receiver?.value ?? 0) * exchangeRate);
|
|
975
|
+
const secondaryReferralReceiverMinOrderAmount = (0, shared_1.roundSecondaryCurrency)((referralSettings?.receiver?.minimumOrderValue ?? 0) * exchangeRate);
|
|
976
|
+
const activeForNewUserCoupon = await this.baseCouponModel.aggregate([
|
|
977
|
+
{
|
|
978
|
+
$match: {
|
|
979
|
+
couponType: enum_1.CouponType.GLOBAL,
|
|
980
|
+
forNewUserOnly: true,
|
|
981
|
+
deletedAt: null,
|
|
982
|
+
$or: [{ expirationReason: { $exists: false } }, { expirationReason: null }],
|
|
983
|
+
'duration.end': { $gte: currentDate },
|
|
984
|
+
updatedVersion: { $exists: false },
|
|
985
|
+
},
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
$addFields: {
|
|
989
|
+
secondaryCurrencyValue: {
|
|
990
|
+
$cond: [
|
|
991
|
+
{
|
|
992
|
+
$eq: ['$valueType', enum_1.ValueType.PERCENTAGE],
|
|
993
|
+
},
|
|
994
|
+
null,
|
|
995
|
+
{
|
|
996
|
+
$switch: {
|
|
997
|
+
branches: [
|
|
998
|
+
{
|
|
999
|
+
case: {
|
|
1000
|
+
$eq: ['$couponType', enum_1.CouponType.REFERRAL_CODE],
|
|
1001
|
+
},
|
|
1002
|
+
then: secondaryReferralReceiverValue,
|
|
1003
|
+
},
|
|
1004
|
+
],
|
|
1005
|
+
default: (0, common_pipeline_functions_1.getRoundSecondaryCurrencyStage)({
|
|
1006
|
+
$multiply: ['$value', exchangeRate],
|
|
1007
|
+
}),
|
|
1008
|
+
},
|
|
1009
|
+
},
|
|
1010
|
+
],
|
|
1011
|
+
},
|
|
1012
|
+
secondaryCurrencyMaxDiscountLimit: {
|
|
1013
|
+
$switch: {
|
|
1014
|
+
branches: [
|
|
1015
|
+
{
|
|
1016
|
+
case: {
|
|
1017
|
+
$eq: ['$couponType', enum_1.CouponType.REFERRAL_CODE],
|
|
1018
|
+
},
|
|
1019
|
+
then: null,
|
|
1020
|
+
},
|
|
1021
|
+
],
|
|
1022
|
+
default: (0, common_pipeline_functions_1.getRoundSecondaryCurrencyStage)({
|
|
1023
|
+
$multiply: ['$maxDiscountLimit', exchangeRate],
|
|
1024
|
+
}),
|
|
1025
|
+
},
|
|
1026
|
+
},
|
|
1027
|
+
secondaryCurrencyMinOrderValue: {
|
|
1028
|
+
$switch: {
|
|
1029
|
+
branches: [
|
|
1030
|
+
{
|
|
1031
|
+
case: {
|
|
1032
|
+
$eq: ['$couponType', enum_1.CouponType.REFERRAL_CODE],
|
|
1033
|
+
},
|
|
1034
|
+
then: secondaryReferralReceiverMinOrderAmount,
|
|
1035
|
+
},
|
|
1036
|
+
],
|
|
1037
|
+
default: (0, common_pipeline_functions_1.getRoundSecondaryCurrencyStage)({
|
|
1038
|
+
$multiply: ['$minOrderValue', exchangeRate],
|
|
1039
|
+
}),
|
|
1040
|
+
},
|
|
1041
|
+
},
|
|
1042
|
+
},
|
|
1043
|
+
},
|
|
1044
|
+
{ $limit: 1 },
|
|
1045
|
+
]);
|
|
1046
|
+
return activeForNewUserCoupon[0] || null;
|
|
1047
|
+
}
|
|
960
1048
|
async checkExistingNewUserCoupon() {
|
|
961
1049
|
const alreadyActiveForNewUserCoupon = await this.getActiveNewUserCoupon();
|
|
962
1050
|
if (alreadyActiveForNewUserCoupon) {
|
|
@@ -978,20 +1066,37 @@ let CouponService = class CouponService {
|
|
|
978
1066
|
if (userId) {
|
|
979
1067
|
userIds.push(new typegoose_1.mongoose.Types.ObjectId(userId));
|
|
980
1068
|
}
|
|
1069
|
+
const hasShownCoupon = await this.userModel.exists({
|
|
1070
|
+
_id: { $in: userIds },
|
|
1071
|
+
isNewUserCouponShowed: true,
|
|
1072
|
+
});
|
|
1073
|
+
if (hasShownCoupon) {
|
|
1074
|
+
return [];
|
|
1075
|
+
}
|
|
981
1076
|
const totalOrders = await this.getAllOrders(userIds);
|
|
982
|
-
const activeNewUserCoupon = await this.
|
|
1077
|
+
const activeNewUserCoupon = await this.getActiveNewUserCouponWithSecondaryCurrency();
|
|
983
1078
|
if (!activeNewUserCoupon) {
|
|
984
|
-
|
|
1079
|
+
return [];
|
|
985
1080
|
}
|
|
986
1081
|
if (activeNewUserCoupon.isOrderLimitPerUserEnabled &&
|
|
987
1082
|
totalOrders < (activeNewUserCoupon.orderLimitPerUser || 0)) {
|
|
988
|
-
return couponRepository.addLabelsToCoupons([activeNewUserCoupon
|
|
1083
|
+
return couponRepository.addLabelsToCoupons([activeNewUserCoupon]);
|
|
989
1084
|
}
|
|
990
|
-
(0, error_common_1.notFoundError)('No gift box coupon available');
|
|
991
1085
|
return [];
|
|
992
1086
|
}
|
|
1087
|
+
async updateNewUserCouponField(userIds) {
|
|
1088
|
+
const result = await this.userModel.updateMany({ _id: { $in: userIds } }, {
|
|
1089
|
+
$set: {
|
|
1090
|
+
isNewUserCouponShowed: false,
|
|
1091
|
+
},
|
|
1092
|
+
});
|
|
1093
|
+
return result.modifiedCount;
|
|
1094
|
+
}
|
|
993
1095
|
async updateCouponGiftBoxShown(userId, data) {
|
|
994
|
-
const
|
|
1096
|
+
const user = await this.userModel.findById(userId);
|
|
1097
|
+
const users = await this.userModel.find({ deviceId: user?.deviceId }).select('_id').lean();
|
|
1098
|
+
const userIds = users.map(u => u._id);
|
|
1099
|
+
const result = await this.userModel.updateMany({ _id: { $in: userIds } }, {
|
|
995
1100
|
$set: {
|
|
996
1101
|
isNewUserCouponShowed: data.isNewUserGiftBoxShown,
|
|
997
1102
|
},
|