@lyxa.ai/marketing 1.0.61 → 1.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/event/event-initializations.d.ts.map +1 -1
- package/dist/lib/event/event-initializations.js +0 -2
- package/dist/lib/event/event-initializations.js.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.d.ts +0 -2
- package/dist/lib/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.js +12 -69
- package/dist/lib/event/event-listeners/event-listeners.js.map +1 -1
- package/dist/lib/event/events/marketing-product-seed.event.d.ts +2 -1
- package/dist/lib/event/events/marketing-product-seed.event.d.ts.map +1 -1
- package/dist/lib/event/events/marketing-product-seed.event.js.map +1 -1
- package/dist/lib/index.d.ts +194 -650
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -5
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +59 -0
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +7 -0
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts +1 -0
- package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.js +3 -0
- package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js +1 -4
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js.map +1 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js +1 -4
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js.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 +0 -3
- 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 +8 -54
- 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 +0 -11
- 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 +0 -6
- 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 +1 -0
- 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 +6 -2
- 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 +3 -16
- 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 +3 -22
- 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 +0 -2
- 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 +0 -12
- 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 +35 -242
- 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 +1 -19
- 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 +1 -8
- 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 +1 -64
- 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 +0 -3
- 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 +8 -66
- 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 +19 -37
- 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 +18 -249
- 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 +0 -2
- 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 +3 -15
- 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 +3 -24
- 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 +1 -19
- 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 +0 -10
- 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 +0 -43
- 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 +10 -195
- 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 +0 -29
- 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.validation.d.ts +33 -428
- 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 +6 -16
- 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 +4 -7
- 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 +7 -42
- 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 +3 -14
- 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 +16 -76
- 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 +0 -1
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts.map +1 -1
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.js +0 -29
- package/dist/lib/modules/marketing/patterns/repository/MarketingMetricsRepository.js.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts +0 -14
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.js +0 -5
- package/dist/lib/modules/marketing/routers/marketing.router.js.map +1 -1
- package/dist/lib/modules/marketing/services/index.d.ts +0 -3
- package/dist/lib/modules/marketing/services/index.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/index.js +0 -3
- package/dist/lib/modules/marketing/services/index.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +2 -7
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +51 -97
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts +3 -2
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.js +13 -42
- package/dist/lib/modules/marketing/services/product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +27 -95
- package/dist/lib/modules/marketing/services/synchronize-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 +0 -3
- package/dist/lib/modules/marketing/validations/all-marketings.validation.js.map +1 -1
- package/dist/lib/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +3 -3
- package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +3 -3
- package/dist/lib/modules/marketing/validations/index.d.ts +0 -1
- package/dist/lib/modules/marketing/validations/index.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/index.js +0 -1
- package/dist/lib/modules/marketing/validations/index.js.map +1 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +0 -17
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.js +1 -7
- package/dist/lib/modules/marketing/validations/marketing.validation.js.map +1 -1
- package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts +1 -0
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts.map +1 -1
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.js +49 -2
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.js.map +1 -1
- package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
- package/dist/types/event/event-initializations.d.ts.map +1 -1
- package/dist/types/event/event-listeners/event-listeners.d.ts +0 -2
- package/dist/types/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/types/event/events/marketing-product-seed.event.d.ts +2 -1
- package/dist/types/event/events/marketing-product-seed.event.d.ts.map +1 -1
- package/dist/types/index.d.ts +194 -650
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +59 -0
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +1 -0
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/services/featured-setting.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +8 -54
- 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 +1 -0
- 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 +3 -16
- 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 +0 -2
- 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 +35 -242
- 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 +1 -8
- 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 +0 -3
- 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 +18 -249
- 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 +0 -2
- 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 +3 -24
- 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 +0 -10
- 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 +10 -195
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +33 -428
- 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 +4 -7
- 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 +3 -14
- 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 +0 -1
- package/dist/types/modules/marketing/patterns/repository/MarketingMetricsRepository.d.ts.map +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +0 -14
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/index.d.ts +0 -3
- package/dist/types/modules/marketing/services/index.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +2 -7
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts +3 -7
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/all-marketings.validation.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +3 -3
- package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +3 -3
- package/dist/types/modules/marketing/validations/index.d.ts +0 -1
- package/dist/types/modules/marketing/validations/index.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts +0 -17
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
- package/dist/types/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts +5 -0
- package/dist/types/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
- package/package.json +2 -2
- package/dist/lib/event/events/marketing-product-sync.event.d.ts +0 -11
- package/dist/lib/event/events/marketing-product-sync.event.d.ts.map +0 -1
- package/dist/lib/event/events/marketing-product-sync.event.js +0 -12
- package/dist/lib/event/events/marketing-product-sync.event.js.map +0 -1
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts +0 -13
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts.map +0 -1
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.js +0 -75
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.js.map +0 -1
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts +0 -21
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts.map +0 -1
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.js +0 -83
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.js.map +0 -1
- package/dist/lib/modules/marketing/services/marketing-conflict.repository.d.ts +0 -9
- package/dist/lib/modules/marketing/services/marketing-conflict.repository.d.ts.map +0 -1
- package/dist/lib/modules/marketing/services/marketing-conflict.repository.js +0 -63
- package/dist/lib/modules/marketing/services/marketing-conflict.repository.js.map +0 -1
- package/dist/lib/modules/marketing/services/marketing-conflict.service.d.ts +0 -27
- package/dist/lib/modules/marketing/services/marketing-conflict.service.d.ts.map +0 -1
- package/dist/lib/modules/marketing/services/marketing-conflict.service.js +0 -135
- package/dist/lib/modules/marketing/services/marketing-conflict.service.js.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.repository.d.ts +0 -14
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.repository.d.ts.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.repository.js +0 -82
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.repository.js.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.service.d.ts +0 -11
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.service.d.ts.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.service.js +0 -99
- package/dist/lib/modules/marketing/services/spend-to-get-marketing.service.js.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-progress.repository.d.ts +0 -9
- package/dist/lib/modules/marketing/services/spend-to-get-progress.repository.d.ts.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-progress.repository.js +0 -69
- package/dist/lib/modules/marketing/services/spend-to-get-progress.repository.js.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-progress.service.d.ts +0 -31
- package/dist/lib/modules/marketing/services/spend-to-get-progress.service.d.ts.map +0 -1
- package/dist/lib/modules/marketing/services/spend-to-get-progress.service.js +0 -123
- package/dist/lib/modules/marketing/services/spend-to-get-progress.service.js.map +0 -1
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.d.ts +0 -617
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.d.ts.map +0 -1
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.js +0 -119
- package/dist/lib/modules/marketing/validations/spend-to-get-marketing.validation.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/routers/index.d.ts +0 -2
- package/dist/lib/modules/spend-to-get-history/routers/index.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/routers/index.js +0 -18
- package/dist/lib/modules/spend-to-get-history/routers/index.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/routers/spend-to-get-history.router.js +0 -62
- package/dist/lib/modules/spend-to-get-history/routers/spend-to-get-history.router.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/services/index.d.ts +0 -2
- package/dist/lib/modules/spend-to-get-history/services/index.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/services/index.js +0 -18
- package/dist/lib/modules/spend-to-get-history/services/index.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/services/spend-to-get-history.service.d.ts +0 -24
- package/dist/lib/modules/spend-to-get-history/services/spend-to-get-history.service.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/services/spend-to-get-history.service.js +0 -136
- package/dist/lib/modules/spend-to-get-history/services/spend-to-get-history.service.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.d.ts +0 -24
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.js +0 -97
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.repository.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.router.d.ts +0 -271
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.router.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.router.js +0 -62
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.router.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.d.ts +0 -24
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.js +0 -116
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.service.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.d.ts +0 -232
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.js +0 -30
- package/dist/lib/modules/spend-to-get-history/spend-to-get-history.validation.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/validations/index.d.ts +0 -2
- package/dist/lib/modules/spend-to-get-history/validations/index.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/validations/index.js +0 -18
- package/dist/lib/modules/spend-to-get-history/validations/index.js.map +0 -1
- package/dist/lib/modules/spend-to-get-history/validations/spend-to-get-history.validation.d.ts +0 -232
- package/dist/lib/modules/spend-to-get-history/validations/spend-to-get-history.validation.d.ts.map +0 -1
- package/dist/lib/modules/spend-to-get-history/validations/spend-to-get-history.validation.js +0 -30
- package/dist/lib/modules/spend-to-get-history/validations/spend-to-get-history.validation.js.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts +0 -2
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.d.ts.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.js +0 -15
- package/dist/lib/modules/tournament/match/events/match-ended.consumer.js.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts +0 -14
- package/dist/lib/modules/tournament/match/events/match-ended.event.d.ts.map +0 -1
- package/dist/lib/modules/tournament/match/events/match-ended.event.js +0 -12
- package/dist/lib/modules/tournament/match/events/match-ended.event.js.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts +0 -10
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.js +0 -23
- package/dist/lib/modules/tournament/notification/jobs/notification.producer.js.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts +0 -9
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.js +0 -82
- package/dist/lib/modules/tournament/notification/jobs/notification.worker.js.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts +0 -10
- package/dist/lib/modules/tournament/notification/notification.schedule.config.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.schedule.config.js +0 -15
- package/dist/lib/modules/tournament/notification/notification.schedule.config.js.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts +0 -10
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.d.ts.map +0 -1
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.js +0 -73
- package/dist/lib/modules/tournament/notification/notification.scheduler.service.js.map +0 -1
- package/dist/types/event/events/marketing-product-sync.event.d.ts +0 -11
- package/dist/types/event/events/marketing-product-sync.event.d.ts.map +0 -1
- package/dist/types/events/event-initializations.d.ts +0 -2
- package/dist/types/events/event-initializations.d.ts.map +0 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +0 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +0 -1
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts +0 -13
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts.map +0 -1
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts +0 -21
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts.map +0 -1
- package/dist/types/modules/marketing/services/marketing-conflict.repository.d.ts +0 -9
- package/dist/types/modules/marketing/services/marketing-conflict.repository.d.ts.map +0 -1
- package/dist/types/modules/marketing/services/marketing-conflict.service.d.ts +0 -41
- package/dist/types/modules/marketing/services/marketing-conflict.service.d.ts.map +0 -1
- package/dist/types/modules/marketing/services/spend-to-get-marketing.repository.d.ts +0 -14
- package/dist/types/modules/marketing/services/spend-to-get-marketing.repository.d.ts.map +0 -1
- package/dist/types/modules/marketing/services/spend-to-get-marketing.service.d.ts +0 -20
- package/dist/types/modules/marketing/services/spend-to-get-marketing.service.d.ts.map +0 -1
- package/dist/types/modules/marketing/services/spend-to-get-progress.repository.d.ts +0 -9
- package/dist/types/modules/marketing/services/spend-to-get-progress.repository.d.ts.map +0 -1
- package/dist/types/modules/marketing/services/spend-to-get-progress.service.d.ts +0 -37
- package/dist/types/modules/marketing/services/spend-to-get-progress.service.d.ts.map +0 -1
- package/dist/types/modules/marketing/validations/spend-to-get-marketing.validation.d.ts +0 -630
- package/dist/types/modules/marketing/validations/spend-to-get-marketing.validation.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/routers/index.d.ts +0 -2
- package/dist/types/modules/spend-to-get-history/routers/index.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/services/index.d.ts +0 -2
- package/dist/types/modules/spend-to-get-history/services/index.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/services/spend-to-get-history.service.d.ts +0 -56
- package/dist/types/modules/spend-to-get-history/services/spend-to-get-history.service.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.repository.d.ts +0 -24
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.repository.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.router.d.ts +0 -271
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.router.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.service.d.ts +0 -56
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.service.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.validation.d.ts +0 -241
- package/dist/types/modules/spend-to-get-history/spend-to-get-history.validation.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/validations/index.d.ts +0 -2
- package/dist/types/modules/spend-to-get-history/validations/index.d.ts.map +0 -1
- package/dist/types/modules/spend-to-get-history/validations/spend-to-get-history.validation.d.ts +0 -241
- package/dist/types/modules/spend-to-get-history/validations/spend-to-get-history.validation.d.ts.map +0 -1
- package/dist/types/modules/tournament/config/tournament-config.validation.d.ts +0 -201
- package/dist/types/modules/tournament/config/tournament-config.validation.d.ts.map +0 -1
- package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts +0 -2
- package/dist/types/modules/tournament/match/events/match-ended.consumer.d.ts.map +0 -1
- package/dist/types/modules/tournament/match/events/match-ended.event.d.ts +0 -14
- package/dist/types/modules/tournament/match/events/match-ended.event.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts +0 -10
- package/dist/types/modules/tournament/notification/jobs/notification.producer.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts +0 -9
- package/dist/types/modules/tournament/notification/jobs/notification.worker.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts +0 -10
- package/dist/types/modules/tournament/notification/notification.schedule.config.d.ts.map +0 -1
- package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts +0 -10
- package/dist/types/modules/tournament/notification/notification.scheduler.service.d.ts.map +0 -1
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
export declare const spendToGetHistoryRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
2
|
-
ctx: import("@lyxa.ai/core/dist/libraries/trpc/context").LyxaHTTPContext;
|
|
3
|
-
meta: object;
|
|
4
|
-
errorShape: {
|
|
5
|
-
message: string;
|
|
6
|
-
data: {
|
|
7
|
-
stack: undefined;
|
|
8
|
-
path: undefined;
|
|
9
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_KEY;
|
|
10
|
-
httpStatus: number;
|
|
11
|
-
};
|
|
12
|
-
stack: undefined;
|
|
13
|
-
code: import("@trpc/server").TRPC_ERROR_CODE_NUMBER;
|
|
14
|
-
};
|
|
15
|
-
transformer: false;
|
|
16
|
-
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
17
|
-
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
18
|
-
input: {
|
|
19
|
-
user: string | import("mongoose").Types.ObjectId;
|
|
20
|
-
shop: string | import("mongoose").Types.ObjectId;
|
|
21
|
-
marketing: string | import("mongoose").Types.ObjectId;
|
|
22
|
-
redemptionCount?: number | undefined;
|
|
23
|
-
lastOrder?: string | import("mongoose").Types.ObjectId | null | undefined;
|
|
24
|
-
};
|
|
25
|
-
output: {
|
|
26
|
-
message: string;
|
|
27
|
-
success: boolean;
|
|
28
|
-
data?: import("zod").objectInputType<{
|
|
29
|
-
user: 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>]>>;
|
|
30
|
-
marketing: 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>]>>;
|
|
31
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
33
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
36
|
-
documents: import("zod").objectInputType<{
|
|
37
|
-
user: 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>]>>;
|
|
38
|
-
marketing: 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>]>>;
|
|
39
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
41
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
44
|
-
metadata?: {
|
|
45
|
-
page: number;
|
|
46
|
-
size: number;
|
|
47
|
-
totalElements: number;
|
|
48
|
-
totalPages: number;
|
|
49
|
-
} | undefined;
|
|
50
|
-
} | undefined;
|
|
51
|
-
};
|
|
52
|
-
meta: object;
|
|
53
|
-
}>;
|
|
54
|
-
getById: import("@trpc/server").TRPCQueryProcedure<{
|
|
55
|
-
input: string | import("mongoose").Types.ObjectId;
|
|
56
|
-
output: {
|
|
57
|
-
message: string;
|
|
58
|
-
success: boolean;
|
|
59
|
-
data?: import("zod").objectInputType<{
|
|
60
|
-
user: 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>]>>;
|
|
61
|
-
marketing: 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>]>>;
|
|
62
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
64
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
67
|
-
documents: import("zod").objectInputType<{
|
|
68
|
-
user: 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>]>>;
|
|
69
|
-
marketing: 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>]>>;
|
|
70
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
72
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
75
|
-
metadata?: {
|
|
76
|
-
page: number;
|
|
77
|
-
size: number;
|
|
78
|
-
totalElements: number;
|
|
79
|
-
totalPages: number;
|
|
80
|
-
} | undefined;
|
|
81
|
-
} | undefined;
|
|
82
|
-
};
|
|
83
|
-
meta: object;
|
|
84
|
-
}>;
|
|
85
|
-
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
86
|
-
input: {
|
|
87
|
-
search?: {
|
|
88
|
-
searchKey: string;
|
|
89
|
-
searchFields?: string[] | undefined;
|
|
90
|
-
} | undefined;
|
|
91
|
-
sort?: Record<string, 1 | -1> | undefined;
|
|
92
|
-
page?: number | undefined;
|
|
93
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
94
|
-
size?: number | undefined;
|
|
95
|
-
populate?: any;
|
|
96
|
-
query?: Record<string, any> | undefined;
|
|
97
|
-
} | undefined;
|
|
98
|
-
output: {
|
|
99
|
-
message: string;
|
|
100
|
-
success: boolean;
|
|
101
|
-
data?: import("zod").objectInputType<{
|
|
102
|
-
user: 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>]>>;
|
|
103
|
-
marketing: 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>]>>;
|
|
104
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
106
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
109
|
-
documents: import("zod").objectInputType<{
|
|
110
|
-
user: 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>]>>;
|
|
111
|
-
marketing: 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>]>>;
|
|
112
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
114
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
117
|
-
metadata?: {
|
|
118
|
-
page: number;
|
|
119
|
-
size: number;
|
|
120
|
-
totalElements: number;
|
|
121
|
-
totalPages: number;
|
|
122
|
-
} | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
};
|
|
125
|
-
meta: object;
|
|
126
|
-
}>;
|
|
127
|
-
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
128
|
-
input: {
|
|
129
|
-
[x: string]: any;
|
|
130
|
-
} | import("zod").objectInputType<{
|
|
131
|
-
user: 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>]>>;
|
|
132
|
-
marketing: 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>]>>;
|
|
133
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
135
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">;
|
|
138
|
-
output: {
|
|
139
|
-
message: string;
|
|
140
|
-
success: boolean;
|
|
141
|
-
data?: import("zod").objectInputType<{
|
|
142
|
-
user: 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>]>>;
|
|
143
|
-
marketing: 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>]>>;
|
|
144
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
146
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
149
|
-
documents: import("zod").objectInputType<{
|
|
150
|
-
user: 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>]>>;
|
|
151
|
-
marketing: 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>]>>;
|
|
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>]>>;
|
|
153
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
154
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
157
|
-
metadata?: {
|
|
158
|
-
page: number;
|
|
159
|
-
size: number;
|
|
160
|
-
totalElements: number;
|
|
161
|
-
totalPages: number;
|
|
162
|
-
} | undefined;
|
|
163
|
-
} | undefined;
|
|
164
|
-
};
|
|
165
|
-
meta: object;
|
|
166
|
-
}>;
|
|
167
|
-
deleteById: import("@trpc/server").TRPCMutationProcedure<{
|
|
168
|
-
input: {
|
|
169
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
170
|
-
softDelete?: boolean | undefined;
|
|
171
|
-
};
|
|
172
|
-
output: {
|
|
173
|
-
message: string;
|
|
174
|
-
success: boolean;
|
|
175
|
-
data?: import("zod").objectInputType<{
|
|
176
|
-
user: 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>]>>;
|
|
177
|
-
marketing: 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>]>>;
|
|
178
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
180
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
183
|
-
documents: import("zod").objectInputType<{
|
|
184
|
-
user: 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>]>>;
|
|
185
|
-
marketing: 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>]>>;
|
|
186
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
188
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
191
|
-
metadata?: {
|
|
192
|
-
page: number;
|
|
193
|
-
size: number;
|
|
194
|
-
totalElements: number;
|
|
195
|
-
totalPages: number;
|
|
196
|
-
} | undefined;
|
|
197
|
-
} | undefined;
|
|
198
|
-
};
|
|
199
|
-
meta: object;
|
|
200
|
-
}>;
|
|
201
|
-
recordRedemption: import("@trpc/server").TRPCMutationProcedure<{
|
|
202
|
-
input: {
|
|
203
|
-
user: string | import("mongoose").Types.ObjectId;
|
|
204
|
-
shop: string | import("mongoose").Types.ObjectId;
|
|
205
|
-
order: string | import("mongoose").Types.ObjectId;
|
|
206
|
-
marketing: string | import("mongoose").Types.ObjectId;
|
|
207
|
-
};
|
|
208
|
-
output: {
|
|
209
|
-
message: string;
|
|
210
|
-
success: boolean;
|
|
211
|
-
data?: import("zod").objectInputType<{
|
|
212
|
-
user: 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>]>>;
|
|
213
|
-
marketing: 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>]>>;
|
|
214
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
216
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
219
|
-
documents: import("zod").objectInputType<{
|
|
220
|
-
user: 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>]>>;
|
|
221
|
-
marketing: 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>]>>;
|
|
222
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
224
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
227
|
-
metadata?: {
|
|
228
|
-
page: number;
|
|
229
|
-
size: number;
|
|
230
|
-
totalElements: number;
|
|
231
|
-
totalPages: number;
|
|
232
|
-
} | undefined;
|
|
233
|
-
} | undefined;
|
|
234
|
-
};
|
|
235
|
-
meta: object;
|
|
236
|
-
}>;
|
|
237
|
-
returnRedemption: import("@trpc/server").TRPCMutationProcedure<{
|
|
238
|
-
input: {
|
|
239
|
-
order: string | import("mongoose").Types.ObjectId;
|
|
240
|
-
};
|
|
241
|
-
output: {
|
|
242
|
-
message: string;
|
|
243
|
-
success: boolean;
|
|
244
|
-
data?: import("zod").objectInputType<{
|
|
245
|
-
user: 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>]>>;
|
|
246
|
-
marketing: 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>]>>;
|
|
247
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
249
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough"> | {
|
|
252
|
-
documents: import("zod").objectInputType<{
|
|
253
|
-
user: 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>]>>;
|
|
254
|
-
marketing: 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>]>>;
|
|
255
|
-
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
|
-
redemptionCount: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
257
|
-
lastOrder: import("zod").ZodOptional<import("zod").ZodNullable<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
|
-
_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
|
-
}, import("zod").ZodTypeAny, "passthrough">[];
|
|
260
|
-
metadata?: {
|
|
261
|
-
page: number;
|
|
262
|
-
size: number;
|
|
263
|
-
totalElements: number;
|
|
264
|
-
totalPages: number;
|
|
265
|
-
} | undefined;
|
|
266
|
-
} | undefined;
|
|
267
|
-
};
|
|
268
|
-
meta: object;
|
|
269
|
-
}>;
|
|
270
|
-
}>>;
|
|
271
|
-
//# sourceMappingURL=spend-to-get-history.router.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BA2Bc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CjD,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.spendToGetHistoryRouter = void 0;
|
|
4
|
-
const trpc_1 = require("@lyxa.ai/core/dist/libraries/trpc");
|
|
5
|
-
const spend_to_get_history_service_1 = require("./spend-to-get-history.service");
|
|
6
|
-
const spend_to_get_history_validation_1 = require("./spend-to-get-history.validation");
|
|
7
|
-
const validation_1 = require("@lyxa.ai/core/dist/utilities/validation");
|
|
8
|
-
const error_handler_1 = require("@lyxa.ai/core/dist/utilities/error-handler");
|
|
9
|
-
const response_1 = require("@lyxa.ai/core/dist/utilities/response");
|
|
10
|
-
exports.spendToGetHistoryRouter = (0, trpc_1.createTRPCRouter)({
|
|
11
|
-
create: trpc_1.publicProcedure
|
|
12
|
-
.input(spend_to_get_history_validation_1.SpendToGetHistoryValidationSchema)
|
|
13
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
14
|
-
.mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
15
|
-
await spend_to_get_history_service_1.spendToGetHistoryService.create(input);
|
|
16
|
-
return (0, response_1.response)('Spend to get history created successfully');
|
|
17
|
-
})),
|
|
18
|
-
getById: trpc_1.publicProcedure
|
|
19
|
-
.input(validation_1.IdSchema)
|
|
20
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
21
|
-
.query(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
22
|
-
const result = await spend_to_get_history_service_1.spendToGetHistoryService.findById(input);
|
|
23
|
-
return (0, response_1.response)('Spend to get history fetched successfully', spend_to_get_history_validation_1.SpendToGetHistorySchema.parse(result));
|
|
24
|
-
})),
|
|
25
|
-
get: trpc_1.publicProcedure
|
|
26
|
-
.input(validation_1.FilterSchema)
|
|
27
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
28
|
-
.query(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
29
|
-
const result = await spend_to_get_history_service_1.spendToGetHistoryService.find(input);
|
|
30
|
-
return (0, response_1.response)('Spend to get history fetched successfully', result);
|
|
31
|
-
})),
|
|
32
|
-
update: trpc_1.publicProcedure
|
|
33
|
-
.input(spend_to_get_history_validation_1.UpdateSpendToGetHistorySchema)
|
|
34
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
35
|
-
.mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
36
|
-
const { _id, ...rest } = input;
|
|
37
|
-
await spend_to_get_history_service_1.spendToGetHistoryService.update(String(_id), rest);
|
|
38
|
-
return (0, response_1.response)('Spend to get history updated successfully');
|
|
39
|
-
})),
|
|
40
|
-
deleteById: trpc_1.publicProcedure
|
|
41
|
-
.input(validation_1.DeleteSchema)
|
|
42
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
43
|
-
.mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
44
|
-
await spend_to_get_history_service_1.spendToGetHistoryService.deleteById(input);
|
|
45
|
-
return (0, response_1.response)('Spend to get history deleted successfully');
|
|
46
|
-
})),
|
|
47
|
-
recordRedemption: trpc_1.publicProcedure
|
|
48
|
-
.input(spend_to_get_history_validation_1.RecordSpendToGetRedemptionSchema)
|
|
49
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
50
|
-
.mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
51
|
-
await spend_to_get_history_service_1.spendToGetHistoryService.recordRedemption(input);
|
|
52
|
-
return (0, response_1.response)('Spend to get redemption recorded successfully');
|
|
53
|
-
})),
|
|
54
|
-
returnRedemption: trpc_1.publicProcedure
|
|
55
|
-
.input(spend_to_get_history_validation_1.ReturnSpendToGetRedemptionSchema)
|
|
56
|
-
.output(spend_to_get_history_validation_1.SpendToGetHistoryResponseSchema)
|
|
57
|
-
.mutation(async ({ input }) => error_handler_1.ErrorHandler.wrapAsync(async () => {
|
|
58
|
-
await spend_to_get_history_service_1.spendToGetHistoryService.returnRedemption(input.order);
|
|
59
|
-
return (0, response_1.response)('Spend to get redemption returned successfully');
|
|
60
|
-
})),
|
|
61
|
-
});
|
|
62
|
-
//# sourceMappingURL=spend-to-get-history.router.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spend-to-get-history.router.js","sourceRoot":"/","sources":["modules/spend-to-get-history/spend-to-get-history.router.ts"],"names":[],"mappings":";;;AAAA,4DAAsF;AACtF,iFAAqF;AACrF,uFAO2C;AAC3C,wEAA+F;AAC/F,8EAA0E;AAC1E,oEAAiE;AAEpD,QAAA,uBAAuB,GAAG,IAAA,uBAAgB,EAAC;IACvD,MAAM,EAAE,sBAAe;SACrB,KAAK,CAAC,mEAAY,CAAC;SACnB,MAAM,CAAC,iEAAc,CAAC;SACtB,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC7B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,uDAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5B,OAAO,IAAA,mBAAQ,EAAC,2CAA2C,CAAC,CAAC;IAC9D,CAAC,CAAC,CACF;IAEF,OAAO,EAAE,sBAAe;SACtB,KAAK,CAAC,qBAAQ,CAAC;SACf,MAAM,CAAC,iEAAc,CAAC;SACtB,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC1B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,MAAM,GAAG,MAAM,uDAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7C,OAAO,IAAA,mBAAQ,EAAC,2CAA2C,EAAE,yDAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC,CAAC,CACF;IAEF,GAAG,EAAE,sBAAe;SAClB,KAAK,CAAC,yBAAY,CAAC;SACnB,MAAM,CAAC,iEAAc,CAAC;SACtB,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC1B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,MAAM,GAAG,MAAM,uDAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,IAAA,mBAAQ,EAAC,2CAA2C,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC,CAAC,CACF;IAEF,MAAM,EAAE,sBAAe;SACrB,KAAK,CAAC,+DAAY,CAAC;SACnB,MAAM,CAAC,iEAAc,CAAC;SACtB,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC7B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAC/B,MAAM,uDAAO,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC;QACxC,OAAO,IAAA,mBAAQ,EAAC,2CAA2C,CAAC,CAAC;IAC9D,CAAC,CAAC,CACF;IAEF,UAAU,EAAE,sBAAe;SACzB,KAAK,CAAC,yBAAY,CAAC;SACnB,MAAM,CAAC,iEAAc,CAAC;SACtB,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC7B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,uDAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAChC,OAAO,IAAA,mBAAQ,EAAC,2CAA2C,CAAC,CAAC;IAC9D,CAAC,CAAC,CACF;IAEF,gBAAgB,EAAE,sBAAe;SAC/B,KAAK,CAAC,kEAAgC,CAAC;SACvC,MAAM,CAAC,iEAAc,CAAC;SACtB,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC7B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,uDAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QACtC,OAAO,IAAA,mBAAQ,EAAC,+CAA+C,CAAC,CAAC;IAClE,CAAC,CAAC,CACF;IAEF,gBAAgB,EAAE,sBAAe;SAC/B,KAAK,CAAC,kEAAgC,CAAC;SACvC,MAAM,CAAC,iEAAc,CAAC;SACtB,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC7B,4BAAY,CAAC,SAAS,CAAC,KAAK,IAAI,EAAE;QACjC,MAAM,uDAAO,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5C,OAAO,IAAA,mBAAQ,EAAC,+CAA+C,CAAC,CAAC;IAClE,CAAC,CAAC,CACF;CACF,CAAC,CAAC","sourcesContent":["import { createTRPCRouter, publicProcedure } from '@lyxa.ai/core/dist/libraries/trpc';\nimport { spendToGetHistoryService as service } from './spend-to-get-history.service';\nimport {\n\tSpendToGetHistorySchema as Schema,\n\tSpendToGetHistoryValidationSchema as CreateSchema,\n\tUpdateSpendToGetHistorySchema as UpdateSchema,\n\tSpendToGetHistoryResponseSchema as ResponseSchema,\n\tRecordSpendToGetRedemptionSchema,\n\tReturnSpendToGetRedemptionSchema,\n} from './spend-to-get-history.validation';\nimport { FilterSchema, DeleteSchema, IdSchema } from '@lyxa.ai/core/dist/utilities/validation';\nimport { ErrorHandler } from '@lyxa.ai/core/dist/utilities/error-handler';\nimport { response } from '@lyxa.ai/core/dist/utilities/response';\n\nexport const spendToGetHistoryRouter = createTRPCRouter({\n\tcreate: publicProcedure\n\t\t.input(CreateSchema)\n\t\t.output(ResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tawait service.create(input);\n\t\t\t\treturn response('Spend to get history created successfully');\n\t\t\t})\n\t\t),\n\n\tgetById: publicProcedure\n\t\t.input(IdSchema)\n\t\t.output(ResponseSchema)\n\t\t.query(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.findById(input);\n\t\t\t\treturn response('Spend to get history fetched successfully', Schema.parse(result));\n\t\t\t})\n\t\t),\n\n\tget: publicProcedure\n\t\t.input(FilterSchema)\n\t\t.output(ResponseSchema)\n\t\t.query(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst result = await service.find(input);\n\t\t\t\treturn response('Spend to get history fetched successfully', result);\n\t\t\t})\n\t\t),\n\n\tupdate: publicProcedure\n\t\t.input(UpdateSchema)\n\t\t.output(ResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tconst { _id, ...rest } = input;\n\t\t\t\tawait service.update(String(_id), rest);\n\t\t\t\treturn response('Spend to get history updated successfully');\n\t\t\t})\n\t\t),\n\n\tdeleteById: publicProcedure\n\t\t.input(DeleteSchema)\n\t\t.output(ResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tawait service.deleteById(input);\n\t\t\t\treturn response('Spend to get history deleted successfully');\n\t\t\t})\n\t\t),\n\n\trecordRedemption: publicProcedure\n\t\t.input(RecordSpendToGetRedemptionSchema)\n\t\t.output(ResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tawait service.recordRedemption(input);\n\t\t\t\treturn response('Spend to get redemption recorded successfully');\n\t\t\t})\n\t\t),\n\n\treturnRedemption: publicProcedure\n\t\t.input(ReturnSpendToGetRedemptionSchema)\n\t\t.output(ResponseSchema)\n\t\t.mutation(async ({ input }) =>\n\t\t\tErrorHandler.wrapAsync(async () => {\n\t\t\t\tawait service.returnRedemption(input.order);\n\t\t\t\treturn response('Spend to get redemption returned successfully');\n\t\t\t})\n\t\t),\n});\n"]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { DocumentType, mongoose } from '@typegoose/typegoose';
|
|
2
|
-
import { FilterDTO, PaginatedResponse, DeleteDTO } from '@lyxa.ai/core/dist/utilities/validation';
|
|
3
|
-
import { ModelType } from '@typegoose/typegoose/lib/types';
|
|
4
|
-
import { SpendToGetHistory as Model } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
5
|
-
import { CreateSpendToGetHistoryDTO as CreateDTO, UpdateSpendToGetHistoryDTO as UpdateDTO } from './spend-to-get-history.validation';
|
|
6
|
-
export declare class SpendToGetHistoryService {
|
|
7
|
-
private repository;
|
|
8
|
-
constructor();
|
|
9
|
-
create(data: CreateDTO): Promise<DocumentType<Model>>;
|
|
10
|
-
findById(id: string | mongoose.Types.ObjectId): Promise<DocumentType<Model>>;
|
|
11
|
-
find(data?: Partial<FilterDTO>): Promise<PaginatedResponse<DocumentType<ModelType<Model>>>>;
|
|
12
|
-
update(id: string, data: UpdateDTO): Promise<DocumentType<Model>>;
|
|
13
|
-
deleteById(data: DeleteDTO): Promise<string>;
|
|
14
|
-
recordRedemption(params: {
|
|
15
|
-
user: mongoose.Types.ObjectId;
|
|
16
|
-
shop: mongoose.Types.ObjectId;
|
|
17
|
-
marketing: mongoose.Types.ObjectId;
|
|
18
|
-
order: mongoose.Types.ObjectId;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
returnRedemption(orderId: mongoose.Types.ObjectId): Promise<void>;
|
|
21
|
-
hasUserReachedLimit(userId: mongoose.Types.ObjectId, marketingId: mongoose.Types.ObjectId, perUserLimit: number): Promise<boolean>;
|
|
22
|
-
}
|
|
23
|
-
export declare const spendToGetHistoryService: SpendToGetHistoryService;
|
|
24
|
-
//# sourceMappingURL=spend-to-get-history.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;KAC/B,GAAG,OAAO,CAAC,IAAI,CAAC;IAQJ,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAOjE,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,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
-
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
-
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.spendToGetHistoryService = exports.SpendToGetHistoryService = void 0;
|
|
46
|
-
const typedi_1 = __importStar(require("typedi"));
|
|
47
|
-
const server_1 = require("@trpc/server");
|
|
48
|
-
const spend_to_get_history_repository_1 = require("./spend-to-get-history.repository");
|
|
49
|
-
let SpendToGetHistoryService = class SpendToGetHistoryService {
|
|
50
|
-
repository;
|
|
51
|
-
constructor() {
|
|
52
|
-
this.repository = typedi_1.default.get(spend_to_get_history_repository_1.SpendToGetHistoryRepository);
|
|
53
|
-
}
|
|
54
|
-
async create(data) {
|
|
55
|
-
return await this.repository.create(data);
|
|
56
|
-
}
|
|
57
|
-
async findById(id) {
|
|
58
|
-
const result = await this.repository.findById(id);
|
|
59
|
-
if (!result) {
|
|
60
|
-
throw new server_1.TRPCError({
|
|
61
|
-
code: 'NOT_FOUND',
|
|
62
|
-
message: 'Record not found',
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
async find(data) {
|
|
68
|
-
try {
|
|
69
|
-
return await this.repository.paginate(data);
|
|
70
|
-
}
|
|
71
|
-
catch (err) {
|
|
72
|
-
throw new server_1.TRPCError({
|
|
73
|
-
code: 'INTERNAL_SERVER_ERROR',
|
|
74
|
-
message: `err: ${err}`,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
async update(id, data) {
|
|
79
|
-
const record = await this.repository.updateById(id, data);
|
|
80
|
-
if (!record) {
|
|
81
|
-
throw new server_1.TRPCError({
|
|
82
|
-
code: 'NOT_FOUND',
|
|
83
|
-
message: `Record not found`,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
return record;
|
|
87
|
-
}
|
|
88
|
-
async deleteById(data) {
|
|
89
|
-
const { _id, softDelete } = data;
|
|
90
|
-
const result = await this.repository.deleteById(_id, softDelete);
|
|
91
|
-
if (!result) {
|
|
92
|
-
throw new server_1.TRPCError({
|
|
93
|
-
code: 'NOT_FOUND',
|
|
94
|
-
message: 'Record not found',
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return 'Record deleted successfully';
|
|
98
|
-
}
|
|
99
|
-
async recordRedemption(params) {
|
|
100
|
-
await this.repository.incrementRedemption(params);
|
|
101
|
-
}
|
|
102
|
-
async returnRedemption(orderId) {
|
|
103
|
-
await this.repository.decrementRedemption(orderId);
|
|
104
|
-
}
|
|
105
|
-
async hasUserReachedLimit(userId, marketingId, perUserLimit) {
|
|
106
|
-
const history = await this.repository.findByUserAndMarketing(userId, marketingId);
|
|
107
|
-
return (history?.redemptionCount ?? 0) >= perUserLimit;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
exports.SpendToGetHistoryService = SpendToGetHistoryService;
|
|
111
|
-
exports.SpendToGetHistoryService = SpendToGetHistoryService = __decorate([
|
|
112
|
-
(0, typedi_1.Service)(),
|
|
113
|
-
__metadata("design:paramtypes", [])
|
|
114
|
-
], SpendToGetHistoryService);
|
|
115
|
-
exports.spendToGetHistoryService = typedi_1.default.get(SpendToGetHistoryService);
|
|
116
|
-
//# sourceMappingURL=spend-to-get-history.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,OAAgC;QAC7D,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;\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): 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"]}
|