@lyxa.ai/marketing 1.0.22 → 1.0.24

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.
Files changed (47) hide show
  1. package/dist/lib/index.d.ts +25 -0
  2. package/dist/lib/index.d.ts.map +1 -1
  3. package/dist/lib/modules/coupon/routers/coupon.router.d.ts +13 -0
  4. package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  5. package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts +1 -0
  6. package/dist/lib/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
  7. package/dist/lib/modules/coupon/services/individual-store-coupon.service.js +14 -0
  8. package/dist/lib/modules/coupon/services/individual-store-coupon.service.js.map +1 -1
  9. package/dist/lib/modules/coupon/transformers/coupon.transformer.d.ts +1 -0
  10. package/dist/lib/modules/coupon/transformers/coupon.transformer.d.ts.map +1 -1
  11. package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts +21 -0
  12. package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
  13. package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.d.ts +9 -0
  14. package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.d.ts.map +1 -1
  15. package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.js +1 -0
  16. package/dist/lib/modules/coupon/validations/individual-store-coupon.validation.js.map +1 -1
  17. package/dist/lib/modules/marketing/routers/marketing.router.d.ts +12 -0
  18. package/dist/lib/modules/marketing/routers/marketing.router.d.ts.map +1 -1
  19. package/dist/lib/modules/marketing/routers/marketing.router.js +6 -0
  20. package/dist/lib/modules/marketing/routers/marketing.router.js.map +1 -1
  21. package/dist/lib/modules/marketing/services/marketing.service.d.ts +2 -1
  22. package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
  23. package/dist/lib/modules/marketing/services/marketing.service.js +28 -0
  24. package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
  25. package/dist/lib/modules/marketing/validations/marketing.validation.d.ts +11 -0
  26. package/dist/lib/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
  27. package/dist/lib/modules/marketing/validations/marketing.validation.js +6 -1
  28. package/dist/lib/modules/marketing/validations/marketing.validation.js.map +1 -1
  29. package/dist/types/index.d.ts +25 -0
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/dist/types/modules/coupon/routers/coupon.router.d.ts +13 -0
  32. package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
  33. package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts +1 -0
  34. package/dist/types/modules/coupon/services/individual-store-coupon.service.d.ts.map +1 -1
  35. package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts +1 -0
  36. package/dist/types/modules/coupon/transformers/coupon.transformer.d.ts.map +1 -1
  37. package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +21 -0
  38. package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
  39. package/dist/types/modules/coupon/validations/individual-store-coupon.validation.d.ts +9 -0
  40. package/dist/types/modules/coupon/validations/individual-store-coupon.validation.d.ts.map +1 -1
  41. package/dist/types/modules/marketing/routers/marketing.router.d.ts +12 -0
  42. package/dist/types/modules/marketing/routers/marketing.router.d.ts.map +1 -1
  43. package/dist/types/modules/marketing/services/marketing.service.d.ts +2 -1
  44. package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
  45. package/dist/types/modules/marketing/validations/marketing.validation.d.ts +11 -0
  46. package/dist/types/modules/marketing/validations/marketing.validation.d.ts.map +1 -1
  47. package/package.json +2 -2
@@ -649,6 +649,18 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
649
649
  };
650
650
  meta: object;
651
651
  }>;
652
+ handleNewProductForEntireMenuMarketing: import("@trpc/server").TRPCMutationProcedure<{
653
+ input: {
654
+ shop: string | import("mongoose").Types.ObjectId;
655
+ product: string | import("mongoose").Types.ObjectId;
656
+ };
657
+ output: {
658
+ success: boolean;
659
+ message: string;
660
+ data: unknown;
661
+ };
662
+ meta: object;
663
+ }>;
652
664
  }>>;
