@lyxa.ai/marketing 1.0.67 → 1.0.68
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 +21 -11810
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +1233 -10
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +28 -0
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts +29 -4
- package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.js +19 -3
- package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +12 -15
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts +30 -2
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +412 -2
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +1 -0
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/transformers/coupon.transformer.d.ts +50 -0
- package/dist/lib/modules/coupon/transformers/coupon.transformer.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts +822 -0
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +580 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +48 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts +98 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js +4 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/referral-reward-coupon.validation.d.ts +374 -0
- package/dist/lib/modules/coupon/validations/referral-reward-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/referral-reward-coupon.validation.js +2 -0
- package/dist/lib/modules/coupon/validations/referral-reward-coupon.validation.js.map +1 -1
- package/dist/lib/modules/deal-setting/routers/deal-setting.router.d.ts +4 -4
- package/dist/lib/modules/deal-setting/routers/deal-setting.router.d.ts.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 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js.map +1 -1
- package/dist/lib/modules/featured-setting/routers/featured-setting.router.d.ts +4 -4
- package/dist/lib/modules/featured-setting/routers/featured-setting.router.d.ts.map +1 -1
- package/dist/lib/modules/featured-setting/services/featured-setting.service.d.ts.map +1 -1
- package/dist/lib/modules/featured-setting/services/featured-setting.service.js +3 -0
- package/dist/lib/modules/featured-setting/services/featured-setting.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +54 -8
- 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 +13 -0
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/index.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/index.js +9 -0
- package/dist/lib/modules/limited-time-offer/campaign/jobs/index.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js +2 -6
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +16 -3
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js +22 -3
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +2 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js +12 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +242 -35
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js +19 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +10 -1
- 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 +83 -1
- 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-scheduler.service.d.ts +4 -0
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.js +75 -6
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +1 -1
- 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 +46 -19
- 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/limited-time-offer.router.d.ts +241 -10
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts +2 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js +13 -4
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts +1 -1
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js +1 -1
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +30 -3
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js +23 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js.map +1 -1
- 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 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js +103 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +187 -2
- 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 +34 -0
- 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 +515 -116
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js +16 -6
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts +11 -4
- 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 +48 -7
- 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 -5
- 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 +114 -16
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts.map +1 -1
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.js +1 -0
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.js.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts +4 -4
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/index.d.ts +1 -0
- package/dist/lib/modules/marketing/services/index.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/index.js +1 -0
- package/dist/lib/modules/marketing/services/index.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +7 -3
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +61 -10
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/new-user-discount-marketing.service.d.ts +11 -0
- package/dist/lib/modules/marketing/services/new-user-discount-marketing.service.d.ts.map +1 -0
- package/dist/lib/modules/marketing/services/new-user-discount-marketing.service.js +116 -0
- package/dist/lib/modules/marketing/services/new-user-discount-marketing.service.js.map +1 -0
- 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 +32 -0
- package/dist/lib/modules/marketing/services/product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/validations/all-marketings.validation.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/all-marketings.validation.js +3 -0
- package/dist/lib/modules/marketing/validations/all-marketings.validation.js.map +1 -1
- package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +6 -6
- package/dist/lib/modules/marketing/validations/index.d.ts +1 -0
- package/dist/lib/modules/marketing/validations/index.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/index.js +1 -0
- package/dist/lib/modules/marketing/validations/index.js.map +1 -1
- package/dist/lib/modules/marketing/validations/new-user-discount-marketing.validation.d.ts +677 -0
- package/dist/lib/modules/marketing/validations/new-user-discount-marketing.validation.d.ts.map +1 -0
- package/dist/lib/modules/marketing/validations/new-user-discount-marketing.validation.js +83 -0
- package/dist/lib/modules/marketing/validations/new-user-discount-marketing.validation.js.map +1 -0
- package/dist/lib/modules/marketing/validations/punch-marketing.validation.d.ts +4 -4
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.js +30 -0
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.js.map +1 -1
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +4 -4
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts.map +1 -1
- package/dist/lib/modules/referral-setting/validations/referral-setting.validation.d.ts.map +1 -1
- package/dist/lib/modules/referral-setting/validations/referral-setting.validation.js.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.d.ts +3 -2
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.d.ts.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.js +11 -3
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.js.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.router.d.ts +20 -4
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.router.d.ts.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.d.ts +2 -2
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.d.ts.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.js.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.d.ts +19 -0
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.d.ts.map +1 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.js +1 -0
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.js.map +1 -1
- package/dist/types/index.d.ts +21 -11810
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +1233 -10
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +29 -4
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts +30 -2
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts +50 -0
- package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +822 -0
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +580 -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 +98 -0
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/referral-reward-coupon.validation.d.ts +374 -0
- package/dist/types/modules/coupon/validations/referral-reward-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/routers/deal-setting.router.d.ts +4 -4
- package/dist/types/modules/deal-setting/routers/deal-setting.router.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/routers/featured-setting.router.d.ts +4 -4
- package/dist/types/modules/featured-setting/routers/featured-setting.router.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/services/featured-setting.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +54 -8
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/index.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +16 -3
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +2 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +242 -35
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +10 -1
- 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-scheduler.service.d.ts +4 -0
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +1 -1
- 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/limited-time-offer.router.d.ts +241 -10
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts +2 -0
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +30 -3
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -1
- 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 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +187 -2
- 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.service.d.ts +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +515 -116
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts +11 -4
- 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 -5
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts.map +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +4 -4
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/index.d.ts +1 -0
- package/dist/types/modules/marketing/services/index.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +7 -3
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/new-user-discount-marketing.service.d.ts +20 -0
- package/dist/types/modules/marketing/services/new-user-discount-marketing.service.d.ts.map +1 -0
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts +6 -0
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/all-marketings.validation.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +6 -6
- package/dist/types/modules/marketing/validations/index.d.ts +1 -0
- package/dist/types/modules/marketing/validations/index.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/new-user-discount-marketing.validation.d.ts +686 -0
- package/dist/types/modules/marketing/validations/new-user-discount-marketing.validation.d.ts.map +1 -0
- package/dist/types/modules/marketing/validations/punch-marketing.validation.d.ts +4 -4
- package/dist/types/modules/marketing/validations/spend-to-get-marketing.validation.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +4 -4
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts.map +1 -1
- package/dist/types/modules/referral-setting/validations/referral-setting.validation.d.ts.map +1 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.repository.d.ts +3 -2
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.repository.d.ts.map +1 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.router.d.ts +20 -4
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.router.d.ts.map +1 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.service.d.ts +2 -2
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.service.d.ts.map +1 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.validation.d.ts +19 -0
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.validation.d.ts.map +1 -1
- package/package.json +2 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-campaign.service.js","sourceRoot":"/","sources":["modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0C;AAG1C,4DAAgG;AAChG,4EAAwG;AAOxG,mHAA4F;AAC5F,mHAA4F;AAC5F,wIAAkH;AAClH,kIAAiH;AACjH,4HAAmH;AAEnH,MAAM,eAAe,GAAG,CAAC,qCAA8B,CAAC,SAAS,EAAE,qCAA8B,CAAC,MAAM,CAAC,CAAC;AAGnG,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IACnB,UAAU,CAAwB;IAClC,SAAS,CAA8B;IACvC,SAAS,CAA8B;IACvC,aAAa,CAAgC;IAErD;QACI,IAAI,CAAC,UAAU,GAAG,gBAAS,CAAC,GAAG,CAAC,8DAAqB,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,GAAG,gBAAS,CAAC,GAAG,CAAC,2EAA2B,CAAC,CAAC;QAC5D,IAAI,CAAC,SAAS,GAAG,gBAAS,CAAC,GAAG,CAAC,2EAA2B,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,GAAG,gBAAS,CAAC,GAAG,CAAC,iEAA6B,CAAC,CAAC;IACtE,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,GAAyB;QACzC,MAAM,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAErC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC/C,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,IAAI,GAAG;YAC/B,CAAC,CAAC,qCAA8B,CAAC,MAAM;YACvC,CAAC,CAAC,qCAA8B,CAAC,SAAS,CAAC;QAE/C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CACzC,6DAAuB,CAAC,gB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AAA,8BAAe,EAAC,qDAAqD,CAAC,CAAC;QACjF,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,kBAAkB;QAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,oBAAa,CAAC,QAAQ,CAAC;aACpE,KAAK,CAAC,GAAG,EAAE,GAAG,MAAM,IAAA,8BAAe,EAAC,uEAAuE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtH,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAA,8BAAe,EAAC,uEAAuE,CAAC,CAAC;QACnG,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AApKY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,gBAAO,GAAE;;GACG,kBAAkB,CAoK9B;AAEY,QAAA,kBAAkB,GAAG,gBAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import Container, {Service} from 'typedi';\nimport {DocumentType, mongoose} from '@typegoose/typegoose';\nimport {LimitedTimeOfferCampaign as Model} from '@lyxa.ai/core/dist/libraries/mongo/models';\nimport {LimitedTimeOfferCampaignStatus, MarketingType} from '@lyxa.ai/core/dist/utilities/enum';\nimport {badRequestError, conflictError, notFoundError} from '@lyxa.ai/core/dist/utilities/error-common';\nimport {\n CreateLtoCampaignDTO,\n GetLtoCampaignHistoryDTO,\n LtoActiveCampaignDTO,\n UpdateLtoCampaignDTO,\n} from '../limited-time-offer-campaign.validation';\nimport {LtoCampaignLifecycleService} from './limited-time-offer-campaign-lifecycle.service';\nimport {LtoCampaignSchedulerService} from './limited-time-offer-campaign-scheduler.service';\nimport {LtoCampaignRepository} from '@modules/limited-time-offer/campaign/limited-time-offer-campaign.repository';\nimport {LtoCampaignQueryBuilder} from '@modules/limited-time-offer/campaign/limited-time-offer-campaign.builder';\nimport {LimitedTimeOfferConfigService} from '@modules/limited-time-offer/config/limited-time-offer-config.service';\n\nconst ACTIVE_STATUSES = [LimitedTimeOfferCampaignStatus.SCHEDULED, LimitedTimeOfferCampaignStatus.ACTIVE];\n\n@Service()\nexport class LtoCampaignService {\n private repository: LtoCampaignRepository;\n private scheduler: LtoCampaignSchedulerService;\n private lifecycle: LtoCampaignLifecycleService;\n private configService: LimitedTimeOfferConfigService;\n\n constructor() {\n this.repository = Container.get(LtoCampaignRepository);\n this.scheduler = Container.get(LtoCampaignSchedulerService);\n this.lifecycle = Container.get(LtoCampaignLifecycleService);\n this.configService = Container.get(LimitedTimeOfferConfigService);\n }\n\n public async create(dto: CreateLtoCampaignDTO) {\n await this.assertNoCampaignRunning();\n\n const now = new Date();\n const config = await this.loadConfigSnapshot();\n const status = dto.startDate <= now\n ? LimitedTimeOfferCampaignStatus.ACTIVE\n : LimitedTimeOfferCampaignStatus.SCHEDULED;\n\n const campaign = await this.repository.create(\n LtoCampaignQueryBuilder.buildCreateInput(dto, status, await this.repository.nextCampaignNumber(), config),\n );\n\n if (status === LimitedTimeOfferCampaignStatus.SCHEDULED) {\n await this.scheduler.scheduleActivation(campaign._id, dto.startDate);\n }\n await this.scheduler.scheduleExpiry(campaign._id, dto.endDate);\n\n return campaign;\n }\n\n public async getCurrent() {\n return this.repository.findCurrent();\n }\n\n public async getActive(): Promise<LtoActiveCampaignDTO | null> {\n const campaign = await this.repository.findActive();\n if (!campaign) return null;\n\n return {\n _id: campaign._id,\n title: campaign.title,\n subtitle: campaign.subTitle,\n startTime: campaign.startDate,\n endTime: campaign.endDate,\n };\n }\n\n public async getById(campaignId: mongoose.Types.ObjectId) {\n const campaign = await this.repository.findById(campaignId);\n if (!campaign) throw notFoundError('Campaign not found');\n return campaign;\n }\n\n public async getHistory(dto: GetLtoCampaignHistoryDTO) {\n const {documents, total} = await this.repository.findHistory(dto);\n return {\n documents,\n metadata: {page: dto.page, size: dto.size, totalElements: total, totalPages: Math.ceil(total / dto.size)},\n };\n }\n\n public async update(dto: UpdateLtoCampaignDTO) {\n const campaign = await this.repository.findById(dto._id);\n if (!campaign) throw notFoundError('Campaign not found');\n\n this.assertUpdateAllowed(campaign, dto);\n\n const updates = LtoCampaignQueryBuilder.buildUpdateInput(campaign, dto);\n\n if (this.shouldExpireImmediately(campaign.status, dto.endDate)) {\n return this.applyImmediateExpiry(dto._id, updates);\n }\n\n const result = await this.repository.updateById(dto._id, updates);\n if (!result) throw notFoundError('Campaign not found after update');\n\n await this.rescheduleIfDatesChanged(dto._id, result.status, campaign, dto);\n\n return result;\n }\n\n public async cancel(campaignId: mongoose.Types.ObjectId): Promise<void> {\n const campaign = await this.repository.findById(campaignId);\n if (!campaign) throw notFoundError('Campaign not found');\n\n this.assertEditable(campaign.status);\n await this.scheduler.cancelJobs(campaignId);\n await this.lifecycle.cancelCampaign(campaignId);\n }\n\n public async expire(campaignId: mongoose.Types.ObjectId): Promise<void> {\n await this.lifecycle.expireCampaign(campaignId);\n }\n\n private assertUpdateAllowed(campaign: DocumentType<Model>, dto: UpdateLtoCampaignDTO): void {\n this.assertEditable(campaign.status);\n\n if (campaign.status === LimitedTimeOfferCampaignStatus.ACTIVE && !dto.confirmActive) {\n throw badRequestError('Set confirmActive=true to confirm editing a live campaign.');\n }\n\n if (dto.startDate < new Date() && campaign.status === LimitedTimeOfferCampaignStatus.SCHEDULED) {\n throw badRequestError('Start date cannot be in the past.');\n }\n }\n\n private shouldExpireImmediately(status: LimitedTimeOfferCampaignStatus, endDate: Date): boolean {\n return status === LimitedTimeOfferCampaignStatus.ACTIVE && endDate <= new Date();\n }\n\n private async applyImmediateExpiry(campaignId: mongoose.Types.ObjectId, updates: object) {\n await this.scheduler.cancelJobs(campaignId);\n await this.repository.updateById(campaignId, updates);\n await this.lifecycle.expireCampaign(campaignId);\n const result = await this.repository.findById(campaignId);\n if (!result) throw notFoundError('Campaign not found after expiry');\n return result;\n }\n\n private async rescheduleIfDatesChanged(\n campaignId: mongoose.Types.ObjectId,\n currentStatus: LimitedTimeOfferCampaignStatus,\n original: DocumentType<Model>,\n dto: UpdateLtoCampaignDTO,\n ): Promise<void> {\n const datesChanged =\n dto.startDate.getTime() !== original.startDate!.getTime() ||\n dto.endDate.getTime() !== original.endDate!.getTime();\n\n if (!datesChanged) return;\n\n await this.scheduler.cancelJobs(campaignId);\n if (currentStatus === LimitedTimeOfferCampaignStatus.SCHEDULED) {\n await this.scheduler.scheduleActivation(campaignId, dto.startDate);\n }\n await this.scheduler.scheduleExpiry(campaignId, dto.endDate);\n }\n\n private async assertNoCampaignRunning(): Promise<void> {\n if (await this.repository.hasActiveCampaign()) {\n throw conflictError('A campaign is already scheduled or active. Delete it before creating a new one.');\n }\n }\n\n private assertEditable(status: LimitedTimeOfferCampaignStatus): void {\n if (!ACTIVE_STATUSES.includes(status)) {\n throw badRequestError('Only SCHEDULED or ACTIVE campaigns can be modified.');\n }\n }\n\n private async loadConfigSnapshot() {\n const config = await this.configService.getByType(MarketingType.DISCOUNT)\n .catch(() => { throw badRequestError('Global config is incomplete. Set discount options and max caps first.'); });\n\n if (config.discountOptions.length === 0 || config.maxDiscountCaps.length === 0) {\n throw badRequestError('Global config is incomplete. Set discount options and max caps first.');\n }\n\n return config;\n }\n}\n\nexport const ltoCampaignService = Container.get(LtoCampaignService);\n"]}
|
|
1
|
+
{"version":3,"file":"limited-time-offer-campaign.service.js","sourceRoot":"/","sources":["modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0C;AAG1C,4DAAgG;AAChG,4EAAwG;AAOxG,mHAA4F;AAC5F,mHAA4F;AAC5F,wIAAkH;AAClH,kIAAqI;AACrI,4HAAmH;AACnH,0DAA4D;AAE5D,MAAM,eAAe,GAAG,CAAC,qCAA8B,CAAC,SAAS,EAAE,qCAA8B,CAAC,MAAM,CAAC,CAAC;AAGnG,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,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,OAAQ,CAAC,CAAC;IACrE,CAAC;IAEO,KAAK,CAAC,uBAAuB;QACjC,IAAI,MAAM,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC;YAC5C,MAAM,IAAA,4BAAa,EAAC,iFAAiF,CAAC,CAAC;QAC3G,CAAC;IACL,CAAC;IAEO,cAAc,CAAC,MAAsC;QACzD,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YACpC,MAAM,IAAA,8BAAe,EAAC,qDAAqD,CAAC,CAAC;QACjF,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,kBAAkB;QAC5B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,oBAAa,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;YACjF,MAAM,IAAA,8BAAe,EAAC,uEAAuE,CAAC,CAAC;QACnG,CAAC,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7E,MAAM,IAAA,8BAAe,EAAC,uEAAuE,CAAC,CAAC;QACnG,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAA;AAvMY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,gBAAO,GAAE;;GACG,kBAAkB,CAuM9B;AAEY,QAAA,kBAAkB,GAAG,gBAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import Container, {Service} from 'typedi';\nimport {DocumentType, mongoose} from '@typegoose/typegoose';\nimport {LimitedTimeOfferCampaign as Model} from '@lyxa.ai/core/dist/libraries/mongo/models';\nimport {LimitedTimeOfferCampaignStatus, MarketingType} from '@lyxa.ai/core/dist/utilities/enum';\nimport {badRequestError, conflictError, notFoundError} from '@lyxa.ai/core/dist/utilities/error-common';\nimport {\n CreateLtoCampaignDTO,\n GetLtoCampaignHistoryDTO,\n LtoActiveCampaignDTO,\n UpdateLtoCampaignDTO,\n} from '../limited-time-offer-campaign.validation';\nimport {LtoCampaignLifecycleService} from './limited-time-offer-campaign-lifecycle.service';\nimport {LtoCampaignSchedulerService} from './limited-time-offer-campaign-scheduler.service';\nimport {LtoCampaignRepository} from '@modules/limited-time-offer/campaign/limited-time-offer-campaign.repository';\nimport {LtoCampaignQueryBuilder, nextOccurrenceDate} from '@modules/limited-time-offer/campaign/limited-time-offer-campaign.builder';\nimport {LimitedTimeOfferConfigService} from '@modules/limited-time-offer/config/limited-time-offer-config.service';\nimport {isLtoScheduleEnabled} from '@utility/feature-flags';\n\nconst ACTIVE_STATUSES = [LimitedTimeOfferCampaignStatus.SCHEDULED, LimitedTimeOfferCampaignStatus.ACTIVE];\n\n@Service()\nexport class LtoCampaignService {\n private repository: LtoCampaignRepository;\n private scheduler: LtoCampaignSchedulerService;\n private lifecycle: LtoCampaignLifecycleService;\n private configService: LimitedTimeOfferConfigService;\n\n constructor() {\n this.repository = Container.get(LtoCampaignRepository);\n this.scheduler = Container.get(LtoCampaignSchedulerService);\n this.lifecycle = Container.get(LtoCampaignLifecycleService);\n this.configService = Container.get(LimitedTimeOfferConfigService);\n }\n\n public async create(dto: CreateLtoCampaignDTO) {\n await this.assertNoCampaignRunning();\n\n const config = await this.loadConfigSnapshot();\n\n const status = this.deriveCampaignStatus(dto.startDate);\n const campaign = await this.repository.create(\n LtoCampaignQueryBuilder.buildCreateInput({\n dto,\n status,\n campaignNumber: await this.repository.nextCampaignNumber(),\n config,\n startDate: dto.startDate,\n endDate: dto.endDate,\n })\n );\n\n if (status === LimitedTimeOfferCampaignStatus.SCHEDULED) {\n await this.scheduler.scheduleActivation(campaign._id, dto.startDate);\n }\n await this.scheduler.scheduleExpiry(campaign._id, dto.endDate);\n\n return campaign;\n }\n\n private deriveCampaignStatus(startDate: Date) {\n return startDate <= new Date()\n ? LimitedTimeOfferCampaignStatus.ACTIVE\n : LimitedTimeOfferCampaignStatus.SCHEDULED;\n }\n\n public async getCurrent() {\n return this.repository.findCurrent();\n }\n\n public async getActive(): Promise<LtoActiveCampaignDTO | null> {\n const campaign = await this.repository.findActive();\n if (!campaign) return null;\n\n return {\n _id: campaign._id,\n title: campaign.title,\n subtitle: campaign.subTitle,\n startTime: campaign.startDate,\n endTime: campaign.endDate,\n };\n }\n\n public async getById(campaignId: mongoose.Types.ObjectId) {\n const campaign = await this.repository.findById(campaignId);\n if (!campaign) throw notFoundError('Campaign not found');\n return campaign;\n }\n\n public async getHistory(dto: GetLtoCampaignHistoryDTO) {\n const {documents, total} = await this.repository.findHistory(dto);\n return {\n documents,\n metadata: {\n page: dto.page,\n size: dto.size,\n totalElements: total,\n totalPages: Math.ceil(total / dto.size),\n },\n };\n }\n\n public async update(dto: UpdateLtoCampaignDTO) {\n const campaign = await this.repository.findById(dto._id);\n if (!campaign) throw notFoundError('Campaign not found');\n\n this.assertUpdateAllowed(campaign, dto);\n\n const updates = LtoCampaignQueryBuilder.buildUpdateInput(campaign, dto);\n\n if (this.shouldExpireImmediately(campaign.status, dto.endDate)) {\n return this.applyImmediateExpiry(dto._id, updates);\n }\n\n const ltoScheduleEnabled = await isLtoScheduleEnabled();\n\n // For a scheduled recurring campaign, snap the schedule to the next selected weekday so the\n // selected days stay authoritative — an active session keeps the dto dates (takes effect now).\n const repeatDays = (updates.repeatDays ?? campaign.repeatDays ?? []) as number[];\n if (\n ltoScheduleEnabled &&\n updates.status === LimitedTimeOfferCampaignStatus.SCHEDULED &&\n repeatDays.length > 0\n ) {\n const occurrence = nextOccurrenceDate(repeatDays, dto.startDate, dto.endDate);\n updates.startDate = occurrence.startDate;\n updates.endDate = occurrence.endDate;\n }\n\n const result = await this.repository.updateById(dto._id, updates);\n if (!result) throw notFoundError('Campaign not found after update');\n\n // Postponing a live campaign back to SCHEDULED must undo what activation applied — otherwise\n // the shops' own discounts stay paused until the campaign eventually cancels or expires.\n if (\n ltoScheduleEnabled &&\n campaign.status === LimitedTimeOfferCampaignStatus.ACTIVE &&\n result.status === LimitedTimeOfferCampaignStatus.SCHEDULED\n ) {\n await this.lifecycle.demoteToScheduled(dto._id);\n }\n\n await this.rescheduleIfDatesChanged(result, campaign);\n\n return result;\n }\n\n public async cancel(campaignId: mongoose.Types.ObjectId): Promise<void> {\n const campaign = await this.repository.findById(campaignId);\n if (!campaign) throw notFoundError('Campaign not found');\n\n this.assertEditable(campaign.status);\n await this.scheduler.cancelJobs(campaignId);\n await this.lifecycle.cancelCampaign(campaignId);\n }\n\n private assertUpdateAllowed(campaign: DocumentType<Model>, dto: UpdateLtoCampaignDTO): void {\n this.assertEditable(campaign.status);\n\n if (campaign.status === LimitedTimeOfferCampaignStatus.ACTIVE && !dto.confirmActive) {\n throw badRequestError('Set confirmActive=true to confirm editing a live campaign.');\n }\n\n if (dto.startDate < new Date() && campaign.status === LimitedTimeOfferCampaignStatus.SCHEDULED) {\n throw badRequestError('Start date cannot be in the past.');\n }\n }\n\n private shouldExpireImmediately(status: LimitedTimeOfferCampaignStatus, endDate: Date): boolean {\n return status === LimitedTimeOfferCampaignStatus.ACTIVE && endDate <= new Date();\n }\n\n private async applyImmediateExpiry(campaignId: mongoose.Types.ObjectId, updates: object) {\n await this.scheduler.cancelJobs(campaignId);\n await this.repository.updateById(campaignId, updates);\n await this.lifecycle.expireCampaign(campaignId);\n const result = await this.repository.findById(campaignId);\n if (!result) throw notFoundError('Campaign not found after expiry');\n return result;\n }\n\n private async rescheduleIfDatesChanged(\n result: DocumentType<Model>,\n original: DocumentType<Model>\n ): Promise<void> {\n const datesChanged =\n result.startDate!.getTime() !== original.startDate!.getTime() ||\n result.endDate!.getTime() !== original.endDate!.getTime();\n\n if (!datesChanged) return;\n\n await this.scheduler.cancelJobs(result._id);\n if (result.status === LimitedTimeOfferCampaignStatus.SCHEDULED) {\n await this.scheduler.scheduleActivation(result._id, result.startDate!);\n }\n await this.scheduler.scheduleExpiry(result._id, result.endDate!);\n }\n\n private async assertNoCampaignRunning(): Promise<void> {\n if (await this.repository.hasActiveCampaign()) {\n throw conflictError('A campaign is already scheduled or active. Delete it before creating a new one.');\n }\n }\n\n private assertEditable(status: LimitedTimeOfferCampaignStatus): void {\n if (!ACTIVE_STATUSES.includes(status)) {\n throw badRequestError('Only SCHEDULED or ACTIVE campaigns can be modified.');\n }\n }\n\n private async loadConfigSnapshot() {\n const config = await this.configService.getByType(MarketingType.DISCOUNT).catch(() => {\n throw badRequestError('Global config is incomplete. Set discount options and max caps first.');\n });\n\n if (config.discountOptions.length === 0 || config.maxDiscountCaps.length === 0) {\n throw badRequestError('Global config is incomplete. Set discount options and max caps first.');\n }\n\n return config;\n }\n}\n\nexport const ltoCampaignService = Container.get(LtoCampaignService);\n"]}
|
|
@@ -197,7 +197,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
197
197
|
startDate: string | Date;
|
|
198
198
|
endDate: string | Date;
|
|
199
199
|
title?: string | undefined;
|
|
200
|
+
campaignType?: import("@lyxa.ai/core/dist/utilities/enum").MarketingType | undefined;
|
|
200
201
|
subTitle?: string | undefined;
|
|
202
|
+
repeatDays?: number[] | undefined;
|
|
201
203
|
};
|
|
202
204
|
output: {
|
|
203
205
|
message: string;
|
|
@@ -212,9 +214,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
212
214
|
updatedAt?: Date | null | undefined;
|
|
213
215
|
title?: string | undefined;
|
|
214
216
|
subTitle?: string | undefined;
|
|
215
|
-
|
|
217
|
+
repeatDays?: number[] | undefined;
|
|
216
218
|
discountOptions?: number[] | undefined;
|
|
217
219
|
maxDiscountCaps?: number[] | undefined;
|
|
220
|
+
archivedAt?: Date | null | undefined;
|
|
218
221
|
} | {
|
|
219
222
|
documents: {
|
|
220
223
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -226,9 +229,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
226
229
|
updatedAt?: Date | null | undefined;
|
|
227
230
|
title?: string | undefined;
|
|
228
231
|
subTitle?: string | undefined;
|
|
229
|
-
|
|
232
|
+
repeatDays?: number[] | undefined;
|
|
230
233
|
discountOptions?: number[] | undefined;
|
|
231
234
|
maxDiscountCaps?: number[] | undefined;
|
|
235
|
+
archivedAt?: Date | null | undefined;
|
|
232
236
|
}[];
|
|
233
237
|
metadata?: {
|
|
234
238
|
size: number;
|
|
@@ -255,9 +259,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
255
259
|
updatedAt?: Date | null | undefined;
|
|
256
260
|
title?: string | undefined;
|
|
257
261
|
subTitle?: string | undefined;
|
|
258
|
-
|
|
262
|
+
repeatDays?: number[] | undefined;
|
|
259
263
|
discountOptions?: number[] | undefined;
|
|
260
264
|
maxDiscountCaps?: number[] | undefined;
|
|
265
|
+
archivedAt?: Date | null | undefined;
|
|
261
266
|
} | {
|
|
262
267
|
documents: ({
|
|
263
268
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -269,9 +274,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
269
274
|
updatedAt?: Date | null | undefined;
|
|
270
275
|
title?: string | undefined;
|
|
271
276
|
subTitle?: string | undefined;
|
|
272
|
-
|
|
277
|
+
repeatDays?: number[] | undefined;
|
|
273
278
|
discountOptions?: number[] | undefined;
|
|
274
279
|
maxDiscountCaps?: number[] | undefined;
|
|
280
|
+
archivedAt?: Date | null | undefined;
|
|
275
281
|
} | null)[];
|
|
276
282
|
metadata?: {
|
|
277
283
|
size: number;
|
|
@@ -300,9 +306,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
300
306
|
updatedAt?: Date | null | undefined;
|
|
301
307
|
title?: string | undefined;
|
|
302
308
|
subTitle?: string | undefined;
|
|
303
|
-
|
|
309
|
+
repeatDays?: number[] | undefined;
|
|
304
310
|
discountOptions?: number[] | undefined;
|
|
305
311
|
maxDiscountCaps?: number[] | undefined;
|
|
312
|
+
archivedAt?: Date | null | undefined;
|
|
306
313
|
} | {
|
|
307
314
|
documents: {
|
|
308
315
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -314,9 +321,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
314
321
|
updatedAt?: Date | null | undefined;
|
|
315
322
|
title?: string | undefined;
|
|
316
323
|
subTitle?: string | undefined;
|
|
317
|
-
|
|
324
|
+
repeatDays?: number[] | undefined;
|
|
318
325
|
discountOptions?: number[] | undefined;
|
|
319
326
|
maxDiscountCaps?: number[] | undefined;
|
|
327
|
+
archivedAt?: Date | null | undefined;
|
|
320
328
|
}[];
|
|
321
329
|
metadata?: {
|
|
322
330
|
size: number;
|
|
@@ -372,6 +380,7 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
372
380
|
endDate: string | Date;
|
|
373
381
|
title?: string | undefined;
|
|
374
382
|
subTitle?: string | undefined;
|
|
383
|
+
repeatDays?: number[] | undefined;
|
|
375
384
|
discountOptions?: number[] | undefined;
|
|
376
385
|
maxDiscountCaps?: number[] | undefined;
|
|
377
386
|
confirmActive?: boolean | undefined;
|
|
@@ -389,9 +398,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
389
398
|
updatedAt?: Date | null | undefined;
|
|
390
399
|
title?: string | undefined;
|
|
391
400
|
subTitle?: string | undefined;
|
|
392
|
-
|
|
401
|
+
repeatDays?: number[] | undefined;
|
|
393
402
|
discountOptions?: number[] | undefined;
|
|
394
403
|
maxDiscountCaps?: number[] | undefined;
|
|
404
|
+
archivedAt?: Date | null | undefined;
|
|
395
405
|
} | {
|
|
396
406
|
documents: {
|
|
397
407
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -403,9 +413,10 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
403
413
|
updatedAt?: Date | null | undefined;
|
|
404
414
|
title?: string | undefined;
|
|
405
415
|
subTitle?: string | undefined;
|
|
406
|
-
|
|
416
|
+
repeatDays?: number[] | undefined;
|
|
407
417
|
discountOptions?: number[] | undefined;
|
|
408
418
|
maxDiscountCaps?: number[] | undefined;
|
|
419
|
+
archivedAt?: Date | null | undefined;
|
|
409
420
|
}[];
|
|
410
421
|
metadata?: {
|
|
411
422
|
size: number;
|
|
@@ -449,6 +460,41 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
449
460
|
};
|
|
450
461
|
meta: object;
|
|
451
462
|
}>;
|
|
463
|
+
getSessions: import("@trpc/server").TRPCQueryProcedure<{
|
|
464
|
+
input: {
|
|
465
|
+
campaignId: string | import("mongoose").Types.ObjectId;
|
|
466
|
+
page?: number | undefined;
|
|
467
|
+
size?: number | undefined;
|
|
468
|
+
};
|
|
469
|
+
output: {
|
|
470
|
+
message: string;
|
|
471
|
+
success: boolean;
|
|
472
|
+
data?: {
|
|
473
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
474
|
+
startDate: Date;
|
|
475
|
+
endDate: Date;
|
|
476
|
+
shopCount: number;
|
|
477
|
+
archivedAt: Date;
|
|
478
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
479
|
+
} | {
|
|
480
|
+
documents: {
|
|
481
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
482
|
+
startDate: Date;
|
|
483
|
+
endDate: Date;
|
|
484
|
+
shopCount: number;
|
|
485
|
+
archivedAt: Date;
|
|
486
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
487
|
+
}[];
|
|
488
|
+
metadata?: {
|
|
489
|
+
size: number;
|
|
490
|
+
page: number;
|
|
491
|
+
totalElements: number;
|
|
492
|
+
totalPages: number;
|
|
493
|
+
} | undefined;
|
|
494
|
+
} | undefined;
|
|
495
|
+
};
|
|
496
|
+
meta: object;
|
|
497
|
+
}>;
|
|
452
498
|
cancel: import("@trpc/server").TRPCMutationProcedure<{
|
|
453
499
|
input: {
|
|
454
500
|
campaignId: string | import("mongoose").Types.ObjectId;
|
|
@@ -653,6 +699,130 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
653
699
|
};
|
|
654
700
|
meta: object;
|
|
655
701
|
}>;
|
|
702
|
+
enrollShops: import("@trpc/server").TRPCMutationProcedure<{
|
|
703
|
+
input: {
|
|
704
|
+
shops: {
|
|
705
|
+
isEntireMenu: boolean;
|
|
706
|
+
shopId: string | import("mongoose").Types.ObjectId;
|
|
707
|
+
maxDiscountCap: number;
|
|
708
|
+
discountPercentage: number;
|
|
709
|
+
isOrderCapacityEnabled: boolean;
|
|
710
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
711
|
+
maxOrderCapacity?: number | undefined;
|
|
712
|
+
shopCategories?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
713
|
+
}[];
|
|
714
|
+
};
|
|
715
|
+
output: {
|
|
716
|
+
message: string;
|
|
717
|
+
success: boolean;
|
|
718
|
+
data?: {
|
|
719
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
720
|
+
shop: string | import("mongoose").Types.ObjectId;
|
|
721
|
+
isEntireMenu: boolean;
|
|
722
|
+
joinedAt: Date;
|
|
723
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
724
|
+
isOrderCapacityEnabled: boolean;
|
|
725
|
+
isWithdrawn: boolean;
|
|
726
|
+
createdAt?: Date | null | undefined;
|
|
727
|
+
updatedAt?: Date | null | undefined;
|
|
728
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
729
|
+
maxDiscountCap?: number | undefined;
|
|
730
|
+
discountPercentage?: number | undefined;
|
|
731
|
+
maxOrderCapacity?: number | undefined;
|
|
732
|
+
withdrawnAt?: Date | null | undefined;
|
|
733
|
+
}[] | {
|
|
734
|
+
documents: {
|
|
735
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
736
|
+
shop: string | import("mongoose").Types.ObjectId;
|
|
737
|
+
isEntireMenu: boolean;
|
|
738
|
+
joinedAt: Date;
|
|
739
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
740
|
+
isOrderCapacityEnabled: boolean;
|
|
741
|
+
isWithdrawn: boolean;
|
|
742
|
+
createdAt?: Date | null | undefined;
|
|
743
|
+
updatedAt?: Date | null | undefined;
|
|
744
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
745
|
+
maxDiscountCap?: number | undefined;
|
|
746
|
+
discountPercentage?: number | undefined;
|
|
747
|
+
maxOrderCapacity?: number | undefined;
|
|
748
|
+
withdrawnAt?: Date | null | undefined;
|
|
749
|
+
}[][];
|
|
750
|
+
metadata?: {
|
|
751
|
+
size: number;
|
|
752
|
+
page: number;
|
|
753
|
+
totalElements: number;
|
|
754
|
+
totalPages: number;
|
|
755
|
+
} | undefined;
|
|
756
|
+
} | undefined;
|
|
757
|
+
};
|
|
758
|
+
meta: object;
|
|
759
|
+
}>;
|
|
760
|
+
updateShop: import("@trpc/server").TRPCMutationProcedure<{
|
|
761
|
+
input: {
|
|
762
|
+
isEntireMenu: boolean;
|
|
763
|
+
shopId: string | import("mongoose").Types.ObjectId;
|
|
764
|
+
maxDiscountCap: number;
|
|
765
|
+
discountPercentage: number;
|
|
766
|
+
isOrderCapacityEnabled: boolean;
|
|
767
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
768
|
+
maxOrderCapacity?: number | undefined;
|
|
769
|
+
shopCategories?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
770
|
+
};
|
|
771
|
+
output: {
|
|
772
|
+
message: string;
|
|
773
|
+
success: boolean;
|
|
774
|
+
data?: {
|
|
775
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
776
|
+
shop: string | import("mongoose").Types.ObjectId;
|
|
777
|
+
isEntireMenu: boolean;
|
|
778
|
+
joinedAt: Date;
|
|
779
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
780
|
+
isOrderCapacityEnabled: boolean;
|
|
781
|
+
isWithdrawn: boolean;
|
|
782
|
+
createdAt?: Date | null | undefined;
|
|
783
|
+
updatedAt?: Date | null | undefined;
|
|
784
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
785
|
+
maxDiscountCap?: number | undefined;
|
|
786
|
+
discountPercentage?: number | undefined;
|
|
787
|
+
maxOrderCapacity?: number | undefined;
|
|
788
|
+
withdrawnAt?: Date | null | undefined;
|
|
789
|
+
} | {
|
|
790
|
+
documents: {
|
|
791
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
792
|
+
shop: string | import("mongoose").Types.ObjectId;
|
|
793
|
+
isEntireMenu: boolean;
|
|
794
|
+
joinedAt: Date;
|
|
795
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
796
|
+
isOrderCapacityEnabled: boolean;
|
|
797
|
+
isWithdrawn: boolean;
|
|
798
|
+
createdAt?: Date | null | undefined;
|
|
799
|
+
updatedAt?: Date | null | undefined;
|
|
800
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
801
|
+
maxDiscountCap?: number | undefined;
|
|
802
|
+
discountPercentage?: number | undefined;
|
|
803
|
+
maxOrderCapacity?: number | undefined;
|
|
804
|
+
withdrawnAt?: Date | null | undefined;
|
|
805
|
+
}[];
|
|
806
|
+
metadata?: {
|
|
807
|
+
size: number;
|
|
808
|
+
page: number;
|
|
809
|
+
totalElements: number;
|
|
810
|
+
totalPages: number;
|
|
811
|
+
} | undefined;
|
|
812
|
+
} | undefined;
|
|
813
|
+
};
|
|
814
|
+
meta: object;
|
|
815
|
+
}>;
|
|
816
|
+
withdrawShop: import("@trpc/server").TRPCMutationProcedure<{
|
|
817
|
+
input: {
|
|
818
|
+
shopId: string | import("mongoose").Types.ObjectId;
|
|
819
|
+
};
|
|
820
|
+
output: {
|
|
821
|
+
message: string;
|
|
822
|
+
success: boolean;
|
|
823
|
+
};
|
|
824
|
+
meta: object;
|
|
825
|
+
}>;
|
|
656
826
|
getParticipants: import("@trpc/server").TRPCQueryProcedure<{
|
|
657
827
|
input: {
|
|
658
828
|
campaignId: string | import("mongoose").Types.ObjectId;
|
|
@@ -668,16 +838,77 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
668
838
|
joinedAt: Date;
|
|
669
839
|
shopName: string | null;
|
|
670
840
|
maxDiscountCap?: number | undefined;
|
|
671
|
-
discountPercentage?: number | undefined;
|
|
672
841
|
shopPhoto?: string | null | undefined;
|
|
842
|
+
discountPercentage?: number | undefined;
|
|
673
843
|
} | {
|
|
674
844
|
documents: {
|
|
675
845
|
shopId: string | import("mongoose").Types.ObjectId;
|
|
676
846
|
joinedAt: Date;
|
|
677
847
|
shopName: string | null;
|
|
678
848
|
maxDiscountCap?: number | undefined;
|
|
679
|
-
discountPercentage?: number | undefined;
|
|
680
849
|
shopPhoto?: string | null | undefined;
|
|
850
|
+
discountPercentage?: number | undefined;
|
|
851
|
+
}[];
|
|
852
|
+
metadata?: {
|
|
853
|
+
size: number;
|
|
854
|
+
page: number;
|
|
855
|
+
totalElements: number;
|
|
856
|
+
totalPages: number;
|
|
857
|
+
} | undefined;
|
|
858
|
+
} | undefined;
|
|
859
|
+
};
|
|
860
|
+
meta: object;
|
|
861
|
+
}>;
|
|
862
|
+
getParticipantByShop: import("@trpc/server").TRPCQueryProcedure<{
|
|
863
|
+
input: {
|
|
864
|
+
shopId: string | import("mongoose").Types.ObjectId;
|
|
865
|
+
};
|
|
866
|
+
output: {
|
|
867
|
+
message: string;
|
|
868
|
+
success: boolean;
|
|
869
|
+
data?: {
|
|
870
|
+
campaignState: import("./participant/limited-time-offer-participant.validation").LtoCardState;
|
|
871
|
+
campaign?: {
|
|
872
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
873
|
+
startDate?: Date | null | undefined;
|
|
874
|
+
endDate?: Date | null | undefined;
|
|
875
|
+
title?: string | undefined;
|
|
876
|
+
subTitle?: string | undefined;
|
|
877
|
+
discountOptions?: number[] | undefined;
|
|
878
|
+
maxDiscountCaps?: number[] | undefined;
|
|
879
|
+
} | undefined;
|
|
880
|
+
participant?: {
|
|
881
|
+
isEntireMenu: boolean;
|
|
882
|
+
joinedAt: Date;
|
|
883
|
+
isOrderCapacityEnabled: boolean;
|
|
884
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
885
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
886
|
+
maxDiscountCap?: number | undefined;
|
|
887
|
+
discountPercentage?: number | undefined;
|
|
888
|
+
maxOrderCapacity?: number | undefined;
|
|
889
|
+
} | undefined;
|
|
890
|
+
} | {
|
|
891
|
+
documents: {
|
|
892
|
+
campaignState: import("./participant/limited-time-offer-participant.validation").LtoCardState;
|
|
893
|
+
campaign?: {
|
|
894
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
895
|
+
startDate?: Date | null | undefined;
|
|
896
|
+
endDate?: Date | null | undefined;
|
|
897
|
+
title?: string | undefined;
|
|
898
|
+
subTitle?: string | undefined;
|
|
899
|
+
discountOptions?: number[] | undefined;
|
|
900
|
+
maxDiscountCaps?: number[] | undefined;
|
|
901
|
+
} | undefined;
|
|
902
|
+
participant?: {
|
|
903
|
+
isEntireMenu: boolean;
|
|
904
|
+
joinedAt: Date;
|
|
905
|
+
isOrderCapacityEnabled: boolean;
|
|
906
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
907
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
908
|
+
maxDiscountCap?: number | undefined;
|
|
909
|
+
discountPercentage?: number | undefined;
|
|
910
|
+
maxOrderCapacity?: number | undefined;
|
|
911
|
+
} | undefined;
|
|
681
912
|
}[];
|
|
682
913
|
metadata?: {
|
|
683
914
|
size: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer.router.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.router.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"limited-time-offer.router.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.router.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwBjC,CAAC"}
|
|
@@ -2,9 +2,11 @@ import { mongoose } from '@typegoose/typegoose';
|
|
|
2
2
|
import { GetActiveCampaignDTO } from '../limited-time-offer/campaign/limited-time-offer-campaign.validation';
|
|
3
3
|
export declare class LimitedTimeOfferService {
|
|
4
4
|
private campaignService;
|
|
5
|
+
private lifecycle;
|
|
5
6
|
private participantService;
|
|
6
7
|
private notificationService;
|
|
7
8
|
constructor();
|
|
9
|
+
activateCampaign(campaignId: mongoose.Types.ObjectId): Promise<void>;
|
|
8
10
|
getActiveCampaign(input: GetActiveCampaignDTO): Promise<{
|
|
9
11
|
_id: mongoose.Types.ObjectId;
|
|
10
12
|
title?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAQ9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,6EAA6E,CAAC;AAgBjH,qBACa,uBAAuB;IAChC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,mBAAmB,CAAsC;;IASpD,gBAAgB,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAUpE,iBAAiB,CAAC,KAAK,EAAE,oBAAoB;;;;;;;IAQ7C,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlE,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlF;AAED,eAAO,MAAM,uBAAuB,yBAAyC,CAAC"}
|
|
@@ -45,18 +45,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
exports.limitedTimeOfferService = exports.LimitedTimeOfferService = void 0;
|
|
46
46
|
const typedi_1 = __importStar(require("typedi"));
|
|
47
47
|
const limited_time_offer_campaign_service_1 = require("../limited-time-offer/campaign/services/limited-time-offer-campaign.service");
|
|
48
|
+
const limited_time_offer_campaign_lifecycle_service_1 = require("../limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service");
|
|
48
49
|
const limited_time_offer_participant_service_1 = require("../limited-time-offer/participant/services/limited-time-offer-participant.service");
|
|
49
50
|
const limited_time_offer_notification_service_1 = require("../limited-time-offer/notification/limited-time-offer-notification.service");
|
|
50
51
|
const limited_time_offer_notification_constants_1 = require("../limited-time-offer/notification/limited-time-offer-notification.constants");
|
|
52
|
+
const feature_flags_1 = require("../../utility/feature-flags");
|
|
51
53
|
let LimitedTimeOfferService = class LimitedTimeOfferService {
|
|
52
54
|
campaignService;
|
|
55
|
+
lifecycle;
|
|
53
56
|
participantService;
|
|
54
57
|
notificationService;
|
|
55
58
|
constructor() {
|
|
56
59
|
this.campaignService = limited_time_offer_campaign_service_1.ltoCampaignService;
|
|
60
|
+
this.lifecycle = typedi_1.default.get(limited_time_offer_campaign_lifecycle_service_1.LtoCampaignLifecycleService);
|
|
57
61
|
this.participantService = limited_time_offer_participant_service_1.ltoParticipantService;
|
|
58
62
|
this.notificationService = typedi_1.default.get(limited_time_offer_notification_service_1.LimitedTimeOfferNotificationService);
|
|
59
63
|
}
|
|
64
|
+
async activateCampaign(campaignId) {
|
|
65
|
+
const campaign = await this.campaignService.getById(campaignId);
|
|
66
|
+
await this.lifecycle.activateCampaign(campaignId);
|
|
67
|
+
if (!(await (0, feature_flags_1.isLtoScheduleEnabled)()))
|
|
68
|
+
return;
|
|
69
|
+
await this.participantService.applyLiveEffectsToParticipants(campaign);
|
|
70
|
+
}
|
|
60
71
|
async getActiveCampaign(input) {
|
|
61
72
|
const campaign = await this.campaignService.getActive();
|
|
62
73
|
if (!campaign)
|
|
@@ -65,14 +76,12 @@ let LimitedTimeOfferService = class LimitedTimeOfferService {
|
|
|
65
76
|
return nearbyParticipants.length > 0 ? campaign : null;
|
|
66
77
|
}
|
|
67
78
|
async cancelCampaign(campaignId) {
|
|
68
|
-
await this.campaignService.cancel(campaignId);
|
|
69
79
|
const participantIds = await this.participantService.getParticipantIdsByCampaignId(campaignId);
|
|
70
|
-
await this.
|
|
80
|
+
await this.campaignService.cancel(campaignId);
|
|
71
81
|
await this.notificationService.send(limited_time_offer_notification_constants_1.NotificationType.Cancel, participantIds, { campaignId });
|
|
72
82
|
}
|
|
73
83
|
async expireCampaign(campaignId) {
|
|
74
|
-
await this.
|
|
75
|
-
await this.participantService.removeCampaignMarketings(campaignId);
|
|
84
|
+
await this.lifecycle.expireCampaign(campaignId);
|
|
76
85
|
}
|
|
77
86
|
};
|
|
78
87
|
exports.LimitedTimeOfferService = LimitedTimeOfferService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer.service.js","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA0C;AAE1C,2IAG2F;
|
|
1
|
+
{"version":3,"file":"limited-time-offer.service.js","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time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M,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3D,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAmC;QAE3D,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAC/F,MAAM,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC9C,MAAM,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,4DAAgB,CAAC,MAAM,EAAE,cAAc,EAAE,EAAC,UAAU,EAAC,CAAC,CAAC;IAC/F,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAmC;QAC3D,MAAM,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;CACJ,CAAA;AAzCY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,gBAAO,GAAE;;GACG,uBAAuB,CAyCnC;AAEY,QAAA,uBAAuB,GAAG,gBAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["import Container, {Service} from 'typedi';\nimport {mongoose} from '@typegoose/typegoose';\nimport {\n ltoCampaignService,\n LtoCampaignService,\n} from '@modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service';\nimport {\n LtoCampaignLifecycleService,\n} from '@modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service';\nimport {GetActiveCampaignDTO} from '@modules/limited-time-offer/campaign/limited-time-offer-campaign.validation';\nimport {\n LimitedTimeOfferParticipantService,\n ltoParticipantService,\n} from '@modules/limited-time-offer/participant/services/limited-time-offer-participant.service';\nimport {\n LimitedTimeOfferNotificationService\n} from \"@modules/limited-time-offer/notification/limited-time-offer-notification.service\";\nimport {NotificationType} from \"@modules/limited-time-offer/notification/limited-time-offer-notification.constants\";\nimport {isLtoScheduleEnabled} from '@utility/feature-flags';\n\n/**\n * Application/orchestration layer for the Limited Time Offer module. Owns every flow that spans the\n * campaign and participant aggregates so neither domain service has to reach across the boundary.\n * Pure single-aggregate operations stay on their respective domain services.\n */\n@Service()\nexport class LimitedTimeOfferService {\n private campaignService: LtoCampaignService;\n private lifecycle: LtoCampaignLifecycleService;\n private participantService: LimitedTimeOfferParticipantService;\n private notificationService: LimitedTimeOfferNotificationService;\n\n constructor() {\n this.campaignService = ltoCampaignService;\n this.lifecycle = Container.get(LtoCampaignLifecycleService);\n this.participantService = ltoParticipantService;\n this.notificationService = Container.get(LimitedTimeOfferNotificationService);\n }\n\n public async activateCampaign(campaignId: mongoose.Types.ObjectId): Promise<void> {\n const campaign = await this.campaignService.getById(campaignId);\n await this.lifecycle.activateCampaign(campaignId);\n if (!(await isLtoScheduleEnabled())) return;\n // Now that the campaign is live, apply the effects that join deferred while it was scheduled\n // (pause the shops' clashing discounts, override order capacity) for every participant —\n // including recurrence clones, whose marketing is (re)created here.\n await this.participantService.applyLiveEffectsToParticipants(campaign);\n }\n\n public async getActiveCampaign(input: GetActiveCampaignDTO) {\n const campaign = await this.campaignService.getActive();\n if (!campaign) return null;\n\n const nearbyParticipants = await this.participantService.getNearby(campaign._id, input);\n return nearbyParticipants.length > 0 ? campaign : null;\n }\n\n public async cancelCampaign(campaignId: mongoose.Types.ObjectId): Promise<void> {\n // Capture participants before cancelling reverts their effects, so the notification still reaches them.\n const participantIds = await this.participantService.getParticipantIdsByCampaignId(campaignId);\n await this.campaignService.cancel(campaignId);\n await this.notificationService.send(NotificationType.Cancel, participantIds, {campaignId});\n }\n\n public async expireCampaign(campaignId: mongoose.Types.ObjectId): Promise<void> {\n await this.lifecycle.expireCampaign(campaignId);\n }\n}\n\nexport const limitedTimeOfferService = Container.get(LimitedTimeOfferService);\n"]}
|
|
@@ -8,7 +8,7 @@ export declare const TARGET_ACCOUNT_TYPES: readonly [NotificationAccountType.SHO
|
|
|
8
8
|
export declare const NOTIFICATIONS: {
|
|
9
9
|
readonly CAMPAIGN_CANCELLED: {
|
|
10
10
|
readonly title: "Lyxa deleted the current campaign";
|
|
11
|
-
readonly body: "The ongoing limited time offer campaign has been deleted by
|
|
11
|
+
readonly body: "The ongoing limited time offer campaign has been deleted by Lyxa.";
|
|
12
12
|
readonly sound: "notification_sound";
|
|
13
13
|
};
|
|
14
14
|
readonly CAMPAIGN_ACTIVATED: {
|
|
@@ -14,7 +14,7 @@ const CUSTOM_NOTIFICATION_SOUND = 'notification_sound';
|
|
|
14
14
|
exports.NOTIFICATIONS = {
|
|
15
15
|
CAMPAIGN_CANCELLED: {
|
|
16
16
|
title: "Lyxa deleted the current campaign",
|
|
17
|
-
body: "The ongoing limited time offer campaign has been deleted by
|
|
17
|
+
body: "The ongoing limited time offer campaign has been deleted by Lyxa.",
|
|
18
18
|
sound: CUSTOM_NOTIFICATION_SOUND
|
|
19
19
|
},
|
|
20
20
|
CAMPAIGN_ACTIVATED: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-notification.constants.js","sourceRoot":"/","sources":["modules/limited-time-offer/notification/limited-time-offer-notification.constants.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAE7D,QAAA,gBAAgB,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACd,CAAC;AAME,QAAA,oBAAoB,GAAG;IAChC,8BAAuB,CAAC,IAAI;IAC5B,8BAAuB,CAAC,YAAY;CAC9B,CAAC;AAEX,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE1C,QAAA,aAAa,GAAG;IACzB,kBAAkB,EAAE;QAChB,KAAK,EAAE,mCAAmC;QAC1C,IAAI,EAAE,mEAAmE;QACzE,KAAK,EAAE,yBAAyB;KACnC;IACD,kBAAkB,EAAE;QAChB,KAAK,EAAE,6BAA6B;QACpC,IAAI,EAAE,yDAAyD;QAC/D,KAAK,EAAE,yBAAyB;KACnC;CACK,CAAC","sourcesContent":["import {NotificationAccountType} from \"@lyxa.ai/core/dist/utilities/enum\";\n\nexport const NotificationType = {\n Cancel: \"cancel\",\n Activate: \"activate\",\n} as const;\n\nexport type NotificationType =\n (typeof NotificationType)[keyof typeof NotificationType];\n\n\nexport const TARGET_ACCOUNT_TYPES = [\n NotificationAccountType.SHOP,\n NotificationAccountType.SHOP_CONSOLE,\n] as const;\n\nconst CUSTOM_NOTIFICATION_SOUND = 'notification_sound';\n\nexport const NOTIFICATIONS = {\n CAMPAIGN_CANCELLED: {\n title: \"Lyxa deleted the current campaign\",\n body: \"The ongoing limited time offer campaign has been deleted by
|
|
1
|
+
{"version":3,"file":"limited-time-offer-notification.constants.js","sourceRoot":"/","sources":["modules/limited-time-offer/notification/limited-time-offer-notification.constants.ts"],"names":[],"mappings":";;;AAAA,4DAA0E;AAE7D,QAAA,gBAAgB,GAAG;IAC5B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACd,CAAC;AAME,QAAA,oBAAoB,GAAG;IAChC,8BAAuB,CAAC,IAAI;IAC5B,8BAAuB,CAAC,YAAY;CAC9B,CAAC;AAEX,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE1C,QAAA,aAAa,GAAG;IACzB,kBAAkB,EAAE;QAChB,KAAK,EAAE,mCAAmC;QAC1C,IAAI,EAAE,mEAAmE;QACzE,KAAK,EAAE,yBAAyB;KACnC;IACD,kBAAkB,EAAE;QAChB,KAAK,EAAE,6BAA6B;QACpC,IAAI,EAAE,yDAAyD;QAC/D,KAAK,EAAE,yBAAyB;KACnC;CACK,CAAC","sourcesContent":["import {NotificationAccountType} from \"@lyxa.ai/core/dist/utilities/enum\";\n\nexport const NotificationType = {\n Cancel: \"cancel\",\n Activate: \"activate\",\n} as const;\n\nexport type NotificationType =\n (typeof NotificationType)[keyof typeof NotificationType];\n\n\nexport const TARGET_ACCOUNT_TYPES = [\n NotificationAccountType.SHOP,\n NotificationAccountType.SHOP_CONSOLE,\n] as const;\n\nconst CUSTOM_NOTIFICATION_SOUND = 'notification_sound';\n\nexport const NOTIFICATIONS = {\n CAMPAIGN_CANCELLED: {\n title: \"Lyxa deleted the current campaign\",\n body: \"The ongoing limited time offer campaign has been deleted by Lyxa.\",\n sound: CUSTOM_NOTIFICATION_SOUND\n },\n CAMPAIGN_ACTIVATED: {\n title: \"Limited Time Offer is Live!\",\n body: \"A new limited time offer has started. Check it out now!\",\n sound: CUSTOM_NOTIFICATION_SOUND\n },\n} as const;"]}
|
package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mongoose } from '@typegoose/typegoose';
|
|
2
|
-
import { LimitedTimeOfferCampaign } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
-
import { MarketingStatus, MarketingType, ValueType } from '@lyxa.ai/core/dist/utilities/enum';
|
|
2
|
+
import { LimitedTimeOfferCampaign, LimitedTimeOfferParticipant } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
import { MarketingCampaignType, MarketingStatus, MarketingType, ValueType } from '@lyxa.ai/core/dist/utilities/enum';
|
|
4
4
|
import { GetLtoCampaignParticipantsDTO } from '../campaign/limited-time-offer-campaign.validation';
|
|
5
5
|
import { JoinLtoCampaignDTO } from './limited-time-offer-participant.validation';
|
|
6
6
|
export declare class LtoParticipantQueryBuilder {
|
|
@@ -9,7 +9,15 @@ export declare class LtoParticipantQueryBuilder {
|
|
|
9
9
|
isWithdrawn: boolean;
|
|
10
10
|
};
|
|
11
11
|
static buildSearchTerm(dto: GetLtoCampaignParticipantsDTO): string | undefined;
|
|
12
|
-
static buildCreateInput(
|
|
12
|
+
static buildCreateInput(input: {
|
|
13
|
+
campaignId: mongoose.Types.ObjectId;
|
|
14
|
+
shopId: mongoose.Types.ObjectId;
|
|
15
|
+
marketingId: mongoose.Types.ObjectId;
|
|
16
|
+
dto: JoinLtoCampaignDTO;
|
|
17
|
+
pausedMarketings?: mongoose.Types.ObjectId[];
|
|
18
|
+
pausedOrderCapacity?: number;
|
|
19
|
+
pausedOrderCapacityEnabled?: boolean;
|
|
20
|
+
}): {
|
|
13
21
|
campaign: mongoose.Types.ObjectId;
|
|
14
22
|
shop: mongoose.Types.ObjectId;
|
|
15
23
|
marketing: mongoose.Types.ObjectId;
|
|
@@ -20,13 +28,32 @@ export declare class LtoParticipantQueryBuilder {
|
|
|
20
28
|
maxDiscountCap: number;
|
|
21
29
|
isOrderCapacityEnabled: boolean;
|
|
22
30
|
maxOrderCapacity: number | undefined;
|
|
31
|
+
pausedOrderCapacity: number | undefined;
|
|
32
|
+
pausedOrderCapacityEnabled: boolean | undefined;
|
|
23
33
|
isWithdrawn: boolean;
|
|
34
|
+
pausedMarketings: mongoose.Types.ObjectId[];
|
|
35
|
+
};
|
|
36
|
+
static buildCloneInput(campaignId: mongoose.Types.ObjectId, source: Pick<LimitedTimeOfferParticipant, 'shop' | 'products' | 'isEntireMenu' | 'discountPercentage' | 'maxDiscountCap' | 'isOrderCapacityEnabled' | 'maxOrderCapacity' | 'pausedOrderCapacity' | 'pausedOrderCapacityEnabled'>): {
|
|
37
|
+
campaign: mongoose.Types.ObjectId;
|
|
38
|
+
shop: import("@typegoose/typegoose").Ref<import("@lyxa.ai/core/dist/libraries/mongo/models").Shop>;
|
|
39
|
+
joinedAt: Date;
|
|
40
|
+
products: import("@typegoose/typegoose").Ref<import("@lyxa.ai/core/dist/libraries/mongo/models").Product>[];
|
|
41
|
+
isEntireMenu: boolean;
|
|
42
|
+
discountPercentage: number | undefined;
|
|
43
|
+
maxDiscountCap: number | undefined;
|
|
44
|
+
isOrderCapacityEnabled: boolean;
|
|
45
|
+
maxOrderCapacity: number | undefined;
|
|
46
|
+
pausedOrderCapacity: number | undefined;
|
|
47
|
+
pausedOrderCapacityEnabled: boolean | undefined;
|
|
48
|
+
isWithdrawn: boolean;
|
|
49
|
+
pausedMarketings: never[];
|
|
24
50
|
};
|
|
25
51
|
static buildMarketingInput(shopId: mongoose.Types.ObjectId, campaign: LimitedTimeOfferCampaign & {
|
|
26
52
|
_id: mongoose.Types.ObjectId;
|
|
27
53
|
}, dto: JoinLtoCampaignDTO): {
|
|
28
54
|
shop: mongoose.Types.ObjectId;
|
|
29
55
|
marketingType: MarketingType;
|
|
56
|
+
campaignType: MarketingCampaignType;
|
|
30
57
|
isAppliedByCompany: boolean;
|
|
31
58
|
duration: {
|
|
32
59
|
start: Date;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-participant.builder.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAC,wBAAwB,EAAC,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer-participant.builder.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAC,wBAAwB,EAAE,2BAA2B,EAAC,MAAM,2CAA2C,CAAC;AAChH,OAAO,EAAC,qBAAqB,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAC,MAAM,mCAAmC,CAAC;AACnH,OAAO,EAAC,6BAA6B,EAAC,MAAM,oDAAoD,CAAC;AACjG,OAAO,EAAC,kBAAkB,EAAC,MAAM,6CAA6C,CAAC;AAE/E,qBAAa,0BAA0B;IACnC,MAAM,CAAC,mBAAmB,CAAC,GAAG,EAAE,6BAA6B;;;;IAI7D,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,6BAA6B,GAAG,MAAM,GAAG,SAAS;IAI9E,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE;QAC3B,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QACpC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAChC,WAAW,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