@lyxa.ai/marketing 1.0.44 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.d.ts +170 -28
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +169 -27
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +13 -4
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts +4 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.js +134 -15
- package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts +208 -3
- package/dist/lib/modules/coupon/services/custom-coupon.service.d.ts.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 -0
- package/dist/lib/modules/coupon/services/global-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/helper.service.d.ts +214 -4
- package/dist/lib/modules/coupon/services/helper.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/helper.service.js +114 -16
- package/dist/lib/modules/coupon/services/helper.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts +208 -3
- package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/individual-user-coupon.service.d.ts +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 +20 -11
- package/dist/lib/modules/coupon/services/individual-user-coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts +10 -4
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +90 -14
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts +2 -2
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +151 -45
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/referral-reward-coupon.service.js +17 -4
- 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 +208 -3
- package/dist/lib/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/transformers/coupon.transformer.d.ts +5 -1
- package/dist/lib/modules/coupon/transformers/coupon.transformer.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts +243 -23
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +412 -48
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +39 -6
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts +94 -6
- package/dist/lib/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/custom-coupon.validation.d.ts +9 -0
- package/dist/lib/modules/coupon/validations/custom-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/custom-coupon.validation.js +1 -0
- package/dist/lib/modules/coupon/validations/custom-coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.d.ts +200 -122
- package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.js +20 -3
- package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/individual-user-coupon.validation.d.ts +9 -0
- package/dist/lib/modules/coupon/validations/individual-user-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/individual-user-coupon.validation.js +1 -0
- package/dist/lib/modules/coupon/validations/individual-user-coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/shops-categories-coupon.validation.d.ts +9 -0
- package/dist/lib/modules/coupon/validations/shops-categories-coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/shops-categories-coupon.validation.js +1 -0
- package/dist/lib/modules/coupon/validations/shops-categories-coupon.validation.js.map +1 -1
- package/dist/lib/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +6 -6
- package/dist/lib/modules/marketing/validations/discount-marketing.validation.d.ts +6 -6
- package/dist/lib/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/lib/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
- package/dist/lib/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
- package/dist/types/index.d.ts +170 -28
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +169 -27
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +4 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/custom-coupon.service.d.ts +208 -3
- package/dist/types/modules/coupon/services/custom-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/helper.service.d.ts +214 -4
- package/dist/types/modules/coupon/services/helper.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts +208 -3
- 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 +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/CouponMetricsRepository.d.ts +10 -4
- package/dist/types/modules/coupon/services/patterns/repository/CouponMetricsRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts +2 -2
- package/dist/types/modules/coupon/services/patterns/repository/CouponRepository.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts +208 -3
- package/dist/types/modules/coupon/services/shops-categories-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts +5 -1
- package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +243 -23
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +412 -48
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts +94 -6
- package/dist/types/modules/coupon/validations/create-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/custom-coupon.validation.d.ts +9 -0
- package/dist/types/modules/coupon/validations/custom-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/individual-store-coupon.validation.d.ts +200 -122
- package/dist/types/modules/coupon/validations/individual-store-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/individual-user-coupon.validation.d.ts +9 -0
- package/dist/types/modules/coupon/validations/individual-user-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/shops-categories-coupon.validation.d.ts +9 -0
- package/dist/types/modules/coupon/validations/shops-categories-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/buy1-get1-marketing.validation.d.ts +6 -6
- package/dist/types/modules/marketing/validations/discount-marketing.validation.d.ts +6 -6
- package/dist/types/modules/marketing/validations/product-marketing.validation.d.ts +2 -2
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +1 -1
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,124 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { DTO } from '@lyxa.ai/core/dist/utilities/validation/global-validation';
|
|
3
3
|
import { CouponType } from '@lyxa.ai/core/dist/utilities/enum';
|
|
4
|
-
declare const
|
|
5
|
-
couponType: z.ZodLiteral<CouponType.INDIVIDUAL_STORE>;
|
|
6
|
-
shop: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
|
|
7
|
-
isShopCoverExpenses: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
-
firstOrderOnly: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
-
valueType: z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>;
|
|
10
|
-
value: z.ZodNumber;
|
|
11
|
-
secondaryCurrencyValue: z.ZodOptional<z.ZodNumber>;
|
|
12
|
-
maxDiscountLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
13
|
-
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
isMaxDiscountLimitEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
15
|
-
duration: z.ZodEffects<z.ZodObject<{
|
|
16
|
-
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>;
|
|
17
|
-
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>>;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
start: Date;
|
|
20
|
-
end?: Date | undefined;
|
|
21
|
-
}, {
|
|
22
|
-
start: string | Date;
|
|
23
|
-
end?: string | Date | undefined;
|
|
24
|
-
}>, {
|
|
25
|
-
start: Date;
|
|
26
|
-
end?: Date | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
start: string | Date;
|
|
29
|
-
end?: string | Date | undefined;
|
|
30
|
-
}>;
|
|
31
|
-
spendLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
32
|
-
isSpendLimitEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
33
|
-
totalOrderLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
34
|
-
isTotalOrderLimitEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
35
|
-
minOrderValue: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
-
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
isMinOrderValueEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
38
|
-
forNewUserOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
39
|
-
status: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>;
|
|
40
|
-
expirationReason: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>;
|
|
41
|
-
referringUser: z.ZodOptional<z.ZodObject<{
|
|
42
|
-
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
name?: string | undefined;
|
|
45
|
-
}, {
|
|
46
|
-
name?: string | undefined;
|
|
47
|
-
}>>;
|
|
48
|
-
code: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
49
|
-
orderLimitPerUser: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
50
|
-
isOrderLimitPerUserEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
51
|
-
createdBy: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
52
|
-
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
-
}, "strict", z.ZodTypeAny, {
|
|
54
|
-
code: string;
|
|
55
|
-
value: number;
|
|
56
|
-
status: import("@lyxa.ai/core/dist/utilities/enum").Status;
|
|
57
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
58
|
-
maxDiscountLimit: number | null;
|
|
59
|
-
isMaxDiscountLimitEnabled: boolean;
|
|
60
|
-
duration: {
|
|
61
|
-
start: Date;
|
|
62
|
-
end?: Date | undefined;
|
|
63
|
-
};
|
|
64
|
-
spendLimit: number | null;
|
|
65
|
-
isSpendLimitEnabled: boolean;
|
|
66
|
-
totalOrderLimit: number | null;
|
|
67
|
-
isTotalOrderLimitEnabled: boolean;
|
|
68
|
-
minOrderValue: number | null;
|
|
69
|
-
isMinOrderValueEnabled: boolean;
|
|
70
|
-
forNewUserOnly: boolean;
|
|
71
|
-
expirationReason: import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason | null;
|
|
72
|
-
orderLimitPerUser: number | null;
|
|
73
|
-
isOrderLimitPerUserEnabled: boolean;
|
|
74
|
-
shop: import("mongoose").Types.ObjectId;
|
|
75
|
-
couponType: CouponType.INDIVIDUAL_STORE;
|
|
76
|
-
isShopCoverExpenses: boolean;
|
|
77
|
-
firstOrderOnly: boolean;
|
|
78
|
-
secondaryCurrencyValue?: number | undefined;
|
|
79
|
-
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
80
|
-
secondaryCurrencyMinOrderValue?: number | undefined;
|
|
81
|
-
referringUser?: {
|
|
82
|
-
name?: string | undefined;
|
|
83
|
-
} | undefined;
|
|
84
|
-
createdBy?: import("mongoose").Types.ObjectId | undefined;
|
|
85
|
-
isExpired?: boolean | undefined;
|
|
86
|
-
}, {
|
|
87
|
-
code: string;
|
|
88
|
-
value: number;
|
|
89
|
-
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
90
|
-
duration: {
|
|
91
|
-
start: string | Date;
|
|
92
|
-
end?: string | Date | undefined;
|
|
93
|
-
};
|
|
94
|
-
shop: string | import("mongoose").Types.ObjectId;
|
|
95
|
-
couponType: CouponType.INDIVIDUAL_STORE;
|
|
96
|
-
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
97
|
-
secondaryCurrencyValue?: number | undefined;
|
|
98
|
-
maxDiscountLimit?: number | null | undefined;
|
|
99
|
-
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
100
|
-
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
101
|
-
spendLimit?: number | null | undefined;
|
|
102
|
-
isSpendLimitEnabled?: boolean | undefined;
|
|
103
|
-
totalOrderLimit?: number | null | undefined;
|
|
104
|
-
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
105
|
-
minOrderValue?: number | null | undefined;
|
|
106
|
-
secondaryCurrencyMinOrderValue?: number | undefined;
|
|
107
|
-
isMinOrderValueEnabled?: boolean | undefined;
|
|
108
|
-
forNewUserOnly?: boolean | undefined;
|
|
109
|
-
expirationReason?: import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason | null | undefined;
|
|
110
|
-
referringUser?: {
|
|
111
|
-
name?: string | undefined;
|
|
112
|
-
} | undefined;
|
|
113
|
-
orderLimitPerUser?: number | null | undefined;
|
|
114
|
-
isOrderLimitPerUserEnabled?: boolean | undefined;
|
|
115
|
-
createdBy?: string | import("mongoose").Types.ObjectId | undefined;
|
|
116
|
-
isExpired?: boolean | undefined;
|
|
117
|
-
isShopCoverExpenses?: boolean | undefined;
|
|
118
|
-
firstOrderOnly?: boolean | undefined;
|
|
119
|
-
}>, IndividualStoreCouponSchema: z.ZodObject<{
|
|
4
|
+
declare const IndividualStoreCouponSchema: z.ZodObject<{
|
|
120
5
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_STORE>>;
|
|
121
|
-
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]
|
|
6
|
+
shop: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
7
|
+
vendor: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
122
8
|
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
123
9
|
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
124
10
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
@@ -168,7 +54,8 @@ declare const IndividualStoreCouponValidationSchema: z.ZodObject<{
|
|
|
168
54
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
169
55
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
170
56
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_STORE>>;
|
|
171
|
-
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]
|
|
57
|
+
shop: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
58
|
+
vendor: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
172
59
|
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
173
60
|
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
174
61
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
@@ -218,7 +105,8 @@ declare const IndividualStoreCouponValidationSchema: z.ZodObject<{
|
|
|
218
105
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
219
106
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
220
107
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_STORE>>;
|
|
221
|
-
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]
|
|
108
|
+
shop: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
109
|
+
vendor: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
222
110
|
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
223
111
|
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
224
112
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
@@ -274,7 +162,8 @@ declare const IndividualStoreCouponValidationSchema: z.ZodObject<{
|
|
|
274
162
|
[x: string]: any;
|
|
275
163
|
}> | z.ZodObject<{
|
|
276
164
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_STORE>>;
|
|
277
|
-
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]
|
|
165
|
+
shop: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
166
|
+
vendor: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
278
167
|
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
279
168
|
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
280
169
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
@@ -324,7 +213,8 @@ declare const IndividualStoreCouponValidationSchema: z.ZodObject<{
|
|
|
324
213
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
325
214
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
326
215
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_STORE>>;
|
|
327
|
-
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]
|
|
216
|
+
shop: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
217
|
+
vendor: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
328
218
|
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
329
219
|
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
330
220
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
@@ -374,7 +264,8 @@ declare const IndividualStoreCouponValidationSchema: z.ZodObject<{
|
|
|
374
264
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
375
265
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
376
266
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_STORE>>;
|
|
377
|
-
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]
|
|
267
|
+
shop: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
268
|
+
vendor: z.ZodOptional<z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>>;
|
|
378
269
|
isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
379
270
|
firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
380
271
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
@@ -423,6 +314,193 @@ declare const IndividualStoreCouponValidationSchema: z.ZodObject<{
|
|
|
423
314
|
isExpired: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
424
315
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
425
316
|
}, z.ZodTypeAny, "passthrough">>;
|
|
317
|
+
declare const IndividualStoreCouponValidationSchema: z.ZodEffects<z.ZodObject<{
|
|
318
|
+
couponType: z.ZodLiteral<CouponType.INDIVIDUAL_STORE>;
|
|
319
|
+
shop: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
320
|
+
vendor: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
321
|
+
isShopCoverExpenses: z.ZodDefault<z.ZodBoolean>;
|
|
322
|
+
firstOrderOnly: z.ZodDefault<z.ZodBoolean>;
|
|
323
|
+
valueType: z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>;
|
|
324
|
+
value: z.ZodNumber;
|
|
325
|
+
secondaryCurrencyValue: z.ZodOptional<z.ZodNumber>;
|
|
326
|
+
maxDiscountLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
327
|
+
secondaryCurrencyMaxDiscountLimit: z.ZodOptional<z.ZodNumber>;
|
|
328
|
+
isMaxDiscountLimitEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
329
|
+
duration: z.ZodEffects<z.ZodObject<{
|
|
330
|
+
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>;
|
|
331
|
+
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>>;
|
|
332
|
+
}, "strip", z.ZodTypeAny, {
|
|
333
|
+
start: Date;
|
|
334
|
+
end?: Date | undefined;
|
|
335
|
+
}, {
|
|
336
|
+
start: string | Date;
|
|
337
|
+
end?: string | Date | undefined;
|
|
338
|
+
}>, {
|
|
339
|
+
start: Date;
|
|
340
|
+
end?: Date | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
start: string | Date;
|
|
343
|
+
end?: string | Date | undefined;
|
|
344
|
+
}>;
|
|
345
|
+
spendLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
346
|
+
isSpendLimitEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
347
|
+
totalOrderLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
348
|
+
isTotalOrderLimitEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
349
|
+
minOrderValue: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
350
|
+
secondaryCurrencyMinOrderValue: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
isMinOrderValueEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
352
|
+
forNewUserOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
353
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").Status>>>;
|
|
354
|
+
expirationReason: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason>>>>;
|
|
355
|
+
referringUser: z.ZodOptional<z.ZodObject<{
|
|
356
|
+
name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
name?: string | undefined;
|
|
359
|
+
}, {
|
|
360
|
+
name?: string | undefined;
|
|
361
|
+
}>>;
|
|
362
|
+
code: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
363
|
+
orderLimitPerUser: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
364
|
+
isOrderLimitPerUserEnabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
365
|
+
createdBy: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
366
|
+
isExpired: z.ZodOptional<z.ZodBoolean>;
|
|
367
|
+
}, "strict", z.ZodTypeAny, {
|
|
368
|
+
code: string;
|
|
369
|
+
value: number;
|
|
370
|
+
status: import("@lyxa.ai/core/dist/utilities/enum").Status;
|
|
371
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
372
|
+
maxDiscountLimit: number | null;
|
|
373
|
+
isMaxDiscountLimitEnabled: boolean;
|
|
374
|
+
duration: {
|
|
375
|
+
start: Date;
|
|
376
|
+
end?: Date | undefined;
|
|
377
|
+
};
|
|
378
|
+
spendLimit: number | null;
|
|
379
|
+
isSpendLimitEnabled: boolean;
|
|
380
|
+
totalOrderLimit: number | null;
|
|
381
|
+
isTotalOrderLimitEnabled: boolean;
|
|
382
|
+
minOrderValue: number | null;
|
|
383
|
+
isMinOrderValueEnabled: boolean;
|
|
384
|
+
forNewUserOnly: boolean;
|
|
385
|
+
expirationReason: import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason | null;
|
|
386
|
+
orderLimitPerUser: number | null;
|
|
387
|
+
isOrderLimitPerUserEnabled: boolean;
|
|
388
|
+
couponType: CouponType.INDIVIDUAL_STORE;
|
|
389
|
+
isShopCoverExpenses: boolean;
|
|
390
|
+
firstOrderOnly: boolean;
|
|
391
|
+
secondaryCurrencyValue?: number | undefined;
|
|
392
|
+
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
393
|
+
secondaryCurrencyMinOrderValue?: number | undefined;
|
|
394
|
+
referringUser?: {
|
|
395
|
+
name?: string | undefined;
|
|
396
|
+
} | undefined;
|
|
397
|
+
createdBy?: import("mongoose").Types.ObjectId | undefined;
|
|
398
|
+
isExpired?: boolean | undefined;
|
|
399
|
+
shop?: import("mongoose").Types.ObjectId | undefined;
|
|
400
|
+
vendor?: import("mongoose").Types.ObjectId | undefined;
|
|
401
|
+
}, {
|
|
402
|
+
code: string;
|
|
403
|
+
value: number;
|
|
404
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
405
|
+
duration: {
|
|
406
|
+
start: string | Date;
|
|
407
|
+
end?: string | Date | undefined;
|
|
408
|
+
};
|
|
409
|
+
couponType: CouponType.INDIVIDUAL_STORE;
|
|
410
|
+
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
411
|
+
secondaryCurrencyValue?: number | undefined;
|
|
412
|
+
maxDiscountLimit?: number | null | undefined;
|
|
413
|
+
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
414
|
+
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
415
|
+
spendLimit?: number | null | undefined;
|
|
416
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
417
|
+
totalOrderLimit?: number | null | undefined;
|
|
418
|
+
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
419
|
+
minOrderValue?: number | null | undefined;
|
|
420
|
+
secondaryCurrencyMinOrderValue?: number | undefined;
|
|
421
|
+
isMinOrderValueEnabled?: boolean | undefined;
|
|
422
|
+
forNewUserOnly?: boolean | undefined;
|
|
423
|
+
expirationReason?: import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason | null | undefined;
|
|
424
|
+
referringUser?: {
|
|
425
|
+
name?: string | undefined;
|
|
426
|
+
} | undefined;
|
|
427
|
+
orderLimitPerUser?: number | null | undefined;
|
|
428
|
+
isOrderLimitPerUserEnabled?: boolean | undefined;
|
|
429
|
+
createdBy?: string | import("mongoose").Types.ObjectId | undefined;
|
|
430
|
+
isExpired?: boolean | undefined;
|
|
431
|
+
shop?: string | import("mongoose").Types.ObjectId | undefined;
|
|
432
|
+
vendor?: string | import("mongoose").Types.ObjectId | undefined;
|
|
433
|
+
isShopCoverExpenses?: boolean | undefined;
|
|
434
|
+
firstOrderOnly?: boolean | undefined;
|
|
435
|
+
}>, {
|
|
436
|
+
code: string;
|
|
437
|
+
value: number;
|
|
438
|
+
status: import("@lyxa.ai/core/dist/utilities/enum").Status;
|
|
439
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
440
|
+
maxDiscountLimit: number | null;
|
|
441
|
+
isMaxDiscountLimitEnabled: boolean;
|
|
442
|
+
duration: {
|
|
443
|
+
start: Date;
|
|
444
|
+
end?: Date | undefined;
|
|
445
|
+
};
|
|
446
|
+
spendLimit: number | null;
|
|
447
|
+
isSpendLimitEnabled: boolean;
|
|
448
|
+
totalOrderLimit: number | null;
|
|
449
|
+
isTotalOrderLimitEnabled: boolean;
|
|
450
|
+
minOrderValue: number | null;
|
|
451
|
+
isMinOrderValueEnabled: boolean;
|
|
452
|
+
forNewUserOnly: boolean;
|
|
453
|
+
expirationReason: import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason | null;
|
|
454
|
+
orderLimitPerUser: number | null;
|
|
455
|
+
isOrderLimitPerUserEnabled: boolean;
|
|
456
|
+
couponType: CouponType.INDIVIDUAL_STORE;
|
|
457
|
+
isShopCoverExpenses: boolean;
|
|
458
|
+
firstOrderOnly: boolean;
|
|
459
|
+
secondaryCurrencyValue?: number | undefined;
|
|
460
|
+
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
461
|
+
secondaryCurrencyMinOrderValue?: number | undefined;
|
|
462
|
+
referringUser?: {
|
|
463
|
+
name?: string | undefined;
|
|
464
|
+
} | undefined;
|
|
465
|
+
createdBy?: import("mongoose").Types.ObjectId | undefined;
|
|
466
|
+
isExpired?: boolean | undefined;
|
|
467
|
+
shop?: import("mongoose").Types.ObjectId | undefined;
|
|
468
|
+
vendor?: import("mongoose").Types.ObjectId | undefined;
|
|
469
|
+
}, {
|
|
470
|
+
code: string;
|
|
471
|
+
value: number;
|
|
472
|
+
valueType: import("@lyxa.ai/core/dist/utilities/enum").ValueType;
|
|
473
|
+
duration: {
|
|
474
|
+
start: string | Date;
|
|
475
|
+
end?: string | Date | undefined;
|
|
476
|
+
};
|
|
477
|
+
couponType: CouponType.INDIVIDUAL_STORE;
|
|
478
|
+
status?: import("@lyxa.ai/core/dist/utilities/enum").Status | undefined;
|
|
479
|
+
secondaryCurrencyValue?: number | undefined;
|
|
480
|
+
maxDiscountLimit?: number | null | undefined;
|
|
481
|
+
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
482
|
+
isMaxDiscountLimitEnabled?: boolean | undefined;
|
|
483
|
+
spendLimit?: number | null | undefined;
|
|
484
|
+
isSpendLimitEnabled?: boolean | undefined;
|
|
485
|
+
totalOrderLimit?: number | null | undefined;
|
|
486
|
+
isTotalOrderLimitEnabled?: boolean | undefined;
|
|
487
|
+
minOrderValue?: number | null | undefined;
|
|
488
|
+
secondaryCurrencyMinOrderValue?: number | undefined;
|
|
489
|
+
isMinOrderValueEnabled?: boolean | undefined;
|
|
490
|
+
forNewUserOnly?: boolean | undefined;
|
|
491
|
+
expirationReason?: import("@lyxa.ai/core/dist/utilities/enum").CouponExpirationReason | null | undefined;
|
|
492
|
+
referringUser?: {
|
|
493
|
+
name?: string | undefined;
|
|
494
|
+
} | undefined;
|
|
495
|
+
orderLimitPerUser?: number | null | undefined;
|
|
496
|
+
isOrderLimitPerUserEnabled?: boolean | undefined;
|
|
497
|
+
createdBy?: string | import("mongoose").Types.ObjectId | undefined;
|
|
498
|
+
isExpired?: boolean | undefined;
|
|
499
|
+
shop?: string | import("mongoose").Types.ObjectId | undefined;
|
|
500
|
+
vendor?: string | import("mongoose").Types.ObjectId | undefined;
|
|
501
|
+
isShopCoverExpenses?: boolean | undefined;
|
|
502
|
+
firstOrderOnly?: boolean | undefined;
|
|
503
|
+
}>;
|
|
426
504
|
export { IndividualStoreCouponValidationSchema, IndividualStoreCouponSchema, IndividualStoreCouponIdSchema as IndividualStoreCouponIdValidationSchema, UpdateIndividualStoreCouponSchema, };
|
|
427
505
|
export type CreateIndividualStoreCouponDTO = DTO<typeof IndividualStoreCouponValidationSchema>;
|
|
428
506
|
export type IndividualStoreCouponDTO = DTO<typeof IndividualStoreCouponSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"individual-store-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/individual-store-coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"individual-store-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/individual-store-coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAwB/D,QAAA,MAEe,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAC/B,6BAA6B,mNACzB,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCACI,CAAC;AAErD,QAAA,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAezC,CAAC;AAKH,OAAO,EACN,qCAAqC,EACrC,2BAA2B,EAC3B,6BAA6B,IAAI,uCAAuC,EACxE,iCAAiC,GACjC,CAAC;AAKF,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAC/F,MAAM,MAAM,wBAAwB,GAAG,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC/E,MAAM,MAAM,8BAA8B,GAAG,GAAG,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
|
|
@@ -8,14 +8,31 @@ const enum_1 = require("@lyxa.ai/core/dist/utilities/enum");
|
|
|
8
8
|
const baseFields = {
|
|
9
9
|
...coupon_validation_1.baseFields,
|
|
10
10
|
couponType: zod_1.z.literal(enum_1.CouponType.INDIVIDUAL_STORE),
|
|
11
|
-
shop: global_validation_1.ZodValidation.objectId('Shop'),
|
|
11
|
+
shop: global_validation_1.ZodValidation.objectId('Shop').optional(),
|
|
12
|
+
vendor: global_validation_1.ZodValidation.objectId('Vendor').optional(),
|
|
12
13
|
isShopCoverExpenses: global_validation_1.ZodValidation.boolean('IsShopCoverExpenses').default(true),
|
|
13
14
|
firstOrderOnly: global_validation_1.ZodValidation.boolean('FirstOrderOnly').default(false),
|
|
14
15
|
};
|
|
15
16
|
const schemaBuilder = (0, global_validation_1.createSchemaBuilder)(baseFields);
|
|
16
|
-
const { BaseSchema:
|
|
17
|
-
exports.IndividualStoreCouponValidationSchema = IndividualStoreCouponValidationSchema;
|
|
17
|
+
const { BaseSchema: IndividualStoreCouponBaseSchema, EntitySchema: IndividualStoreCouponSchema, IdSchema: IndividualStoreCouponIdSchema, UpdateSchema: UpdateIndividualStoreCouponSchema, } = schemaBuilder.getAllSchemas({ createdAt: true });
|
|
18
18
|
exports.IndividualStoreCouponSchema = IndividualStoreCouponSchema;
|
|
19
19
|
exports.IndividualStoreCouponIdValidationSchema = IndividualStoreCouponIdSchema;
|
|
20
20
|
exports.UpdateIndividualStoreCouponSchema = UpdateIndividualStoreCouponSchema;
|
|
21
|
+
const IndividualStoreCouponValidationSchema = IndividualStoreCouponBaseSchema.superRefine((data, ctx) => {
|
|
22
|
+
if (!data.shop && !data.vendor) {
|
|
23
|
+
ctx.addIssue({
|
|
24
|
+
path: ['shop', 'vendor'],
|
|
25
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
26
|
+
message: 'Shop or vendor is required.',
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
if (data.shop && data.vendor) {
|
|
30
|
+
ctx.addIssue({
|
|
31
|
+
path: ['shop', 'vendor'],
|
|
32
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
33
|
+
message: 'Only one of Shop or vendor should be provided.',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
exports.IndividualStoreCouponValidationSchema = IndividualStoreCouponValidationSchema;
|
|
21
38
|
//# sourceMappingURL=individual-store-coupon.validation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"individual-store-coupon.validation.js","sourceRoot":"/","sources":["modules/coupon/validations/individual-store-coupon.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAImE;AACnE,2DAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"individual-store-coupon.validation.js","sourceRoot":"/","sources":["modules/coupon/validations/individual-store-coupon.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAImE;AACnE,2DAAqE;AACrE,4DAA+D;AAK/D,MAAM,UAAU,GAAG;IAClB,GAAG,8BAAgB;IACnB,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,iBAAU,CAAC,gBAAgB,CAAC;IAClD,IAAI,EAAE,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;IAC/C,MAAM,EAAE,iCAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;IACnD,mBAAmB,EAAE,iCAAa,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/E,cAAc,EAAE,iCAAa,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;CACtE,CAAC;AAOF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AAKtD,MAAM,EACL,UAAU,EAAE,+BAA+B,EAC3C,YAAY,EAAE,2BAA2B,EACzC,QAAQ,EAAE,6BAA6B,EACvC,YAAY,EAAE,iCAAiC,GAC/C,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAwBpD,kEAA2B;AACM,gFAAuC;AACxE,8EAAiC;AAxBlC,MAAM,qCAAqC,GAAG,+BAA+B,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;IACvG,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAChC,GAAG,CAAC,QAAQ,CAAC;YACZ,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YACxB,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,6BAA6B;SACtC,CAAC,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;QAC9B,GAAG,CAAC,QAAQ,CAAC;YACZ,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;YACxB,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,gDAAgD;SACzD,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC,CAAC;AAMF,sFAAqC","sourcesContent":["import { z } from 'zod';\nimport {\n\tZodValidation,\n\tcreateSchemaBuilder,\n\tDTO,\n} from '@lyxa.ai/core/dist/utilities/validation/global-validation';\nimport { baseFields as baseCouponFields } from './coupon.validation';\nimport { CouponType } from '@lyxa.ai/core/dist/utilities/enum';\n\n/**\n * Define the base parent schema fields\n */\nconst baseFields = {\n\t...baseCouponFields,\n\tcouponType: z.literal(CouponType.INDIVIDUAL_STORE),\n\tshop: ZodValidation.objectId('Shop').optional(),\n\tvendor: ZodValidation.objectId('Vendor').optional(),\n\tisShopCoverExpenses: ZodValidation.boolean('IsShopCoverExpenses').default(true),\n\tfirstOrderOnly: ZodValidation.boolean('FirstOrderOnly').default(false),\n};\n\n/**\n * Create schema builder for Parent entity\n * - Includes timestamps\n * - Excludes 'createdAt' from update operations\n */\nconst schemaBuilder = createSchemaBuilder(baseFields);\n\n/**\n * Get all schemas for the Parent entity\n */\nconst {\n\tBaseSchema: IndividualStoreCouponBaseSchema,\n\tEntitySchema: IndividualStoreCouponSchema,\n\tIdSchema: IndividualStoreCouponIdSchema,\n\tUpdateSchema: UpdateIndividualStoreCouponSchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\nconst IndividualStoreCouponValidationSchema = IndividualStoreCouponBaseSchema.superRefine((data, ctx) => {\n\tif (!data.shop && !data.vendor) {\n\t\tctx.addIssue({\n\t\t\tpath: ['shop', 'vendor'],\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: 'Shop or vendor is required.',\n\t\t});\n\t}\n\tif (data.shop && data.vendor) {\n\t\tctx.addIssue({\n\t\t\tpath: ['shop', 'vendor'],\n\t\t\tcode: z.ZodIssueCode.custom,\n\t\t\tmessage: 'Only one of Shop or vendor should be provided.',\n\t\t});\n\t}\n});\n\n/**\n * Export schemas\n */\nexport {\n\tIndividualStoreCouponValidationSchema,\n\tIndividualStoreCouponSchema,\n\tIndividualStoreCouponIdSchema as IndividualStoreCouponIdValidationSchema,\n\tUpdateIndividualStoreCouponSchema,\n};\n\n/**\n * Export DTO types\n */\nexport type CreateIndividualStoreCouponDTO = DTO<typeof IndividualStoreCouponValidationSchema>;\nexport type IndividualStoreCouponDTO = DTO<typeof IndividualStoreCouponSchema>;\nexport type UpdateIndividualStoreCouponDTO = DTO<typeof UpdateIndividualStoreCouponSchema>;\n"]}
|
|
@@ -6,6 +6,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
6
6
|
users: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">;
|
|
7
7
|
itemTypes: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>;
|
|
8
8
|
shops: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>;
|
|
9
|
+
vendors: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>;
|
|
9
10
|
valueType: z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>;
|
|
10
11
|
value: z.ZodNumber;
|
|
11
12
|
secondaryCurrencyValue: z.ZodOptional<z.ZodNumber>;
|
|
@@ -74,6 +75,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
74
75
|
couponType: CouponType.INDIVIDUAL_USER;
|
|
75
76
|
itemTypes: ItemType[];
|
|
76
77
|
shops: import("mongoose").Types.ObjectId[];
|
|
78
|
+
vendors: import("mongoose").Types.ObjectId[];
|
|
77
79
|
users: [import("mongoose").Types.ObjectId, ...import("mongoose").Types.ObjectId[]];
|
|
78
80
|
secondaryCurrencyValue?: number | undefined;
|
|
79
81
|
secondaryCurrencyMaxDiscountLimit?: number | undefined;
|
|
@@ -116,11 +118,13 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
116
118
|
isExpired?: boolean | undefined;
|
|
117
119
|
itemTypes?: ItemType[] | undefined;
|
|
118
120
|
shops?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
121
|
+
vendors?: (string | import("mongoose").Types.ObjectId)[] | undefined;
|
|
119
122
|
}>, IndividualUserCouponSchema: z.ZodObject<{
|
|
120
123
|
couponType: z.ZodOptional<z.ZodLiteral<CouponType.INDIVIDUAL_USER>>;
|
|
121
124
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">>;
|
|
122
125
|
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>>;
|
|
123
126
|
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
127
|
+
vendors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
124
128
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
125
129
|
value: z.ZodOptional<z.ZodNumber>;
|
|
126
130
|
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -171,6 +175,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
171
175
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">>;
|
|
172
176
|
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>>;
|
|
173
177
|
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
178
|
+
vendors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
174
179
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
175
180
|
value: z.ZodOptional<z.ZodNumber>;
|
|
176
181
|
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -221,6 +226,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
221
226
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">>;
|
|
222
227
|
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>>;
|
|
223
228
|
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
229
|
+
vendors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
224
230
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
225
231
|
value: z.ZodOptional<z.ZodNumber>;
|
|
226
232
|
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -277,6 +283,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
277
283
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">>;
|
|
278
284
|
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>>;
|
|
279
285
|
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
286
|
+
vendors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
280
287
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
281
288
|
value: z.ZodOptional<z.ZodNumber>;
|
|
282
289
|
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -327,6 +334,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
327
334
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">>;
|
|
328
335
|
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>>;
|
|
329
336
|
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
337
|
+
vendors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
330
338
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
331
339
|
value: z.ZodOptional<z.ZodNumber>;
|
|
332
340
|
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -377,6 +385,7 @@ declare const IndividualUserCouponValidationSchema: z.ZodObject<{
|
|
|
377
385
|
users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "atleastone">>;
|
|
378
386
|
itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof ItemType>, "many">>>;
|
|
379
387
|
shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
388
|
+
vendors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
|
|
380
389
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
|
|
381
390
|
value: z.ZodOptional<z.ZodNumber>;
|
|
382
391
|
secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"individual-user-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/individual-user-coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"individual-user-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/individual-user-coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAwBzE,QAAA,MACa,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAClC,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAC9B,4BAA4B,mNACxB,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCACK,CAAC;AAKrD,OAAO,EACN,oCAAoC,EACpC,0BAA0B,EAC1B,4BAA4B,IAAI,sCAAsC,EACtE,gCAAgC,GAChC,CAAC;AAKF,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAC7F,MAAM,MAAM,uBAAuB,GAAG,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC7E,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -11,6 +11,7 @@ const baseFields = {
|
|
|
11
11
|
users: global_validation_1.ZodValidation.array(global_validation_1.ZodValidation.objectId('User'), 'Users').nonempty(),
|
|
12
12
|
itemTypes: global_validation_1.ZodValidation.array(global_validation_1.ZodValidation.enumType(enum_1.ItemType, 'Item type'), 'Item types').default([]),
|
|
13
13
|
shops: global_validation_1.ZodValidation.array(global_validation_1.ZodValidation.objectId('Shop'), 'Shops').default([]),
|
|
14
|
+
vendors: global_validation_1.ZodValidation.array(global_validation_1.ZodValidation.objectId('Vendor'), 'Vendors').default([]),
|
|
14
15
|
};
|
|
15
16
|
const schemaBuilder = (0, global_validation_1.createSchemaBuilder)(baseFields);
|
|
16
17
|
const { BaseSchema: IndividualUserCouponValidationSchema, EntitySchema: IndividualUserCouponSchema, IdSchema: IndividualUserCouponIdSchema, UpdateSchema: UpdateIndividualUserCouponSchema, } = schemaBuilder.getAllSchemas({ createdAt: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"individual-user-coupon.validation.js","sourceRoot":"/","sources":["modules/coupon/validations/individual-user-coupon.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAImE;AACnE,2DAAqE;AACrE,4DAAyE;AAKzE,MAAM,UAAU,GAAG;IAClB,GAAG,8BAAgB;IACnB,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,iBAAU,CAAC,eAAe,CAAC;IACjD,KAAK,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;IAC9E,SAAS,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,eAAQ,EAAE,WAAW,CAAC,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvG,KAAK,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"individual-user-coupon.validation.js","sourceRoot":"/","sources":["modules/coupon/validations/individual-user-coupon.validation.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iGAImE;AACnE,2DAAqE;AACrE,4DAAyE;AAKzE,MAAM,UAAU,GAAG;IAClB,GAAG,8BAAgB;IACnB,UAAU,EAAE,OAAC,CAAC,OAAO,CAAC,iBAAU,CAAC,eAAe,CAAC;IACjD,KAAK,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;IAC9E,SAAS,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,eAAQ,EAAE,WAAW,CAAC,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACvG,KAAK,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC/E,OAAO,EAAE,iCAAa,CAAC,KAAK,CAAC,iCAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CACrF,CAAC;AAOF,MAAM,aAAa,GAAG,IAAA,uCAAmB,EAAC,UAAU,CAAC,CAAC;AAKtD,MAAM,EACL,UAAU,EAAE,oCAAoC,EAChD,YAAY,EAAE,0BAA0B,EACxC,QAAQ,EAAE,4BAA4B,EACtC,YAAY,EAAE,gCAAgC,GAC9C,GAAG,aAAa,CAAC,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAMpD,oFAAoC;AACpC,gEAA0B;AACM,8EAAsC;AACtE,4EAAgC","sourcesContent":["import { z } from 'zod';\nimport {\n\tZodValidation,\n\tcreateSchemaBuilder,\n\tDTO\n} from '@lyxa.ai/core/dist/utilities/validation/global-validation';\nimport { baseFields as baseCouponFields } from './coupon.validation';\nimport { CouponType, ItemType } from '@lyxa.ai/core/dist/utilities/enum';\n\n/**\n * Define the base parent schema fields\n */\nconst baseFields = {\n\t...baseCouponFields,\n\tcouponType: z.literal(CouponType.INDIVIDUAL_USER),\n\tusers: ZodValidation.array(ZodValidation.objectId('User'), 'Users').nonempty(),\n\titemTypes: ZodValidation.array(ZodValidation.enumType(ItemType, 'Item type'), 'Item types').default([]),\n\tshops: ZodValidation.array(ZodValidation.objectId('Shop'), 'Shops').default([]),\n\tvendors: ZodValidation.array(ZodValidation.objectId('Vendor'), 'Vendors').default([]),\n};\n\n/**\n * Create schema builder for Parent entity\n * - Includes timestamps\n * - Excludes 'createdAt' from update operations\n */\nconst schemaBuilder = createSchemaBuilder(baseFields);\n\n/**\n * Get all schemas for the Parent entity\n */\nconst {\n\tBaseSchema: IndividualUserCouponValidationSchema,\n\tEntitySchema: IndividualUserCouponSchema,\n\tIdSchema: IndividualUserCouponIdSchema,\n\tUpdateSchema: UpdateIndividualUserCouponSchema,\n} = schemaBuilder.getAllSchemas({ createdAt: true });\n\n/**\n * Export schemas\n */\nexport {\n\tIndividualUserCouponValidationSchema,\n\tIndividualUserCouponSchema,\n\tIndividualUserCouponIdSchema as IndividualUserCouponIdValidationSchema,\n\tUpdateIndividualUserCouponSchema,\n};\n\n/**\n * Export DTO types\n */\nexport type CreateIndividualUserCouponDTO = DTO<typeof IndividualUserCouponValidationSchema>;\nexport type IndividualUserCouponDTO = DTO<typeof IndividualUserCouponSchema>;\nexport type UpdateIndividualUserCouponDTO = DTO<typeof UpdateIndividualUserCouponSchema>;\n"]}
|