@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
|
@@ -21,6 +21,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
21
21
|
marketing: string | import("mongoose").Types.ObjectId;
|
|
22
22
|
redemptionCount?: number | undefined;
|
|
23
23
|
redeemingOrders?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
24
|
+
lastOrder?: string | import("mongoose").Types.ObjectId | undefined;
|
|
24
25
|
};
|
|
25
26
|
output: {
|
|
26
27
|
message: string;
|
|
@@ -31,6 +32,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
31
32
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
32
33
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
33
34
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
35
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
34
36
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
35
37
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
36
38
|
documents: import("zod").objectInputType<{
|
|
@@ -39,6 +41,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
39
41
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
40
42
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
41
43
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
44
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
42
45
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
43
46
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
44
47
|
metadata?: {
|
|
@@ -62,6 +65,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
62
65
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
63
66
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
64
67
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
68
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
65
69
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
66
70
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
67
71
|
documents: import("zod").objectInputType<{
|
|
@@ -70,6 +74,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
70
74
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
71
75
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
72
76
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
77
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
73
78
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
74
79
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
75
80
|
metadata?: {
|
|
@@ -84,16 +89,16 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
84
89
|
}>;
|
|
85
90
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
86
91
|
input: {
|
|
87
|
-
|
|
92
|
+
query?: Record<string, any> | undefined;
|
|
88
93
|
search?: {
|
|
89
94
|
searchKey: string;
|
|
90
95
|
searchFields?: string[] | undefined;
|
|
91
96
|
} | undefined;
|
|
92
|
-
|
|
93
|
-
populate?: any;
|
|
97
|
+
sort?: Record<string, 1 | -1> | undefined;
|
|
94
98
|
size?: number | undefined;
|
|
95
99
|
page?: number | undefined;
|
|
96
|
-
|
|
100
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
101
|
+
populate?: any;
|
|
97
102
|
} | undefined;
|
|
98
103
|
output: {
|
|
99
104
|
message: string;
|
|
@@ -104,6 +109,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
104
109
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
105
110
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
106
111
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
112
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
107
113
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
108
114
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
109
115
|
documents: import("zod").objectInputType<{
|
|
@@ -112,6 +118,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
112
118
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
113
119
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
114
120
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
121
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
115
122
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
116
123
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
117
124
|
metadata?: {
|
|
@@ -133,6 +140,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
133
140
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
134
141
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
135
142
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
143
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
136
144
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
137
145
|
}, import("zod").ZodTypeAny, "passthrough">;
|
|
138
146
|
output: {
|
|
@@ -144,6 +152,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
144
152
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
145
153
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
146
154
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
155
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
147
156
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
148
157
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
149
158
|
documents: import("zod").objectInputType<{
|
|
@@ -152,6 +161,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
152
161
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
153
162
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
154
163
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
164
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
155
165
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
156
166
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
157
167
|
metadata?: {
|
|
@@ -178,6 +188,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
178
188
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
179
189
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
180
190
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
191
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
181
192
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
182
193
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
183
194
|
documents: import("zod").objectInputType<{
|
|
@@ -186,6 +197,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
186
197
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
187
198
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
188
199
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
200
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
189
201
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
190
202
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
191
203
|
metadata?: {
|
|
@@ -214,6 +226,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
214
226
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
215
227
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
216
228
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
229
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
217
230
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
218
231
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
219
232
|
documents: import("zod").objectInputType<{
|
|
@@ -222,6 +235,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
222
235
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
223
236
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
224
237
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
238
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
225
239
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
226
240
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
227
241
|
metadata?: {
|
|
@@ -247,6 +261,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
247
261
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
248
262
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
249
263
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
264
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
250
265
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
251
266
|
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
252
267
|
documents: import("zod").objectInputType<{
|
|
@@ -255,6 +270,7 @@ export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRo
|
|
|
255
270
|
shop: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
256
271
|
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
257
272
|
redeemingOrders: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
273
|
+
lastOrder: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
258
274
|
_id: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
259
275
|
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
260
276
|
metadata?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spend-to-get-history.router.d.ts","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.router.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"spend-to-get-history.router.d.ts","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.router.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA+B3B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCR,CAAC"}
|
|
@@ -15,9 +15,9 @@ export declare class SpendToGetHistoryService {
|
|
|
15
15
|
user: mongoose.Types.ObjectId;
|
|
16
16
|
shop: mongoose.Types.ObjectId;
|
|
17
17
|
marketing: mongoose.Types.ObjectId;
|
|
18
|
-
order: mongoose.Types.ObjectId;
|
|
18
|
+
order: mongoose.Types.ObjectId | string;
|
|
19
19
|
}): Promise<void>;
|
|
20
|
-
returnRedemption(orderId: mongoose.Types.ObjectId): Promise<void>;
|
|
20
|
+
returnRedemption(orderId: mongoose.Types.ObjectId | string): Promise<void>;
|
|
21
21
|
hasUserReachedLimit(userId: mongoose.Types.ObjectId, marketingId: mongoose.Types.ObjectId, perUserLimit: number): Promise<boolean>;
|
|
22
22
|
}
|
|
23
23
|
export declare const spendToGetHistoryService: SpendToGetHistoryService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spend-to-get-history.service.d.ts","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,iBAAiB,IAAI,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EACN,0BAA0B,IAAI,SAAS,EACvC,0BAA0B,IAAI,SAAS,EACvC,MAAM,mCAAmC,CAAC;AAG3C,qBACa,wBAAwB;IACpC,OAAO,CAAC,UAAU,CAA8B;;IAUnC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAQrD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAe5E,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAgB3F,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAiBjE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAkB5C,gBAAgB,CAAC,MAAM,EAAE;QACrC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9B,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QACnC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"spend-to-get-history.service.d.ts","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,iBAAiB,IAAI,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EACN,0BAA0B,IAAI,SAAS,EACvC,0BAA0B,IAAI,SAAS,EACvC,MAAM,mCAAmC,CAAC;AAG3C,qBACa,wBAAwB;IACpC,OAAO,CAAC,UAAU,CAA8B;;IAUnC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAQrD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAe5E,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAgB3F,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAiBjE,UAAU,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAkB5C,gBAAgB,CAAC,MAAM,EAAE;QACrC,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9B,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC9B,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;QACnC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;KACxC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQJ,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO1E,mBAAmB,CAC/B,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACpC,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,OAAO,CAAC;CAInB;AAED,eAAO,MAAM,wBAAwB,0BAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spend-to-get-history.service.js","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAC5C,yCAAyC;AASzC,uFAAgF;AAGzE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAC5B,UAAU,CAA8B;IAEhD;QACC,IAAI,CAAC,UAAU,GAAG,gBAAS,CAAC,GAAG,CAAC,6DAA2B,CAAC,CAAC;IAC9D,CAAC;IAMM,KAAK,CAAC,MAAM,CAAC,IAAe;QAClC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAMM,KAAK,CAAC,QAAQ,CAAC,EAAoC;QACzD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kBAAkB;aAC3B,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAMM,KAAK,CAAC,IAAI,CAAC,IAAyB;QAC1C,IAAI,CAAC;YACJ,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,QAAQ,GAAG,EAAE;aACtB,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAOM,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAe;QAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAE1D,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kBAAkB;aAC3B,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAMM,KAAK,CAAC,UAAU,CAAC,IAAe;QACtC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAEjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kBAAkB;aAC3B,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,6BAA6B,CAAC;IACtC,CAAC;IAMM,KAAK,CAAC,gBAAgB,CAAC,MAK7B;QACA,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAMM,KAAK,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"spend-to-get-history.service.js","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAC5C,yCAAyC;AASzC,uFAAgF;AAGzE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAC5B,UAAU,CAA8B;IAEhD;QACC,IAAI,CAAC,UAAU,GAAG,gBAAS,CAAC,GAAG,CAAC,6DAA2B,CAAC,CAAC;IAC9D,CAAC;IAMM,KAAK,CAAC,MAAM,CAAC,IAAe;QAClC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAMM,KAAK,CAAC,QAAQ,CAAC,EAAoC;QACzD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kBAAkB;aAC3B,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAMM,KAAK,CAAC,IAAI,CAAC,IAAyB;QAC1C,IAAI,CAAC;YACJ,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,uBAAuB;gBAC7B,OAAO,EAAE,QAAQ,GAAG,EAAE;aACtB,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAOM,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAe;QAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAE1D,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kBAAkB;aAC3B,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,MAAM,CAAC;IACf,CAAC;IAMM,KAAK,CAAC,UAAU,CAAC,IAAe;QACtC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAEjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QACjE,IAAI,CAAC,MAAM,EAAE,CAAC;YACb,MAAM,IAAI,kBAAS,CAAC;gBACnB,IAAI,EAAE,WAAW;gBACjB,OAAO,EAAE,kBAAkB;aAC3B,CAAC,CAAC;QACJ,CAAC;QAED,OAAO,6BAA6B,CAAC;IACtC,CAAC;IAMM,KAAK,CAAC,gBAAgB,CAAC,MAK7B;QACA,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAMM,KAAK,CAAC,gBAAgB,CAAC,OAAyC;QACtE,MAAM,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAKM,KAAK,CAAC,mBAAmB,CAC/B,MAA+B,EAC/B,WAAoC,EACpC,YAAoB;QAEpB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAClF,OAAO,CAAC,OAAO,EAAE,eAAe,IAAI,CAAC,CAAC,IAAI,YAAY,CAAC;IACxD,CAAC;CACD,CAAA;AAjHY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,gBAAO,GAAE;;GACG,wBAAwB,CAiHpC;AAEY,QAAA,wBAAwB,GAAG,gBAAS,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { TRPCError } from '@trpc/server';\nimport { DocumentType, mongoose } from '@typegoose/typegoose';\nimport { FilterDTO, PaginatedResponse, DeleteDTO } from '@lyxa.ai/core/dist/utilities/validation';\nimport { ModelType } from '@typegoose/typegoose/lib/types';\nimport { SpendToGetHistory as Model } from '@lyxa.ai/core/dist/libraries/mongo/models';\nimport {\n\tCreateSpendToGetHistoryDTO as CreateDTO,\n\tUpdateSpendToGetHistoryDTO as UpdateDTO,\n} from './spend-to-get-history.validation';\nimport { SpendToGetHistoryRepository } from './spend-to-get-history.repository';\n\n@Service()\nexport class SpendToGetHistoryService {\n\tprivate repository: SpendToGetHistoryRepository;\n\n\tconstructor() {\n\t\tthis.repository = Container.get(SpendToGetHistoryRepository);\n\t}\n\n\t/**\n\t * Create a new record\n\t * @param data Data for the new record\n\t */\n\tpublic async create(data: CreateDTO): Promise<DocumentType<Model>> {\n\t\treturn await this.repository.create(data);\n\t}\n\n\t/**\n\t * Get record by ID\n\t * @param id ID of the record\n\t */\n\tpublic async findById(id: string | mongoose.Types.ObjectId): Promise<DocumentType<Model>> {\n\t\tconst result = await this.repository.findById(id);\n\t\tif (!result) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'NOT_FOUND',\n\t\t\t\tmessage: 'Record not found',\n\t\t\t});\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * Get records\n\t * @param query Query to find records\n\t */\n\tpublic async find(data?: Partial<FilterDTO>): Promise<PaginatedResponse<DocumentType<ModelType<Model>>>> {\n\t\ttry {\n\t\t\treturn await this.repository.paginate(data);\n\t\t} catch (err) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'INTERNAL_SERVER_ERROR',\n\t\t\t\tmessage: `err: ${err}`,\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Update record\n\t * @param id ID of the record\n\t * @param data Data to update\n\t */\n\tpublic async update(id: string, data: UpdateDTO): Promise<DocumentType<Model>> {\n\t\tconst record = await this.repository.updateById(id, data);\n\n\t\tif (!record) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'NOT_FOUND',\n\t\t\t\tmessage: `Record not found`,\n\t\t\t});\n\t\t}\n\n\t\treturn record;\n\t}\n\n\t/**\n\t * Delete record by ID\n\t * @param data ID + softDelete flag\n\t */\n\tpublic async deleteById(data: DeleteDTO): Promise<string> {\n\t\tconst { _id, softDelete } = data;\n\n\t\tconst result = await this.repository.deleteById(_id, softDelete);\n\t\tif (!result) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'NOT_FOUND',\n\t\t\t\tmessage: 'Record not found',\n\t\t\t});\n\t\t}\n\n\t\treturn 'Record deleted successfully';\n\t}\n\n\t/**\n\t * Record a redemption for a user against a Spend-to-Get promotion (per-user limit counter).\n\t * Called on order placement; upserts the one history doc per (user, marketing).\n\t */\n\tpublic async recordRedemption(params: {\n\t\tuser: mongoose.Types.ObjectId;\n\t\tshop: mongoose.Types.ObjectId;\n\t\tmarketing: mongoose.Types.ObjectId;\n\t\torder: mongoose.Types.ObjectId | string;\n\t}): Promise<void> {\n\t\tawait this.repository.incrementRedemption(params);\n\t}\n\n\t/**\n\t * Reverse a redemption when the order that granted it is cancelled, restoring budget for the\n\t * user's per-user limit.\n\t */\n\tpublic async returnRedemption(orderId: mongoose.Types.ObjectId | string): Promise<void> {\n\t\tawait this.repository.decrementRedemption(orderId);\n\t}\n\n\t/**\n\t * Whether a user has exhausted their per-user redemption limit for a Spend-to-Get promotion.\n\t */\n\tpublic async hasUserReachedLimit(\n\t\tuserId: mongoose.Types.ObjectId,\n\t\tmarketingId: mongoose.Types.ObjectId,\n\t\tperUserLimit: number\n\t): Promise<boolean> {\n\t\tconst history = await this.repository.findByUserAndMarketing(userId, marketingId);\n\t\treturn (history?.redemptionCount ?? 0) >= perUserLimit;\n\t}\n}\n\nexport const spendToGetHistoryService = Container.get(SpendToGetHistoryService);\n"]}
|
|
@@ -6,24 +6,28 @@ declare const SpendToGetHistoryValidationSchema: z.ZodObject<{
|
|
|
6
6
|
shop: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
7
7
|
redemptionCount: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
redeemingOrders: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>;
|
|
9
|
+
lastOrder: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
9
10
|
}, "strict", z.ZodTypeAny, {
|
|
10
11
|
user: import("mongoose").Types.ObjectId;
|
|
11
12
|
shop: import("mongoose").Types.ObjectId;
|
|
12
13
|
marketing: import("mongoose").Types.ObjectId;
|
|
13
14
|
redemptionCount?: number | undefined;
|
|
14
15
|
redeemingOrders?: import("mongoose").Types.ObjectId[] | undefined;
|
|
16
|
+
lastOrder?: import("mongoose").Types.ObjectId | undefined;
|
|
15
17
|
}, {
|
|
16
18
|
user: string | import("mongoose").Types.ObjectId;
|
|
17
19
|
shop: string | import("mongoose").Types.ObjectId;
|
|
18
20
|
marketing: string | import("mongoose").Types.ObjectId;
|
|
19
21
|
redemptionCount?: number | undefined;
|
|
20
22
|
redeemingOrders?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
23
|
+
lastOrder?: string | import("mongoose").Types.ObjectId | undefined;
|
|
21
24
|
}>, SpendToGetHistorySchema: z.ZodObject<{
|
|
22
25
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
23
26
|
marketing: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
24
27
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
25
28
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
26
29
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
30
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
27
31
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
28
32
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
29
33
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
@@ -31,6 +35,7 @@ declare const SpendToGetHistoryValidationSchema: z.ZodObject<{
|
|
|
31
35
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
32
36
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
33
37
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
38
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
34
39
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
35
40
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
36
41
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
@@ -38,6 +43,7 @@ declare const SpendToGetHistoryValidationSchema: z.ZodObject<{
|
|
|
38
43
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
39
44
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
40
45
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
46
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
41
47
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
42
48
|
}, z.ZodTypeAny, "passthrough">>, SpendToGetHistoryIdSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, UpdateSpendToGetHistorySchema: z.ZodObject<{
|
|
43
49
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
@@ -51,6 +57,7 @@ declare const SpendToGetHistoryValidationSchema: z.ZodObject<{
|
|
|
51
57
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
52
58
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
53
59
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
60
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
54
61
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
55
62
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
56
63
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
@@ -58,6 +65,7 @@ declare const SpendToGetHistoryValidationSchema: z.ZodObject<{
|
|
|
58
65
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
59
66
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
60
67
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
68
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
61
69
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
62
70
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
63
71
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
@@ -65,6 +73,7 @@ declare const SpendToGetHistoryValidationSchema: z.ZodObject<{
|
|
|
65
73
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
66
74
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
67
75
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
76
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
68
77
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
69
78
|
}, z.ZodTypeAny, "passthrough">>;
|
|
70
79
|
export { SpendToGetHistoryValidationSchema, SpendToGetHistorySchema, SpendToGetHistoryIdSchema as SpendToGetHistoryIdValidationSchema, UpdateSpendToGetHistorySchema, };
|
|
@@ -94,6 +103,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
94
103
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
95
104
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
96
105
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
106
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
97
107
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
98
108
|
}, z.ZodTypeAny, "passthrough">, z.ZodTypeDef, z.objectInputType<{
|
|
99
109
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
@@ -101,6 +111,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
101
111
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
102
112
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
103
113
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
114
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
104
115
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
105
116
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
106
117
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -110,6 +121,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
110
121
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
111
122
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
112
123
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
124
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
113
125
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
114
126
|
}, z.ZodTypeAny, "passthrough">[];
|
|
115
127
|
metadata?: {
|
|
@@ -125,6 +137,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
125
137
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
126
138
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
127
139
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
140
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
128
141
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
129
142
|
}, z.ZodTypeAny, "passthrough">[];
|
|
130
143
|
metadata?: {
|
|
@@ -139,6 +152,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
139
152
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
140
153
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
141
154
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
155
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
142
156
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
143
157
|
}, z.ZodTypeAny, "passthrough">, z.ZodTypeDef, z.objectInputType<{
|
|
144
158
|
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
@@ -146,6 +160,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
146
160
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
147
161
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
148
162
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
163
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
149
164
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
150
165
|
}, z.ZodTypeAny, "passthrough">>]>>;
|
|
151
166
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -157,6 +172,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
157
172
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
158
173
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
159
174
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
175
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
160
176
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
161
177
|
}, z.ZodTypeAny, "passthrough"> | {
|
|
162
178
|
documents: z.objectInputType<{
|
|
@@ -165,6 +181,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
165
181
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
166
182
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
167
183
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
184
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
168
185
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
169
186
|
}, z.ZodTypeAny, "passthrough">[];
|
|
170
187
|
metadata?: {
|
|
@@ -183,6 +200,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
183
200
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
184
201
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
185
202
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
203
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
186
204
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
187
205
|
}, z.ZodTypeAny, "passthrough"> | {
|
|
188
206
|
documents: z.objectInputType<{
|
|
@@ -191,6 +209,7 @@ export declare const SpendToGetHistoryResponseSchema: z.ZodObject<{
|
|
|
191
209
|
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
192
210
|
redemptionCount: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
193
211
|
redeemingOrders: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
212
|
+
lastOrder: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
194
213
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
195
214
|
}, z.ZodTypeAny, "passthrough">[];
|
|
196
215
|
metadata?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spend-to-get-history.validation.d.ts","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;
|
|
1
|
+
{"version":3,"file":"spend-to-get-history.validation.d.ts","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AAyBnE,QAAA,MACa,iCAAiC;;;;;;;;;;;;;;;;;;;;;IAC/B,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;kCAC3B,yBAAyB,mNACrB,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCACQ,CAAC;AAKrD,OAAO,EACN,iCAAiC,EACjC,uBAAuB,EACvB,yBAAyB,IAAI,mCAAmC,EAChE,6BAA6B,GAC7B,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgD,CAAC;AAE7F,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;EAK3C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;EAE3C,CAAC;AAKH,MAAM,MAAM,0BAA0B,GAAG,GAAG,CAAC,OAAO,iCAAiC,CAAC,CAAC;AACvF,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACvE,MAAM,MAAM,0BAA0B,GAAG,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACnF,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC;AACzF,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -10,6 +10,7 @@ const baseFields = {
|
|
|
10
10
|
shop: global_validation_1.ZodValidation.objectId('Shop Id'),
|
|
11
11
|
redemptionCount: global_validation_1.ZodValidation.number('Redemption Count').optional(),
|
|
12
12
|
redeemingOrders: global_validation_1.ZodValidation.objectId('Redeeming Order').array().optional(),
|
|
13
|
+
lastOrder: global_validation_1.ZodValidation.objectId('Last Order').optional(),
|
|
13
14
|
};
|
|
14
15
|
const schemaBuilder = (0, global_validation_1.createSchemaBuilder)(baseFields);
|
|
15
16
|
const { BaseSchema: SpendToGetHistoryValidationSchema, EntitySchema: SpendToGetHistorySchema, IdSchema: SpendToGetHistoryIdSchema, UpdateSchema: UpdateSpendToGetHistorySchema, } = schemaBuilder.getAllSchemas({ createdAt: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spend-to-get-history.validation.js","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAImE;AACnE,wEAA+E;AAK/E,MAAM,UAAU,GAAG;IAClB,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACvC,SAAS,EAAE,iCAAa,CAAC,QAAQ,CAAC,cAAc,CAAC;IACjD,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACvC,eAAe,EAAE,iCAAa,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IACpE,eAAe,EAAE,iCAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"spend-to-get-history.validation.js","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAImE;AACnE,wEAA+E;AAK/E,MAAM,UAAU,GAAG;IAClB,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACvC,SAAS,EAAE,iCAAa,CAAC,QAAQ,CAAC,cAAc,CAAC;IACjD,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;IACvC,eAAe,EAAE,iCAAa,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IACpE,eAAe,EAAE,iCAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;IAC7E,SAAS,EAAE,iCAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;CAC1D,CAAC;AAOF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AAKtD,MAAM,EACL,UAAU,EAAE,iCAAiC,EAC7C,YAAY,EAAE,uBAAuB,EACrC,QAAQ,EAAE,yBAAyB,EACnC,YAAY,EAAE,6BAA6B,GAC3C,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAMpD,8EAAiC;AACjC,0DAAuB;AACM,wEAAmC;AAChE,sEAA6B;AAGjB,QAAA,+BAA+B,GAAG,IAAA,iCAAoB,EAAC,uBAAuB,CAAC,CAAC;AAEhF,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC;IACpC,SAAS,EAAE,iCAAa,CAAC,QAAQ,CAAC,WAAW,CAAC;IAC9C,KAAK,EAAE,iCAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;CACtC,CAAC,CAAC;AAEU,QAAA,gCAAgC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,KAAK,EAAE,iCAAa,CAAC,QAAQ,CAAC,OAAO,CAAC;CACtC,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n\tZodValidation,\n\tcreateSchemaBuilder,\n\tDTO,\n} from '@lyxa.ai/core/dist/utilities/validation/global-validation';\nimport { createResponseSchema } from '@lyxa.ai/core/dist/utilities/validation';\n\n/**\n * Define the base parent schema fields\n */\nconst baseFields = {\n\tuser: ZodValidation.objectId('User Id'),\n\tmarketing: ZodValidation.objectId('Marketing Id'),\n\tshop: ZodValidation.objectId('Shop Id'),\n\tredemptionCount: ZodValidation.number('Redemption Count').optional(),\n\tredeemingOrders: ZodValidation.objectId('Redeeming Order').array().optional(),\n\tlastOrder: ZodValidation.objectId('Last Order').optional(),\n};\n\n/**\n * Create schema builder for Parent entity\n * - Includes timestamps\n * - Excludes 'createdAt' from update operations\n */\nconst schemaBuilder = createSchemaBuilder(baseFields);\n\n/**\n * Get all schemas for the Parent entity\n */\nconst {\n\tBaseSchema: SpendToGetHistoryValidationSchema,\n\tEntitySchema: SpendToGetHistorySchema,\n\tIdSchema: SpendToGetHistoryIdSchema,\n\tUpdateSchema: UpdateSpendToGetHistorySchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\n/**\n * Export schemas\n */\nexport {\n\tSpendToGetHistoryValidationSchema,\n\tSpendToGetHistorySchema,\n\tSpendToGetHistoryIdSchema as SpendToGetHistoryIdValidationSchema,\n\tUpdateSpendToGetHistorySchema,\n};\n\nexport const SpendToGetHistoryResponseSchema = createResponseSchema(SpendToGetHistorySchema);\n\nexport const RecordSpendToGetRedemptionSchema = z.object({\n\tuser: ZodValidation.objectId('User'),\n\tshop: ZodValidation.objectId('Shop'),\n\tmarketing: ZodValidation.objectId('Marketing'),\n\torder: ZodValidation.objectId('Order'),\n});\n\nexport const ReturnSpendToGetRedemptionSchema = z.object({\n\torder: ZodValidation.objectId('Order'),\n});\n\n/**\n * Export DTO types\n */\nexport type CreateSpendToGetHistoryDTO = DTO<typeof SpendToGetHistoryValidationSchema>;\nexport type SpendToGetHistoryDTO = DTO<typeof SpendToGetHistorySchema>;\nexport type UpdateSpendToGetHistoryDTO = DTO<typeof UpdateSpendToGetHistorySchema>;\nexport type RecordSpendToGetRedemptionDTO = DTO<typeof RecordSpendToGetRedemptionSchema>;\nexport type ReturnSpendToGetRedemptionDTO = DTO<typeof ReturnSpendToGetRedemptionSchema>;\n"]}
|