653
665
  couponRouter: import("@trpc/server").TRPCBuiltRouter<{
654
666
  ctx: import("@lyxa.ai/core/dist/libraries/trpc/context").LyxaHTTPContext;
@@ -771,6 +783,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
771
783
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
772
784
  shops?: (string | import("mongoose").Types.ObjectId)[] | undefined;
773
785
  isShopCoverExpenses?: boolean | undefined;
786
+ firstOrderOnly?: boolean | undefined;
774
787
  } | {
775
788
  value: number;
776
789
  code: string;
@@ -952,6 +965,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
952
965
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
953
966
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
954
967
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
968
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
955
969
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
956
970
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
957
971
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -1209,6 +1223,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
1209
1223
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1210
1224
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
1211
1225
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
1226
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
1212
1227
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1213
1228
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
1214
1229
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -1481,6 +1496,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
1481
1496
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1482
1497
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
1483
1498
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
1499
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
1484
1500
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1485
1501
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
1486
1502
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -1738,6 +1754,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
1738
1754
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1739
1755
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
1740
1756
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
1757
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
1741
1758
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1742
1759
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
1743
1760
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -2021,6 +2038,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
2021
2038
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2022
2039
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
2023
2040
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2041
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2024
2042
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2025
2043
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
2026
2044
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -2278,6 +2296,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
2278
2296
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2279
2297
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
2280
2298
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2299
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2281
2300
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2282
2301
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
2283
2302
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -2541,6 +2560,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
2541
2560
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
2542
2561
  shops?: (string | import("mongoose").Types.ObjectId)[] | undefined;
2543
2562
  isShopCoverExpenses?: boolean | undefined;
2563
+ firstOrderOnly?: boolean | undefined;
2544
2564
  } | {
2545
2565
  value: number;
2546
2566
  code: string;
@@ -2723,6 +2743,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
2723
2743
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2724
2744
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
2725
2745
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2746
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2726
2747
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2727
2748
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
2728
2749
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -2980,6 +3001,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
2980
3001
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2981
3002
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
2982
3003
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3004
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
2983
3005
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2984
3006
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
2985
3007
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -3255,6 +3277,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
3255
3277
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3256
3278
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
3257
3279
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3280
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3258
3281
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3259
3282
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
3260
3283
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -3512,6 +3535,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
3512
3535
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3513
3536
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
3514
3537
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3538
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3515
3539
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3516
3540
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
3517
3541
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -3806,6 +3830,7 @@ declare const marketingMicroServiceRouter: import("@trpc/server").TRPCBuiltRoute
3806
3830
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3807
3831
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
3808
3832
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3833
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
3809
3834
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3810
3835
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
3811
3836
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAiBA,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAeU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAR1C,CAAC;AAoCH,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAC"}
@@ -121,6 +121,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
121
121
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
122
122
  shops?: (string | mongoose.Types.ObjectId)[] | undefined;
123
123
  isShopCoverExpenses?: boolean | undefined;
124
+ firstOrderOnly?: boolean | undefined;
124
125
  } | {
125
126
  value: number;
126
127
  code: string;
@@ -302,6 +303,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
302
303
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
303
304
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
304
305
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
306
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
305
307
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
306
308
  value: z.ZodOptional<z.ZodNumber>;
307
309
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -559,6 +561,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
559
561
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
560
562
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
561
563
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
564
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
562
565
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
563
566
  value: z.ZodOptional<z.ZodNumber>;
564
567
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -831,6 +834,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
831
834
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
832
835
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
833
836
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
837
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
834
838
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
835
839
  value: z.ZodOptional<z.ZodNumber>;
836
840
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1088,6 +1092,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
1088
1092
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1089
1093
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
1090
1094
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1095
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1091
1096
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1092
1097
  value: z.ZodOptional<z.ZodNumber>;
1093
1098
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1371,6 +1376,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
1371
1376
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1372
1377
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
1373
1378
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1379
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1374
1380
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1375
1381
  value: z.ZodOptional<z.ZodNumber>;
1376
1382
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1628,6 +1634,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
1628
1634
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1629
1635
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
1630
1636
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1637
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1631
1638
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1632
1639
  value: z.ZodOptional<z.ZodNumber>;
1633
1640
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1891,6 +1898,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
1891
1898
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
1892
1899
  shops?: (string | mongoose.Types.ObjectId)[] | undefined;
1893
1900
  isShopCoverExpenses?: boolean | undefined;
1901
+ firstOrderOnly?: boolean | undefined;
1894
1902
  } | {
1895
1903
  value: number;
1896
1904
  code: string;
@@ -2073,6 +2081,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
2073
2081
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2074
2082
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
2075
2083
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2084
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2076
2085
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2077
2086
  value: z.ZodOptional<z.ZodNumber>;
2078
2087
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -2330,6 +2339,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
2330
2339
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2331
2340
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
2332
2341
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2342
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2333
2343
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2334
2344
  value: z.ZodOptional<z.ZodNumber>;
2335
2345
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -2605,6 +2615,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
2605
2615
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2606
2616
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
2607
2617
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2618
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2608
2619
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2609
2620
  value: z.ZodOptional<z.ZodNumber>;
2610
2621
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -2862,6 +2873,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
2862
2873
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2863
2874
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
2864
2875
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2876
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2865
2877
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2866
2878
  value: z.ZodOptional<z.ZodNumber>;
2867
2879
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -3156,6 +3168,7 @@ export declare const couponRouter: import("@trpc/server").TRPCBuiltRouter<{
3156
3168
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3157
3169
  shops: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, mongoose.Types.ObjectId, string>, z.ZodType<mongoose.Types.ObjectId, z.ZodTypeDef, mongoose.Types.ObjectId>]>, "many">>>;
3158
3170
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3171
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3159
3172
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3160
3173
  value: z.ZodOptional<z.ZodNumber>;
3161
3174
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1 +1 @@
1
- {"version":3,"file":"coupon.router.d.ts","sourceRoot":"/","sources":["modules/coupon/routers/coupon.router.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;4BAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2IqlzB,CAAC;;;;;;;;;;GAD/mzB,CAAC"}
@@ -4,6 +4,7 @@ import { CouponValidationOutputDTO, CreateIndividualStoreCouponDTO as CreateDTO,
4
4
  export declare class IndividualStoreCouponService {
5
5
  private model;
6
6
  private readonly shopModelForCoupon;
7
+ private orderModel;
7
8
  constructor();
8
9
  create(data: CreateDTO): Promise<DocumentType<Model>>;
9
10
  update(id: string, data: UpdateDTO): Promise<DocumentType<Model>>;
@@ -1 +1 @@
1
- {"version":3,"file":"individual-store-coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/individual-store-coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAY,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAEN,qBAAqB,IAAI,KAAK,EAE9B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,yBAAyB,EACzB,8BAA8B,IAAI,SAAS,EAC3C,8BAA8B,IAAI,SAAS,EAC3C,iBAAiB,EACjB,MAAM,6BAA6B,CAAC;AAKrC,qBACa,4BAA4B;IACxC,OAAO,CAAC,KAAK,CAAC;IACd,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAmB;;IAWzC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAWrD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAuBjE,cAAc,CAC1B,IAAI,EAAE,iBAAiB,EACvB,cAAc,EAAE,YAAY,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,yBAAyB,CAAC;CA4CrC;AAED,eAAO,MAAM,4BAA4B,8BAA8C,CAAC"}
1
+ {"version":3,"file":"individual-store-coupon.service.d.ts","sourceRoot":"/","sources":["modules/coupon/services/individual-store-coupon.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAY,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAEN,qBAAqB,IAAI,KAAK,EAI9B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,yBAAyB,EACzB,8BAA8B,IAAI,SAAS,EAC3C,8BAA8B,IAAI,SAAS,EAC3C,iBAAiB,EACjB,MAAM,6BAA6B,CAAC;AAMrC,qBACa,4BAA4B;IACxC,OAAO,CAAC,KAAK,CAAC;IACd,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAmB;IACtD,OAAO,CAAC,UAAU,CAA2D;;IAYhE,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAWrD,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAuBjE,cAAc,CAC1B,IAAI,EAAE,iBAAiB,EACvB,cAAc,EAAE,YAAY,CAAC,KAAK,CAAC,GACjC,OAAO,CAAC,yBAAyB,CAAC;CA4DrC;AAED,eAAO,MAAM,4BAA4B,8BAA8C,CAAC"}
@@ -53,9 +53,11 @@ const enum_1 = require("@lyxa.ai/core/dist/utilities/enum");
53
53
  let IndividualStoreCouponService = class IndividualStoreCouponService {
54
54
  model;
55
55
  shopModelForCoupon;
56
+ orderModel;
56
57
  constructor() {
57
58
  this.model = models_1.IndividualStoreCouponModel;
58
59
  this.shopModelForCoupon = models_1.ShopModel;
60
+ this.orderModel = models_1.RegularOrderModel;
59
61
  }
60
62
  async create(data) {
61
63
  const coupon = this.model.create(data);
@@ -90,6 +92,18 @@ let IndividualStoreCouponService = class IndividualStoreCouponService {
90
92
  isValid: false,
91
93
  };
92
94
  }
95
+ if (couponDocument.firstOrderOnly) {
96
+ const order = await this.orderModel.findOne({
97
+ user: new typegoose_1.mongoose.Types.ObjectId(data.user),
98
+ shop: new typegoose_1.mongoose.Types.ObjectId(data.shop),
99
+ status: enum_1.RegularOrderStatus.DELIVERED,
100
+ });
101
+ if (order) {
102
+ return {
103
+ isValid: false,
104
+ };
105
+ }
106
+ }
93
107
  const discountAmount = couponDocument.valueType == enum_1.ValueType.FIXED
94
108
  ? couponDocument.value
95
109
  : (0, shared_1.roundBaseCurrency)((data.amountBeforeCoupon * couponDocument.value) / 100);
@@ -1 +1 @@
1
- {"version":3,"file":"individual-store-coupon.service.js","sourceRoot":"/","sources":["modules/coupon/services/individual-store-coupon.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAA4C;AAC5C,yCAAyC;AACzC,oDAA8D;AAC9D,uEAIoD;AAOpD,oEAA2E;AAC3E,gEAAgG;AAChG,4DAA8D;AAGvD,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAChC,KAAK,CAAC;IACG,kBAAkB,CAAmB;IAEtD;QACC,IAAI,CAAC,KAAK,GAAG,mCAA0B,CAAC;QACxC,IAAI,CAAC,kBAAkB,GAAG,kBAA6B,CAAC;IACzD,CAAC;IAMM,KAAK,CAAC,MAAM,CAAC,IAAe;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,KAA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iB,EAAC,CAAC,IAAI,CAAC,kBAAkB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;QAE9E,MAAM,uBAAuB,GAC5B,cAAc,CAAC,SAAS,IAAI,gBAAS,CAAC,KAAK;YAC1C,CAAC,CAAC,MAAM,IAAA,6BAAkB,EAAC,cAAc,CAAC,KAAK,CAAC;YAChD,CAAC,CAAC,IAAA,+BAAsB,EAAC,CAAC,IAAI,CAAC,2BAA2B,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;QAE5F,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC;QAE/D,OAAO;YACN,OAAO,EAAE,IAAI;YACb,cAAc;YACd,uBAAuB;YACvB,iBAAiB,EAAE,IAAA,0BAAiB,EAAC,IAAI,CAAC,kBAAkB,GAAG,cAAc,CAAC;YAC9E,0BAA0B,EAAE,IAAA,+BAAsB,EACjD,IAAI,CAAC,2BAA2B,GAAG,uBAAuB,CAC1D;YACD,WAAW,EAAE;gBACZ,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc;gBACpD,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB;gBACtE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBACjD,gBAAgB,EAAE,mBAAmB,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;aACnE;SACD,CAAC;IACH,CAAC;CACD,CAAA;AA9FY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,gBAAO,GAAE;;GACG,4BAA4B,CA8FxC;AAEY,QAAA,4BAA4B,GAAG,gBAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { TRPCError } from '@trpc/server';\nimport { DocumentType, mongoose } from '@typegoose/typegoose';\nimport {\n\tIndividualStoreCouponModel,\n\tIndividualStoreCoupon as Model,\n\tShopModel,\n} from '@lyxa.ai/core/dist/libraries/mongo/models/';\nimport {\n\tCouponValidationOutputDTO,\n\tCreateIndividualStoreCouponDTO as CreateDTO,\n\tUpdateIndividualStoreCouponDTO as UpdateDTO,\n\tValidateCouponDTO,\n} from '@modules/coupon/validations';\nimport { convertToSecondary } from '@lyxa.ai/core/dist/utilities/currency';\nimport { roundBaseCurrency, roundSecondaryCurrency } from '@lyxa.ai/core/dist/utilities/shared';\nimport { ValueType } from '@lyxa.ai/core/dist/utilities/enum';\n\n@Service()\nexport class IndividualStoreCouponService {\n\tprivate model;\n\tprivate readonly shopModelForCoupon: typeof ShopModel;\n\n\tconstructor() {\n\t\tthis.model = IndividualStoreCouponModel;\n\t\tthis.shopModelForCoupon = ShopModel as typeof ShopModel;\n\t}\n\n\t/**\n\t * Create a new record\n\t * @param data Data for the new record\n\t */\n\tpublic async create(data: CreateDTO): Promise<DocumentType<Model>> {\n\t\tconst coupon = this.model.create(data);\n\n\t\treturn coupon;\n\t}\n\n\t/**\n\t * Update record\n\t * @param id ID of the record\n\t * @param data Data to update\n\t */\n\tpublic async update(id: string, data: UpdateDTO): Promise<DocumentType<Model>> {\n\t\tconst record = await this.model.findOneAndUpdate(\n\t\t\t{\n\t\t\t\t_id: id,\n\t\t\t\tdeletedAt: null,\n\t\t\t},\n\t\t\tdata,\n\t\t\t{\n\t\t\t\tnew: true,\n\t\t\t\trunValidators: true,\n\t\t\t}\n\t\t);\n\n\t\tif (!record) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'NOT_FOUND',\n\t\t\t\tmessage: `Record not found`,\n\t\t\t});\n\t\t}\n\n\t\treturn record;\n\t}\n\n\tpublic async validateCoupon(\n\t\tdata: ValidateCouponDTO,\n\t\tcouponDocument: DocumentType<Model>\n\t): Promise<CouponValidationOutputDTO> {\n\t\tconst shopId = new mongoose.Types.ObjectId(data.shop);\n\t\tconst shop = await this.shopModelForCoupon.findOne({ _id: shopId, deletedAt: null });\n\t\tif (!shop) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t};\n\t\t}\n\n\t\t// Check if the coupon is applicable to the shop and item-type\n\t\tif (!couponDocument.shops?.includes(shopId) && !couponDocument.itemTypes?.includes(shop.itemType)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t};\n\t\t}\n\n\t\tconst discountAmount =\n\t\t\tcouponDocument.valueType == ValueType.FIXED\n\t\t\t\t? couponDocument.value\n\t\t\t\t: roundBaseCurrency((data.amountBeforeCoupon * couponDocument.value) / 100);\n\n\t\tconst secondaryDiscountAmount =\n\t\t\tcouponDocument.valueType == ValueType.FIXED\n\t\t\t\t? await convertToSecondary(couponDocument.value)\n\t\t\t\t: roundSecondaryCurrency((data.secondaryAmountBeforeCoupon * couponDocument.value) / 100);\n\n\t\tconst isShopCoverExpenses = couponDocument.isShopCoverExpenses;\n\n\t\treturn {\n\t\t\tisValid: true,\n\t\t\tdiscountAmount,\n\t\t\tsecondaryDiscountAmount,\n\t\t\tamountAfterCoupon: roundBaseCurrency(data.amountBeforeCoupon - discountAmount),\n\t\t\tsecondaryAmountAfterCoupon: roundSecondaryCurrency(\n\t\t\t\tdata.secondaryAmountBeforeCoupon - secondaryDiscountAmount\n\t\t\t),\n\t\t\tdiscountCut: {\n\t\t\t\tcompanyCut: isShopCoverExpenses ? 0 : discountAmount,\n\t\t\t\tsecondaryCompanyCut: isShopCoverExpenses ? 0 : secondaryDiscountAmount,\n\t\t\t\tshopCut: isShopCoverExpenses ? discountAmount : 0,\n\t\t\t\tsecondaryShopCut: isShopCoverExpenses ? secondaryDiscountAmount : 0,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport const individualStoreCouponService = Container.get(IndividualStoreCouponService);\n"]}
1
+ {"version":3,"file":"individual-store-coupon.service.js","sourceRoot":"/","sources":["modules/coupon/services/individual-store-coupon.service.ts"],"names":[],"mappings":";;;;;;;;;;;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c,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC;QAE5F,MAAM,mBAAmB,GAAG,cAAc,CAAC,mBAAmB,CAAC;QAE/D,OAAO;YACN,OAAO,EAAE,IAAI;YACb,cAAc;YACd,uBAAuB;YACvB,iBAAiB,EAAE,IAAA,0BAAiB,EAAC,IAAI,CAAC,kBAAkB,GAAG,cAAc,CAAC;YAC9E,0BAA0B,EAAE,IAAA,+BAAsB,EACjD,IAAI,CAAC,2BAA2B,GAAG,uBAAuB,CAC1D;YACD,WAAW,EAAE;gBACZ,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc;gBACpD,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB;gBACtE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;gBACjD,gBAAgB,EAAE,mBAAmB,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC;aACnE;SACD,CAAC;IACH,CAAC;CACD,CAAA;AAhHY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,gBAAO,GAAE;;GACG,4BAA4B,CAgHxC;AAEY,QAAA,4BAA4B,GAAG,gBAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["import Container, { Service } from 'typedi';\nimport { TRPCError } from '@trpc/server';\nimport { DocumentType, mongoose } from '@typegoose/typegoose';\nimport {\n\tIndividualStoreCouponModel,\n\tIndividualStoreCoupon as Model,\n\tRegularOrder,\n\tRegularOrderModel,\n\tShopModel,\n} from '@lyxa.ai/core/dist/libraries/mongo/models/';\nimport {\n\tCouponValidationOutputDTO,\n\tCreateIndividualStoreCouponDTO as CreateDTO,\n\tUpdateIndividualStoreCouponDTO as UpdateDTO,\n\tValidateCouponDTO,\n} from '@modules/coupon/validations';\nimport { convertToSecondary } from '@lyxa.ai/core/dist/utilities/currency';\nimport { roundBaseCurrency, roundSecondaryCurrency } from '@lyxa.ai/core/dist/utilities/shared';\nimport { RegularOrderStatus, ValueType } from '@lyxa.ai/core/dist/utilities/enum';\nimport { SoftDeleteModel } from '@lyxa.ai/core/dist/libraries/mongo/plugins/soft-delete-plugin';\n\n@Service()\nexport class IndividualStoreCouponService {\n\tprivate model;\n\tprivate readonly shopModelForCoupon: typeof ShopModel;\n\tprivate orderModel: typeof RegularOrderModel & SoftDeleteModel<RegularOrder>;\n\n\tconstructor() {\n\t\tthis.model = IndividualStoreCouponModel;\n\t\tthis.shopModelForCoupon = ShopModel as typeof ShopModel;\n\t\tthis.orderModel = RegularOrderModel as typeof RegularOrderModel & SoftDeleteModel<RegularOrder>;\n\t}\n\n\t/**\n\t * Create a new record\n\t * @param data Data for the new record\n\t */\n\tpublic async create(data: CreateDTO): Promise<DocumentType<Model>> {\n\t\tconst coupon = this.model.create(data);\n\n\t\treturn coupon;\n\t}\n\n\t/**\n\t * Update record\n\t * @param id ID of the record\n\t * @param data Data to update\n\t */\n\tpublic async update(id: string, data: UpdateDTO): Promise<DocumentType<Model>> {\n\t\tconst record = await this.model.findOneAndUpdate(\n\t\t\t{\n\t\t\t\t_id: id,\n\t\t\t\tdeletedAt: null,\n\t\t\t},\n\t\t\tdata,\n\t\t\t{\n\t\t\t\tnew: true,\n\t\t\t\trunValidators: true,\n\t\t\t}\n\t\t);\n\n\t\tif (!record) {\n\t\t\tthrow new TRPCError({\n\t\t\t\tcode: 'NOT_FOUND',\n\t\t\t\tmessage: `Record not found`,\n\t\t\t});\n\t\t}\n\n\t\treturn record;\n\t}\n\n\tpublic async validateCoupon(\n\t\tdata: ValidateCouponDTO,\n\t\tcouponDocument: DocumentType<Model>\n\t): Promise<CouponValidationOutputDTO> {\n\t\tconst shopId = new mongoose.Types.ObjectId(data.shop);\n\t\tconst shop = await this.shopModelForCoupon.findOne({ _id: shopId, deletedAt: null });\n\t\tif (!shop) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t};\n\t\t}\n\n\t\t// Check if the coupon is applicable to the shop and item-type\n\t\tif (!couponDocument.shops?.includes(shopId) && !couponDocument.itemTypes?.includes(shop.itemType)) {\n\t\t\treturn {\n\t\t\t\tisValid: false,\n\t\t\t};\n\t\t}\n\n\t\t// Add condition to check first order only\n\n\t\tif (couponDocument.firstOrderOnly) {\n\t\t\tconst order = await this.orderModel.findOne({\n\t\t\t\tuser: new mongoose.Types.ObjectId(data.user),\n\t\t\t\tshop: new mongoose.Types.ObjectId(data.shop),\n\t\t\t\tstatus: RegularOrderStatus.DELIVERED,\n\t\t\t});\n\n\t\t\tif (order) {\n\t\t\t\treturn {\n\t\t\t\t\tisValid: false,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tconst discountAmount =\n\t\t\tcouponDocument.valueType == ValueType.FIXED\n\t\t\t\t? couponDocument.value\n\t\t\t\t: roundBaseCurrency((data.amountBeforeCoupon * couponDocument.value) / 100);\n\n\t\tconst secondaryDiscountAmount =\n\t\t\tcouponDocument.valueType == ValueType.FIXED\n\t\t\t\t? await convertToSecondary(couponDocument.value)\n\t\t\t\t: roundSecondaryCurrency((data.secondaryAmountBeforeCoupon * couponDocument.value) / 100);\n\n\t\tconst isShopCoverExpenses = couponDocument.isShopCoverExpenses;\n\n\t\treturn {\n\t\t\tisValid: true,\n\t\t\tdiscountAmount,\n\t\t\tsecondaryDiscountAmount,\n\t\t\tamountAfterCoupon: roundBaseCurrency(data.amountBeforeCoupon - discountAmount),\n\t\t\tsecondaryAmountAfterCoupon: roundSecondaryCurrency(\n\t\t\t\tdata.secondaryAmountBeforeCoupon - secondaryDiscountAmount\n\t\t\t),\n\t\t\tdiscountCut: {\n\t\t\t\tcompanyCut: isShopCoverExpenses ? 0 : discountAmount,\n\t\t\t\tsecondaryCompanyCut: isShopCoverExpenses ? 0 : secondaryDiscountAmount,\n\t\t\t\tshopCut: isShopCoverExpenses ? discountAmount : 0,\n\t\t\t\tsecondaryShopCut: isShopCoverExpenses ? secondaryDiscountAmount : 0,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport const individualStoreCouponService = Container.get(IndividualStoreCouponService);\n"]}
@@ -110,6 +110,7 @@ export declare const allCouponTransformer: import("@lyxa.ai/core/dist/utilities/
110
110
  itemTypes: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
111
111
  shops: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodEffects<import("zod").ZodEffects<import("zod").ZodString, string, string>, import("mongoose").Types.ObjectId, string>, import("zod").ZodType<import("mongoose").Types.ObjectId, import("zod").ZodTypeDef, import("mongoose").Types.ObjectId>]>, "many">>>;
112
112
  isShopCoverExpenses: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
113
+ firstOrderOnly: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodBoolean>>;
113
114
  valueType: import("zod").ZodOptional<import("zod").ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
114
115
  value: import("zod").ZodOptional<import("zod").ZodNumber>;
115
116
  secondaryCurrencyValue: import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodNumber>>;
@@ -1 +1 @@
1
- {"version":3,"file":"coupon.transformer.d.ts","sourceRoot":"/","sources":["modules/coupon/transformers/coupon.transformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,wDAAwD,CAAC;AAQzF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAEhC,CAAC"}
1
+ {"version":3,"file":"coupon.transformer.d.ts","sourceRoot":"/","sources":["modules/coupon/transformers/coupon.transformer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,KAAK,EAAE,MAAM,wDAAwD,CAAC;AAQzF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAEhC,CAAC"}
@@ -249,6 +249,7 @@ export declare const AllCouponsValidationSchema: z.ZodUnion<[z.ZodObject<{
249
249
  itemTypes: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>;
250
250
  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">>;
251
251
  isShopCoverExpenses: z.ZodDefault<z.ZodBoolean>;
252
+ firstOrderOnly: z.ZodDefault<z.ZodBoolean>;
252
253
  valueType: z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>;
253
254
  value: z.ZodNumber;
254
255
  secondaryCurrencyValue: z.ZodOptional<z.ZodNumber>;
@@ -318,6 +319,7 @@ export declare const AllCouponsValidationSchema: z.ZodUnion<[z.ZodObject<{
318
319
  itemTypes: import("@lyxa.ai/core/dist/utilities/enum").ItemType[];
319
320
  shops: import("mongoose").Types.ObjectId[];
320
321
  isShopCoverExpenses: boolean;
322
+ firstOrderOnly: boolean;
321
323
  secondaryCurrencyValue?: number | undefined;
322
324
  secondaryCurrencyMaxDiscountLimit?: number | undefined;
323
325
  secondaryCurrencyMinOrderValue?: number | undefined;
@@ -359,6 +361,7 @@ export declare const AllCouponsValidationSchema: z.ZodUnion<[z.ZodObject<{
359
361
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
360
362
  shops?: (string | import("mongoose").Types.ObjectId)[] | undefined;
361
363
  isShopCoverExpenses?: boolean | undefined;
364
+ firstOrderOnly?: boolean | undefined;
362
365
  }>, z.ZodObject<{
363
366
  couponType: z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_USER>;
364
367
  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">;
@@ -913,6 +916,7 @@ export declare const AllCouponsSchema: z.ZodUnion<[z.ZodObject<{
913
916
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
914
917
  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">>>;
915
918
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
919
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
916
920
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
917
921
  value: z.ZodOptional<z.ZodNumber>;
918
922
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -963,6 +967,7 @@ export declare const AllCouponsSchema: z.ZodUnion<[z.ZodObject<{
963
967
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
964
968
  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">>>;
965
969
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
970
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
966
971
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
967
972
  value: z.ZodOptional<z.ZodNumber>;
968
973
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1013,6 +1018,7 @@ export declare const AllCouponsSchema: z.ZodUnion<[z.ZodObject<{
1013
1018
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
1014
1019
  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">>>;
1015
1020
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1021
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
1016
1022
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
1017
1023
  value: z.ZodOptional<z.ZodNumber>;
1018
1024
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -1611,6 +1617,7 @@ export declare const AllCouponsUpdateSchema: z.ZodObject<{
1611
1617
  itemTypes: z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>;
1612
1618
  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">>;
1613
1619
  isShopCoverExpenses: z.ZodDefault<z.ZodBoolean>;
1620
+ firstOrderOnly: z.ZodDefault<z.ZodBoolean>;
1614
1621
  valueType: z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>;
1615
1622
  value: z.ZodNumber;
1616
1623
  secondaryCurrencyValue: z.ZodOptional<z.ZodNumber>;
@@ -1680,6 +1687,7 @@ export declare const AllCouponsUpdateSchema: z.ZodObject<{
1680
1687
  itemTypes: import("@lyxa.ai/core/dist/utilities/enum").ItemType[];
1681
1688
  shops: import("mongoose").Types.ObjectId[];
1682
1689
  isShopCoverExpenses: boolean;
1690
+ firstOrderOnly: boolean;
1683
1691
  secondaryCurrencyValue?: number | undefined;
1684
1692
  secondaryCurrencyMaxDiscountLimit?: number | undefined;
1685
1693
  secondaryCurrencyMinOrderValue?: number | undefined;
@@ -1721,6 +1729,7 @@ export declare const AllCouponsUpdateSchema: z.ZodObject<{
1721
1729
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
1722
1730
  shops?: (string | import("mongoose").Types.ObjectId)[] | undefined;
1723
1731
  isShopCoverExpenses?: boolean | undefined;
1732
+ firstOrderOnly?: boolean | undefined;
1724
1733
  }>, z.ZodObject<{
1725
1734
  couponType: z.ZodLiteral<import("@lyxa.ai/core/dist/utilities/enum").CouponType.INDIVIDUAL_USER>;
1726
1735
  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">;
@@ -2050,6 +2059,7 @@ export declare const AllCouponsUpdateSchema: z.ZodObject<{
2050
2059
  itemTypes: import("@lyxa.ai/core/dist/utilities/enum").ItemType[];
2051
2060
  shops: import("mongoose").Types.ObjectId[];
2052
2061
  isShopCoverExpenses: boolean;
2062
+ firstOrderOnly: boolean;
2053
2063
  secondaryCurrencyValue?: number | undefined;
2054
2064
  secondaryCurrencyMaxDiscountLimit?: number | undefined;
2055
2065
  secondaryCurrencyMinOrderValue?: number | undefined;
@@ -2231,6 +2241,7 @@ export declare const AllCouponsUpdateSchema: z.ZodObject<{
2231
2241
  itemTypes?: import("@lyxa.ai/core/dist/utilities/enum").ItemType[] | undefined;
2232
2242
  shops?: (string | import("mongoose").Types.ObjectId)[] | undefined;
2233
2243
  isShopCoverExpenses?: boolean | undefined;
2244
+ firstOrderOnly?: boolean | undefined;
2234
2245
  } | {
2235
2246
  value: number;
2236
2247
  code: string;
@@ -2430,6 +2441,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
2430
2441
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2431
2442
  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">>>;
2432
2443
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2444
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2433
2445
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2434
2446
  value: z.ZodOptional<z.ZodNumber>;
2435
2447
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -2686,6 +2698,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
2686
2698
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2687
2699
  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">>>;
2688
2700
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2701
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2689
2702
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2690
2703
  value: z.ZodOptional<z.ZodNumber>;
2691
2704
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -2944,6 +2957,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
2944
2957
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
2945
2958
  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">>>;
2946
2959
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2960
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2947
2961
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
2948
2962
  value: z.ZodOptional<z.ZodNumber>;
2949
2963
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -3208,6 +3222,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
3208
3222
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3209
3223
  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">>>;
3210
3224
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3225
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3211
3226
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3212
3227
  value: z.ZodOptional<z.ZodNumber>;
3213
3228
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -3471,6 +3486,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
3471
3486
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3472
3487
  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">>>;
3473
3488
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3489
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3474
3490
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3475
3491
  value: z.ZodOptional<z.ZodNumber>;
3476
3492
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -3727,6 +3743,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
3727
3743
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3728
3744
  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">>>;
3729
3745
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3746
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3730
3747
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3731
3748
  value: z.ZodOptional<z.ZodNumber>;
3732
3749
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -3987,6 +4004,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
3987
4004
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
3988
4005
  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">>>;
3989
4006
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4007
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
3990
4008
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
3991
4009
  value: z.ZodOptional<z.ZodNumber>;
3992
4010
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -4244,6 +4262,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
4244
4262
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
4245
4263
  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">>>;
4246
4264
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4265
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4247
4266
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
4248
4267
  value: z.ZodOptional<z.ZodNumber>;
4249
4268
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -4511,6 +4530,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
4511
4530
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
4512
4531
  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">>>;
4513
4532
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4533
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4514
4534
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
4515
4535
  value: z.ZodOptional<z.ZodNumber>;
4516
4536
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
@@ -4768,6 +4788,7 @@ export declare const CouponResponseSchema: z.ZodObject<{
4768
4788
  itemTypes: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ItemType>, "many">>>;
4769
4789
  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">>>;
4770
4790
  isShopCoverExpenses: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4791
+ firstOrderOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
4771
4792
  valueType: z.ZodOptional<z.ZodNativeEnum<typeof import("@lyxa.ai/core/dist/utilities/enum").ValueType>>;
4772
4793
  value: z.ZodOptional<z.ZodNumber>;
4773
4794
  secondaryCurrencyValue: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;