@lyxa.ai/marketing 1.0.42 → 1.0.44
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 +2 -0
- package/dist/lib/event/event-initializations.js.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.d.ts +2 -0
- package/dist/lib/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.js +59 -0
- package/dist/lib/event/event-listeners/event-listeners.js.map +1 -1
- package/dist/lib/event/events/marketing-product-seed.event.d.ts +17 -0
- package/dist/lib/event/events/marketing-product-seed.event.d.ts.map +1 -0
- package/dist/lib/event/events/marketing-product-seed.event.js +12 -0
- package/dist/lib/event/events/marketing-product-seed.event.js.map +1 -0
- package/dist/lib/index.d.ts +224 -82
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +118 -0
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +33 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +32 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +504 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -0
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +420 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +40 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts +1118 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js +13 -0
- package/dist/lib/modules/coupon/validations/create-coupon.validation.js.map +1 -0
- package/dist/lib/modules/coupon/validations/index.d.ts +1 -0
- package/dist/lib/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/index.js +1 -0
- package/dist/lib/modules/coupon/validations/index.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +29 -72
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +3 -16
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +36 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js +48 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +22 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js +131 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +78 -78
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +1 -2
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.js +6 -11
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +16 -51
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +33 -156
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts +8 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.js +13 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts +14 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.js +77 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -2
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js +19 -26
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +92 -77
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +53 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js +55 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +21 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js +142 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +63 -5
- 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 +8 -2
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js +2 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.service.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +161 -27
- 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 +11 -9
- 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 +6 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.js +17 -38
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +20 -8
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js +38 -27
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts +12 -3
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.js +7 -0
- package/dist/lib/modules/marketing/routers/marketing.router.js.map +1 -1
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.js +11 -9
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/discount-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/discount-marketing.service.js +15 -13
- package/dist/lib/modules/marketing/services/discount-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +1 -0
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +57 -7
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts +11 -0
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.js +23 -0
- package/dist/lib/modules/marketing/services/product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +6 -31
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +2 -2
- package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/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 +14 -0
- 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 +4 -4
- package/dist/types/event/event-initializations.d.ts.map +1 -1
- package/dist/types/event/event-listeners/event-listeners.d.ts +2 -0
- package/dist/types/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/types/event/events/marketing-product-seed.event.d.ts +17 -0
- package/dist/types/event/events/marketing-product-seed.event.d.ts.map +1 -0
- package/dist/types/index.d.ts +224 -82
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +118 -0
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +32 -0
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -0
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +420 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts +1118 -0
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -0
- package/dist/types/modules/coupon/validations/index.d.ts +1 -0
- package/dist/types/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +29 -72
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +36 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +22 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +78 -78
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +1 -2
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +16 -51
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts +8 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts +14 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts +1 -2
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/config/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +92 -77
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +53 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +21 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +63 -5
- 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 +161 -27
- 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 +6 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +20 -8
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +12 -3
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/buy1-get1-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/discount-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +1 -0
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts +11 -0
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts +2 -2
- package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts +1 -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 +4 -4
- package/package.json +3 -3
- package/dist/types/events/event-initializations.d.ts +0 -2
- package/dist/types/events/event-initializations.d.ts.map +0 -1
|
@@ -42,7 +42,106 @@ export declare const JoinLtoCampaignSchema: z.ZodEffects<z.ZodObject<{
|
|
|
42
42
|
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
43
43
|
maxOrderCapacity?: number | undefined;
|
|
44
44
|
}>;
|
|
45
|
-
declare const
|
|
45
|
+
export declare const ParticipantSchema: z.ZodObject<{
|
|
46
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
47
|
+
campaign: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
48
|
+
shop: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
49
|
+
joinedAt: z.ZodDate;
|
|
50
|
+
products: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>;
|
|
51
|
+
isEntireMenu: z.ZodBoolean;
|
|
52
|
+
discountPercentage: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
maxDiscountCap: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
isOrderCapacityEnabled: z.ZodBoolean;
|
|
55
|
+
maxOrderCapacity: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
isWithdrawn: z.ZodBoolean;
|
|
57
|
+
withdrawnAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
58
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
59
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
_id: import("mongoose").Types.ObjectId;
|
|
62
|
+
shop: import("mongoose").Types.ObjectId;
|
|
63
|
+
products: import("mongoose").Types.ObjectId[];
|
|
64
|
+
joinedAt: Date;
|
|
65
|
+
isEntireMenu: boolean;
|
|
66
|
+
campaign: import("mongoose").Types.ObjectId;
|
|
67
|
+
isOrderCapacityEnabled: boolean;
|
|
68
|
+
isWithdrawn: boolean;
|
|
69
|
+
createdAt?: Date | null | undefined;
|
|
70
|
+
updatedAt?: Date | null | undefined;
|
|
71
|
+
discountPercentage?: number | undefined;
|
|
72
|
+
maxDiscountCap?: number | undefined;
|
|
73
|
+
maxOrderCapacity?: number | undefined;
|
|
74
|
+
withdrawnAt?: Date | null | undefined;
|
|
75
|
+
}, {
|
|
76
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
77
|
+
shop: string | import("mongoose").Types.ObjectId;
|
|
78
|
+
joinedAt: Date;
|
|
79
|
+
isEntireMenu: boolean;
|
|
80
|
+
campaign: string | import("mongoose").Types.ObjectId;
|
|
81
|
+
isOrderCapacityEnabled: boolean;
|
|
82
|
+
isWithdrawn: boolean;
|
|
83
|
+
createdAt?: Date | null | undefined;
|
|
84
|
+
updatedAt?: Date | null | undefined;
|
|
85
|
+
products?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
86
|
+
discountPercentage?: number | undefined;
|
|
87
|
+
maxDiscountCap?: number | undefined;
|
|
88
|
+
maxOrderCapacity?: number | undefined;
|
|
89
|
+
withdrawnAt?: Date | null | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
export declare const CampaignSummarySchema: z.ZodObject<{
|
|
92
|
+
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
93
|
+
title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
94
|
+
subTitle: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
95
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
96
|
+
endDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
97
|
+
discountOptions: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
|
|
98
|
+
maxDiscountCaps: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
_id: import("mongoose").Types.ObjectId;
|
|
101
|
+
discountOptions: number[];
|
|
102
|
+
maxDiscountCaps: number[];
|
|
103
|
+
startDate?: Date | null | undefined;
|
|
104
|
+
endDate?: Date | null | undefined;
|
|
105
|
+
title?: string | undefined;
|
|
106
|
+
subTitle?: string | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
109
|
+
startDate?: Date | null | undefined;
|
|
110
|
+
endDate?: Date | null | undefined;
|
|
111
|
+
title?: string | undefined;
|
|
112
|
+
subTitle?: string | undefined;
|
|
113
|
+
discountOptions?: number[] | undefined;
|
|
114
|
+
maxDiscountCaps?: number[] | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
export declare const ParticipantSummarySchema: z.ZodObject<{
|
|
117
|
+
discountPercentage: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
maxDiscountCap: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
joinedAt: z.ZodDate;
|
|
120
|
+
isEntireMenu: z.ZodBoolean;
|
|
121
|
+
isOrderCapacityEnabled: z.ZodBoolean;
|
|
122
|
+
maxOrderCapacity: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
productIds: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>;
|
|
124
|
+
marketingId: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
125
|
+
}, "strip", z.ZodTypeAny, {
|
|
126
|
+
joinedAt: Date;
|
|
127
|
+
productIds: import("mongoose").Types.ObjectId[];
|
|
128
|
+
isEntireMenu: boolean;
|
|
129
|
+
isOrderCapacityEnabled: boolean;
|
|
130
|
+
marketingId?: import("mongoose").Types.ObjectId | undefined;
|
|
131
|
+
discountPercentage?: number | undefined;
|
|
132
|
+
maxDiscountCap?: number | undefined;
|
|
133
|
+
maxOrderCapacity?: number | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
joinedAt: Date;
|
|
136
|
+
isEntireMenu: boolean;
|
|
137
|
+
isOrderCapacityEnabled: boolean;
|
|
138
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
139
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
140
|
+
discountPercentage?: number | undefined;
|
|
141
|
+
maxDiscountCap?: number | undefined;
|
|
142
|
+
maxOrderCapacity?: number | undefined;
|
|
143
|
+
}>;
|
|
144
|
+
export declare const ParticipantStatusSchema: z.ZodObject<{
|
|
46
145
|
campaignState: z.ZodNativeEnum<typeof LtoCardState>;
|
|
47
146
|
campaign: z.ZodOptional<z.ZodObject<{
|
|
48
147
|
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
@@ -56,15 +155,15 @@ declare const ParticipantStatusSchema: z.ZodObject<{
|
|
|
56
155
|
_id: import("mongoose").Types.ObjectId;
|
|
57
156
|
discountOptions: number[];
|
|
58
157
|
maxDiscountCaps: number[];
|
|
59
|
-
title?: string | undefined;
|
|
60
158
|
startDate?: Date | null | undefined;
|
|
61
159
|
endDate?: Date | null | undefined;
|
|
160
|
+
title?: string | undefined;
|
|
62
161
|
subTitle?: string | undefined;
|
|
63
162
|
}, {
|
|
64
163
|
_id: string | import("mongoose").Types.ObjectId;
|
|
65
|
-
title?: string | undefined;
|
|
66
164
|
startDate?: Date | null | undefined;
|
|
67
165
|
endDate?: Date | null | undefined;
|
|
166
|
+
title?: string | undefined;
|
|
68
167
|
subTitle?: string | undefined;
|
|
69
168
|
discountOptions?: number[] | undefined;
|
|
70
169
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -76,10 +175,14 @@ declare const ParticipantStatusSchema: z.ZodObject<{
|
|
|
76
175
|
isEntireMenu: z.ZodBoolean;
|
|
77
176
|
isOrderCapacityEnabled: z.ZodBoolean;
|
|
78
177
|
maxOrderCapacity: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
productIds: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>;
|
|
179
|
+
marketingId: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
79
180
|
}, "strip", z.ZodTypeAny, {
|
|
80
181
|
joinedAt: Date;
|
|
182
|
+
productIds: import("mongoose").Types.ObjectId[];
|
|
81
183
|
isEntireMenu: boolean;
|
|
82
184
|
isOrderCapacityEnabled: boolean;
|
|
185
|
+
marketingId?: import("mongoose").Types.ObjectId | undefined;
|
|
83
186
|
discountPercentage?: number | undefined;
|
|
84
187
|
maxDiscountCap?: number | undefined;
|
|
85
188
|
maxOrderCapacity?: number | undefined;
|
|
@@ -87,6 +190,8 @@ declare const ParticipantStatusSchema: z.ZodObject<{
|
|
|
87
190
|
joinedAt: Date;
|
|
88
191
|
isEntireMenu: boolean;
|
|
89
192
|
isOrderCapacityEnabled: boolean;
|
|
193
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
194
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
90
195
|
discountPercentage?: number | undefined;
|
|
91
196
|
maxDiscountCap?: number | undefined;
|
|
92
197
|
maxOrderCapacity?: number | undefined;
|
|
@@ -97,15 +202,17 @@ declare const ParticipantStatusSchema: z.ZodObject<{
|
|
|
97
202
|
_id: import("mongoose").Types.ObjectId;
|
|
98
203
|
discountOptions: number[];
|
|
99
204
|
maxDiscountCaps: number[];
|
|
100
|
-
title?: string | undefined;
|
|
101
205
|
startDate?: Date | null | undefined;
|
|
102
206
|
endDate?: Date | null | undefined;
|
|
207
|
+
title?: string | undefined;
|
|
103
208
|
subTitle?: string | undefined;
|
|
104
209
|
} | undefined;
|
|
105
210
|
participant?: {
|
|
106
211
|
joinedAt: Date;
|
|
212
|
+
productIds: import("mongoose").Types.ObjectId[];
|
|
107
213
|
isEntireMenu: boolean;
|
|
108
214
|
isOrderCapacityEnabled: boolean;
|
|
215
|
+
marketingId?: import("mongoose").Types.ObjectId | undefined;
|
|
109
216
|
discountPercentage?: number | undefined;
|
|
110
217
|
maxDiscountCap?: number | undefined;
|
|
111
218
|
maxOrderCapacity?: number | undefined;
|
|
@@ -114,9 +221,9 @@ declare const ParticipantStatusSchema: z.ZodObject<{
|
|
|
114
221
|
campaignState: LtoCardState;
|
|
115
222
|
campaign?: {
|
|
116
223
|
_id: string | import("mongoose").Types.ObjectId;
|
|
117
|
-
title?: string | undefined;
|
|
118
224
|
startDate?: Date | null | undefined;
|
|
119
225
|
endDate?: Date | null | undefined;
|
|
226
|
+
title?: string | undefined;
|
|
120
227
|
subTitle?: string | undefined;
|
|
121
228
|
discountOptions?: number[] | undefined;
|
|
122
229
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -125,6 +232,8 @@ declare const ParticipantStatusSchema: z.ZodObject<{
|
|
|
125
232
|
joinedAt: Date;
|
|
126
233
|
isEntireMenu: boolean;
|
|
127
234
|
isOrderCapacityEnabled: boolean;
|
|
235
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
236
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
128
237
|
discountPercentage?: number | undefined;
|
|
129
238
|
maxDiscountCap?: number | undefined;
|
|
130
239
|
maxOrderCapacity?: number | undefined;
|
|
@@ -155,8 +264,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
155
264
|
shop: string | import("mongoose").Types.ObjectId;
|
|
156
265
|
joinedAt: Date;
|
|
157
266
|
isEntireMenu: boolean;
|
|
158
|
-
isOrderCapacityEnabled: boolean;
|
|
159
267
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
268
|
+
isOrderCapacityEnabled: boolean;
|
|
160
269
|
isWithdrawn: boolean;
|
|
161
270
|
createdAt?: Date | null | undefined;
|
|
162
271
|
updatedAt?: Date | null | undefined;
|
|
@@ -170,8 +279,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
170
279
|
shop: string | import("mongoose").Types.ObjectId;
|
|
171
280
|
joinedAt: Date;
|
|
172
281
|
isEntireMenu: boolean;
|
|
173
|
-
isOrderCapacityEnabled: boolean;
|
|
174
282
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
283
|
+
isOrderCapacityEnabled: boolean;
|
|
175
284
|
isWithdrawn: boolean;
|
|
176
285
|
createdAt?: Date | null | undefined;
|
|
177
286
|
updatedAt?: Date | null | undefined;
|
|
@@ -187,8 +296,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
187
296
|
shop: string | import("mongoose").Types.ObjectId;
|
|
188
297
|
joinedAt: Date;
|
|
189
298
|
isEntireMenu: boolean;
|
|
190
|
-
isOrderCapacityEnabled: boolean;
|
|
191
299
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
300
|
+
isOrderCapacityEnabled: boolean;
|
|
192
301
|
isWithdrawn: boolean;
|
|
193
302
|
createdAt?: Date | null | undefined;
|
|
194
303
|
updatedAt?: Date | null | undefined;
|
|
@@ -210,8 +319,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
210
319
|
shop: string | import("mongoose").Types.ObjectId;
|
|
211
320
|
joinedAt: Date;
|
|
212
321
|
isEntireMenu: boolean;
|
|
213
|
-
isOrderCapacityEnabled: boolean;
|
|
214
322
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
323
|
+
isOrderCapacityEnabled: boolean;
|
|
215
324
|
isWithdrawn: boolean;
|
|
216
325
|
createdAt?: Date | null | undefined;
|
|
217
326
|
updatedAt?: Date | null | undefined;
|
|
@@ -232,8 +341,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
232
341
|
shop: string | import("mongoose").Types.ObjectId;
|
|
233
342
|
joinedAt: Date;
|
|
234
343
|
isEntireMenu: boolean;
|
|
235
|
-
isOrderCapacityEnabled: boolean;
|
|
236
344
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
345
|
+
isOrderCapacityEnabled: boolean;
|
|
237
346
|
isWithdrawn: boolean;
|
|
238
347
|
createdAt?: Date | null | undefined;
|
|
239
348
|
updatedAt?: Date | null | undefined;
|
|
@@ -247,8 +356,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
247
356
|
shop: string | import("mongoose").Types.ObjectId;
|
|
248
357
|
joinedAt: Date;
|
|
249
358
|
isEntireMenu: boolean;
|
|
250
|
-
isOrderCapacityEnabled: boolean;
|
|
251
359
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
360
|
+
isOrderCapacityEnabled: boolean;
|
|
252
361
|
isWithdrawn: boolean;
|
|
253
362
|
createdAt?: Date | null | undefined;
|
|
254
363
|
updatedAt?: Date | null | undefined;
|
|
@@ -266,8 +375,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
266
375
|
shop: string | import("mongoose").Types.ObjectId;
|
|
267
376
|
joinedAt: Date;
|
|
268
377
|
isEntireMenu: boolean;
|
|
269
|
-
isOrderCapacityEnabled: boolean;
|
|
270
378
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
379
|
+
isOrderCapacityEnabled: boolean;
|
|
271
380
|
isWithdrawn: boolean;
|
|
272
381
|
createdAt?: Date | null | undefined;
|
|
273
382
|
updatedAt?: Date | null | undefined;
|
|
@@ -282,8 +391,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
282
391
|
shop: string | import("mongoose").Types.ObjectId;
|
|
283
392
|
joinedAt: Date;
|
|
284
393
|
isEntireMenu: boolean;
|
|
285
|
-
isOrderCapacityEnabled: boolean;
|
|
286
394
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
395
|
+
isOrderCapacityEnabled: boolean;
|
|
287
396
|
isWithdrawn: boolean;
|
|
288
397
|
createdAt?: Date | null | undefined;
|
|
289
398
|
updatedAt?: Date | null | undefined;
|
|
@@ -308,8 +417,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
308
417
|
shop: string | import("mongoose").Types.ObjectId;
|
|
309
418
|
joinedAt: Date;
|
|
310
419
|
isEntireMenu: boolean;
|
|
311
|
-
isOrderCapacityEnabled: boolean;
|
|
312
420
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
421
|
+
isOrderCapacityEnabled: boolean;
|
|
313
422
|
isWithdrawn: boolean;
|
|
314
423
|
createdAt?: Date | null | undefined;
|
|
315
424
|
updatedAt?: Date | null | undefined;
|
|
@@ -324,8 +433,8 @@ export declare const ParticipantResponseSchema: z.ZodObject<{
|
|
|
324
433
|
shop: string | import("mongoose").Types.ObjectId;
|
|
325
434
|
joinedAt: Date;
|
|
326
435
|
isEntireMenu: boolean;
|
|
327
|
-
isOrderCapacityEnabled: boolean;
|
|
328
436
|
campaign: string | import("mongoose").Types.ObjectId;
|
|
437
|
+
isOrderCapacityEnabled: boolean;
|
|
329
438
|
isWithdrawn: boolean;
|
|
330
439
|
createdAt?: Date | null | undefined;
|
|
331
440
|
updatedAt?: Date | null | undefined;
|
|
@@ -367,9 +476,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
367
476
|
campaignState: LtoCardState;
|
|
368
477
|
campaign?: {
|
|
369
478
|
_id: string | import("mongoose").Types.ObjectId;
|
|
370
|
-
title?: string | undefined;
|
|
371
479
|
startDate?: Date | null | undefined;
|
|
372
480
|
endDate?: Date | null | undefined;
|
|
481
|
+
title?: string | undefined;
|
|
373
482
|
subTitle?: string | undefined;
|
|
374
483
|
discountOptions?: number[] | undefined;
|
|
375
484
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -378,6 +487,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
378
487
|
joinedAt: Date;
|
|
379
488
|
isEntireMenu: boolean;
|
|
380
489
|
isOrderCapacityEnabled: boolean;
|
|
490
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
491
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
381
492
|
discountPercentage?: number | undefined;
|
|
382
493
|
maxDiscountCap?: number | undefined;
|
|
383
494
|
maxOrderCapacity?: number | undefined;
|
|
@@ -386,9 +497,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
386
497
|
campaignState: LtoCardState;
|
|
387
498
|
campaign?: {
|
|
388
499
|
_id: string | import("mongoose").Types.ObjectId;
|
|
389
|
-
title?: string | undefined;
|
|
390
500
|
startDate?: Date | null | undefined;
|
|
391
501
|
endDate?: Date | null | undefined;
|
|
502
|
+
title?: string | undefined;
|
|
392
503
|
subTitle?: string | undefined;
|
|
393
504
|
discountOptions?: number[] | undefined;
|
|
394
505
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -397,6 +508,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
397
508
|
joinedAt: Date;
|
|
398
509
|
isEntireMenu: boolean;
|
|
399
510
|
isOrderCapacityEnabled: boolean;
|
|
511
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
512
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
400
513
|
discountPercentage?: number | undefined;
|
|
401
514
|
maxDiscountCap?: number | undefined;
|
|
402
515
|
maxOrderCapacity?: number | undefined;
|
|
@@ -407,9 +520,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
407
520
|
campaignState: LtoCardState;
|
|
408
521
|
campaign?: {
|
|
409
522
|
_id: string | import("mongoose").Types.ObjectId;
|
|
410
|
-
title?: string | undefined;
|
|
411
523
|
startDate?: Date | null | undefined;
|
|
412
524
|
endDate?: Date | null | undefined;
|
|
525
|
+
title?: string | undefined;
|
|
413
526
|
subTitle?: string | undefined;
|
|
414
527
|
discountOptions?: number[] | undefined;
|
|
415
528
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -418,6 +531,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
418
531
|
joinedAt: Date;
|
|
419
532
|
isEntireMenu: boolean;
|
|
420
533
|
isOrderCapacityEnabled: boolean;
|
|
534
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
535
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
421
536
|
discountPercentage?: number | undefined;
|
|
422
537
|
maxDiscountCap?: number | undefined;
|
|
423
538
|
maxOrderCapacity?: number | undefined;
|
|
@@ -434,9 +549,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
434
549
|
campaignState: LtoCardState;
|
|
435
550
|
campaign?: {
|
|
436
551
|
_id: string | import("mongoose").Types.ObjectId;
|
|
437
|
-
title?: string | undefined;
|
|
438
552
|
startDate?: Date | null | undefined;
|
|
439
553
|
endDate?: Date | null | undefined;
|
|
554
|
+
title?: string | undefined;
|
|
440
555
|
subTitle?: string | undefined;
|
|
441
556
|
discountOptions?: number[] | undefined;
|
|
442
557
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -445,6 +560,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
445
560
|
joinedAt: Date;
|
|
446
561
|
isEntireMenu: boolean;
|
|
447
562
|
isOrderCapacityEnabled: boolean;
|
|
563
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
564
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
448
565
|
discountPercentage?: number | undefined;
|
|
449
566
|
maxDiscountCap?: number | undefined;
|
|
450
567
|
maxOrderCapacity?: number | undefined;
|
|
@@ -460,9 +577,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
460
577
|
campaignState: LtoCardState;
|
|
461
578
|
campaign?: {
|
|
462
579
|
_id: string | import("mongoose").Types.ObjectId;
|
|
463
|
-
title?: string | undefined;
|
|
464
580
|
startDate?: Date | null | undefined;
|
|
465
581
|
endDate?: Date | null | undefined;
|
|
582
|
+
title?: string | undefined;
|
|
466
583
|
subTitle?: string | undefined;
|
|
467
584
|
discountOptions?: number[] | undefined;
|
|
468
585
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -471,6 +588,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
471
588
|
joinedAt: Date;
|
|
472
589
|
isEntireMenu: boolean;
|
|
473
590
|
isOrderCapacityEnabled: boolean;
|
|
591
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
592
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
474
593
|
discountPercentage?: number | undefined;
|
|
475
594
|
maxDiscountCap?: number | undefined;
|
|
476
595
|
maxOrderCapacity?: number | undefined;
|
|
@@ -479,9 +598,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
479
598
|
campaignState: LtoCardState;
|
|
480
599
|
campaign?: {
|
|
481
600
|
_id: string | import("mongoose").Types.ObjectId;
|
|
482
|
-
title?: string | undefined;
|
|
483
601
|
startDate?: Date | null | undefined;
|
|
484
602
|
endDate?: Date | null | undefined;
|
|
603
|
+
title?: string | undefined;
|
|
485
604
|
subTitle?: string | undefined;
|
|
486
605
|
discountOptions?: number[] | undefined;
|
|
487
606
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -490,6 +609,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
490
609
|
joinedAt: Date;
|
|
491
610
|
isEntireMenu: boolean;
|
|
492
611
|
isOrderCapacityEnabled: boolean;
|
|
612
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
613
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
493
614
|
discountPercentage?: number | undefined;
|
|
494
615
|
maxDiscountCap?: number | undefined;
|
|
495
616
|
maxOrderCapacity?: number | undefined;
|
|
@@ -502,9 +623,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
502
623
|
campaignState: LtoCardState;
|
|
503
624
|
campaign?: {
|
|
504
625
|
_id: string | import("mongoose").Types.ObjectId;
|
|
505
|
-
title?: string | undefined;
|
|
506
626
|
startDate?: Date | null | undefined;
|
|
507
627
|
endDate?: Date | null | undefined;
|
|
628
|
+
title?: string | undefined;
|
|
508
629
|
subTitle?: string | undefined;
|
|
509
630
|
discountOptions?: number[] | undefined;
|
|
510
631
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -513,6 +634,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
513
634
|
joinedAt: Date;
|
|
514
635
|
isEntireMenu: boolean;
|
|
515
636
|
isOrderCapacityEnabled: boolean;
|
|
637
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
638
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
516
639
|
discountPercentage?: number | undefined;
|
|
517
640
|
maxDiscountCap?: number | undefined;
|
|
518
641
|
maxOrderCapacity?: number | undefined;
|
|
@@ -522,9 +645,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
522
645
|
campaignState: LtoCardState;
|
|
523
646
|
campaign?: {
|
|
524
647
|
_id: string | import("mongoose").Types.ObjectId;
|
|
525
|
-
title?: string | undefined;
|
|
526
648
|
startDate?: Date | null | undefined;
|
|
527
649
|
endDate?: Date | null | undefined;
|
|
650
|
+
title?: string | undefined;
|
|
528
651
|
subTitle?: string | undefined;
|
|
529
652
|
discountOptions?: number[] | undefined;
|
|
530
653
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -533,6 +656,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
533
656
|
joinedAt: Date;
|
|
534
657
|
isEntireMenu: boolean;
|
|
535
658
|
isOrderCapacityEnabled: boolean;
|
|
659
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
660
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
536
661
|
discountPercentage?: number | undefined;
|
|
537
662
|
maxDiscountCap?: number | undefined;
|
|
538
663
|
maxOrderCapacity?: number | undefined;
|
|
@@ -552,9 +677,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
552
677
|
campaignState: LtoCardState;
|
|
553
678
|
campaign?: {
|
|
554
679
|
_id: string | import("mongoose").Types.ObjectId;
|
|
555
|
-
title?: string | undefined;
|
|
556
680
|
startDate?: Date | null | undefined;
|
|
557
681
|
endDate?: Date | null | undefined;
|
|
682
|
+
title?: string | undefined;
|
|
558
683
|
subTitle?: string | undefined;
|
|
559
684
|
discountOptions?: number[] | undefined;
|
|
560
685
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -563,6 +688,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
563
688
|
joinedAt: Date;
|
|
564
689
|
isEntireMenu: boolean;
|
|
565
690
|
isOrderCapacityEnabled: boolean;
|
|
691
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
692
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
566
693
|
discountPercentage?: number | undefined;
|
|
567
694
|
maxDiscountCap?: number | undefined;
|
|
568
695
|
maxOrderCapacity?: number | undefined;
|
|
@@ -572,9 +699,9 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
572
699
|
campaignState: LtoCardState;
|
|
573
700
|
campaign?: {
|
|
574
701
|
_id: string | import("mongoose").Types.ObjectId;
|
|
575
|
-
title?: string | undefined;
|
|
576
702
|
startDate?: Date | null | undefined;
|
|
577
703
|
endDate?: Date | null | undefined;
|
|
704
|
+
title?: string | undefined;
|
|
578
705
|
subTitle?: string | undefined;
|
|
579
706
|
discountOptions?: number[] | undefined;
|
|
580
707
|
maxDiscountCaps?: number[] | undefined;
|
|
@@ -583,6 +710,8 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
583
710
|
joinedAt: Date;
|
|
584
711
|
isEntireMenu: boolean;
|
|
585
712
|
isOrderCapacityEnabled: boolean;
|
|
713
|
+
productIds?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
714
|
+
marketingId?: string | import("mongoose").Types.ObjectId | undefined;
|
|
586
715
|
discountPercentage?: number | undefined;
|
|
587
716
|
maxDiscountCap?: number | undefined;
|
|
588
717
|
maxOrderCapacity?: number | undefined;
|
|
@@ -597,7 +726,12 @@ export declare const ParticipantStatusResponseSchema: z.ZodObject<{
|
|
|
597
726
|
} | undefined;
|
|
598
727
|
}>;
|
|
599
728
|
export type JoinLtoCampaignDTO = DTO<typeof JoinLtoCampaignSchema>;
|
|
600
|
-
export type
|
|
729
|
+
export type ParticipantDTO = DTO<typeof ParticipantSchema>;
|
|
730
|
+
export type CampaignSummaryDTO = DTO<typeof CampaignSummarySchema>;
|
|
731
|
+
export type ParticipantSummaryDTO = DTO<typeof ParticipantSummarySchema>;
|
|
601
732
|
export type ParticipantStatusDTO = DTO<typeof ParticipantStatusSchema>;
|
|
602
|
-
export
|
|
733
|
+
export type ActiveParticipantMarketingDTO = Pick<ParticipantSummaryDTO, 'marketingId'>;
|
|
734
|
+
export type UpdateParticipantDataDTO = JoinLtoCampaignDTO & {
|
|
735
|
+
marketing: ParticipantSummaryDTO['marketingId'];
|
|
736
|
+
};
|
|
603
737
|
//# sourceMappingURL=limited-time-offer-participant.validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-participant.validation.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAuB,GAAG,EAAgB,MAAM,yCAAyC,CAAC;AAEjG,oBAAY,YAAY;IACpB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;CACpB;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B5B,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer-participant.validation.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EAAuB,GAAG,EAAgB,MAAM,yCAAyC,CAAC;AAEjG,oBAAY,YAAY;IACpB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,MAAM,WAAW;CACpB;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B5B,CAAC;AAEP,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe5B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;EAQhC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;EASnC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIlC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA0C,CAAC;AACjF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgD,CAAC;AAE7F,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACnE,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACzE,MAAM,MAAM,oBAAoB,GAAG,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACvE,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,qBAAqB,EAAE,aAAa,CAAC,CAAC;AACvF,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG;IAAC,SAAS,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAA;CAAC,CAAC"}
|
package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParticipantStatusResponseSchema = exports.ParticipantResponseSchema = exports.JoinLtoCampaignSchema = exports.LtoCardState = void 0;
|
|
3
|
+
exports.ParticipantStatusResponseSchema = exports.ParticipantResponseSchema = exports.ParticipantStatusSchema = exports.ParticipantSummarySchema = exports.CampaignSummarySchema = exports.ParticipantSchema = exports.JoinLtoCampaignSchema = exports.LtoCardState = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const validation_1 = require("@lyxa.ai/core/dist/utilities/validation");
|
|
6
6
|
var LtoCardState;
|
|
@@ -42,7 +42,7 @@ exports.JoinLtoCampaignSchema = zod_1.z
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
exports.ParticipantSchema = zod_1.z.object({
|
|
46
46
|
_id: validation_1.ZodValidation.objectId(),
|
|
47
47
|
campaign: validation_1.ZodValidation.objectId(),
|
|
48
48
|
shop: validation_1.ZodValidation.objectId(),
|
|
@@ -58,7 +58,7 @@ const ParticipantSchema = zod_1.z.object({
|
|
|
58
58
|
createdAt: zod_1.z.date().nullable().optional(),
|
|
59
59
|
updatedAt: zod_1.z.date().nullable().optional(),
|
|
60
60
|
});
|
|
61
|
-
|
|
61
|
+
exports.CampaignSummarySchema = zod_1.z.object({
|
|
62
62
|
_id: validation_1.ZodValidation.objectId(),
|
|
63
63
|
title: validation_1.ZodValidation.string('Title').optional(),
|
|
64
64
|
subTitle: validation_1.ZodValidation.string('Subtitle').optional(),
|
|
@@ -67,19 +67,21 @@ const CampaignSummarySchema = zod_1.z.object({
|
|
|
67
67
|
discountOptions: zod_1.z.array(validation_1.ZodValidation.number('Discount option')).default([]),
|
|
68
68
|
maxDiscountCaps: zod_1.z.array(validation_1.ZodValidation.number('Max discount cap')).default([]),
|
|
69
69
|
});
|
|
70
|
-
|
|
70
|
+
exports.ParticipantSummarySchema = zod_1.z.object({
|
|
71
71
|
discountPercentage: validation_1.ZodValidation.number('Discount percentage').optional(),
|
|
72
72
|
maxDiscountCap: validation_1.ZodValidation.number('Max discount cap').optional(),
|
|
73
73
|
joinedAt: zod_1.z.date(),
|
|
74
74
|
isEntireMenu: zod_1.z.boolean(),
|
|
75
75
|
isOrderCapacityEnabled: zod_1.z.boolean(),
|
|
76
76
|
maxOrderCapacity: validation_1.ZodValidation.number('Max order capacity').optional(),
|
|
77
|
+
productIds: zod_1.z.array(validation_1.ZodValidation.objectId()).default([]),
|
|
78
|
+
marketingId: validation_1.ZodValidation.objectId().optional(),
|
|
77
79
|
});
|
|
78
|
-
|
|
80
|
+
exports.ParticipantStatusSchema = zod_1.z.object({
|
|
79
81
|
campaignState: zod_1.z.nativeEnum(LtoCardState),
|
|
80
|
-
campaign: CampaignSummarySchema.optional(),
|
|
81
|
-
participant: ParticipantSummarySchema.optional(),
|
|
82
|
+
campaign: exports.CampaignSummarySchema.optional(),
|
|
83
|
+
participant: exports.ParticipantSummarySchema.optional(),
|
|
82
84
|
});
|
|
83
|
-
exports.ParticipantResponseSchema = (0, validation_1.createResponseSchema)(ParticipantSchema);
|
|
84
|
-
exports.ParticipantStatusResponseSchema = (0, validation_1.createResponseSchema)(ParticipantStatusSchema);
|
|
85
|
+
exports.ParticipantResponseSchema = (0, validation_1.createResponseSchema)(exports.ParticipantSchema);
|
|
86
|
+
exports.ParticipantStatusResponseSchema = (0, validation_1.createResponseSchema)(exports.ParticipantStatusSchema);
|
|
85
87
|
//# sourceMappingURL=limited-time-offer-participant.validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-participant.validation.js","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,wEAAiG;AAEjG,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,6BAAa,CAAA;IACb,uCAAuB,CAAA;IACvB,6BAAa,CAAA;IACb,iCAAiB,CAAA;AACrB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAEY,QAAA,qBAAqB,GAAG,OAAC;KACjC,MAAM,CAAC;IACJ,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE;IACzB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,0BAAa,CAAC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvD,kBAAkB,EAAE,0BAAa,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAC/D,cAAc,EAAE,0BAAa,CAAC,MAAM,CAAC,kBAAkB,CAAC;IACxD,sBAAsB,EAAE,OAAC,CAAC,OAAO,EAAE;IACnC,gBAAgB,EAAE,0BAAa,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE;CAC1E,CAAC;KACD,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;IACpB,IAAI,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,QAAQ,CAAC;YACT,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,uCAAuC;YAChD,IAAI,EAAE,CAAC,UAAU,CAAC;SACrB,CAAC,CAAC;IACP,CAAC;IACD,IAAI,CAAC,CAAC,sBAAsB,IAAI,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC;QAClD,GAAG,CAAC,QAAQ,CAAC;YACT,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,yDAAyD;YAClE,IAAI,EAAE,CAAC,kBAAkB,CAAC;SAC7B,CAAC,CAAC;IACP,CAAC;IACD,IAAI,CAAC,CAAC,sBAAsB,IAAI,CAAC,CAAC,gBAAgB,KAAK,SAAS,IAAI,CAAC,CAAC,gBAAgB,IAAI,CAAC,EAAE,CAAC;QAC1F,GAAG,CAAC,QAAQ,CAAC;YACT,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,2CAA2C;YACpD,IAAI,EAAE,CAAC,kBAAkB,CAAC;SAC7B,CAAC,CAAC;IACP,CAAC;AACL,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer-participant.validation.js","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.validation.ts"],"names":[],"mappings":"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","sourcesContent":["import {z} from 'zod';\nimport {createResponseSchema, DTO, ZodValidation} from '@lyxa.ai/core/dist/utilities/validation';\n\nexport enum LtoCardState {\n NONE = 'NONE',\n SCHEDULED = 'SCHEDULED',\n LIVE = 'LIVE',\n JOINED = 'JOINED',\n}\n\nexport const JoinLtoCampaignSchema = z\n .object({\n isEntireMenu: z.boolean(),\n products: z.array(ZodValidation.objectId()).default([]),\n discountPercentage: ZodValidation.number('Discount percentage'),\n maxDiscountCap: ZodValidation.number('Max discount cap'),\n isOrderCapacityEnabled: z.boolean(),\n maxOrderCapacity: ZodValidation.number('Max order capacity').optional(),\n })\n .superRefine((d, ctx) => {\n if (!d.isEntireMenu && d.products.length === 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'At least one product must be selected',\n path: ['products']\n });\n }\n if (d.isOrderCapacityEnabled && !d.maxOrderCapacity) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Max order capacity is required when capacity is enabled',\n path: ['maxOrderCapacity']\n });\n }\n if (d.isOrderCapacityEnabled && d.maxOrderCapacity !== undefined && d.maxOrderCapacity <= 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Max order capacity must be greater than 0',\n path: ['maxOrderCapacity']\n });\n }\n });\n\nexport const ParticipantSchema = z.object({\n _id: ZodValidation.objectId(),\n campaign: ZodValidation.objectId(),\n shop: ZodValidation.objectId(),\n joinedAt: z.date(),\n products: z.array(ZodValidation.objectId()).default([]),\n isEntireMenu: z.boolean(),\n discountPercentage: ZodValidation.number('Discount percentage').optional(),\n maxDiscountCap: ZodValidation.number('Max discount cap').optional(),\n isOrderCapacityEnabled: z.boolean(),\n maxOrderCapacity: ZodValidation.number('Max order capacity').optional(),\n isWithdrawn: z.boolean(),\n withdrawnAt: z.date().nullable().optional(),\n createdAt: z.date().nullable().optional(),\n updatedAt: z.date().nullable().optional(),\n});\n\nexport const CampaignSummarySchema = z.object({\n _id: ZodValidation.objectId(),\n title: ZodValidation.string('Title').optional(),\n subTitle: ZodValidation.string('Subtitle').optional(),\n startDate: z.date().nullable().optional(),\n endDate: z.date().nullable().optional(),\n discountOptions: z.array(ZodValidation.number('Discount option')).default([]),\n maxDiscountCaps: z.array(ZodValidation.number('Max discount cap')).default([]),\n});\n\nexport const ParticipantSummarySchema = z.object({\n discountPercentage: ZodValidation.number('Discount percentage').optional(),\n maxDiscountCap: ZodValidation.number('Max discount cap').optional(),\n joinedAt: z.date(),\n isEntireMenu: z.boolean(),\n isOrderCapacityEnabled: z.boolean(),\n maxOrderCapacity: ZodValidation.number('Max order capacity').optional(),\n productIds: z.array(ZodValidation.objectId()).default([]),\n marketingId: ZodValidation.objectId().optional(),\n});\n\nexport const ParticipantStatusSchema = z.object({\n campaignState: z.nativeEnum(LtoCardState),\n campaign: CampaignSummarySchema.optional(),\n participant: ParticipantSummarySchema.optional(),\n});\n\nexport const ParticipantResponseSchema = createResponseSchema(ParticipantSchema);\nexport const ParticipantStatusResponseSchema = createResponseSchema(ParticipantStatusSchema);\n\nexport type JoinLtoCampaignDTO = DTO<typeof JoinLtoCampaignSchema>;\nexport type ParticipantDTO = DTO<typeof ParticipantSchema>;\nexport type CampaignSummaryDTO = DTO<typeof CampaignSummarySchema>;\nexport type ParticipantSummaryDTO = DTO<typeof ParticipantSummarySchema>;\nexport type ParticipantStatusDTO = DTO<typeof ParticipantStatusSchema>;\nexport type ActiveParticipantMarketingDTO = Pick<ParticipantSummaryDTO, 'marketingId'>;\nexport type UpdateParticipantDataDTO = JoinLtoCampaignDTO & {marketing: ParticipantSummaryDTO['marketingId']};\n"]}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { mongoose } from '@typegoose/typegoose';
|
|
2
|
-
import { JoinLtoCampaignDTO } from '../limited-time-offer-participant.validation';
|
|
3
2
|
import { LimitedTimeOfferCampaign } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
import { JoinLtoCampaignDTO } from '../limited-time-offer-participant.validation';
|
|
4
4
|
export declare class LtoParticipantMarketingService {
|
|
5
|
+
private repository;
|
|
6
|
+
constructor();
|
|
5
7
|
applyMarketing(shopId: mongoose.Types.ObjectId, campaign: LimitedTimeOfferCampaign & {
|
|
6
8
|
_id: mongoose.Types.ObjectId;
|
|
7
9
|
}, dto: JoinLtoCampaignDTO): Promise<mongoose.Types.ObjectId>;
|
|
8
10
|
removeMarketing(marketingId: mongoose.Types.ObjectId): Promise<void>;
|
|
11
|
+
replaceMarketing(oldMarketingId: mongoose.Types.ObjectId, shopId: mongoose.Types.ObjectId, campaign: LimitedTimeOfferCampaign & {
|
|
12
|
+
_id: mongoose.Types.ObjectId;
|
|
13
|
+
}, dto: JoinLtoCampaignDTO): Promise<mongoose.Types.ObjectId>;
|
|
9
14
|
removeAllCampaignMarketings(campaignId: mongoose.Types.ObjectId): Promise<void>;
|
|
10
15
|
}
|
|
11
16
|
export declare const ltoParticipantMarketingService: LtoParticipantMarketingService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-participant-marketing.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer-participant-marketing.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAC,wBAAwB,EAAC,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAC,kBAAkB,EAAC,MAAM,8CAA8C,CAAC;AAIhF,qBACa,8BAA8B;IACvC,OAAO,CAAC,UAAU,CAA2B;;IAMhC,cAAc,CACvB,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,QAAQ,EAAE,wBAAwB,GAAG;QAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAA;KAAC,EACnE,GAAG,EAAE,kBAAkB,GACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAOtB,eAAe,CAAC,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIpE,gBAAgB,CACzB,cAAc,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACvC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,QAAQ,EAAE,wBAAwB,GAAG;QAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAA;KAAC,EACnE,GAAG,EAAE,kBAAkB,GACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAKtB,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAI/F;AAED,eAAO,MAAM,8BAA8B,gCAAgD,CAAC"}
|