@lyxa.ai/marketing 1.0.42 → 1.0.43
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/event/event-initializations.d.ts.map +1 -1
- package/dist/lib/event/event-initializations.js +1 -0
- package/dist/lib/event/event-initializations.js.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.d.ts +1 -0
- package/dist/lib/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.js +52 -0
- package/dist/lib/event/event-listeners/event-listeners.js.map +1 -1
- package/dist/lib/event/events/marketing-product-seed.event.d.ts +17 -0
- package/dist/lib/event/events/marketing-product-seed.event.d.ts.map +1 -0
- package/dist/lib/event/events/marketing-product-seed.event.js +12 -0
- package/dist/lib/event/events/marketing-product-seed.event.js.map +1 -0
- package/dist/lib/index.d.ts +165 -83
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +116 -0
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +33 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +32 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +503 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -0
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +407 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +39 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts +1118 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js +13 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js.map +1 -0
- package/dist/lib/modules/coupon/validations/index.d.ts +1 -0
- package/dist/lib/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/index.js +1 -0
- package/dist/lib/modules/coupon/validations/index.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +29 -72
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +3 -16
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +36 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js +48 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +22 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js +131 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +78 -78
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +1 -2
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.js +6 -11
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +16 -51
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +33 -156
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts +8 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.js +13 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts +14 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.js +77 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -2
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js +19 -26
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +35 -78
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +53 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js +55 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +18 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js +126 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -6
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.js +1 -2
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js +2 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +24 -24
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts +3 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.js +13 -38
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +19 -8
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js +19 -27
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts +12 -3
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.js +7 -0
- package/dist/lib/modules/marketing/routers/marketing.router.js.map +1 -1
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.js +11 -9
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/discount-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/discount-marketing.service.js +15 -13
- package/dist/lib/modules/marketing/services/discount-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +1 -0
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +57 -7
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts +11 -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 +23 -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 +6 -31
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +2 -2
- package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +4 -4
- package/dist/types/event/event-initializations.d.ts.map +1 -1
- package/dist/types/event/event-listeners/event-listeners.d.ts +1 -0
- package/dist/types/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/types/event/events/marketing-product-seed.event.d.ts +17 -0
- package/dist/types/event/events/marketing-product-seed.event.d.ts.map +1 -0
- package/dist/types/index.d.ts +165 -83
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +116 -0
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +32 -0
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -0
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +407 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts +1118 -0
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -0
- package/dist/types/modules/coupon/validations/index.d.ts +1 -0
- package/dist/types/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +29 -72
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +36 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +22 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +78 -78
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +1 -2
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +16 -51
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts +8 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts +14 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -2
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/config/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +35 -78
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +53 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +18 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +6 -6
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +24 -24
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts +3 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +19 -8
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +12 -3
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/buy1-get1-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/discount-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +1 -0
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts +11 -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/marketing.validation.d.ts +2 -2
- package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +4 -4
- package/package.json +2 -2
- package/dist/types/events/event-initializations.d.ts +0 -2
- package/dist/types/events/event-initializations.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/create-coupon.validation.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
|
|
@@ -29,28 +29,28 @@ export declare const campaignRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
29
29
|
_id: string | import("mongoose").Types.ObjectId;
|
|
30
30
|
campaignNumber: number;
|
|
31
31
|
createdAt?: Date | null | undefined;
|
|
32
|
-
updatedAt?: Date | null | undefined;
|
|
33
|
-
title?: string | undefined;
|
|
34
32
|
startDate?: Date | null | undefined;
|
|
35
33
|
endDate?: Date | null | undefined;
|
|
34
|
+
updatedAt?: Date | null | undefined;
|
|
35
|
+
title?: string | undefined;
|
|
36
36
|
subTitle?: string | undefined;
|
|
37
|
-
archivedAt?: Date | null | undefined;
|
|
38
37
|
discountOptions?: number[] | undefined;
|
|
39
38
|
maxDiscountCaps?: number[] | undefined;
|
|
39
|
+
archivedAt?: Date | null | undefined;
|
|
40
40
|
} | {
|
|
41
41
|
documents: {
|
|
42
42
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
43
43
|
_id: string | import("mongoose").Types.ObjectId;
|
|
44
44
|
campaignNumber: number;
|
|
45
45
|
createdAt?: Date | null | undefined;
|
|
46
|
-
updatedAt?: Date | null | undefined;
|
|
47
|
-
title?: string | undefined;
|
|
48
46
|
startDate?: Date | null | undefined;
|
|
49
47
|
endDate?: Date | null | undefined;
|
|
48
|
+
updatedAt?: Date | null | undefined;
|
|
49
|
+
title?: string | undefined;
|
|
50
50
|
subTitle?: string | undefined;
|
|
51
|
-
archivedAt?: Date | null | undefined;
|
|
52
51
|
discountOptions?: number[] | undefined;
|
|
53
52
|
maxDiscountCaps?: number[] | undefined;
|
|
53
|
+
archivedAt?: Date | null | undefined;
|
|
54
54
|
}[];
|
|
55
55
|
metadata?: {
|
|
56
56
|
page: number;
|
|
@@ -72,71 +72,28 @@ export declare const campaignRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
72
72
|
_id: string | import("mongoose").Types.ObjectId;
|
|
73
73
|
campaignNumber: number;
|
|
74
74
|
createdAt?: Date | null | undefined;
|
|
75
|
-
updatedAt?: Date | null | undefined;
|
|
76
|
-
title?: string | undefined;
|
|
77
75
|
startDate?: Date | null | undefined;
|
|
78
76
|
endDate?: Date | null | undefined;
|
|
79
|
-
subTitle?: string | undefined;
|
|
80
|
-
archivedAt?: Date | null | undefined;
|
|
81
|
-
discountOptions?: number[] | undefined;
|
|
82
|
-
maxDiscountCaps?: number[] | undefined;
|
|
83
|
-
} | {
|
|
84
|
-
documents: ({
|
|
85
|
-
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
86
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
87
|
-
campaignNumber: number;
|
|
88
|
-
createdAt?: Date | null | undefined;
|
|
89
|
-
updatedAt?: Date | null | undefined;
|
|
90
|
-
title?: string | undefined;
|
|
91
|
-
startDate?: Date | null | undefined;
|
|
92
|
-
endDate?: Date | null | undefined;
|
|
93
|
-
subTitle?: string | undefined;
|
|
94
|
-
archivedAt?: Date | null | undefined;
|
|
95
|
-
discountOptions?: number[] | undefined;
|
|
96
|
-
maxDiscountCaps?: number[] | undefined;
|
|
97
|
-
} | null)[];
|
|
98
|
-
metadata?: {
|
|
99
|
-
page: number;
|
|
100
|
-
size: number;
|
|
101
|
-
totalElements: number;
|
|
102
|
-
totalPages: number;
|
|
103
|
-
} | undefined;
|
|
104
|
-
} | null | undefined;
|
|
105
|
-
};
|
|
106
|
-
meta: object;
|
|
107
|
-
}>;
|
|
108
|
-
getActiveForShop: import("@trpc/server").TRPCQueryProcedure<{
|
|
109
|
-
input: void;
|
|
110
|
-
output: {
|
|
111
|
-
message: string;
|
|
112
|
-
success: boolean;
|
|
113
|
-
data?: {
|
|
114
|
-
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
115
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
116
|
-
campaignNumber: number;
|
|
117
|
-
createdAt?: Date | null | undefined;
|
|
118
77
|
updatedAt?: Date | null | undefined;
|
|
119
78
|
title?: string | undefined;
|
|
120
|
-
startDate?: Date | null | undefined;
|
|
121
|
-
endDate?: Date | null | undefined;
|
|
122
79
|
subTitle?: string | undefined;
|
|
123
|
-
archivedAt?: Date | null | undefined;
|
|
124
80
|
discountOptions?: number[] | undefined;
|
|
125
81
|
maxDiscountCaps?: number[] | undefined;
|
|
82
|
+
archivedAt?: Date | null | undefined;
|
|
126
83
|
} | {
|
|
127
84
|
documents: ({
|
|
128
85
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
129
86
|
_id: string | import("mongoose").Types.ObjectId;
|
|
130
87
|
campaignNumber: number;
|
|
131
88
|
createdAt?: Date | null | undefined;
|
|
132
|
-
updatedAt?: Date | null | undefined;
|
|
133
|
-
title?: string | undefined;
|
|
134
89
|
startDate?: Date | null | undefined;
|
|
135
90
|
endDate?: Date | null | undefined;
|
|
91
|
+
updatedAt?: Date | null | undefined;
|
|
92
|
+
title?: string | undefined;
|
|
136
93
|
subTitle?: string | undefined;
|
|
137
|
-
archivedAt?: Date | null | undefined;
|
|
138
94
|
discountOptions?: number[] | undefined;
|
|
139
95
|
maxDiscountCaps?: number[] | undefined;
|
|
96
|
+
archivedAt?: Date | null | undefined;
|
|
140
97
|
} | null)[];
|
|
141
98
|
metadata?: {
|
|
142
99
|
page: number;
|
|
@@ -148,7 +105,7 @@ export declare const campaignRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
148
105
|
};
|
|
149
106
|
meta: object;
|
|
150
107
|
}>;
|
|
151
|
-
|
|
108
|
+
getActive: import("@trpc/server").TRPCQueryProcedure<{
|
|
152
109
|
input: void;
|
|
153
110
|
output: {
|
|
154
111
|
message: string;
|
|
@@ -158,28 +115,28 @@ export declare const campaignRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
158
115
|
_id: string | import("mongoose").Types.ObjectId;
|
|
159
116
|
campaignNumber: number;
|
|
160
117
|
createdAt?: Date | null | undefined;
|
|
161
|
-
updatedAt?: Date | null | undefined;
|
|
162
|
-
title?: string | undefined;
|
|
163
118
|
startDate?: Date | null | undefined;
|
|
164
119
|
endDate?: Date | null | undefined;
|
|
120
|
+
updatedAt?: Date | null | undefined;
|
|
121
|
+
title?: string | undefined;
|
|
165
122
|
subTitle?: string | undefined;
|
|
166
|
-
archivedAt?: Date | null | undefined;
|
|
167
123
|
discountOptions?: number[] | undefined;
|
|
168
124
|
maxDiscountCaps?: number[] | undefined;
|
|
125
|
+
archivedAt?: Date | null | undefined;
|
|
169
126
|
} | {
|
|
170
127
|
documents: ({
|
|
171
128
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
172
129
|
_id: string | import("mongoose").Types.ObjectId;
|
|
173
130
|
campaignNumber: number;
|
|
174
131
|
createdAt?: Date | null | undefined;
|
|
175
|
-
updatedAt?: Date | null | undefined;
|
|
176
|
-
title?: string | undefined;
|
|
177
132
|
startDate?: Date | null | undefined;
|
|
178
133
|
endDate?: Date | null | undefined;
|
|
134
|
+
updatedAt?: Date | null | undefined;
|
|
135
|
+
title?: string | undefined;
|
|
179
136
|
subTitle?: string | undefined;
|
|
180
|
-
archivedAt?: Date | null | undefined;
|
|
181
137
|
discountOptions?: number[] | undefined;
|
|
182
138
|
maxDiscountCaps?: number[] | undefined;
|
|
139
|
+
archivedAt?: Date | null | undefined;
|
|
183
140
|
} | null)[];
|
|
184
141
|
metadata?: {
|
|
185
142
|
page: number;
|
|
@@ -203,28 +160,28 @@ export declare const campaignRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
203
160
|
_id: string | import("mongoose").Types.ObjectId;
|
|
204
161
|
campaignNumber: number;
|
|
205
162
|
createdAt?: Date | null | undefined;
|
|
206
|
-
updatedAt?: Date | null | undefined;
|
|
207
|
-
title?: string | undefined;
|
|
208
163
|
startDate?: Date | null | undefined;
|
|
209
164
|
endDate?: Date | null | undefined;
|
|
165
|
+
updatedAt?: Date | null | undefined;
|
|
166
|
+
title?: string | undefined;
|
|
210
167
|
subTitle?: string | undefined;
|
|
211
|
-
archivedAt?: Date | null | undefined;
|
|
212
168
|
discountOptions?: number[] | undefined;
|
|
213
169
|
maxDiscountCaps?: number[] | undefined;
|
|
170
|
+
archivedAt?: Date | null | undefined;
|
|
214
171
|
} | {
|
|
215
172
|
documents: {
|
|
216
173
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
217
174
|
_id: string | import("mongoose").Types.ObjectId;
|
|
218
175
|
campaignNumber: number;
|
|
219
176
|
createdAt?: Date | null | undefined;
|
|
220
|
-
updatedAt?: Date | null | undefined;
|
|
221
|
-
title?: string | undefined;
|
|
222
177
|
startDate?: Date | null | undefined;
|
|
223
178
|
endDate?: Date | null | undefined;
|
|
179
|
+
updatedAt?: Date | null | undefined;
|
|
180
|
+
title?: string | undefined;
|
|
224
181
|
subTitle?: string | undefined;
|
|
225
|
-
archivedAt?: Date | null | undefined;
|
|
226
182
|
discountOptions?: number[] | undefined;
|
|
227
183
|
maxDiscountCaps?: number[] | undefined;
|
|
184
|
+
archivedAt?: Date | null | undefined;
|
|
228
185
|
}[];
|
|
229
186
|
metadata?: {
|
|
230
187
|
page: number;
|
|
@@ -292,28 +249,28 @@ export declare const campaignRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
292
249
|
_id: string | import("mongoose").Types.ObjectId;
|
|
293
250
|
campaignNumber: number;
|
|
294
251
|
createdAt?: Date | null | undefined;
|
|
295
|
-
updatedAt?: Date | null | undefined;
|
|
296
|
-
title?: string | undefined;
|
|
297
252
|
startDate?: Date | null | undefined;
|
|
298
253
|
endDate?: Date | null | undefined;
|
|
254
|
+
updatedAt?: Date | null | undefined;
|
|
255
|
+
title?: string | undefined;
|
|
299
256
|
subTitle?: string | undefined;
|
|
300
|
-
archivedAt?: Date | null | undefined;
|
|
301
257
|
discountOptions?: number[] | undefined;
|
|
302
258
|
maxDiscountCaps?: number[] | undefined;
|
|
259
|
+
archivedAt?: Date | null | undefined;
|
|
303
260
|
} | {
|
|
304
261
|
documents: {
|
|
305
262
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
306
263
|
_id: string | import("mongoose").Types.ObjectId;
|
|
307
264
|
campaignNumber: number;
|
|
308
265
|
createdAt?: Date | null | undefined;
|
|
309
|
-
updatedAt?: Date | null | undefined;
|
|
310
|
-
title?: string | undefined;
|
|
311
266
|
startDate?: Date | null | undefined;
|
|
312
267
|
endDate?: Date | null | undefined;
|
|
268
|
+
updatedAt?: Date | null | undefined;
|
|
269
|
+
title?: string | undefined;
|
|
313
270
|
subTitle?: string | undefined;
|
|
314
|
-
archivedAt?: Date | null | undefined;
|
|
315
271
|
discountOptions?: number[] | undefined;
|
|
316
272
|
maxDiscountCaps?: number[] | undefined;
|
|
273
|
+
archivedAt?: Date | null | undefined;
|
|
317
274
|
}[];
|
|
318
275
|
metadata?: {
|
|
319
276
|
page: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"campaign.router.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/campaign/campaign.router.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"campaign.router.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/campaign/campaign.router.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEzB,CAAC"}
|
package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { LimitedTimeOfferCampaign } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
2
|
+
import { LimitedTimeOfferCampaignStatus } from '@lyxa.ai/core/dist/utilities/enum';
|
|
3
|
+
import { CreateLtoCampaignDTO, GetLtoCampaignHistoryDTO, UpdateLtoCampaignDTO } from './limited-time-offer-campaign.validation';
|
|
4
|
+
export declare class LtoCampaignQueryBuilder {
|
|
5
|
+
static buildCreateInput(dto: CreateLtoCampaignDTO, status: LimitedTimeOfferCampaignStatus, campaignNumber: number, config: {
|
|
6
|
+
discountOptions: number[];
|
|
7
|
+
maxDiscountCaps: number[];
|
|
8
|
+
}): {
|
|
9
|
+
campaignNumber: number;
|
|
10
|
+
title: string | undefined;
|
|
11
|
+
subTitle: string | undefined;
|
|
12
|
+
startDate: Date;
|
|
13
|
+
endDate: Date;
|
|
14
|
+
status: LimitedTimeOfferCampaignStatus;
|
|
15
|
+
discountOptions: number[];
|
|
16
|
+
maxDiscountCaps: number[];
|
|
17
|
+
};
|
|
18
|
+
static buildUpdateInput(campaign: LimitedTimeOfferCampaign, dto: UpdateLtoCampaignDTO): {
|
|
19
|
+
maxDiscountCaps?: number[] | undefined;
|
|
20
|
+
discountOptions?: number[] | undefined;
|
|
21
|
+
title: string;
|
|
22
|
+
subTitle: string;
|
|
23
|
+
startDate: Date;
|
|
24
|
+
endDate: Date;
|
|
25
|
+
};
|
|
26
|
+
static buildHistoryFilter(dto: GetLtoCampaignHistoryDTO): {
|
|
27
|
+
status: LimitedTimeOfferCampaignStatus.EXPIRED | LimitedTimeOfferCampaignStatus.CANCELLED;
|
|
28
|
+
} | {
|
|
29
|
+
status: {
|
|
30
|
+
$in: LimitedTimeOfferCampaignStatus[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
static buildSortField(sortBy?: string): string;
|
|
34
|
+
static buildSortDirection(sortOrder?: string): 1 | -1;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=limited-time-offer-campaign.builder.d.ts.map
|
package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-campaign.builder.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,wBAAwB,EAAC,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAC,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAC,oBAAoB,EAAE,wBAAwB,EAAE,oBAAoB,EAAC,MAAM,0CAA0C,CAAC;AAa9H,qBAAa,uBAAuB;IAChC,MAAM,CAAC,gBAAgB,CACnB,GAAG,EAAE,oBAAoB,EACzB,MAAM,EAAE,8BAA8B,EACtC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE;QAAC,eAAe,EAAE,MAAM,EAAE,CAAC;QAAC,eAAe,EAAE,MAAM,EAAE,CAAA;KAAC;;;;;;;;;;IAclE,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,wBAAwB,EAAE,GAAG,EAAE,oBAAoB;;;;;;;;IAWrF,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,wBAAwB;;;;;;;IAIvD,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM;IAI9C,MAAM,CAAC,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;CAGxD"}
|
package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DocumentType, mongoose } from '@typegoose/typegoose';
|
|
2
|
+
import { LimitedTimeOfferCampaign as Model } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
import { LimitedTimeOfferCampaignStatus } from '@lyxa.ai/core/dist/utilities/enum';
|
|
4
|
+
import { GetLtoCampaignHistoryDTO, LtoCampaignHistoryItemDTO } from './limited-time-offer-campaign.validation';
|
|
5
|
+
export declare class LtoCampaignRepository {
|
|
6
|
+
private model;
|
|
7
|
+
constructor();
|
|
8
|
+
create(input: object): Promise<DocumentType<Model>>;
|
|
9
|
+
findCurrent(): Promise<DocumentType<Model> | null>;
|
|
10
|
+
findActive(): Promise<DocumentType<Model> | null>;
|
|
11
|
+
findById(id: mongoose.Types.ObjectId): Promise<DocumentType<Model> | null>;
|
|
12
|
+
hasActiveCampaign(): Promise<boolean>;
|
|
13
|
+
updateById(id: mongoose.Types.ObjectId, updates: object): Promise<DocumentType<Model> | null>;
|
|
14
|
+
setStatus(id: mongoose.Types.ObjectId, status: LimitedTimeOfferCampaignStatus, archive?: boolean): Promise<void>;
|
|
15
|
+
nextCampaignNumber(): Promise<number>;
|
|
16
|
+
findHistory(dto: GetLtoCampaignHistoryDTO): Promise<{
|
|
17
|
+
documents: LtoCampaignHistoryItemDTO[];
|
|
18
|
+
total: number;
|
|
19
|
+
}>;
|
|
20
|
+
}
|
|
21
|
+
export declare const ltoCampaignRepository: LtoCampaignRepository;
|
|
22
|
+
//# sourceMappingURL=limited-time-offer-campaign.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-campaign.repository.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAEH,wBAAwB,IAAI,KAAK,EAGpC,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAc,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAC,wBAAwB,EAAE,yBAAyB,EAAC,MAAM,0CAA0C,CAAC;AAK7G,qBACa,qBAAqB;IAC9B,OAAO,CAAC,KAAK,CAAgE;;IAMvE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAInD,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAIlD,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAIjD,QAAQ,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAI1E,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIrC,UAAU,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAI7F,SAAS,CAAC,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,8BAA8B,EAAE,OAAO,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAM9G,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC;IASrC,WAAW,CAAC,GAAG,EAAE,wBAAwB,GAAG,OAAO,CAAC;QAAC,SAAS,EAAE,yBAAyB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CA4CrH;AAED,eAAO,MAAM,qBAAqB,uBAAuC,CAAC"}
|