@lyxa.ai/marketing 1.0.3 → 1.0.5
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.js +2 -0
- package/dist/types/events/event-initializations.d.ts +2 -0
- package/dist/types/events/event-initializations.d.ts.map +1 -0
- package/dist/types/index.d.ts +202 -27
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +2254 -2182
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +5 -0
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts +2 -1
- package/dist/types/modules/coupon/services/referral-code-coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +456 -0
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/referral-code-coupon.validation.d.ts +14 -0
- package/dist/types/modules/coupon/validations/referral-code-coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/routers/deal-setting.router.d.ts +29 -5
- package/dist/types/modules/deal-setting/routers/deal-setting.router.d.ts.map +1 -1
- package/dist/types/modules/deal-setting/services/deal-setting.service.d.ts +5 -3
- package/dist/types/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/routers/featured-setting.router.d.ts +29 -5
- package/dist/types/modules/featured-setting/routers/featured-setting.router.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/services/featured-setting.service.d.ts +5 -3
- package/dist/types/modules/featured-setting/services/featured-setting.service.d.ts.map +1 -1
- package/dist/types/modules/loyalty-point-setting/routers/loyalty-point-setting.router.d.ts +31 -7
- package/dist/types/modules/loyalty-point-setting/routers/loyalty-point-setting.router.d.ts.map +1 -1
- package/dist/types/modules/loyalty-point-setting/services/loyalty-point-setting.service.d.ts +5 -3
- package/dist/types/modules/loyalty-point-setting/services/loyalty-point-setting.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/routers/marketing.router.d.ts +14 -5
- package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +4 -3
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/types/modules/punch-marketing-history/routers/punch-marketing-history.router.d.ts +2 -2
- package/dist/types/modules/referral-setting/routers/referral-setting.router.d.ts +27 -3
- package/dist/types/modules/referral-setting/routers/referral-setting.router.d.ts.map +1 -1
- package/dist/types/modules/referral-setting/services/referral-setting.service.d.ts +5 -3
- package/dist/types/modules/referral-setting/services/referral-setting.service.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupon.router.d.ts","sourceRoot":"/","sources":["modules/coupon/routers/coupon.router.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coupon.router.d.ts","sourceRoot":"/","sources":["modules/coupon/routers/coupon.router.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;
|
|
60
61
|
private getCouponDiscountTotals;
|
|
61
62
|
private assignCouponToUser;
|
|
62
63
|
private assignCouponToMultipleUser;
|
|
63
64
|
private removeCouponFromUser;
|
|
64
65
|
private removeCouponFromMultipleUser;
|
|
66
|
+
private newUserCheck;
|
|
67
|
+
private throwBadRequest;
|
|
68
|
+
addCouponToUser(user: any, couponCode: string): Promise<DocumentType<Model>>;
|
|
69
|
+
private hasUserAlreadyAppliedCoupon;
|
|
65
70
|
private exchangeCouponForMultipleUser;
|
|
66
71
|
}
|
|
67
72
|
export declare const couponService: CouponService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAMN,MAAM,IAAI,KAAK,EAOf,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACN,uBAAuB,EAIvB,yBAAyB,EACzB,iBAAiB,EACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAElG,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAa3D,qBACa,aAAa;IACzB,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,SAAS,CAA2C;IAC5D,OAAO,CAAC,UAAU,CAA2D;IAC7E,OAAO,CAAC,mBAAmB,CAA2E;;IAUtG;;;OAGG;IACU,MAAM,CAAC,IAAI,EAAE,uBAAuB,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAiFhF;;;OAGG;IACU,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAoBzF;;;OAGG;IACU,IAAI,CAAC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EAAE,iBAAiB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAkExF,OAAO,CAAC,eAAe;IAQvB;;;;;;OAMG;YACW,kBAAkB;YAiBlB,cAAc;YAQd,sBAAsB;YAUtB,kBAAkB;YA8ClB,gBAAgB;YAWhB,uBAAuB;YAqCvB,kBAAkB;YAelB,0BAA0B;YAkB1B,oBAAoB;YAepB,4BAA4B;YAkB5B,YAAY;IAK1B,OAAO,CAAC,eAAe;IAOV,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;YA8B3E,2BAA2B;YAoB3B,6BAA6B;CAQ3C;AAED,eAAO,MAAM,aAAa,eAA+B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DocumentType, mongoose } from '@typegoose/typegoose';
|
|
2
2
|
import { ReferralCodeCoupon as Model } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
-
import { CouponValidationOutputDTO, CreateReferralCodeCouponDTO as CreateDTO, UpdateReferralCodeCouponDTO as UpdateDTO, ValidateCouponDTO } from '@modules/coupon/validations';
|
|
3
|
+
import { CouponValidationOutputDTO, CreateReferralCodeCouponDTO as CreateDTO, ReferralCodeCouponResponseDTO, UpdateReferralCodeCouponDTO as UpdateDTO, ValidateCouponDTO } from '@modules/coupon/validations';
|
|
4
4
|
export declare class ReferralCodeCouponService {
|
|
5
5
|
private model;
|
|
6
6
|
private settingsModel;
|
|
@@ -21,6 +21,7 @@ export declare class ReferralCodeCouponService {
|
|
|
21
21
|
private generateCouponCode;
|
|
22
22
|
createReferralCodeForUser(userId: mongoose.Types.ObjectId | undefined): Promise<DocumentType<Model>>;
|
|
23
23
|
validateCoupon(data: ValidateCouponDTO): Promise<CouponValidationOutputDTO>;
|
|
24
|
+
getReferralCodeCoupon(userId: mongoose.Types.ObjectId): Promise<ReferralCodeCouponResponseDTO>;
|
|
24
25
|
private getReferralSettings;
|
|
25
26
|
}
|
|
26
27
|
export declare const referralCodeCouponService: ReferralCodeCouponService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral-code-coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/referral-code-coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAEN,kBAAkB,IAAI,KAAK,EAK3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACN,yBAAyB,EACzB,2BAA2B,IAAI,SAAS,EACxC,2BAA2B,IAAI,SAAS,EACxC,iBAAiB,EACjB,MAAM,6BAA6B,CAAC;AAMrC,qBACa,yBAAyB;IACrC,OAAO,CAAC,KAAK,CAAC;IACd,OAAO,CAAC,aAAa,CAAiE;IACtF,OAAO,CAAC,SAAS,CAA2C;;IAS5D;;;OAGG;IACU,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAIlE;;;;OAIG;IACU,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAuB9E,OAAO,CAAC,YAAY;YASN,kBAAkB;IAanB,yBAAyB,CACrC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,SAAS,GACzC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"referral-code-coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/referral-code-coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAEN,kBAAkB,IAAI,KAAK,EAK3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACN,yBAAyB,EACzB,2BAA2B,IAAI,SAAS,EACxC,6BAA6B,EAC7B,2BAA2B,IAAI,SAAS,EACxC,iBAAiB,EACjB,MAAM,6BAA6B,CAAC;AAMrC,qBACa,yBAAyB;IACrC,OAAO,CAAC,KAAK,CAAC;IACd,OAAO,CAAC,aAAa,CAAiE;IACtF,OAAO,CAAC,SAAS,CAA2C;;IAS5D;;;OAGG;IACU,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAIlE;;;;OAIG;IACU,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAuB9E,OAAO,CAAC,YAAY;YASN,kBAAkB;IAanB,yBAAyB,CACrC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,SAAS,GACzC,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAiClB,cAAc,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAqC3E,qBAAqB,CACjC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAC7B,OAAO,CAAC,6BAA6B,CAAC;YAiB3B,mBAAmB;CAUjC;AAED,eAAO,MAAM,yBAAyB,2BAA2C,CAAC"}
|
|
@@ -284,6 +284,454 @@ declare const CouponValidationSchema: z.ZodObject<{
|
|
|
284
284
|
/**
|
|
285
285
|
* Export schemas
|
|
286
286
|
*/
|
|
287
|
+
export declare const GetUserCouponsResponseSchema: z.ZodObject<{
|
|
288
|
+
available: z.ZodArray<z.ZodObject<{
|
|
289
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
290
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
291
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
292
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
293
|
+
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>;
|
|
294
|
+
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>>;
|
|
295
|
+
}, "strip", z.ZodTypeAny, {
|
|
296
|
+
start: Date;
|
|
297
|
+
end?: Date | undefined;
|
|
298
|
+
}, {
|
|
299
|
+
start: string | Date;
|
|
300
|
+
end?: string | Date | undefined;
|
|
301
|
+
}>, {
|
|
302
|
+
start: Date;
|
|
303
|
+
end?: Date | undefined;
|
|
304
|
+
}, {
|
|
305
|
+
start: string | Date;
|
|
306
|
+
end?: string | Date | undefined;
|
|
307
|
+
}>>;
|
|
308
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
309
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
310
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
311
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
312
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
313
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
314
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
315
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
316
|
+
_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>]>>;
|
|
317
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
318
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
319
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
320
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
321
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
322
|
+
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>;
|
|
323
|
+
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>>;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
start: Date;
|
|
326
|
+
end?: Date | undefined;
|
|
327
|
+
}, {
|
|
328
|
+
start: string | Date;
|
|
329
|
+
end?: string | Date | undefined;
|
|
330
|
+
}>, {
|
|
331
|
+
start: Date;
|
|
332
|
+
end?: Date | undefined;
|
|
333
|
+
}, {
|
|
334
|
+
start: string | Date;
|
|
335
|
+
end?: string | Date | undefined;
|
|
336
|
+
}>>;
|
|
337
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
338
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
339
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
340
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
341
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
342
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
343
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
344
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
345
|
+
_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>]>>;
|
|
346
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
347
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
348
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
349
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
350
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
351
|
+
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>;
|
|
352
|
+
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>>;
|
|
353
|
+
}, "strip", z.ZodTypeAny, {
|
|
354
|
+
start: Date;
|
|
355
|
+
end?: Date | undefined;
|
|
356
|
+
}, {
|
|
357
|
+
start: string | Date;
|
|
358
|
+
end?: string | Date | undefined;
|
|
359
|
+
}>, {
|
|
360
|
+
start: Date;
|
|
361
|
+
end?: Date | undefined;
|
|
362
|
+
}, {
|
|
363
|
+
start: string | Date;
|
|
364
|
+
end?: string | Date | undefined;
|
|
365
|
+
}>>;
|
|
366
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
367
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
368
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
369
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
370
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
371
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
372
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
373
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
374
|
+
_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
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
376
|
+
used: z.ZodArray<z.ZodObject<{
|
|
377
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
378
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
379
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
380
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
381
|
+
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>;
|
|
382
|
+
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>>;
|
|
383
|
+
}, "strip", z.ZodTypeAny, {
|
|
384
|
+
start: Date;
|
|
385
|
+
end?: Date | undefined;
|
|
386
|
+
}, {
|
|
387
|
+
start: string | Date;
|
|
388
|
+
end?: string | Date | undefined;
|
|
389
|
+
}>, {
|
|
390
|
+
start: Date;
|
|
391
|
+
end?: Date | undefined;
|
|
392
|
+
}, {
|
|
393
|
+
start: string | Date;
|
|
394
|
+
end?: string | Date | undefined;
|
|
395
|
+
}>>;
|
|
396
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
397
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
398
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
399
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
400
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
401
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
402
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
403
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
404
|
+
_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>]>>;
|
|
405
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
406
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
407
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
408
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
409
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
410
|
+
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>;
|
|
411
|
+
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>>;
|
|
412
|
+
}, "strip", z.ZodTypeAny, {
|
|
413
|
+
start: Date;
|
|
414
|
+
end?: Date | undefined;
|
|
415
|
+
}, {
|
|
416
|
+
start: string | Date;
|
|
417
|
+
end?: string | Date | undefined;
|
|
418
|
+
}>, {
|
|
419
|
+
start: Date;
|
|
420
|
+
end?: Date | undefined;
|
|
421
|
+
}, {
|
|
422
|
+
start: string | Date;
|
|
423
|
+
end?: string | Date | undefined;
|
|
424
|
+
}>>;
|
|
425
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
426
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
427
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
428
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
429
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
430
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
431
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
432
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
433
|
+
_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>]>>;
|
|
434
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
435
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
436
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
437
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
438
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
439
|
+
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>;
|
|
440
|
+
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>>;
|
|
441
|
+
}, "strip", z.ZodTypeAny, {
|
|
442
|
+
start: Date;
|
|
443
|
+
end?: Date | undefined;
|
|
444
|
+
}, {
|
|
445
|
+
start: string | Date;
|
|
446
|
+
end?: string | Date | undefined;
|
|
447
|
+
}>, {
|
|
448
|
+
start: Date;
|
|
449
|
+
end?: Date | undefined;
|
|
450
|
+
}, {
|
|
451
|
+
start: string | Date;
|
|
452
|
+
end?: string | Date | undefined;
|
|
453
|
+
}>>;
|
|
454
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
455
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
456
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
457
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
458
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
459
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
460
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
461
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
462
|
+
_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>]>>;
|
|
463
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
464
|
+
expired: z.ZodArray<z.ZodObject<{
|
|
465
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
466
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
468
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
469
|
+
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>;
|
|
470
|
+
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>>;
|
|
471
|
+
}, "strip", z.ZodTypeAny, {
|
|
472
|
+
start: Date;
|
|
473
|
+
end?: Date | undefined;
|
|
474
|
+
}, {
|
|
475
|
+
start: string | Date;
|
|
476
|
+
end?: string | Date | undefined;
|
|
477
|
+
}>, {
|
|
478
|
+
start: Date;
|
|
479
|
+
end?: Date | undefined;
|
|
480
|
+
}, {
|
|
481
|
+
start: string | Date;
|
|
482
|
+
end?: string | Date | undefined;
|
|
483
|
+
}>>;
|
|
484
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
485
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
486
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
487
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
488
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
489
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
490
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
491
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
492
|
+
_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>]>>;
|
|
493
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
494
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
495
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
496
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
497
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
498
|
+
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>;
|
|
499
|
+
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>>;
|
|
500
|
+
}, "strip", z.ZodTypeAny, {
|
|
501
|
+
start: Date;
|
|
502
|
+
end?: Date | undefined;
|
|
503
|
+
}, {
|
|
504
|
+
start: string | Date;
|
|
505
|
+
end?: string | Date | undefined;
|
|
506
|
+
}>, {
|
|
507
|
+
start: Date;
|
|
508
|
+
end?: Date | undefined;
|
|
509
|
+
}, {
|
|
510
|
+
start: string | Date;
|
|
511
|
+
end?: string | Date | undefined;
|
|
512
|
+
}>>;
|
|
513
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
514
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
515
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
516
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
517
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
518
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
519
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
520
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
521
|
+
_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>]>>;
|
|
522
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
523
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
524
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
525
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
526
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
527
|
+
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>;
|
|
528
|
+
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>>;
|
|
529
|
+
}, "strip", z.ZodTypeAny, {
|
|
530
|
+
start: Date;
|
|
531
|
+
end?: Date | undefined;
|
|
532
|
+
}, {
|
|
533
|
+
start: string | Date;
|
|
534
|
+
end?: string | Date | undefined;
|
|
535
|
+
}>, {
|
|
536
|
+
start: Date;
|
|
537
|
+
end?: Date | undefined;
|
|
538
|
+
}, {
|
|
539
|
+
start: string | Date;
|
|
540
|
+
end?: string | Date | undefined;
|
|
541
|
+
}>>;
|
|
542
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
543
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
544
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
545
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
546
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
547
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
548
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
549
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
550
|
+
_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>]>>;
|
|
551
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
552
|
+
}, "strip", z.ZodTypeAny, {
|
|
553
|
+
available: z.objectOutputType<{
|
|
554
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
555
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
557
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
558
|
+
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>;
|
|
559
|
+
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>>;
|
|
560
|
+
}, "strip", z.ZodTypeAny, {
|
|
561
|
+
start: Date;
|
|
562
|
+
end?: Date | undefined;
|
|
563
|
+
}, {
|
|
564
|
+
start: string | Date;
|
|
565
|
+
end?: string | Date | undefined;
|
|
566
|
+
}>, {
|
|
567
|
+
start: Date;
|
|
568
|
+
end?: Date | undefined;
|
|
569
|
+
}, {
|
|
570
|
+
start: string | Date;
|
|
571
|
+
end?: string | Date | undefined;
|
|
572
|
+
}>>;
|
|
573
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
574
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
575
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
576
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
577
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
578
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
579
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
580
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
581
|
+
_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>]>>;
|
|
582
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
583
|
+
used: z.objectOutputType<{
|
|
584
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
585
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
586
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
587
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
588
|
+
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>;
|
|
589
|
+
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>>;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
start: Date;
|
|
592
|
+
end?: Date | undefined;
|
|
593
|
+
}, {
|
|
594
|
+
start: string | Date;
|
|
595
|
+
end?: string | Date | undefined;
|
|
596
|
+
}>, {
|
|
597
|
+
start: Date;
|
|
598
|
+
end?: Date | undefined;
|
|
599
|
+
}, {
|
|
600
|
+
start: string | Date;
|
|
601
|
+
end?: string | Date | undefined;
|
|
602
|
+
}>>;
|
|
603
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
604
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
605
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
606
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
607
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
608
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
609
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
610
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
611
|
+
_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>]>>;
|
|
612
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
613
|
+
expired: z.objectOutputType<{
|
|
614
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
615
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
616
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
617
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
618
|
+
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>;
|
|
619
|
+
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>>;
|
|
620
|
+
}, "strip", z.ZodTypeAny, {
|
|
621
|
+
start: Date;
|
|
622
|
+
end?: Date | undefined;
|
|
623
|
+
}, {
|
|
624
|
+
start: string | Date;
|
|
625
|
+
end?: string | Date | undefined;
|
|
626
|
+
}>, {
|
|
627
|
+
start: Date;
|
|
628
|
+
end?: Date | undefined;
|
|
629
|
+
}, {
|
|
630
|
+
start: string | Date;
|
|
631
|
+
end?: string | Date | undefined;
|
|
632
|
+
}>>;
|
|
633
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
634
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
635
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
636
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
637
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
638
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
639
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
640
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
641
|
+
_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>]>>;
|
|
642
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
643
|
+
}, {
|
|
644
|
+
available: z.objectInputType<{
|
|
645
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
646
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
647
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
648
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
649
|
+
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>;
|
|
650
|
+
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>>;
|
|
651
|
+
}, "strip", z.ZodTypeAny, {
|
|
652
|
+
start: Date;
|
|
653
|
+
end?: Date | undefined;
|
|
654
|
+
}, {
|
|
655
|
+
start: string | Date;
|
|
656
|
+
end?: string | Date | undefined;
|
|
657
|
+
}>, {
|
|
658
|
+
start: Date;
|
|
659
|
+
end?: Date | undefined;
|
|
660
|
+
}, {
|
|
661
|
+
start: string | Date;
|
|
662
|
+
end?: string | Date | undefined;
|
|
663
|
+
}>>;
|
|
664
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
665
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
666
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
667
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
668
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
669
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
670
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
671
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
672
|
+
_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>]>>;
|
|
673
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
674
|
+
used: z.objectInputType<{
|
|
675
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
676
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
677
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
678
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
679
|
+
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>;
|
|
680
|
+
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>>;
|
|
681
|
+
}, "strip", z.ZodTypeAny, {
|
|
682
|
+
start: Date;
|
|
683
|
+
end?: Date | undefined;
|
|
684
|
+
}, {
|
|
685
|
+
start: string | Date;
|
|
686
|
+
end?: string | Date | undefined;
|
|
687
|
+
}>, {
|
|
688
|
+
start: Date;
|
|
689
|
+
end?: Date | undefined;
|
|
690
|
+
}, {
|
|
691
|
+
start: string | Date;
|
|
692
|
+
end?: string | Date | undefined;
|
|
693
|
+
}>>;
|
|
694
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
695
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
696
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
697
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
698
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
699
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
700
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
701
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
702
|
+
_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>]>>;
|
|
703
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
704
|
+
expired: z.objectInputType<{
|
|
705
|
+
valueType: z.ZodOptional<z.ZodNativeEnum<typeof ValueType>>;
|
|
706
|
+
value: z.ZodOptional<z.ZodNumber>;
|
|
707
|
+
maxDiscountLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
708
|
+
duration: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
709
|
+
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>;
|
|
710
|
+
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>>;
|
|
711
|
+
}, "strip", z.ZodTypeAny, {
|
|
712
|
+
start: Date;
|
|
713
|
+
end?: Date | undefined;
|
|
714
|
+
}, {
|
|
715
|
+
start: string | Date;
|
|
716
|
+
end?: string | Date | undefined;
|
|
717
|
+
}>, {
|
|
718
|
+
start: Date;
|
|
719
|
+
end?: Date | undefined;
|
|
720
|
+
}, {
|
|
721
|
+
start: string | Date;
|
|
722
|
+
end?: string | Date | undefined;
|
|
723
|
+
}>>;
|
|
724
|
+
spendLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
725
|
+
totalOrderLimit: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
726
|
+
minOrderValue: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodNumber>>>;
|
|
727
|
+
forNewUserOnly: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodBoolean>>>;
|
|
728
|
+
status: z.ZodOptional<z.ZodDefault<z.ZodOptional<z.ZodNativeEnum<typeof Status>>>>;
|
|
729
|
+
expirationReason: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNativeEnum<typeof CouponExpirationReason>>>>>;
|
|
730
|
+
code: z.ZodOptional<z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
731
|
+
orderLimitPerUser: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodOptional<z.ZodNumber>>>>;
|
|
732
|
+
_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>]>>;
|
|
733
|
+
}, z.ZodTypeAny, "passthrough">[];
|
|
734
|
+
}>;
|
|
287
735
|
export { CouponValidationSchema, CouponSchema, CouponIdSchema as CouponIdValidationSchema, UpdateCouponSchema, };
|
|
288
736
|
/**
|
|
289
737
|
* Schema for getting user coupons
|
|
@@ -345,6 +793,13 @@ export declare const CouponValidationOutputSchema: z.ZodObject<{
|
|
|
345
793
|
discountAmount?: number | undefined;
|
|
346
794
|
secondaryDiscountAmount?: number | undefined;
|
|
347
795
|
}>;
|
|
796
|
+
export declare const CouponCodeSchema: z.ZodObject<{
|
|
797
|
+
couponCode: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
798
|
+
}, "strip", z.ZodTypeAny, {
|
|
799
|
+
couponCode: string;
|
|
800
|
+
}, {
|
|
801
|
+
couponCode: string;
|
|
802
|
+
}>;
|
|
348
803
|
export declare const CouponValidationResponseSchema: z.ZodObject<{
|
|
349
804
|
success: z.ZodBoolean;
|
|
350
805
|
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
@@ -477,4 +932,5 @@ export type UpdateCouponDTO = DTO<typeof UpdateCouponSchema>;
|
|
|
477
932
|
export type GetUserCouponDTO = DTO<typeof GetUserCouponSchema>;
|
|
478
933
|
export type ValidateCouponDTO = DTO<typeof ValidateCouponSchema>;
|
|
479
934
|
export type CouponValidationOutputDTO = DTO<typeof CouponValidationOutputSchema>;
|
|
935
|
+
export type GetUserCouponsResponseDTO = DTO<typeof GetUserCouponsResponseSchema>;
|
|
480
936
|
//# 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;AAO1G;;GAEG;AACH,eAAO,MAAM,YAAY;;;CAcxB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;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G,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -66,6 +66,20 @@ declare const ReferralCodeCouponValidationSchema: z.ZodObject<{
|
|
|
66
66
|
* Export schemas
|
|
67
67
|
*/
|
|
68
68
|
export { ReferralCodeCouponValidationSchema, ReferralCodeCouponSchema, ReferralCodeCouponIdSchema as ReferralCodeCouponIdValidationSchema, UpdateReferralCodeCouponSchema, };
|
|
69
|
+
export declare const ReferralCodeCouponResponseSchema: z.ZodObject<{
|
|
70
|
+
code: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
71
|
+
text: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
code: string;
|
|
74
|
+
text: string;
|
|
75
|
+
}, {
|
|
76
|
+
code: string;
|
|
77
|
+
text: string;
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* Export DTO type
|
|
81
|
+
*/
|
|
82
|
+
export type ReferralCodeCouponResponseDTO = DTO<typeof ReferralCodeCouponResponseSchema>;
|
|
69
83
|
/**
|
|
70
84
|
* Export DTO types
|
|
71
85
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referral-code-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/referral-code-coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAoB/D;;GAEG;AACH,QAAA,MACa,kCAAkC;;;;;;;;;;;;;;;IAChC,wBAAwB;;;;;;;;;;;;;;;;;;kCAC5B,0BAA0B,mNACtB,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;gCACO,CAAC;AAErD;;GAEG;AACH,OAAO,EACN,kCAAkC,EAClC,wBAAwB,EACxB,0BAA0B,IAAI,oCAAoC,EAClE,8BAA8B,GAC9B,CAAC;
|
|
1
|
+
{"version":3,"file":"referral-code-coupon.validation.d.ts","sourceRoot":"/","sources":["modules/coupon/validations/referral-code-coupon.validation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAGN,GAAG,EACH,MAAM,2DAA2D,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAoB/D;;GAEG;AACH,QAAA,MACa,kCAAkC;;;;;;;;;;;;;;;IAChC,wBAAwB;;;;;;;;;;;;;;;;;;kCAC5B,0BAA0B,mNACtB,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;gCACO,CAAC;AAErD;;GAEG;AACH,OAAO,EACN,kCAAkC,EAClC,wBAAwB,EACxB,0BAA0B,IAAI,oCAAoC,EAClE,8BAA8B,GAC9B,CAAC;AACF,eAAO,MAAM,gCAAgC;;;;;;;;;EAG3C,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG,GAAG,CAAC,OAAO,kCAAkC,CAAC,CAAC;AACzF,MAAM,MAAM,qBAAqB,GAAG,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACzE,MAAM,MAAM,2BAA2B,GAAG,GAAG,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|