@lyxa.ai/marketing 1.0.57 → 1.0.59
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/event/event-initializations.d.ts.map +1 -1
- package/dist/lib/event/event-initializations.js +1 -0
- package/dist/lib/event/event-initializations.js.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.d.ts +1 -0
- package/dist/lib/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/lib/event/event-listeners/event-listeners.js +62 -12
- package/dist/lib/event/event-listeners/event-listeners.js.map +1 -1
- package/dist/lib/event/events/marketing-product-seed.event.d.ts +1 -2
- package/dist/lib/event/events/marketing-product-seed.event.d.ts.map +1 -1
- package/dist/lib/event/events/marketing-product-seed.event.js.map +1 -1
- package/dist/lib/event/events/marketing-product-sync.event.d.ts +11 -0
- package/dist/lib/event/events/marketing-product-sync.event.d.ts.map +1 -0
- package/dist/lib/event/events/marketing-product-sync.event.js +12 -0
- package/dist/lib/event/events/marketing-product-sync.event.js.map +1 -0
- package/dist/lib/index.d.ts +243 -12
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +3 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/modules/coupon/routers/coupon.router.d.ts +2 -2
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js +2 -2
- package/dist/lib/modules/coupon/services/patterns/repository/CouponRepository.js.map +1 -1
- package/dist/lib/modules/coupon/validations/coupon.validation.d.ts +6 -6
- package/dist/lib/modules/coupon/validations/coupon.validation.js +2 -2
- package/dist/lib/modules/coupon/validations/coupon.validation.js.map +1 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js +4 -1
- package/dist/lib/modules/deal-setting/services/deal-setting.service.js.map +1 -1
- package/dist/lib/modules/featured-setting/services/featured-setting.service.d.ts.map +1 -1
- package/dist/lib/modules/featured-setting/services/featured-setting.service.js +3 -0
- package/dist/lib/modules/featured-setting/services/featured-setting.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts +54 -8
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js +11 -0
- package/dist/lib/modules/limited-time-offer/campaign/campaign.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/index.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/index.js +6 -0
- package/dist/lib/modules/limited-time-offer/campaign/jobs/index.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js +2 -6
- package/dist/lib/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +16 -3
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js +22 -3
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +2 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js +12 -0
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +242 -35
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js +19 -1
- package/dist/lib/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +6 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.js +45 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.d.ts +3 -0
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.js +66 -8
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js +37 -19
- package/dist/lib/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/config/limited-time-offer-config.validation.d.ts +2 -2
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts +241 -10
- package/dist/lib/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/limited-time-offer.service.d.ts +2 -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 +15 -3
- 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.constants.d.ts +1 -1
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js +1 -1
- package/dist/lib/modules/limited-time-offer/notification/limited-time-offer-notification.constants.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +10 -2
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.builder.js +4 -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 +10 -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 +43 -0
- 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 +187 -2
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.js +29 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.router.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +395 -0
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js +16 -6
- package/dist/lib/modules/limited-time-offer/participant/limited-time-offer-participant.validation.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts +7 -4
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.js +31 -6
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +14 -3
- 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 +76 -16
- package/dist/lib/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.js.map +1 -1
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts +13 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.js +75 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.js.map +1 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts +21 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts.map +1 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.js +83 -0
- package/dist/lib/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.js.map +1 -0
- 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 +60 -46
- package/dist/lib/modules/marketing/services/marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts +2 -3
- package/dist/lib/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/product-marketing.service.js +42 -13
- package/dist/lib/modules/marketing/services/product-marketing.service.js.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js +95 -27
- package/dist/lib/modules/marketing/services/synchronize-product-marketing.service.js.map +1 -1
- package/dist/types/event/event-initializations.d.ts.map +1 -1
- package/dist/types/event/event-listeners/event-listeners.d.ts +1 -0
- package/dist/types/event/event-listeners/event-listeners.d.ts.map +1 -1
- package/dist/types/event/events/marketing-product-seed.event.d.ts +1 -2
- package/dist/types/event/events/marketing-product-seed.event.d.ts.map +1 -1
- package/dist/types/event/events/marketing-product-sync.event.d.ts +11 -0
- package/dist/types/event/events/marketing-product-sync.event.d.ts.map +1 -0
- package/dist/types/index.d.ts +243 -12
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/coupon/routers/coupon.router.d.ts +2 -2
- package/dist/types/modules/coupon/validations/coupon.validation.d.ts +6 -6
- package/dist/types/modules/deal-setting/services/deal-setting.service.d.ts.map +1 -1
- package/dist/types/modules/featured-setting/services/featured-setting.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts +54 -8
- package/dist/types/modules/limited-time-offer/campaign/campaign.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/index.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts +0 -1
- package/dist/types/modules/limited-time-offer/campaign/jobs/limited-time-offer-campaign.worker.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts +16 -3
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.builder.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts +2 -0
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.repository.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts +242 -35
- package/dist/types/modules/limited-time-offer/campaign/limited-time-offer-campaign.validation.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts +6 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-lifecycle.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.d.ts +3 -0
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign-scheduler.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts +1 -1
- package/dist/types/modules/limited-time-offer/campaign/services/limited-time-offer-campaign.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/config/limited-time-offer-config.validation.d.ts +2 -2
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts +241 -10
- package/dist/types/modules/limited-time-offer/limited-time-offer.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/limited-time-offer.service.d.ts +2 -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.constants.d.ts +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts +10 -2
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.builder.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.repository.d.ts +10 -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 +187 -2
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.router.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts +395 -0
- package/dist/types/modules/limited-time-offer/participant/limited-time-offer-participant.validation.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts +7 -4
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts +14 -3
- package/dist/types/modules/limited-time-offer/participant/services/limited-time-offer-participant.service.d.ts.map +1 -1
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts +13 -0
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.d.ts.map +1 -0
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts +21 -0
- package/dist/types/modules/limited-time-offer/session/limited-time-offer-campaign-session.service.d.ts.map +1 -0
- 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/dist/types/modules/marketing/services/product-marketing.service.d.ts +7 -3
- package/dist/types/modules/marketing/services/product-marketing.service.d.ts.map +1 -1
- package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DocumentType, mongoose } from '@typegoose/typegoose';
|
|
2
|
-
import {
|
|
2
|
+
import { LimitedTimeOfferCampaign } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
import { AdminEnrollShopEntryDTO, JoinLtoCampaignDTO, ParticipantStatusDTO } from '../limited-time-offer-participant.validation';
|
|
3
4
|
import { GetLtoCampaignParticipantsDTO } from '../../campaign/limited-time-offer-campaign.validation';
|
|
4
5
|
export declare class LimitedTimeOfferParticipantService {
|
|
5
6
|
private repository;
|
|
@@ -7,7 +8,16 @@ export declare class LimitedTimeOfferParticipantService {
|
|
|
7
8
|
private marketingService;
|
|
8
9
|
constructor();
|
|
9
10
|
join(shopId: mongoose.Types.ObjectId, dto: JoinLtoCampaignDTO): Promise<DocumentType<import("@lyxa.ai/core/dist/libraries/mongo/models").LimitedTimeOfferParticipant>>;
|
|
11
|
+
enrollShops(entries: AdminEnrollShopEntryDTO[]): Promise<(mongoose.Document<unknown, import("@typegoose/typegoose/lib/types").BeAnObject, import("@lyxa.ai/core/dist/libraries/mongo/models").LimitedTimeOfferParticipant, Record<string, any>, {}> & import("@lyxa.ai/core/dist/libraries/mongo/models").LimitedTimeOfferParticipant & {
|
|
12
|
+
_id: mongoose.Types.ObjectId;
|
|
13
|
+
} & {
|
|
14
|
+
__v: number;
|
|
15
|
+
} & import("@typegoose/typegoose/lib/types").IObjectWithTypegooseFunction)[]>;
|
|
16
|
+
private joinShop;
|
|
17
|
+
private pauseIfLive;
|
|
10
18
|
withdraw(shopId: mongoose.Types.ObjectId): Promise<void>;
|
|
19
|
+
cleanupCampaignMarketings(campaignId: mongoose.Types.ObjectId): Promise<void>;
|
|
20
|
+
isActiveParticipant(shopId: mongoose.Types.ObjectId): Promise<boolean>;
|
|
11
21
|
getStatus(shopId: mongoose.Types.ObjectId): Promise<ParticipantStatusDTO>;
|
|
12
22
|
update(shopId: mongoose.Types.ObjectId, dto: JoinLtoCampaignDTO): Promise<DocumentType<import("@lyxa.ai/core/dist/libraries/mongo/models").LimitedTimeOfferParticipant> | null>;
|
|
13
23
|
getParticipants(dto: GetLtoCampaignParticipantsDTO): Promise<{
|
|
@@ -15,9 +25,9 @@ export declare class LimitedTimeOfferParticipantService {
|
|
|
15
25
|
shopId: mongoose.Types.ObjectId;
|
|
16
26
|
joinedAt: Date;
|
|
17
27
|
shopName: string | null;
|
|
28
|
+
shopPhoto?: string | null | undefined;
|
|
18
29
|
discountPercentage?: number | undefined;
|
|
19
30
|
maxDiscountCap?: number | undefined;
|
|
20
|
-
shopPhoto?: string | null | undefined;
|
|
21
31
|
}[];
|
|
22
32
|
metadata: {
|
|
23
33
|
page: number;
|
|
@@ -31,7 +41,8 @@ export declare class LimitedTimeOfferParticipantService {
|
|
|
31
41
|
latitude: number;
|
|
32
42
|
longitude: number;
|
|
33
43
|
}): Promise<any[]>;
|
|
34
|
-
|
|
44
|
+
reactivateMarketings(campaign: DocumentType<LimitedTimeOfferCampaign>): Promise<void>;
|
|
45
|
+
private applyMarketingWithRollback;
|
|
35
46
|
private fetchCurrentCampaignOrThrow;
|
|
36
47
|
private assertNotAlreadyJoined;
|
|
37
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limited-time-offer-participant.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/services/limited-time-offer-participant.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"limited-time-offer-participant.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/participant/services/limited-time-offer-participant.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAC,wBAAwB,EAAU,MAAM,2CAA2C,CAAC;AAK5F,OAAO,EACN,uBAAuB,EACvB,kBAAkB,EAElB,oBAAoB,EAEpB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,EAAC,6BAA6B,EAAC,MAAM,uDAAuD,CAAC;AAGpG,qBACa,kCAAkC;IAC9C,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,gBAAgB,CAAiC;;IAQ5C,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,kBAAkB;IAK7D,WAAW,CAAC,OAAO,EAAE,uBAAuB,EAAE;;;;;YAK7C,QAAQ;YAqCR,WAAW;IAQZ,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAcxD,yBAAyB,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAM7E,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;IAMtE,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAmBzE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,kBAAkB;IA2B/D,eAAe,CAAC,GAAG,EAAE,6BAA6B;;;;;;;;;;;;;;;;IAQlD,6BAA6B,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ;IAIjE,SAAS,CACrB,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAOlC,oBAAoB,CAAC,QAAQ,EAAE,YAAY,CAAC,wBAAwB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;YA+BpF,0BAA0B;YAe1B,2BAA2B;YAQ3B,sBAAsB;IASpC;;;;OAIG;YACW,wBAAwB;IAgBtC;;;;OAIG;YACW,0BAA0B;IAexC,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,0BAA0B;CAkBlC;AAED,eAAO,MAAM,qBAAqB,oCAAoD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mongoose } from '@typegoose/typegoose';
|
|
2
|
+
import { LimitedTimeOfferCampaignSession as Model } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
export declare class LtoCampaignSessionRepository {
|
|
4
|
+
private model;
|
|
5
|
+
constructor();
|
|
6
|
+
create(data: object): Promise<InstanceType<typeof Model>>;
|
|
7
|
+
findByCampaign(campaignId: mongoose.Types.ObjectId, page: number, size: number): Promise<{
|
|
8
|
+
documents: InstanceType<typeof Model>[];
|
|
9
|
+
total: number;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
export declare const ltoCampaignSessionRepository: LtoCampaignSessionRepository;
|
|
13
|
+
//# sourceMappingURL=limited-time-offer-campaign-session.repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-campaign-session.repository.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/session/limited-time-offer-campaign-session.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACH,+BAA+B,IAAI,KAAK,EAE3C,MAAM,2CAA2C,CAAC;AAEnD,qBACa,4BAA4B;IACrC,OAAO,CAAC,KAAK,CAA8C;;IAMrD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,OAAO,KAAK,CAAC,CAAC;IAIzD,cAAc,CAChB,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACb,OAAO,CAAC;QAAC,SAAS,EAAE,YAAY,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CAYvE;AAED,eAAO,MAAM,4BAA4B,8BAA8C,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DocumentType, mongoose } from '@typegoose/typegoose';
|
|
2
|
+
import { LimitedTimeOfferCampaign } from '@lyxa.ai/core/dist/libraries/mongo/models';
|
|
3
|
+
export interface LtoCampaignSessionItemDTO {
|
|
4
|
+
_id: mongoose.Types.ObjectId;
|
|
5
|
+
campaign: mongoose.Types.ObjectId;
|
|
6
|
+
startDate: Date;
|
|
7
|
+
endDate: Date;
|
|
8
|
+
shopCount: number;
|
|
9
|
+
archivedAt: Date;
|
|
10
|
+
}
|
|
11
|
+
export declare class LtoCampaignSessionService {
|
|
12
|
+
private repository;
|
|
13
|
+
constructor();
|
|
14
|
+
logSession(campaign: DocumentType<LimitedTimeOfferCampaign>, shopCount: number): Promise<void>;
|
|
15
|
+
getSessionsByCampaign(campaignId: mongoose.Types.ObjectId, page: number, size: number): Promise<{
|
|
16
|
+
documents: LtoCampaignSessionItemDTO[];
|
|
17
|
+
total: number;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare const ltoCampaignSessionService: LtoCampaignSessionService;
|
|
21
|
+
//# sourceMappingURL=limited-time-offer-campaign-session.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"limited-time-offer-campaign-session.service.d.ts","sourceRoot":"/","sources":["modules/limited-time-offer/session/limited-time-offer-campaign-session.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,YAAY,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAC,wBAAwB,EAAC,MAAM,2CAA2C,CAAC;AAGnF,MAAM,WAAW,yBAAyB;IACtC,GAAG,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC7B,QAAQ,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAClC,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,IAAI,CAAC;CACpB;AAED,qBACa,yBAAyB;IAClC,OAAO,CAAC,UAAU,CAA+B;;IAMpC,UAAU,CACnB,QAAQ,EAAE,YAAY,CAAC,wBAAwB,CAAC,EAChD,SAAS,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IAUH,qBAAqB,CAC9B,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EACnC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACb,OAAO,CAAC;QAAC,SAAS,EAAE,yBAAyB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CActE;AAED,eAAO,MAAM,yBAAyB,2BAA2C,CAAC"}
|
|
@@ -45,6 +45,7 @@ export declare class MarketingService {
|
|
|
45
45
|
private expireMarketingsExceedingSpendLimits;
|
|
46
46
|
private unExpireMarketingsBelowSpendLimits;
|
|
47
47
|
recomputeAndSyncAllMarketingSpent(): Promise<void>;
|
|
48
|
+
private publishEntireMenuSeedEvents;
|
|
48
49
|
reseedEntireMenuMarketing(marketingId: mongoose.Types.ObjectId): Promise<void>;
|
|
49
50
|
assignMarketingToProducts(marketing: DocumentType<Buy1Get1Marketing | DiscountMarketing>): Promise<void>;
|
|
50
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketing.service.d.ts","sourceRoot":"/","sources":["modules/marketing/services/marketing.service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EAMjB,SAAS,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"marketing.service.d.ts","sourceRoot":"/","sources":["modules/marketing/services/marketing.service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EAMjB,SAAS,IAAI,KAAK,EAOlB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAEN,0BAA0B,EAE1B,oCAAoC,EACpC,kBAAkB,IAAI,SAAS,EAC/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACN,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AA4C3D,qBACa,gBAAgB;IAC5B,OAAO,CAAC,KAAK,CAAiD;IAC9D,OAAO,CAAC,SAAS,CAA2C;IAC5D,OAAO,CAAC,UAAU,CAA2D;IAC7E,OAAO,CAAC,0BAA0B,CAA6B;IAC/D,OAAO,CAAC,gCAAgC,CACM;;IAY9C;;;OAGG;IACU,MAAM,CAClB,IAAI,EAAE,0BAA0B,EAChC,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,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AAI,CAAC;IAgB9E,yBAAyB,CAAC,SAAS,EAAE,YAAY,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;CAqCrG;AAED,eAAO,MAAM,gBAAgB,kBAAkC,CAAC"}
|
|
@@ -56,11 +56,15 @@ export declare class ProductMarketingService {
|
|
|
56
56
|
* @param products Array of product IDs
|
|
57
57
|
*/
|
|
58
58
|
checkProductMarketingAvailability(products: mongoose.Types.ObjectId[], isAppliedByCompany?: boolean): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Pause any standard (non-LTO) marketing already covering these products, so a
|
|
61
|
+
* Limited Time Offer marketing can take them over instead of being blocked by it.
|
|
62
|
+
* @param products Array of product IDs
|
|
63
|
+
*/
|
|
64
|
+
pauseConflictingMarketings(products: mongoose.Types.ObjectId[]): Promise<mongoose.Types.ObjectId[]>;
|
|
59
65
|
upsertProductMarketingsForPage(data: {
|
|
60
|
-
shop: mongoose.Types.ObjectId;
|
|
61
66
|
marketingId: mongoose.Types.ObjectId;
|
|
62
|
-
|
|
63
|
-
pageSize: number;
|
|
67
|
+
productIds: mongoose.Types.ObjectId[];
|
|
64
68
|
isAppliedByCompany: boolean;
|
|
65
69
|
isBuy1Get1: boolean;
|
|
66
70
|
value?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-marketing.service.d.ts","sourceRoot":"/","sources":["modules/marketing/services/product-marketing.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"product-marketing.service.d.ts","sourceRoot":"/","sources":["modules/marketing/services/product-marketing.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AAC/E,OAAO,EAGN,gBAAgB,IAAI,KAAK,EAEzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,oCAAoC,EACpC,yBAA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MAAM,CAAC;CAI9D;AAED,eAAO,MAAM,uBAAuB,yBAAyC,CAAC"}
|
package/dist/types/modules/marketing/services/synchronize-product-marketing.service.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synchronize-product-marketing.service.d.ts","sourceRoot":"/","sources":["modules/marketing/services/synchronize-product-marketing.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"synchronize-product-marketing.service.d.ts","sourceRoot":"/","sources":["modules/marketing/services/synchronize-product-marketing.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAahD,OAAO,EAAE,6CAA6C,EAAE,MAAM,0FAA0F,CAAC;AAIzJ,qBACa,kCAAkC;IAC9C,OAAO,CAAC,YAAY,CAA+C;IACnE,OAAO,CAAC,qBAAqB,CAAmE;;IAQnF,kDAAkD;IAKxD,2CAA2C,CACjD,OAAO,EAAE,6CAA6C,GACpD,MAAM;IAKF,4BAA4B,QAAa,OAAO,CAAC,GAAG,CAAC,CAqC1D;YAEY,oBAAoB;YA2CpB,kCAAkC;IAsCnC,mCAAmC,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ;IAqCtE,oCAAoC,CAAC,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE;IAoI1E,sCAAsC,CAAC,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE;CAY3F;AAED,eAAO,MAAM,kCAAkC,oCAAoD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lyxa.ai/marketing",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
4
4
|
"description": "The Lyxa Marketing microservice",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/lib/index.js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"test:watch": "jest --watch"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lyxa.ai/core": "1.4.
|
|
22
|
+
"@lyxa.ai/core": "1.4.246",
|
|
23
23
|
"@lyxa.ai/notification": "^1.0.7",
|
|
24
24
|
"@trpc/client": "^11.4.3",
|
|
25
25
|
"@trpc/server": "^11.4.3",
|