@lyxa.ai/marketing 1.0.29 → 1.0.31
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 +2 -0
- package/dist/lib/event/event-initializations.d.ts.map +1 -0
- package/dist/lib/event/event-initializations.js +8 -0
- package/dist/lib/event/event-initializations.js.map +1 -0
- package/dist/lib/event/event-listeners/event-listeners.d.ts +2 -0
- package/dist/lib/event/event-listeners/event-listeners.d.ts.map +1 -0
- package/dist/lib/event/event-listeners/event-listeners.js +12 -0
- package/dist/lib/event/event-listeners/event-listeners.js.map +1 -0
- package/dist/lib/index.d.ts +734 -78
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +17 -17
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +710 -75
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +4 -0
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts +2 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.js +42 -18
- package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/global-coupon.service.js +2 -1
- package/dist/lib/modules/coupon/services/global-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/helper.service.js +1 -1
- package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.js +4 -1
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/individual-user-coupon.service.js +1 -0
- package/dist/lib/modules/coupon/services/individual-user-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts +1 -0
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +123 -5
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.js +2 -0
- package/dist/lib/modules/coupon/services/referral-code-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +4 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js +4 -1
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts +153 -153
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +33 -12
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +12 -5
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/custom-coupon.validation.d.ts +8 -8
- package/dist/lib/modules/coupon/validations/global-coupon.validation.d.ts +8 -8
- package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.d.ts +10 -10
- package/dist/lib/modules/coupon/validations/individual-user-coupon.validation.d.ts +8 -8
- package/dist/lib/modules/coupon/validations/referral-reward-coupon.validation.d.ts +9 -9
- package/dist/lib/modules/coupon/validations/shops-categories-coupon.validation.d.ts +8 -8
- package/dist/lib/modules/deal-setting/validations/deal-setting.validation.d.ts +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts +21 -0
- package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/lib/modules/marketing/routers/marketing.router.js +19 -8
- package/dist/lib/modules/marketing/routers/marketing.router.js.map +1 -1
- package/dist/lib/modules/marketing/services/buy1-get1-marketing.service.d.ts +2 -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 +45 -102
- 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 +2 -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 +54 -163
- package/dist/lib/modules/marketing/services/discount-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/featured-marketing.service.d.ts +2 -0
- package/dist/lib/modules/marketing/services/featured-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/featured-marketing.service.js +30 -2
- package/dist/lib/modules/marketing/services/featured-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/free-delivery-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/free-delivery-marketing.service.js +6 -1
- package/dist/lib/modules/marketing/services/free-delivery-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/index.d.ts +1 -0
- package/dist/lib/modules/marketing/services/index.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/index.js +1 -0
- package/dist/lib/modules/marketing/services/index.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +6 -0
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +230 -8
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts +1 -0
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.js +21 -3
- package/dist/lib/modules/marketing/services/product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/punch-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/punch-marketing.service.js +6 -1
- package/dist/lib/modules/marketing/services/punch-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts +14 -0
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -0
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +209 -0
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -0
- package/dist/lib/modules/marketing/transformers/buy1-get1-marketing.transformer.d.ts +2 -2
- package/dist/lib/modules/marketing/transformers/discount-marketing.transformer.d.ts +2 -2
- package/dist/lib/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +58 -58
- package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +68 -68
- package/dist/lib/modules/marketing/validations/featured-marketing.validation.d.ts +21 -21
- package/dist/lib/modules/marketing/validations/free-delivery-marketing.validation.d.ts +18 -18
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +14 -7
- package/dist/lib/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.js +4 -1
- package/dist/lib/modules/marketing/validations/marketing.validation.js.map +1 -1
- package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +4 -4
- package/dist/lib/modules/marketing/validations/punch-marketing.validation.d.ts +22 -22
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +3 -3
- package/dist/lib/modules/punch-marketing-history/services/punch-marketing-history.service.js +2 -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 +6 -6
- package/dist/types/event/event-initializations.d.ts +2 -0
- package/dist/types/event/event-initializations.d.ts.map +1 -0
- package/dist/types/event/event-listeners/event-listeners.d.ts +2 -0
- package/dist/types/event/event-listeners/event-listeners.d.ts.map +1 -0
- package/dist/types/index.d.ts +734 -78
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +710 -75
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +2 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/global-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts +1 -0
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +153 -153
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +33 -12
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/custom-coupon.validation.d.ts +8 -8
- package/dist/types/modules/coupon/validations/global-coupon.validation.d.ts +8 -8
- package/dist/types/modules/coupon/validations/individual-store-coupon.validation.d.ts +10 -10
- package/dist/types/modules/coupon/validations/individual-user-coupon.validation.d.ts +8 -8
- package/dist/types/modules/coupon/validations/referral-reward-coupon.validation.d.ts +9 -9
- package/dist/types/modules/coupon/validations/shops-categories-coupon.validation.d.ts +8 -8
- package/dist/types/modules/deal-setting/validations/deal-setting.validation.d.ts +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +21 -0
- 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 +2 -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 +2 -1
- package/dist/types/modules/marketing/services/discount-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/featured-marketing.service.d.ts +2 -0
- package/dist/types/modules/marketing/services/featured-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/free-delivery-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/index.d.ts +1 -0
- package/dist/types/modules/marketing/services/index.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +6 -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 +1 -0
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/punch-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts +14 -0
- package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -0
- package/dist/types/modules/marketing/transformers/buy1-get1-marketing.transformer.d.ts +2 -2
- package/dist/types/modules/marketing/transformers/discount-marketing.transformer.d.ts +2 -2
- package/dist/types/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +58 -58
- package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +68 -68
- package/dist/types/modules/marketing/validations/featured-marketing.validation.d.ts +21 -21
- package/dist/types/modules/marketing/validations/free-delivery-marketing.validation.d.ts +18 -18
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts +14 -7
- package/dist/types/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +4 -4
- package/dist/types/modules/marketing/validations/punch-marketing.validation.d.ts +22 -22
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +3 -3
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +6 -6
- package/package.json +2 -2
|
@@ -18,21 +18,21 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
18
18
|
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
19
19
|
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
20
20
|
input: {
|
|
21
|
-
value: number;
|
|
22
21
|
code: string;
|
|
22
|
+
value: number;
|
|
23
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
23
24
|
duration: {
|
|
24
25
|
start: string | Date;
|
|
25
26
|
end?: string | Date | undefined;
|
|
26
27
|
};
|
|
27
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
28
28
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.GLOBAL;
|
|
29
29
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
30
|
-
spendLimit?: number | null | undefined;
|
|
31
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
32
30
|
secondaryCurrencyValue?: number | undefined;
|
|
33
31
|
maxDiscountLimit?: number | null | undefined;
|
|
34
32
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
35
33
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
34
|
+
spendLimit?: number | null | undefined;
|
|
35
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
36
36
|
totalOrderLimit?: number | null | undefined;
|
|
37
37
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
38
38
|
minOrderValue?: number | null | undefined;
|
|
@@ -56,24 +56,24 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
56
56
|
createdBy?: string | mongoose.Types.ObjectId | undefined;
|
|
57
57
|
isExpired?: boolean | undefined;
|
|
58
58
|
} | {
|
|
59
|
-
value: number;
|
|
60
59
|
code: string;
|
|
60
|
+
value: number;
|
|
61
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
61
62
|
duration: {
|
|
62
63
|
start: string | Date;
|
|
63
64
|
end?: string | Date | undefined;
|
|
64
65
|
};
|
|
65
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
66
66
|
user: string | mongoose.Types.ObjectId;
|
|
67
67
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.REFERRAL_REWARD;
|
|
68
68
|
referralCodeUsedBy: string | mongoose.Types.ObjectId;
|
|
69
69
|
referralCodeUsedOnOrder: string | mongoose.Types.ObjectId;
|
|
70
70
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
71
|
-
spendLimit?: number | null | undefined;
|
|
72
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
73
71
|
secondaryCurrencyValue?: number | undefined;
|
|
74
72
|
maxDiscountLimit?: number | null | undefined;
|
|
75
73
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
76
74
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
75
|
+
spendLimit?: number | null | undefined;
|
|
76
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
77
77
|
totalOrderLimit?: number | null | undefined;
|
|
78
78
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
79
79
|
minOrderValue?: number | null | undefined;
|
|
@@ -89,21 +89,21 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
89
89
|
createdBy?: string | mongoose.Types.ObjectId | undefined;
|
|
90
90
|
isExpired?: boolean | undefined;
|
|
91
91
|
} | {
|
|
92
|
-
value: number;
|
|
93
92
|
code: string;
|
|
93
|
+
value: number;
|
|
94
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
94
95
|
duration: {
|
|
95
96
|
start: string | Date;
|
|
96
97
|
end?: string | Date | undefined;
|
|
97
98
|
};
|
|
98
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
99
99
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.SHOPS_CATEGORIES;
|
|
100
100
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
101
|
-
spendLimit?: number | null | undefined;
|
|
102
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
103
101
|
secondaryCurrencyValue?: number | undefined;
|
|
104
102
|
maxDiscountLimit?: number | null | undefined;
|
|
105
103
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
106
104
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
105
|
+
spendLimit?: number | null | undefined;
|
|
106
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
107
107
|
totalOrderLimit?: number | null | undefined;
|
|
108
108
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
109
109
|
minOrderValue?: number | null | undefined;
|
|
@@ -123,22 +123,22 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
123
123
|
isShopCoverExpenses?: boolean | undefined;
|
|
124
124
|
firstOrderOnly?: boolean | undefined;
|
|
125
125
|
} | {
|
|
126
|
-
shop: string | mongoose.Types.ObjectId;
|
|
127
|
-
value: number;
|
|
128
126
|
code: string;
|
|
127
|
+
value: number;
|
|
128
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
129
129
|
duration: {
|
|
130
130
|
start: string | Date;
|
|
131
131
|
end?: string | Date | undefined;
|
|
132
132
|
};
|
|
133
|
-
|
|
133
|
+
shop: string | mongoose.Types.ObjectId;
|
|
134
134
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_STORE;
|
|
135
135
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
136
|
-
spendLimit?: number | null | undefined;
|
|
137
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
138
136
|
secondaryCurrencyValue?: number | undefined;
|
|
139
137
|
maxDiscountLimit?: number | null | undefined;
|
|
140
138
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
141
139
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
140
|
+
spendLimit?: number | null | undefined;
|
|
141
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
142
142
|
totalOrderLimit?: number | null | undefined;
|
|
143
143
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
144
144
|
minOrderValue?: number | null | undefined;
|
|
@@ -156,22 +156,22 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
156
156
|
isShopCoverExpenses?: boolean | undefined;
|
|
157
157
|
firstOrderOnly?: boolean | undefined;
|
|
158
158
|
} | {
|
|
159
|
-
value: number;
|
|
160
159
|
code: string;
|
|
160
|
+
value: number;
|
|
161
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
161
162
|
duration: {
|
|
162
163
|
start: string | Date;
|
|
163
164
|
end?: string | Date | undefined;
|
|
164
165
|
};
|
|
165
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
166
166
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_USER;
|
|
167
167
|
users: [string | mongoose.Types.ObjectId, ...(string | mongoose.Types.ObjectId)[]];
|
|
168
168
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
169
|
-
spendLimit?: number | null | undefined;
|
|
170
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
171
169
|
secondaryCurrencyValue?: number | undefined;
|
|
172
170
|
maxDiscountLimit?: number | null | undefined;
|
|
173
171
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
174
172
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
173
|
+
spendLimit?: number | null | undefined;
|
|
174
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
175
175
|
totalOrderLimit?: number | null | undefined;
|
|
176
176
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
177
177
|
minOrderValue?: number | null | undefined;
|
|
@@ -189,22 +189,22 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
189
189
|
itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
|
|
190
190
|
shops?: (string | mongoose.Types.ObjectId)[] | undefined;
|
|
191
191
|
} | {
|
|
192
|
-
value: number;
|
|
193
192
|
code: string;
|
|
193
|
+
value: number;
|
|
194
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
194
195
|
duration: {
|
|
195
196
|
start: string | Date;
|
|
196
197
|
end?: string | Date | undefined;
|
|
197
198
|
};
|
|
198
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
199
199
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.CUSTOM_COUPON;
|
|
200
200
|
influencer: string | mongoose.Types.ObjectId;
|
|
201
201
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
202
|
-
spendLimit?: number | null | undefined;
|
|
203
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
204
202
|
secondaryCurrencyValue?: number | undefined;
|
|
205
203
|
maxDiscountLimit?: number | null | undefined;
|
|
206
204
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
207
205
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
206
|
+
spendLimit?: number | null | undefined;
|
|
207
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
208
208
|
totalOrderLimit?: number | null | undefined;
|
|
209
209
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
210
210
|
minOrderValue?: number | null | undefined;
|
|
@@ -215,13 +215,644 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
215
215
|
referringUser?: {
|
|
216
216
|
name?: string | undefined;
|
|
217
217
|
} | undefined;
|
|
218
|
-
orderLimitPerUser?: number | null | undefined;
|
|
219
|
-
isOrderLimitPerUserEnabled?: boolean | undefined;
|
|
220
|
-
createdBy?: string | mongoose.Types.ObjectId | undefined;
|
|
221
|
-
isExpired?: boolean | undefined;
|
|
222
|
-
itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
|
|
223
|
-
shops?: (string | mongoose.Types.ObjectId)[] | undefined;
|
|
218
|
+
orderLimitPerUser?: number | null | undefined;
|
|
219
|
+
isOrderLimitPerUserEnabled?: boolean | undefined;
|
|
220
|
+
createdBy?: string | mongoose.Types.ObjectId | undefined;
|
|
221
|
+
isExpired?: boolean | undefined;
|
|
222
|
+
itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
|
|
223
|
+
shops?: (string | mongoose.Types.ObjectId)[] | undefined;
|
|
224
|
+
};
|
|
225
|
+
output: {
|
|
226
|
+
message: string;
|
|
227
|
+
success: boolean;
|
|
228
|
+
data?: z.objectInputType<{
|
|
229
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.GLOBAL>>;
|
|
230
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
231
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
233
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
234
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
235
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
236
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
237
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
238
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
start: Date;
|
|
241
|
+
end?: Date | undefined;
|
|
242
|
+
}, {
|
|
243
|
+
start: string | Date;
|
|
244
|
+
end?: string | Date | undefined;
|
|
245
|
+
}>, {
|
|
246
|
+
start: Date;
|
|
247
|
+
end?: Date | undefined;
|
|
248
|
+
}, {
|
|
249
|
+
start: string | Date;
|
|
250
|
+
end?: string | Date | undefined;
|
|
251
|
+
}>>;
|
|
252
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
253
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
254
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
255
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
256
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
257
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
258
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
259
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
260
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
261
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
262
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
263
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
name?: string | undefined;
|
|
266
|
+
}, {
|
|
267
|
+
name?: string | undefined;
|
|
268
|
+
}>>>;
|
|
269
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
270
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
271
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
272
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
273
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
274
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
275
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
276
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.REFERRAL_CODE>>;
|
|
277
|
+
orderLimitPerUser: z.ZodOptional<z.ZodLiteral<1>>;
|
|
278
|
+
referralUser: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
279
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
280
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
281
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
282
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
283
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
284
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
285
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.REFERRAL_REWARD>>;
|
|
286
|
+
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
287
|
+
referralCodeUsedBy: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
288
|
+
referralCodeUsedOnOrder: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
289
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
290
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
292
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
293
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
294
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
295
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
296
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
297
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
298
|
+
}, "strip", z.ZodTypeAny, {
|
|
299
|
+
start: Date;
|
|
300
|
+
end?: Date | undefined;
|
|
301
|
+
}, {
|
|
302
|
+
start: string | Date;
|
|
303
|
+
end?: string | Date | undefined;
|
|
304
|
+
}>, {
|
|
305
|
+
start: Date;
|
|
306
|
+
end?: Date | undefined;
|
|
307
|
+
}, {
|
|
308
|
+
start: string | Date;
|
|
309
|
+
end?: string | Date | undefined;
|
|
310
|
+
}>>;
|
|
311
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
312
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
313
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
314
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
315
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
316
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
317
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
318
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
319
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
320
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
321
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
322
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
323
|
+
}, "strip", z.ZodTypeAny, {
|
|
324
|
+
name?: string | undefined;
|
|
325
|
+
}, {
|
|
326
|
+
name?: string | undefined;
|
|
327
|
+
}>>>;
|
|
328
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
329
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
330
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
331
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
332
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
333
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
334
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
335
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.SHOPS_CATEGORIES>>;
|
|
336
|
+
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
|
|
337
|
+
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
|
|
338
|
+
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
339
|
+
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
340
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
341
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
342
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
343
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
344
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
345
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
346
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
347
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
348
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
349
|
+
}, "strip", z.ZodTypeAny, {
|
|
350
|
+
start: Date;
|
|
351
|
+
end?: Date | undefined;
|
|
352
|
+
}, {
|
|
353
|
+
start: string | Date;
|
|
354
|
+
end?: string | Date | undefined;
|
|
355
|
+
}>, {
|
|
356
|
+
start: Date;
|
|
357
|
+
end?: Date | undefined;
|
|
358
|
+
}, {
|
|
359
|
+
start: string | Date;
|
|
360
|
+
end?: string | Date | undefined;
|
|
361
|
+
}>>;
|
|
362
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
363
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
364
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
365
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
366
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
367
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
368
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
369
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
370
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
371
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
372
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
373
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
374
|
+
}, "strip", z.ZodTypeAny, {
|
|
375
|
+
name?: string | undefined;
|
|
376
|
+
}, {
|
|
377
|
+
name?: string | undefined;
|
|
378
|
+
}>>>;
|
|
379
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
380
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
381
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
382
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
383
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
384
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
385
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
386
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_STORE>>;
|
|
387
|
+
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
388
|
+
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
389
|
+
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
390
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
391
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
393
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
394
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
395
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
396
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
397
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
398
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
399
|
+
}, "strip", z.ZodTypeAny, {
|
|
400
|
+
start: Date;
|
|
401
|
+
end?: Date | undefined;
|
|
402
|
+
}, {
|
|
403
|
+
start: string | Date;
|
|
404
|
+
end?: string | Date | undefined;
|
|
405
|
+
}>, {
|
|
406
|
+
start: Date;
|
|
407
|
+
end?: Date | undefined;
|
|
408
|
+
}, {
|
|
409
|
+
start: string | Date;
|
|
410
|
+
end?: string | Date | undefined;
|
|
411
|
+
}>>;
|
|
412
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
413
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
414
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
415
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
416
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
417
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
418
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
419
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
420
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
421
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
422
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
423
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
424
|
+
}, "strip", z.ZodTypeAny, {
|
|
425
|
+
name?: string | undefined;
|
|
426
|
+
}, {
|
|
427
|
+
name?: string | undefined;
|
|
428
|
+
}>>>;
|
|
429
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
430
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
431
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
432
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
433
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
434
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
435
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
436
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_USER>>;
|
|
437
|
+
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "atleastone">>;
|
|
438
|
+
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
|
|
439
|
+
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
|
|
440
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
441
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
442
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
443
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
444
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
445
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
446
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
447
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
448
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
449
|
+
}, "strip", z.ZodTypeAny, {
|
|
450
|
+
start: Date;
|
|
451
|
+
end?: Date | undefined;
|
|
452
|
+
}, {
|
|
453
|
+
start: string | Date;
|
|
454
|
+
end?: string | Date | undefined;
|
|
455
|
+
}>, {
|
|
456
|
+
start: Date;
|
|
457
|
+
end?: Date | undefined;
|
|
458
|
+
}, {
|
|
459
|
+
start: string | Date;
|
|
460
|
+
end?: string | Date | undefined;
|
|
461
|
+
}>>;
|
|
462
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
463
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
464
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
465
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
466
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
467
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
468
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
469
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
470
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
471
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
472
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
473
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
name?: string | undefined;
|
|
476
|
+
}, {
|
|
477
|
+
name?: string | undefined;
|
|
478
|
+
}>>>;
|
|
479
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
480
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
481
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
482
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
483
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
484
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
485
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
486
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.CUSTOM_COUPON>>;
|
|
487
|
+
influencer: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
488
|
+
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
|
|
489
|
+
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
|
|
490
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
491
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
492
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
493
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
494
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
495
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
496
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
497
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
498
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
499
|
+
}, "strip", z.ZodTypeAny, {
|
|
500
|
+
start: Date;
|
|
501
|
+
end?: Date | undefined;
|
|
502
|
+
}, {
|
|
503
|
+
start: string | Date;
|
|
504
|
+
end?: string | Date | undefined;
|
|
505
|
+
}>, {
|
|
506
|
+
start: Date;
|
|
507
|
+
end?: Date | undefined;
|
|
508
|
+
}, {
|
|
509
|
+
start: string | Date;
|
|
510
|
+
end?: string | Date | undefined;
|
|
511
|
+
}>>;
|
|
512
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
513
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
514
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
515
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
516
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
517
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
518
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
519
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
520
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
521
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
522
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
523
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
524
|
+
}, "strip", z.ZodTypeAny, {
|
|
525
|
+
name?: string | undefined;
|
|
526
|
+
}, {
|
|
527
|
+
name?: string | undefined;
|
|
528
|
+
}>>>;
|
|
529
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
530
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
531
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
532
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
533
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
534
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
535
|
+
}, z.ZodTypeAny, "passthrough"> | {
|
|
536
|
+
documents: (z.objectInputType<{
|
|
537
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.GLOBAL>>;
|
|
538
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
539
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
540
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
541
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
542
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
543
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
544
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
545
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
546
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
547
|
+
}, "strip", z.ZodTypeAny, {
|
|
548
|
+
start: Date;
|
|
549
|
+
end?: Date | undefined;
|
|
550
|
+
}, {
|
|
551
|
+
start: string | Date;
|
|
552
|
+
end?: string | Date | undefined;
|
|
553
|
+
}>, {
|
|
554
|
+
start: Date;
|
|
555
|
+
end?: Date | undefined;
|
|
556
|
+
}, {
|
|
557
|
+
start: string | Date;
|
|
558
|
+
end?: string | Date | undefined;
|
|
559
|
+
}>>;
|
|
560
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
561
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
562
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
563
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
564
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
565
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
566
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
567
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
568
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
569
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
570
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
571
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
572
|
+
}, "strip", z.ZodTypeAny, {
|
|
573
|
+
name?: string | undefined;
|
|
574
|
+
}, {
|
|
575
|
+
name?: string | undefined;
|
|
576
|
+
}>>>;
|
|
577
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
578
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
579
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
580
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
581
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
582
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
583
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
584
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.REFERRAL_CODE>>;
|
|
585
|
+
orderLimitPerUser: z.ZodOptional<z.ZodLiteral<1>>;
|
|
586
|
+
referralUser: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
587
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
588
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
589
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
590
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
591
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
592
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
593
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.REFERRAL_REWARD>>;
|
|
594
|
+
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
595
|
+
referralCodeUsedBy: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
596
|
+
referralCodeUsedOnOrder: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
597
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
598
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
599
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
600
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
601
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
602
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
603
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
604
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
605
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
606
|
+
}, "strip", z.ZodTypeAny, {
|
|
607
|
+
start: Date;
|
|
608
|
+
end?: Date | undefined;
|
|
609
|
+
}, {
|
|
610
|
+
start: string | Date;
|
|
611
|
+
end?: string | Date | undefined;
|
|
612
|
+
}>, {
|
|
613
|
+
start: Date;
|
|
614
|
+
end?: Date | undefined;
|
|
615
|
+
}, {
|
|
616
|
+
start: string | Date;
|
|
617
|
+
end?: string | Date | undefined;
|
|
618
|
+
}>>;
|
|
619
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
620
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
621
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
622
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
623
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
624
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
625
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
626
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
627
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
628
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
629
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
630
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
631
|
+
}, "strip", z.ZodTypeAny, {
|
|
632
|
+
name?: string | undefined;
|
|
633
|
+
}, {
|
|
634
|
+
name?: string | undefined;
|
|
635
|
+
}>>>;
|
|
636
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
637
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
638
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
639
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
640
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
641
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
642
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
643
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.SHOPS_CATEGORIES>>;
|
|
644
|
+
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
|
|
645
|
+
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
|
|
646
|
+
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
647
|
+
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
648
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
649
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
650
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
651
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
652
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
653
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
654
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
655
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
656
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
657
|
+
}, "strip", z.ZodTypeAny, {
|
|
658
|
+
start: Date;
|
|
659
|
+
end?: Date | undefined;
|
|
660
|
+
}, {
|
|
661
|
+
start: string | Date;
|
|
662
|
+
end?: string | Date | undefined;
|
|
663
|
+
}>, {
|
|
664
|
+
start: Date;
|
|
665
|
+
end?: Date | undefined;
|
|
666
|
+
}, {
|
|
667
|
+
start: string | Date;
|
|
668
|
+
end?: string | Date | undefined;
|
|
669
|
+
}>>;
|
|
670
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
671
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
672
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
673
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
674
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
675
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
676
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
677
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
678
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
679
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
680
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
681
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
682
|
+
}, "strip", z.ZodTypeAny, {
|
|
683
|
+
name?: string | undefined;
|
|
684
|
+
}, {
|
|
685
|
+
name?: string | undefined;
|
|
686
|
+
}>>>;
|
|
687
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
688
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
689
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
690
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
691
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
692
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
693
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
694
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_STORE>>;
|
|
695
|
+
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
696
|
+
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
697
|
+
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
698
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
699
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
700
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
701
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
702
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
703
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
704
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
705
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
706
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
707
|
+
}, "strip", z.ZodTypeAny, {
|
|
708
|
+
start: Date;
|
|
709
|
+
end?: Date | undefined;
|
|
710
|
+
}, {
|
|
711
|
+
start: string | Date;
|
|
712
|
+
end?: string | Date | undefined;
|
|
713
|
+
}>, {
|
|
714
|
+
start: Date;
|
|
715
|
+
end?: Date | undefined;
|
|
716
|
+
}, {
|
|
717
|
+
start: string | Date;
|
|
718
|
+
end?: string | Date | undefined;
|
|
719
|
+
}>>;
|
|
720
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
721
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
722
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
723
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
724
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
725
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
726
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
727
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
728
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
729
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
730
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
731
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
732
|
+
}, "strip", z.ZodTypeAny, {
|
|
733
|
+
name?: string | undefined;
|
|
734
|
+
}, {
|
|
735
|
+
name?: string | undefined;
|
|
736
|
+
}>>>;
|
|
737
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
738
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
739
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
740
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
741
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
742
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
743
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
744
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_USER>>;
|
|
745
|
+
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "atleastone">>;
|
|
746
|
+
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
|
|
747
|
+
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
|
|
748
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
749
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
750
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
751
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
752
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
753
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
754
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
755
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
756
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
757
|
+
}, "strip", z.ZodTypeAny, {
|
|
758
|
+
start: Date;
|
|
759
|
+
end?: Date | undefined;
|
|
760
|
+
}, {
|
|
761
|
+
start: string | Date;
|
|
762
|
+
end?: string | Date | undefined;
|
|
763
|
+
}>, {
|
|
764
|
+
start: Date;
|
|
765
|
+
end?: Date | undefined;
|
|
766
|
+
}, {
|
|
767
|
+
start: string | Date;
|
|
768
|
+
end?: string | Date | undefined;
|
|
769
|
+
}>>;
|
|
770
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
771
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
772
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
773
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
774
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
775
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
776
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
777
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
778
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
779
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
780
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
781
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
782
|
+
}, "strip", z.ZodTypeAny, {
|
|
783
|
+
name?: string | undefined;
|
|
784
|
+
}, {
|
|
785
|
+
name?: string | undefined;
|
|
786
|
+
}>>>;
|
|
787
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
788
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
789
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
790
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
791
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
792
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
793
|
+
}, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
|
|
794
|
+
couponType: z.ZodOptional<z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.CUSTOM_COUPON>>;
|
|
795
|
+
influencer: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
796
|
+
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
|
|
797
|
+
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
|
|
798
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
799
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
800
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
801
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
802
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
803
|
+
isMaxDiscountLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
804
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
805
|
+
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
|
|
806
|
+
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
|
|
807
|
+
}, "strip", z.ZodTypeAny, {
|
|
808
|
+
start: Date;
|
|
809
|
+
end?: Date | undefined;
|
|
810
|
+
}, {
|
|
811
|
+
start: string | Date;
|
|
812
|
+
end?: string | Date | undefined;
|
|
813
|
+
}>, {
|
|
814
|
+
start: Date;
|
|
815
|
+
end?: Date | undefined;
|
|
816
|
+
}, {
|
|
817
|
+
start: string | Date;
|
|
818
|
+
end?: string | Date | undefined;
|
|
819
|
+
}>>;
|
|
820
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
821
|
+
isSpendLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
822
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
823
|
+
isTotalOrderLimitEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
824
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
825
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
826
|
+
isMinOrderValueEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
827
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
828
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>>;
|
|
829
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>>;
|
|
830
|
+
referringUser: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
831
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
832
|
+
}, "strip", z.ZodTypeAny, {
|
|
833
|
+
name?: string | undefined;
|
|
834
|
+
}, {
|
|
835
|
+
name?: string | undefined;
|
|
836
|
+
}>>>;
|
|
837
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
838
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
839
|
+
isOrderLimitPerUserEnabled: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
840
|
+
createdBy: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>>;
|
|
841
|
+
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
842
|
+
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>>;
|
|
843
|
+
}, z.ZodTypeAny, "passthrough">)[];
|
|
844
|
+
metadata?: {
|
|
845
|
+
page: number;
|
|
846
|
+
size: number;
|
|
847
|
+
totalElements: number;
|
|
848
|
+
totalPages: number;
|
|
849
|
+
} | undefined;
|
|
850
|
+
} | undefined;
|
|
224
851
|
};
|
|
852
|
+
meta: object;
|
|
853
|
+
}>;
|
|
854
|
+
getById: import("@trpc/server").TRPCQueryProcedure<{
|
|
855
|
+
input: string | mongoose.Types.ObjectId;
|
|
225
856
|
output: {
|
|
226
857
|
message: string;
|
|
227
858
|
success: boolean;
|
|
@@ -851,8 +1482,19 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
851
1482
|
};
|
|
852
1483
|
meta: object;
|
|
853
1484
|
}>;
|
|
854
|
-
|
|
855
|
-
input:
|
|
1485
|
+
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
1486
|
+
input: {
|
|
1487
|
+
search?: {
|
|
1488
|
+
searchKey: string;
|
|
1489
|
+
searchFields?: string[] | undefined;
|
|
1490
|
+
} | undefined;
|
|
1491
|
+
sort?: Record<string, 1 | -1> | undefined;
|
|
1492
|
+
page?: number | undefined;
|
|
1493
|
+
select?: Record<string, 0 | 1> | undefined;
|
|
1494
|
+
size?: number | undefined;
|
|
1495
|
+
populate?: any;
|
|
1496
|
+
query?: Record<string, any> | undefined;
|
|
1497
|
+
} | undefined;
|
|
856
1498
|
output: {
|
|
857
1499
|
message: string;
|
|
858
1500
|
success: boolean;
|
|
@@ -1482,19 +2124,8 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1482
2124
|
};
|
|
1483
2125
|
meta: object;
|
|
1484
2126
|
}>;
|
|
1485
|
-
|
|
1486
|
-
input:
|
|
1487
|
-
search?: {
|
|
1488
|
-
searchKey: string;
|
|
1489
|
-
searchFields?: string[] | undefined;
|
|
1490
|
-
} | undefined;
|
|
1491
|
-
sort?: Record<string, 1 | -1> | undefined;
|
|
1492
|
-
page?: number | undefined;
|
|
1493
|
-
select?: Record<string, 0 | 1> | undefined;
|
|
1494
|
-
size?: number | undefined;
|
|
1495
|
-
populate?: any;
|
|
1496
|
-
query?: Record<string, any> | undefined;
|
|
1497
|
-
} | undefined;
|
|
2127
|
+
checkExistingNewUserCoupon: import("@trpc/server").TRPCQueryProcedure<{
|
|
2128
|
+
input: void;
|
|
1498
2129
|
output: {
|
|
1499
2130
|
message: string;
|
|
1500
2131
|
success: boolean;
|
|
@@ -2128,21 +2759,21 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2128
2759
|
input: {
|
|
2129
2760
|
_id: string | mongoose.Types.ObjectId;
|
|
2130
2761
|
data: {
|
|
2131
|
-
value: number;
|
|
2132
2762
|
code: string;
|
|
2763
|
+
value: number;
|
|
2764
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2133
2765
|
duration: {
|
|
2134
2766
|
start: string | Date;
|
|
2135
2767
|
end?: string | Date | undefined;
|
|
2136
2768
|
};
|
|
2137
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2138
2769
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.GLOBAL;
|
|
2139
2770
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
2140
|
-
spendLimit?: number | null | undefined;
|
|
2141
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
2142
2771
|
secondaryCurrencyValue?: number | undefined;
|
|
2143
2772
|
maxDiscountLimit?: number | null | undefined;
|
|
2144
2773
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
2145
2774
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
2775
|
+
spendLimit?: number | null | undefined;
|
|
2776
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
2146
2777
|
totalOrderLimit?: number | null | undefined;
|
|
2147
2778
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
2148
2779
|
minOrderValue?: number | null | undefined;
|
|
@@ -2166,24 +2797,24 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2166
2797
|
createdBy?: string | mongoose.Types.ObjectId | undefined;
|
|
2167
2798
|
isExpired?: boolean | undefined;
|
|
2168
2799
|
} | {
|
|
2169
|
-
value: number;
|
|
2170
2800
|
code: string;
|
|
2801
|
+
value: number;
|
|
2802
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2171
2803
|
duration: {
|
|
2172
2804
|
start: string | Date;
|
|
2173
2805
|
end?: string | Date | undefined;
|
|
2174
2806
|
};
|
|
2175
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2176
2807
|
user: string | mongoose.Types.ObjectId;
|
|
2177
2808
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.REFERRAL_REWARD;
|
|
2178
2809
|
referralCodeUsedBy: string | mongoose.Types.ObjectId;
|
|
2179
2810
|
referralCodeUsedOnOrder: string | mongoose.Types.ObjectId;
|
|
2180
2811
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
2181
|
-
spendLimit?: number | null | undefined;
|
|
2182
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
2183
2812
|
secondaryCurrencyValue?: number | undefined;
|
|
2184
2813
|
maxDiscountLimit?: number | null | undefined;
|
|
2185
2814
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
2186
2815
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
2816
|
+
spendLimit?: number | null | undefined;
|
|
2817
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
2187
2818
|
totalOrderLimit?: number | null | undefined;
|
|
2188
2819
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
2189
2820
|
minOrderValue?: number | null | undefined;
|
|
@@ -2199,21 +2830,21 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2199
2830
|
createdBy?: string | mongoose.Types.ObjectId | undefined;
|
|
2200
2831
|
isExpired?: boolean | undefined;
|
|
2201
2832
|
} | {
|
|
2202
|
-
value: number;
|
|
2203
2833
|
code: string;
|
|
2834
|
+
value: number;
|
|
2835
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2204
2836
|
duration: {
|
|
2205
2837
|
start: string | Date;
|
|
2206
2838
|
end?: string | Date | undefined;
|
|
2207
2839
|
};
|
|
2208
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2209
2840
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.SHOPS_CATEGORIES;
|
|
2210
2841
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
2211
|
-
spendLimit?: number | null | undefined;
|
|
2212
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
2213
2842
|
secondaryCurrencyValue?: number | undefined;
|
|
2214
2843
|
maxDiscountLimit?: number | null | undefined;
|
|
2215
2844
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
2216
2845
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
2846
|
+
spendLimit?: number | null | undefined;
|
|
2847
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
2217
2848
|
totalOrderLimit?: number | null | undefined;
|
|
2218
2849
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
2219
2850
|
minOrderValue?: number | null | undefined;
|
|
@@ -2233,22 +2864,22 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2233
2864
|
isShopCoverExpenses?: boolean | undefined;
|
|
2234
2865
|
firstOrderOnly?: boolean | undefined;
|
|
2235
2866
|
} | {
|
|
2236
|
-
shop: string | mongoose.Types.ObjectId;
|
|
2237
|
-
value: number;
|
|
2238
2867
|
code: string;
|
|
2868
|
+
value: number;
|
|
2869
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2239
2870
|
duration: {
|
|
2240
2871
|
start: string | Date;
|
|
2241
2872
|
end?: string | Date | undefined;
|
|
2242
2873
|
};
|
|
2243
|
-
|
|
2874
|
+
shop: string | mongoose.Types.ObjectId;
|
|
2244
2875
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_STORE;
|
|
2245
2876
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
2246
|
-
spendLimit?: number | null | undefined;
|
|
2247
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
2248
2877
|
secondaryCurrencyValue?: number | undefined;
|
|
2249
2878
|
maxDiscountLimit?: number | null | undefined;
|
|
2250
2879
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
2251
2880
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
2881
|
+
spendLimit?: number | null | undefined;
|
|
2882
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
2252
2883
|
totalOrderLimit?: number | null | undefined;
|
|
2253
2884
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
2254
2885
|
minOrderValue?: number | null | undefined;
|
|
@@ -2266,22 +2897,22 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2266
2897
|
isShopCoverExpenses?: boolean | undefined;
|
|
2267
2898
|
firstOrderOnly?: boolean | undefined;
|
|
2268
2899
|
} | {
|
|
2269
|
-
value: number;
|
|
2270
2900
|
code: string;
|
|
2901
|
+
value: number;
|
|
2902
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2271
2903
|
duration: {
|
|
2272
2904
|
start: string | Date;
|
|
2273
2905
|
end?: string | Date | undefined;
|
|
2274
2906
|
};
|
|
2275
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2276
2907
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_USER;
|
|
2277
2908
|
users: [string | mongoose.Types.ObjectId, ...(string | mongoose.Types.ObjectId)[]];
|
|
2278
2909
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
2279
|
-
spendLimit?: number | null | undefined;
|
|
2280
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
2281
2910
|
secondaryCurrencyValue?: number | undefined;
|
|
2282
2911
|
maxDiscountLimit?: number | null | undefined;
|
|
2283
2912
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
2284
2913
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
2914
|
+
spendLimit?: number | null | undefined;
|
|
2915
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
2285
2916
|
totalOrderLimit?: number | null | undefined;
|
|
2286
2917
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
2287
2918
|
minOrderValue?: number | null | undefined;
|
|
@@ -2299,22 +2930,22 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
2299
2930
|
itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
|
|
2300
2931
|
shops?: (string | mongoose.Types.ObjectId)[] | undefined;
|
|
2301
2932
|
} | {
|
|
2302
|
-
value: number;
|
|
2303
2933
|
code: string;
|
|
2934
|
+
value: number;
|
|
2935
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2304
2936
|
duration: {
|
|
2305
2937
|
start: string | Date;
|
|
2306
2938
|
end?: string | Date | undefined;
|
|
2307
2939
|
};
|
|
2308
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
2309
2940
|
couponType: import("@lyxa.ai/core/dist/utilities/enum").CouponType.CUSTOM_COUPON;
|
|
2310
2941
|
influencer: string | mongoose.Types.ObjectId;
|
|
2311
2942
|
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
2312
|
-
spendLimit?: number | null | undefined;
|
|
2313
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
2314
2943
|
secondaryCurrencyValue?: number | undefined;
|
|
2315
2944
|
maxDiscountLimit?: number | null | undefined;
|
|
2316
2945
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
2317
2946
|
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
2947
|
+
spendLimit?: number | null | undefined;
|
|
2948
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
2318
2949
|
totalOrderLimit?: number | null | undefined;
|
|
2319
2950
|
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
2320
2951
|
minOrderValue?: number | null | undefined;
|
|
@@ -4232,8 +4863,8 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4232
4863
|
}>;
|
|
4233
4864
|
getUserCoupons: import("@trpc/server").TRPCQueryProcedure<{
|
|
4234
4865
|
input: {
|
|
4235
|
-
shop?: string | mongoose.Types.ObjectId | undefined;
|
|
4236
4866
|
user?: string | mongoose.Types.ObjectId | undefined;
|
|
4867
|
+
shop?: string | mongoose.Types.ObjectId | undefined;
|
|
4237
4868
|
page?: number | undefined;
|
|
4238
4869
|
size?: number | undefined;
|
|
4239
4870
|
};
|
|
@@ -4569,8 +5200,8 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4569
5200
|
}>;
|
|
4570
5201
|
validateCoupon: import("@trpc/server").TRPCQueryProcedure<{
|
|
4571
5202
|
input: {
|
|
4572
|
-
shop: string | mongoose.Types.ObjectId;
|
|
4573
5203
|
user: string | mongoose.Types.ObjectId;
|
|
5204
|
+
shop: string | mongoose.Types.ObjectId;
|
|
4574
5205
|
amountBeforeCoupon: number;
|
|
4575
5206
|
secondaryAmountBeforeCoupon: number;
|
|
4576
5207
|
coupon?: string | undefined;
|
|
@@ -4579,6 +5210,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4579
5210
|
message: string;
|
|
4580
5211
|
success: boolean;
|
|
4581
5212
|
data?: {
|
|
5213
|
+
message?: string | undefined;
|
|
4582
5214
|
isValid?: boolean | undefined;
|
|
4583
5215
|
amountAfterCoupon?: number | undefined;
|
|
4584
5216
|
secondaryAmountAfterCoupon?: number | undefined;
|
|
@@ -4592,6 +5224,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4592
5224
|
} | undefined;
|
|
4593
5225
|
} | {
|
|
4594
5226
|
documents: {
|
|
5227
|
+
message?: string | undefined;
|
|
4595
5228
|
isValid?: boolean | undefined;
|
|
4596
5229
|
amountAfterCoupon?: number | undefined;
|
|
4597
5230
|
secondaryAmountAfterCoupon?: number | undefined;
|
|
@@ -4616,8 +5249,8 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4616
5249
|
}>;
|
|
4617
5250
|
validateCouponMutation: import("@trpc/server").TRPCMutationProcedure<{
|
|
4618
5251
|
input: {
|
|
4619
|
-
shop: string | mongoose.Types.ObjectId;
|
|
4620
5252
|
user: string | mongoose.Types.ObjectId;
|
|
5253
|
+
shop: string | mongoose.Types.ObjectId;
|
|
4621
5254
|
amountBeforeCoupon: number;
|
|
4622
5255
|
secondaryAmountBeforeCoupon: number;
|
|
4623
5256
|
coupon?: string | undefined;
|
|
@@ -4626,6 +5259,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4626
5259
|
message: string;
|
|
4627
5260
|
success: boolean;
|
|
4628
5261
|
data?: {
|
|
5262
|
+
message?: string | undefined;
|
|
4629
5263
|
isValid?: boolean | undefined;
|
|
4630
5264
|
amountAfterCoupon?: number | undefined;
|
|
4631
5265
|
secondaryAmountAfterCoupon?: number | undefined;
|
|
@@ -4639,6 +5273,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4639
5273
|
} | undefined;
|
|
4640
5274
|
} | {
|
|
4641
5275
|
documents: {
|
|
5276
|
+
message?: string | undefined;
|
|
4642
5277
|
isValid?: boolean | undefined;
|
|
4643
5278
|
amountAfterCoupon?: number | undefined;
|
|
4644
5279
|
secondaryAmountAfterCoupon?: number | undefined;
|
|
@@ -4663,8 +5298,8 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
4663
5298
|
}>;
|
|
4664
5299
|
createReferralCodeForUser: import("@trpc/server").TRPCMutationProcedure<{
|
|
4665
5300
|
input: {
|
|
4666
|
-
shop?: string | mongoose.Types.ObjectId | undefined;
|
|
4667
5301
|
user?: string | mongoose.Types.ObjectId | undefined;
|
|
5302
|
+
shop?: string | mongoose.Types.ObjectId | undefined;
|
|
4668
5303
|
page?: number | undefined;
|
|
4669
5304
|
size?: number | undefined;
|
|
4670
5305
|
};
|