@lyxa.ai/marketing 1.0.53 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/index.d.ts +675 -28
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +647 -0
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js +8 -1
- package/dist/lib/modules/coupon/routers/coupon.router.js.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts +8 -1
- package/dist/lib/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/lib/modules/coupon/services/coupon.service.js +231 -27
- package/dist/lib/modules/coupon/services/coupon.service.js.map +1 -1
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js +2 -2
- package/dist/lib/modules/coupon/services/patterns/repository/CouponMetricsRepository.js.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts +293 -1125
- package/dist/lib/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/all-coupons.validation.js +2 -16
- package/dist/lib/modules/coupon/validations/all-coupons.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +26 -0
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js +10 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/coupon/validations/index.d.ts +1 -0
- package/dist/lib/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/lib/modules/coupon/validations/index.js +1 -0
- package/dist/lib/modules/coupon/validations/index.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +8 -8
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +34 -34
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +28 -28
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js +6 -0
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts +13 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.js +22 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.builder.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts +20 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js +26 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts +8 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.js +60 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.service.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts +5 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.js +3 -0
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.type.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +1 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js +8 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.repository.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +20 -20
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +82 -82
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +2 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js +12 -5
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.d.ts +1 -0
- package/dist/lib/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/marketing.service.js +9 -0
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/types/index.d.ts +675 -28
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +647 -0
- package/dist/types/modules/coupon/routers/coupon.router.d.ts.map +1 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts +8 -1
- package/dist/types/modules/coupon/services/coupon.service.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts +293 -1125
- package/dist/types/modules/coupon/validations/all-coupons.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +26 -0
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts.map +1 -1
- package/dist/types/modules/coupon/validations/index.d.ts +1 -0
- package/dist/types/modules/coupon/validations/index.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +8 -8
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +34 -34
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +28 -28
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts +1 -0
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts +13 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.builder.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts +20 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.constants.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts +8 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.service.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts +5 -0
- package/dist/types/modules/limited-time-offer/notification/limited-time-offer-notification.type.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +1 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts +20 -20
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +82 -82
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +2 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/marketing.service.d.ts +1 -0
- package/dist/types/modules/marketing/services/marketing.service.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -212,9 +212,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
212
212
|
updatedAt?: Date | null | undefined;
|
|
213
213
|
title?: string | undefined;
|
|
214
214
|
subTitle?: string | undefined;
|
|
215
|
+
archivedAt?: Date | null | undefined;
|
|
215
216
|
discountOptions?: number[] | undefined;
|
|
216
217
|
maxDiscountCaps?: number[] | undefined;
|
|
217
|
-
archivedAt?: Date | null | undefined;
|
|
218
218
|
} | {
|
|
219
219
|
documents: {
|
|
220
220
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -226,9 +226,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
226
226
|
updatedAt?: Date | null | undefined;
|
|
227
227
|
title?: string | undefined;
|
|
228
228
|
subTitle?: string | undefined;
|
|
229
|
+
archivedAt?: Date | null | undefined;
|
|
229
230
|
discountOptions?: number[] | undefined;
|
|
230
231
|
maxDiscountCaps?: number[] | undefined;
|
|
231
|
-
archivedAt?: Date | null | undefined;
|
|
232
232
|
}[];
|
|
233
233
|
metadata?: {
|
|
234
234
|
page: number;
|
|
@@ -255,9 +255,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
255
255
|
updatedAt?: Date | null | undefined;
|
|
256
256
|
title?: string | undefined;
|
|
257
257
|
subTitle?: string | undefined;
|
|
258
|
+
archivedAt?: Date | null | undefined;
|
|
258
259
|
discountOptions?: number[] | undefined;
|
|
259
260
|
maxDiscountCaps?: number[] | undefined;
|
|
260
|
-
archivedAt?: Date | null | undefined;
|
|
261
261
|
} | {
|
|
262
262
|
documents: ({
|
|
263
263
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -269,9 +269,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
269
269
|
updatedAt?: Date | null | undefined;
|
|
270
270
|
title?: string | undefined;
|
|
271
271
|
subTitle?: string | undefined;
|
|
272
|
+
archivedAt?: Date | null | undefined;
|
|
272
273
|
discountOptions?: number[] | undefined;
|
|
273
274
|
maxDiscountCaps?: number[] | undefined;
|
|
274
|
-
archivedAt?: Date | null | undefined;
|
|
275
275
|
} | null)[];
|
|
276
276
|
metadata?: {
|
|
277
277
|
page: number;
|
|
@@ -300,9 +300,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
300
300
|
updatedAt?: Date | null | undefined;
|
|
301
301
|
title?: string | undefined;
|
|
302
302
|
subTitle?: string | undefined;
|
|
303
|
+
archivedAt?: Date | null | undefined;
|
|
303
304
|
discountOptions?: number[] | undefined;
|
|
304
305
|
maxDiscountCaps?: number[] | undefined;
|
|
305
|
-
archivedAt?: Date | null | undefined;
|
|
306
306
|
} | {
|
|
307
307
|
documents: {
|
|
308
308
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -314,9 +314,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
314
314
|
updatedAt?: Date | null | undefined;
|
|
315
315
|
title?: string | undefined;
|
|
316
316
|
subTitle?: string | undefined;
|
|
317
|
+
archivedAt?: Date | null | undefined;
|
|
317
318
|
discountOptions?: number[] | undefined;
|
|
318
319
|
maxDiscountCaps?: number[] | undefined;
|
|
319
|
-
archivedAt?: Date | null | undefined;
|
|
320
320
|
}[];
|
|
321
321
|
metadata?: {
|
|
322
322
|
page: number;
|
|
@@ -389,9 +389,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
389
389
|
updatedAt?: Date | null | undefined;
|
|
390
390
|
title?: string | undefined;
|
|
391
391
|
subTitle?: string | undefined;
|
|
392
|
+
archivedAt?: Date | null | undefined;
|
|
392
393
|
discountOptions?: number[] | undefined;
|
|
393
394
|
maxDiscountCaps?: number[] | undefined;
|
|
394
|
-
archivedAt?: Date | null | undefined;
|
|
395
395
|
} | {
|
|
396
396
|
documents: {
|
|
397
397
|
status: import("@lyxa.ai/core/dist/utilities/enum").LimitedTimeOfferCampaignStatus;
|
|
@@ -403,9 +403,9 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
403
403
|
updatedAt?: Date | null | undefined;
|
|
404
404
|
title?: string | undefined;
|
|
405
405
|
subTitle?: string | undefined;
|
|
406
|
+
archivedAt?: Date | null | undefined;
|
|
406
407
|
discountOptions?: number[] | undefined;
|
|
407
408
|
maxDiscountCaps?: number[] | undefined;
|
|
408
|
-
archivedAt?: Date | null | undefined;
|
|
409
409
|
}[];
|
|
410
410
|
metadata?: {
|
|
411
411
|
page: number;
|
|
@@ -601,6 +601,15 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
601
601
|
success: boolean;
|
|
602
602
|
data?: {
|
|
603
603
|
campaignState: import("./participant/limited-time-offer-participant.validation").LtoCardState;
|
|
604
|
+
campaign?: {
|
|
605
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
606
|
+
startDate?: Date | null | undefined;
|
|
607
|
+
endDate?: Date | null | undefined;
|
|
608
|
+
title?: string | undefined;
|
|
609
|
+
subTitle?: string | undefined;
|
|
610
|
+
discountOptions?: number[] | undefined;
|
|
611
|
+
maxDiscountCaps?: number[] | undefined;
|
|
612
|
+
} | undefined;
|
|
604
613
|
participant?: {
|
|
605
614
|
isEntireMenu: boolean;
|
|
606
615
|
joinedAt: Date;
|
|
@@ -611,18 +620,18 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
611
620
|
maxDiscountCap?: number | undefined;
|
|
612
621
|
maxOrderCapacity?: number | undefined;
|
|
613
622
|
} | undefined;
|
|
614
|
-
campaign?: {
|
|
615
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
616
|
-
startDate?: Date | null | undefined;
|
|
617
|
-
endDate?: Date | null | undefined;
|
|
618
|
-
title?: string | undefined;
|
|
619
|
-
subTitle?: string | undefined;
|
|
620
|
-
discountOptions?: number[] | undefined;
|
|
621
|
-
maxDiscountCaps?: number[] | undefined;
|
|
622
|
-
} | undefined;
|
|
623
623
|
} | {
|
|
624
624
|
documents: {
|
|
625
625
|
campaignState: import("./participant/limited-time-offer-participant.validation").LtoCardState;
|
|
626
|
+
campaign?: {
|
|
627
|
+
_id: string | import("mongoose").Types.ObjectId;
|
|
628
|
+
startDate?: Date | null | undefined;
|
|
629
|
+
endDate?: Date | null | undefined;
|
|
630
|
+
title?: string | undefined;
|
|
631
|
+
subTitle?: string | undefined;
|
|
632
|
+
discountOptions?: number[] | undefined;
|
|
633
|
+
maxDiscountCaps?: number[] | undefined;
|
|
634
|
+
} | undefined;
|
|
626
635
|
participant?: {
|
|
627
636
|
isEntireMenu: boolean;
|
|
628
637
|
joinedAt: Date;
|
|
@@ -633,15 +642,6 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
633
642
|
maxDiscountCap?: number | undefined;
|
|
634
643
|
maxOrderCapacity?: number | undefined;
|
|
635
644
|
} | undefined;
|
|
636
|
-
campaign?: {
|
|
637
|
-
_id: string | import("mongoose").Types.ObjectId;
|
|
638
|
-
startDate?: Date | null | undefined;
|
|
639
|
-
endDate?: Date | null | undefined;
|
|
640
|
-
title?: string | undefined;
|
|
641
|
-
subTitle?: string | undefined;
|
|
642
|
-
discountOptions?: number[] | undefined;
|
|
643
|
-
maxDiscountCaps?: number[] | undefined;
|
|
644
|
-
} | undefined;
|
|
645
645
|
}[];
|
|
646
646
|
metadata?: {
|
|
647
647
|
page: number;
|
|
@@ -667,17 +667,17 @@ export declare const limitedTimeOfferRouter: import("@trpc/server").TRPCBuiltRou
|
|
|
667
667
|
shopId: string | import("mongoose").Types.ObjectId;
|
|
668
668
|
joinedAt: Date;
|
|
669
669
|
shopName: string | null;
|
|
670
|
-
shopPhoto?: string | null | undefined;
|
|
671
670
|
discountPercentage?: number | undefined;
|
|
672
671
|
maxDiscountCap?: number | undefined;
|
|
672
|
+
shopPhoto?: string | null | undefined;
|
|
673
673
|
} | {
|
|
674
674
|
documents: {
|
|
675
675
|
shopId: string | import("mongoose").Types.ObjectId;
|
|
676
676
|
joinedAt: Date;
|
|
677
677
|
shopName: string | null;
|
|
678
|
-
shopPhoto?: string | null | undefined;
|
|
679
678
|
discountPercentage?: number | undefined;
|
|
680
679
|
maxDiscountCap?: number | undefined;
|
|
680
|
+
shopPhoto?: string | null | undefined;
|
|
681
681
|
}[];
|
|
682
682
|
metadata?: {
|
|
683
683
|
page: number;
|
|
@@ -8,6 +8,7 @@ import { GetActiveCampaignDTO } from '@modules/limited-time-offer/campaign/limit
|
|
|
8
8
|
export declare class LimitedTimeOfferService {
|
|
9
9
|
private campaignService;
|
|
10
10
|
private participantService;
|
|
11
|
+
private notificationService;
|
|
11
12
|
constructor();
|
|
12
13
|
getActiveCampaign(input: GetActiveCampaignDTO): Promise<{
|
|
13
14
|
_id: mongoose.Types.ObjectId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAK9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,6EAA6E,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/limited-time-offer.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAK9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,6EAA6E,CAAC;AAUjH;;;;GAIG;AACH,qBACa,uBAAuB;IAChC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,mBAAmB,CAAsC;;IAQpD,iBAAiB,CAAC,KAAK,EAAE,oBAAoB;;;;;;;IAQ7C,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlE,cAAc,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAIlF;AAED,eAAO,MAAM,uBAAuB,yBAAyC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mongoose } from "@typegoose/typegoose";
|
|
2
|
+
import { NotificationEvent } from "@lyxa.ai/core/dist/libraries/notification";
|
|
3
|
+
import { NotificationAccountType } from "@lyxa.ai/core/dist/utilities/enum";
|
|
4
|
+
import { NotificationType } from "./limited-time-offer-notification.constants";
|
|
5
|
+
export interface NotificationBuilderArgs {
|
|
6
|
+
campaignId: mongoose.Types.ObjectId;
|
|
7
|
+
recipientId: mongoose.Types.ObjectId;
|
|
8
|
+
accountType: NotificationAccountType;
|
|
9
|
+
}
|
|
10
|
+
type NotificationBuilder = (args: NotificationBuilderArgs) => NotificationEvent;
|
|
11
|
+
export declare const NOTIFICATION_BUILDERS: Record<NotificationType, NotificationBuilder>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=limited-time-offer-notification.builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-notification.builder.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/notification/limited-time-offer-notification.builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAC,uBAAuB,EAAC,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAgB,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAE7F,MAAM,WAAW,uBAAuB;IACpC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACpC,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IACrC,WAAW,EAAE,uBAAuB,CAAC;CACxC;AAED,KAAK,mBAAmB,GAAG,CAAC,IAAI,EAAE,uBAAuB,KAAK,iBAAiB,CAAC;AAEhF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAiB/E,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NotificationAccountType } from "@lyxa.ai/core/dist/utilities/enum";
|
|
2
|
+
export declare const NotificationType: {
|
|
3
|
+
readonly Cancel: "cancel";
|
|
4
|
+
readonly Activate: "activate";
|
|
5
|
+
};
|
|
6
|
+
export type NotificationType = (typeof NotificationType)[keyof typeof NotificationType];
|
|
7
|
+
export declare const TARGET_ACCOUNT_TYPES: readonly [NotificationAccountType.SHOP, NotificationAccountType.SHOP_CONSOLE];
|
|
8
|
+
export declare const NOTIFICATIONS: {
|
|
9
|
+
readonly CAMPAIGN_CANCELLED: {
|
|
10
|
+
readonly title: "Lyxa deleted the current campaign";
|
|
11
|
+
readonly body: "The ongoing limited time offer campaign has been deleted by lyxa.";
|
|
12
|
+
readonly sound: "notification_sound";
|
|
13
|
+
};
|
|
14
|
+
readonly CAMPAIGN_ACTIVATED: {
|
|
15
|
+
readonly title: "Limited Time Offer is Live!";
|
|
16
|
+
readonly body: "A new limited time offer has started. Check it out now!";
|
|
17
|
+
readonly sound: "notification_sound";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=limited-time-offer-notification.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-notification.constants.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/notification/limited-time-offer-notification.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,uBAAuB,EAAC,MAAM,mCAAmC,CAAC;AAE1E,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GACxB,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAG7D,eAAO,MAAM,oBAAoB,+EAGvB,CAAC;AAIX,eAAO,MAAM,aAAa;;;;;;;;;;;CAWhB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mongoose } from "@typegoose/typegoose";
|
|
2
|
+
import { NotificationType } from "./limited-time-offer-notification.constants";
|
|
3
|
+
import { SendLimitedTimeOfferNotificationDto } from "./limited-time-offer-notification.type";
|
|
4
|
+
export declare class LimitedTimeOfferNotificationService {
|
|
5
|
+
send(type: NotificationType, recipientIds: mongoose.Types.ObjectId[], dto: SendLimitedTimeOfferNotificationDto): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare const limitedTimeOfferNotificationService: LimitedTimeOfferNotificationService;
|
|
8
|
+
//# sourceMappingURL=limited-time-offer-notification.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-notification.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/notification/limited-time-offer-notification.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAG9C,OAAO,EAAC,gBAAgB,EAAwB,MAAM,6CAA6C,CAAC;AAEpG,OAAO,EAAC,mCAAmC,EAAC,MAAM,wCAAwC,CAAC;AAE3F,qBACa,mCAAmC;IACtC,IAAI,CACN,IAAI,EAAE,gBAAgB,EACtB,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,EACvC,GAAG,EAAE,mCAAmC,GACzC,OAAO,CAAC,IAAI,CAAC;CAWnB;AAED,eAAO,MAAM,mCAAmC,qCAE/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-notification.type.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/notification/limited-time-offer-notification.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAE9C,MAAM,WAAW,mCAAmC;IAChD,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;CACvC"}
|
|
@@ -24,6 +24,7 @@ export declare class LtoParticipantRepository {
|
|
|
24
24
|
countShopProducts(shopId: mongoose.Types.ObjectId, productIds: mongoose.Types.ObjectId[]): Promise<number>;
|
|
25
25
|
findProductIdsByCategories(shopId: mongoose.Types.ObjectId, categoryIds: mongoose.Types.ObjectId[]): Promise<mongoose.Types.ObjectId[]>;
|
|
26
26
|
findMarketingIdsByCampaign(campaignId: mongoose.Types.ObjectId): Promise<mongoose.Types.ObjectId[]>;
|
|
27
|
+
findParticipantIdsByCampaignId(campaignId: mongoose.Types.ObjectId): Promise<mongoose.Types.ObjectId[]>;
|
|
27
28
|
findByCampaign(dto: GetLtoCampaignParticipantsDTO): Promise<{
|
|
28
29
|
documents: LtoCampaignParticipantItemDTO[];
|
|
29
30
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-participant.repository.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.repository.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"limited-time-offer-participant.repository.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/limited-time-offer-participant.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACN,2BAA2B,IAAI,KAAK,EAIpC,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EACN,6BAA6B,EAC7B,6BAA6B,EAC7B,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EACN,6BAA6B,EAC7B,qBAAqB,EACrB,wBAAwB,EACxB,MAAM,6CAA6C,CAAC;AAErD,qBACa,wBAAwB;IACpC,OAAO,CAAC,KAAK,CAAmE;IAChF,OAAO,CAAC,SAAS,CAAmB;;IAQvB,UAAU,CACtB,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,KAAK,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KAClB,EACD,WAAW,EAAE,MAAM;IA2Cd,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAGnD,uBAAuB,CAC5B,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,sBAAsB,EAAE,OAAO,EAC/B,gBAAgB,CAAC,EAAE,MAAM;;;;;IAapB,2BAA2B,CAChC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAC7B,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAYlC,QAAQ,CACb,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAC7B,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAQhC,6BAA6B,CAClC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAC7B,OAAO,CAAC,OAAO,CAAC;IAIb,mBAAmB,CACxB,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAC7B,OAAO,CAAC,6BAA6B,GAAG,IAAI,CAAC;IAS1C,iBAAiB,CACtB,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,IAAI,EAAE,wBAAwB,GAC5B,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IAQhC,iBAAiB,CACtB,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,GACnC,OAAO,CAAC,MAAM,CAAC;IAKZ,0BAA0B,CAC/B,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAC/B,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,GACpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAa/B,0BAA0B,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAQnG,8BAA8B,CACnC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;IAU/B,cAAc,CACnB,GAAG,EAAE,6BAA6B,GAChC,OAAO,CAAC;QAAE,SAAS,EAAE,6BAA6B,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CA8CzE;AAED,eAAO,MAAM,wBAAwB,0BAA0C,CAAC"}
|
package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts
CHANGED
|
@@ -140,6 +140,15 @@ export declare const participantRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
140
140
|
success: boolean;
|
|
141
141
|
data?: {
|
|
142
142
|
campaignState: import("./limited-time-offer-participant.validation").LtoCardState;
|
|
143
|
+
campaign?: {
|
|
144
|
+
_id: string | mongoose.Types.ObjectId;
|
|
145
|
+
startDate?: Date | null | undefined;
|
|
146
|
+
endDate?: Date | null | undefined;
|
|
147
|
+
title?: string | undefined;
|
|
148
|
+
subTitle?: string | undefined;
|
|
149
|
+
discountOptions?: number[] | undefined;
|
|
150
|
+
maxDiscountCaps?: number[] | undefined;
|
|
151
|
+
} | undefined;
|
|
143
152
|
participant?: {
|
|
144
153
|
isEntireMenu: boolean;
|
|
145
154
|
joinedAt: Date;
|
|
@@ -150,18 +159,18 @@ export declare const participantRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
150
159
|
maxDiscountCap?: number | undefined;
|
|
151
160
|
maxOrderCapacity?: number | undefined;
|
|
152
161
|
} | undefined;
|
|
153
|
-
campaign?: {
|
|
154
|
-
_id: string | mongoose.Types.ObjectId;
|
|
155
|
-
startDate?: Date | null | undefined;
|
|
156
|
-
endDate?: Date | null | undefined;
|
|
157
|
-
title?: string | undefined;
|
|
158
|
-
subTitle?: string | undefined;
|
|
159
|
-
discountOptions?: number[] | undefined;
|
|
160
|
-
maxDiscountCaps?: number[] | undefined;
|
|
161
|
-
} | undefined;
|
|
162
162
|
} | {
|
|
163
163
|
documents: {
|
|
164
164
|
campaignState: import("./limited-time-offer-participant.validation").LtoCardState;
|
|
165
|
+
campaign?: {
|
|
166
|
+
_id: string | mongoose.Types.ObjectId;
|
|
167
|
+
startDate?: Date | null | undefined;
|
|
168
|
+
endDate?: Date | null | undefined;
|
|
169
|
+
title?: string | undefined;
|
|
170
|
+
subTitle?: string | undefined;
|
|
171
|
+
discountOptions?: number[] | undefined;
|
|
172
|
+
maxDiscountCaps?: number[] | undefined;
|
|
173
|
+
} | undefined;
|
|
165
174
|
participant?: {
|
|
166
175
|
isEntireMenu: boolean;
|
|
167
176
|
joinedAt: Date;
|
|
@@ -172,15 +181,6 @@ export declare const participantRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
172
181
|
maxDiscountCap?: number | undefined;
|
|
173
182
|
maxOrderCapacity?: number | undefined;
|
|
174
183
|
} | undefined;
|
|
175
|
-
campaign?: {
|
|
176
|
-
_id: string | mongoose.Types.ObjectId;
|
|
177
|
-
startDate?: Date | null | undefined;
|
|
178
|
-
endDate?: Date | null | undefined;
|
|
179
|
-
title?: string | undefined;
|
|
180
|
-
subTitle?: string | undefined;
|
|
181
|
-
discountOptions?: number[] | undefined;
|
|
182
|
-
maxDiscountCaps?: number[] | undefined;
|
|
183
|
-
} | undefined;
|
|
184
184
|
}[];
|
|
185
185
|
metadata?: {
|
|
186
186
|
page: number;
|
|
@@ -206,17 +206,17 @@ export declare const participantRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
206
206
|
shopId: string | mongoose.Types.ObjectId;
|
|
207
207
|
joinedAt: Date;
|
|
208
208
|
shopName: string | null;
|
|
209
|
-
shopPhoto?: string | null | undefined;
|
|
210
209
|
discountPercentage?: number | undefined;
|
|
211
210
|
maxDiscountCap?: number | undefined;
|
|
211
|
+
shopPhoto?: string | null | undefined;
|
|
212
212
|
} | {
|
|
213
213
|
documents: {
|
|
214
214
|
shopId: string | mongoose.Types.ObjectId;
|
|
215
215
|
joinedAt: Date;
|
|
216
216
|
shopName: string | null;
|
|
217
|
-
shopPhoto?: string | null | undefined;
|
|
218
217
|
discountPercentage?: number | undefined;
|
|
219
218
|
maxDiscountCap?: number | undefined;
|
|
219
|
+
shopPhoto?: string | null | undefined;
|
|
220
220
|
}[];
|
|
221
221
|
metadata?: {
|
|
222
222
|
page: number;
|