@lyxa.ai/marketing 1.0.0 → 1.0.3
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/types/index.d.ts +3300 -1952
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +1477 -1924
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +23 -28
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/custom-coupon.service.d.ts +2 -1
- 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 +2 -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 +2 -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 +2 -1
- package/dist/types/modules/coupon/services/individual-user-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts +9 -2
- 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 +10 -2
- package/dist/types/modules/coupon/services/referral-reward-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts +41 -41
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +1159 -1120
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +239 -70
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/custom-coupon.validation.d.ts +57 -57
- package/dist/types/modules/coupon/validations/global-coupon.validation.d.ts +57 -57
- package/dist/types/modules/coupon/validations/individual-store-coupon.validation.d.ts +57 -57
- package/dist/types/modules/coupon/validations/individual-user-coupon.validation.d.ts +57 -57
- package/dist/types/modules/coupon/validations/referral-code-coupon.validation.d.ts +7 -7
- package/dist/types/modules/coupon/validations/referral-reward-coupon.validation.d.ts +57 -57
- package/dist/types/modules/deal-setting/routers/deal-setting.router.d.ts +2 -38
- package/dist/types/modules/deal-setting/routers/deal-setting.router.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/validations/deal-setting.validation.d.ts +1 -1
- package/dist/types/modules/featured-setting/routers/featured-setting.router.d.ts +2 -38
- package/dist/types/modules/featured-setting/routers/featured-setting.router.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/validations/featured-setting.validation.d.ts +1 -1
- package/dist/types/modules/loyalty-point-setting/routers/loyalty-point-setting.router.d.ts +26 -98
- package/dist/types/modules/loyalty-point-setting/routers/loyalty-point-setting.router.d.ts.map +1 -1
- package/dist/types/modules/loyalty-point-setting/transformers/loyalty-point-category.transformer.d.ts +1 -1
- package/dist/types/modules/loyalty-point-setting/validations/loyalty-point-category.validation.d.ts +18 -18
- package/dist/types/modules/loyalty-point-setting/validations/loyalty-point-setting.validation.d.ts +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +4 -78
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/punch-marketing.service.d.ts +2 -2
- package/dist/types/modules/marketing/services/punch-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/validations/all-marketings.validation.d.ts +2 -1
- package/dist/types/modules/marketing/validations/all-marketings.validation.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +2076 -62
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts +21 -0
- package/dist/types/modules/punch-marketing-history/services/punch-marketing-history.service.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/transformers/punch-marketing-history.transformer.d.ts +75 -1
- package/dist/types/modules/punch-marketing-history/transformers/punch-marketing-history.transformer.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts +1336 -20
- package/dist/types/modules/punch-marketing-history/validations/punch-marketing-history.validation.d.ts.map +1 -1
- package/dist/types/modules/referral-setting/validations/referral-setting.validation.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-coupons.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/all-coupons.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAW,MAAM,KAAK,CAAC;AAuBjC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOrC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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Fields: {
|
|
8
|
-
code: z.ZodString
|
|
9
|
-
orderLimitPerUser: z.ZodNullable<z.ZodNumber
|
|
8
|
+
code: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
9
|
+
orderLimitPerUser: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
10
10
|
};
|
|
11
11
|
export declare const baseFields: {
|
|
12
12
|
valueType: z.ZodNativeEnum<typeof ValueType>;
|
|
13
13
|
value: z.ZodNumber;
|
|
14
|
-
maxDiscountLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
14
|
+
maxDiscountLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
15
15
|
duration: z.ZodEffects<z.ZodObject<{
|
|
16
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
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>>;
|
|
@@ -28,14 +28,14 @@ export declare const baseFields: {
|
|
|
28
28
|
start: string | Date;
|
|
29
29
|
end?: string | Date | undefined;
|
|
30
30
|
}>;
|
|
31
|
-
spendLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
32
|
-
totalOrderLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
31
|
+
spendLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
32
|
+
totalOrderLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
33
33
|
minOrderValue: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
34
|
-
forNewUserOnly: z.ZodDefault<z.ZodBoolean
|
|
35
|
-
status: z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
36
|
-
expirationReason: z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
37
|
-
code: z.ZodString
|
|
38
|
-
orderLimitPerUser: z.ZodNullable<z.ZodNumber
|
|
34
|
+
forNewUserOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
35
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>;
|
|
36
|
+
expirationReason: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>;
|
|
37
|
+
code: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
38
|
+
orderLimitPerUser: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
41
|
* Get all schemas for the Parent entity
|
|
@@ -43,7 +43,7 @@ export declare const baseFields: {
|
|
|
43
43
|
declare const CouponValidationSchema: z.ZodObject<{
|
|
44
44
|
valueType: z.ZodNativeEnum<typeof ValueType>;
|
|
45
45
|
value: z.ZodNumber;
|
|
46
|
-
maxDiscountLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
46
|
+
maxDiscountLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
47
47
|
duration: z.ZodEffects<z.ZodObject<{
|
|
48
48
|
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>;
|
|
49
49
|
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>>;
|
|
@@ -60,14 +60,14 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
60
60
|
start: string | Date;
|
|
61
61
|
end?: string | Date | undefined;
|
|
62
62
|
}>;
|
|
63
|
-
spendLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
64
|
-
totalOrderLimit: z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
63
|
+
spendLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
64
|
+
totalOrderLimit: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
65
65
|
minOrderValue: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
66
|
-
forNewUserOnly: z.ZodDefault<z.ZodBoolean
|
|
67
|
-
status: z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
68
|
-
expirationReason: z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
69
|
-
code: z.ZodString
|
|
70
|
-
orderLimitPerUser: z.ZodNullable<z.ZodNumber
|
|
66
|
+
forNewUserOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
67
|
+
status: z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>;
|
|
68
|
+
expirationReason: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>;
|
|
69
|
+
code: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
70
|
+
orderLimitPerUser: z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>;
|
|
71
71
|
}, "strict", z.ZodTypeAny, {
|
|
72
72
|
value: number;
|
|
73
73
|
code: string;
|
|
@@ -92,7 +92,6 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
92
92
|
end?: string | Date | undefined;
|
|
93
93
|
};
|
|
94
94
|
valueType: ValueType;
|
|
95
|
-
orderLimitPerUser: number | null;
|
|
96
95
|
status?: Status | undefined;
|
|
97
96
|
spendLimit?: number | null | undefined;
|
|
98
97
|
maxDiscountLimit?: number | null | undefined;
|
|
@@ -100,10 +99,11 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
100
99
|
minOrderValue?: number | null | undefined;
|
|
101
100
|
forNewUserOnly?: boolean | undefined;
|
|
102
101
|
expirationReason?: CouponExpirationReason | null | undefined;
|
|
102
|
+
orderLimitPerUser?: number | null | undefined;
|
|
103
103
|
}>, CouponSchema: z.ZodObject<{
|
|
104
104
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
105
105
|
value: z.ZodOptional<z.ZodNumber>;
|
|
106
|
-
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
106
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
107
107
|
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
108
108
|
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>;
|
|
109
109
|
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>>;
|
|
@@ -120,19 +120,19 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
120
120
|
start: string | Date;
|
|
121
121
|
end?: string | Date | undefined;
|
|
122
122
|
}>>;
|
|
123
|
-
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
124
|
-
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
123
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
124
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
125
125
|
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
126
|
-
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean
|
|
127
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
128
|
-
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
129
|
-
code: z.ZodOptional<z.ZodString
|
|
130
|
-
orderLimitPerUser: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
126
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
127
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
128
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
129
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
130
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
131
131
|
_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>]>>;
|
|
132
132
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
133
133
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
134
134
|
value: z.ZodOptional<z.ZodNumber>;
|
|
135
|
-
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
135
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
136
136
|
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
137
137
|
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>;
|
|
138
138
|
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>>;
|
|
@@ -149,19 +149,19 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
149
149
|
start: string | Date;
|
|
150
150
|
end?: string | Date | undefined;
|
|
151
151
|
}>>;
|
|
152
|
-
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
153
|
-
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
152
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
153
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
154
154
|
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
155
|
-
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean
|
|
156
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
157
|
-
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
158
|
-
code: z.ZodOptional<z.ZodString
|
|
159
|
-
orderLimitPerUser: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
155
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
156
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
157
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
158
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
159
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
160
160
|
_id: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
161
161
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
162
162
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
163
163
|
value: z.ZodOptional<z.ZodNumber>;
|
|
164
|
-
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
164
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
165
165
|
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
166
166
|
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>;
|
|
167
167
|
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>>;
|
|
@@ -178,14 +178,14 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
178
178
|
start: string | Date;
|
|
179
179
|
end?: string | Date | undefined;
|
|
180
180
|
}>>;
|
|
181
|
-
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
182
|
-
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
181
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
182
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
183
183
|
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
184
|
-
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean
|
|
185
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
186
|
-
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
187
|
-
code: z.ZodOptional<z.ZodString
|
|
188
|
-
orderLimitPerUser: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
184
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
185
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
186
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
187
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
188
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
189
189
|
_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>]>>;
|
|
190
190
|
}, z.ZodTypeAny, "passthrough">>, CouponIdSchema: 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>]>, UpdateCouponSchema: z.ZodObject<{
|
|
191
191
|
[x: string]: z.ZodOptional<z.ZodTypeAny>;
|
|
@@ -196,7 +196,7 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
196
196
|
}> | z.ZodObject<{
|
|
197
197
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
198
198
|
value: z.ZodOptional<z.ZodNumber>;
|
|
199
|
-
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
199
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
200
200
|
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
201
201
|
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>;
|
|
202
202
|
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>>;
|
|
@@ -213,19 +213,19 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
213
213
|
start: string | Date;
|
|
214
214
|
end?: string | Date | undefined;
|
|
215
215
|
}>>;
|
|
216
|
-
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
217
|
-
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
216
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
217
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
218
218
|
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
219
|
-
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean
|
|
220
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
221
|
-
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
222
|
-
code: z.ZodOptional<z.ZodString
|
|
223
|
-
orderLimitPerUser: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
219
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
220
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
221
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
222
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
223
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
224
224
|
_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>]>>;
|
|
225
225
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
226
226
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
227
227
|
value: z.ZodOptional<z.ZodNumber>;
|
|
228
|
-
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
228
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
229
229
|
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
230
230
|
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>;
|
|
231
231
|
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>>;
|
|
@@ -242,19 +242,19 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
242
242
|
start: string | Date;
|
|
243
243
|
end?: string | Date | undefined;
|
|
244
244
|
}>>;
|
|
245
|
-
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
246
|
-
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
245
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
246
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
247
247
|
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
248
|
-
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean
|
|
249
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
250
|
-
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
251
|
-
code: z.ZodOptional<z.ZodString
|
|
252
|
-
orderLimitPerUser: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
248
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
249
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
250
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
251
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
252
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
253
253
|
_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>]>>;
|
|
254
254
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
255
255
|
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
256
256
|
value: z.ZodOptional<z.ZodNumber>;
|
|
257
|
-
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
257
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
258
258
|
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
259
259
|
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>;
|
|
260
260
|
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>>;
|
|
@@ -271,14 +271,14 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
271
271
|
start: string | Date;
|
|
272
272
|
end?: string | Date | undefined;
|
|
273
273
|
}>>;
|
|
274
|
-
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
275
|
-
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber
|
|
274
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
275
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
276
276
|
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
277
|
-
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean
|
|
278
|
-
status: z.ZodOptional<z.ZodDefault<z.ZodNativeEnum<typeof Status
|
|
279
|
-
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNativeEnum<typeof CouponExpirationReason
|
|
280
|
-
code: z.ZodOptional<z.ZodString
|
|
281
|
-
orderLimitPerUser: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
277
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
278
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
279
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
280
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
281
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
282
282
|
_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>]>>;
|
|
283
283
|
}, z.ZodTypeAny, "passthrough">>;
|
|
284
284
|
/**
|
|
@@ -289,18 +289,185 @@ export { CouponValidationSchema, CouponSchema, CouponIdSchema as CouponIdValidat
|
|
|
289
289
|
* Schema for getting user coupons
|
|
290
290
|
*/
|
|
291
291
|
export declare const GetUserCouponSchema: z.ZodObject<{
|
|
292
|
-
user: 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>]
|
|
292
|
+
user: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
|
|
293
293
|
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
294
294
|
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
295
295
|
}, "strip", z.ZodTypeAny, {
|
|
296
|
-
user: import("mongoose").Types.ObjectId;
|
|
297
296
|
page: number;
|
|
298
297
|
size: number;
|
|
298
|
+
user?: import("mongoose").Types.ObjectId | undefined;
|
|
299
299
|
}, {
|
|
300
|
-
user
|
|
300
|
+
user?: string | import("mongoose").Types.ObjectId | undefined;
|
|
301
301
|
page?: number | undefined;
|
|
302
302
|
size?: number | undefined;
|
|
303
303
|
}>;
|
|
304
|
+
/**
|
|
305
|
+
* Schema for validating coupons
|
|
306
|
+
*/
|
|
307
|
+
export declare const ValidateCouponSchema: z.ZodObject<{
|
|
308
|
+
user: 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>]>;
|
|
309
|
+
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>]>;
|
|
310
|
+
coupon: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
311
|
+
amountBeforeCoupon: z.ZodNumber;
|
|
312
|
+
secondaryAmountBeforeCoupon: z.ZodNumber;
|
|
313
|
+
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
shop: import("mongoose").Types.ObjectId;
|
|
315
|
+
user: import("mongoose").Types.ObjectId;
|
|
316
|
+
amountBeforeCoupon: number;
|
|
317
|
+
secondaryAmountBeforeCoupon: number;
|
|
318
|
+
coupon?: string | undefined;
|
|
319
|
+
}, {
|
|
320
|
+
shop: string | import("mongoose").Types.ObjectId;
|
|
321
|
+
user: string | import("mongoose").Types.ObjectId;
|
|
322
|
+
amountBeforeCoupon: number;
|
|
323
|
+
secondaryAmountBeforeCoupon: number;
|
|
324
|
+
coupon?: string | undefined;
|
|
325
|
+
}>;
|
|
326
|
+
/**
|
|
327
|
+
* Schema for coupon validation output
|
|
328
|
+
*/
|
|
329
|
+
export declare const CouponValidationOutputSchema: z.ZodObject<{
|
|
330
|
+
isValid: z.ZodDefault<z.ZodBoolean>;
|
|
331
|
+
amountAfterCoupon: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
secondaryAmountAfterCoupon: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
discountAmount: z.ZodOptional<z.ZodNumber>;
|
|
334
|
+
secondaryDiscountAmount: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
}, "strip", z.ZodTypeAny, {
|
|
336
|
+
isValid: boolean;
|
|
337
|
+
amountAfterCoupon?: number | undefined;
|
|
338
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
339
|
+
discountAmount?: number | undefined;
|
|
340
|
+
secondaryDiscountAmount?: number | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
isValid?: boolean | undefined;
|
|
343
|
+
amountAfterCoupon?: number | undefined;
|
|
344
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
345
|
+
discountAmount?: number | undefined;
|
|
346
|
+
secondaryDiscountAmount?: number | undefined;
|
|
347
|
+
}>;
|
|
348
|
+
export declare const CouponValidationResponseSchema: z.ZodObject<{
|
|
349
|
+
success: z.ZodBoolean;
|
|
350
|
+
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
351
|
+
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
352
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
page: z.ZodNumber;
|
|
354
|
+
size: z.ZodNumber;
|
|
355
|
+
totalElements: z.ZodNumber;
|
|
356
|
+
totalPages: z.ZodNumber;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
page: number;
|
|
359
|
+
size: number;
|
|
360
|
+
totalElements: number;
|
|
361
|
+
totalPages: number;
|
|
362
|
+
}, {
|
|
363
|
+
page: number;
|
|
364
|
+
size: number;
|
|
365
|
+
totalElements: number;
|
|
366
|
+
totalPages: number;
|
|
367
|
+
}>>;
|
|
368
|
+
documents: z.ZodArray<z.ZodType<{
|
|
369
|
+
isValid?: boolean | undefined;
|
|
370
|
+
amountAfterCoupon?: number | undefined;
|
|
371
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
372
|
+
discountAmount?: number | undefined;
|
|
373
|
+
secondaryDiscountAmount?: number | undefined;
|
|
374
|
+
}, z.ZodTypeDef, {
|
|
375
|
+
isValid?: boolean | undefined;
|
|
376
|
+
amountAfterCoupon?: number | undefined;
|
|
377
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
378
|
+
discountAmount?: number | undefined;
|
|
379
|
+
secondaryDiscountAmount?: number | undefined;
|
|
380
|
+
}>, "many">;
|
|
381
|
+
}, "strip", z.ZodTypeAny, {
|
|
382
|
+
documents: {
|
|
383
|
+
isValid?: boolean | undefined;
|
|
384
|
+
amountAfterCoupon?: number | undefined;
|
|
385
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
386
|
+
discountAmount?: number | undefined;
|
|
387
|
+
secondaryDiscountAmount?: number | undefined;
|
|
388
|
+
}[];
|
|
389
|
+
metadata?: {
|
|
390
|
+
page: number;
|
|
391
|
+
size: number;
|
|
392
|
+
totalElements: number;
|
|
393
|
+
totalPages: number;
|
|
394
|
+
} | undefined;
|
|
395
|
+
}, {
|
|
396
|
+
documents: {
|
|
397
|
+
isValid?: boolean | undefined;
|
|
398
|
+
amountAfterCoupon?: number | undefined;
|
|
399
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
400
|
+
discountAmount?: number | undefined;
|
|
401
|
+
secondaryDiscountAmount?: number | undefined;
|
|
402
|
+
}[];
|
|
403
|
+
metadata?: {
|
|
404
|
+
page: number;
|
|
405
|
+
size: number;
|
|
406
|
+
totalElements: number;
|
|
407
|
+
totalPages: number;
|
|
408
|
+
} | undefined;
|
|
409
|
+
}>, z.ZodType<{
|
|
410
|
+
isValid?: boolean | undefined;
|
|
411
|
+
amountAfterCoupon?: number | undefined;
|
|
412
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
413
|
+
discountAmount?: number | undefined;
|
|
414
|
+
secondaryDiscountAmount?: number | undefined;
|
|
415
|
+
}, z.ZodTypeDef, {
|
|
416
|
+
isValid?: boolean | undefined;
|
|
417
|
+
amountAfterCoupon?: number | undefined;
|
|
418
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
419
|
+
discountAmount?: number | undefined;
|
|
420
|
+
secondaryDiscountAmount?: number | undefined;
|
|
421
|
+
}>]>>;
|
|
422
|
+
}, "strip", z.ZodTypeAny, {
|
|
423
|
+
message: string;
|
|
424
|
+
success: boolean;
|
|
425
|
+
data?: {
|
|
426
|
+
isValid?: boolean | undefined;
|
|
427
|
+
amountAfterCoupon?: number | undefined;
|
|
428
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
429
|
+
discountAmount?: number | undefined;
|
|
430
|
+
secondaryDiscountAmount?: number | undefined;
|
|
431
|
+
} | {
|
|
432
|
+
documents: {
|
|
433
|
+
isValid?: boolean | undefined;
|
|
434
|
+
amountAfterCoupon?: number | undefined;
|
|
435
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
436
|
+
discountAmount?: number | undefined;
|
|
437
|
+
secondaryDiscountAmount?: number | undefined;
|
|
438
|
+
}[];
|
|
439
|
+
metadata?: {
|
|
440
|
+
page: number;
|
|
441
|
+
size: number;
|
|
442
|
+
totalElements: number;
|
|
443
|
+
totalPages: number;
|
|
444
|
+
} | undefined;
|
|
445
|
+
} | undefined;
|
|
446
|
+
}, {
|
|
447
|
+
message: string;
|
|
448
|
+
success: boolean;
|
|
449
|
+
data?: {
|
|
450
|
+
isValid?: boolean | undefined;
|
|
451
|
+
amountAfterCoupon?: number | undefined;
|
|
452
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
453
|
+
discountAmount?: number | undefined;
|
|
454
|
+
secondaryDiscountAmount?: number | undefined;
|
|
455
|
+
} | {
|
|
456
|
+
documents: {
|
|
457
|
+
isValid?: boolean | undefined;
|
|
458
|
+
amountAfterCoupon?: number | undefined;
|
|
459
|
+
secondaryAmountAfterCoupon?: number | undefined;
|
|
460
|
+
discountAmount?: number | undefined;
|
|
461
|
+
secondaryDiscountAmount?: number | undefined;
|
|
462
|
+
}[];
|
|
463
|
+
metadata?: {
|
|
464
|
+
page: number;
|
|
465
|
+
size: number;
|
|
466
|
+
totalElements: number;
|
|
467
|
+
totalPages: number;
|
|
468
|
+
} | undefined;
|
|
469
|
+
} | undefined;
|
|
470
|
+
}>;
|
|
304
471
|
/**
|
|
305
472
|
* Export DTO types
|
|
306
473
|
*/
|
|
@@ -308,4 +475,6 @@ export type CreateCouponDTO = DTO<typeof CouponValidationSchema>;
|
|
|
308
475
|
export type CouponDTO = DTO<typeof CouponSchema>;
|
|
309
476
|
export type UpdateCouponDTO = DTO<typeof UpdateCouponSchema>;
|
|
310
477
|
export type GetUserCouponDTO = DTO<typeof GetUserCouponSchema>;
|
|
478
|
+
export type ValidateCouponDTO = DTO<typeof ValidateCouponSchema>;
|
|
479
|
+
export type CouponValidationOutputDTO = DTO<typeof CouponValidationOutputSchema>;
|
|
311
480
|
//# sourceMappingURL=coupon.validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAc,MAAM,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAc,MAAM,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAO1G;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAcxB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBtB,CAAC;AASF;;GAEG;AACH,QAAA,MACa,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACpB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAChB,cAAc,mNACV,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCACmB,CAAC;AAErD;;GAEG;AACH,OAAO,EACN,sBAAsB,EACtB,YAAY,EACZ,cAAc,IAAI,wBAAwB,EAC1C,kBAAkB,GAClB,CAAC;AAEF;;GAEG;AACH,eAA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