@koredev/kore-web-sdk 11.16.0-rc.e5ecb93 → 11.16.1-rc.390b324
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/README.md +1 -1
- package/dist/esm/kore-web-sdk-chat.min.js +1 -1
- package/dist/esm/plugins/proactive-web-campaign.js +1 -1
- package/dist/plugins/proactiveWebCampaign/proactiveWebCampaign.d.ts +60 -1
- package/dist/umd/kore-web-sdk-umd-chat.min.js +1 -1
- package/dist/umd/plugins/proactive-web-campaign.js +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,18 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
22
22
|
customDataChangeMap: any;
|
|
23
23
|
static readonly CUSTOM_OPERATORS: string[];
|
|
24
24
|
static readonly MAX_FLATTEN_DEPTH = 10;
|
|
25
|
+
private static readonly ACTIVE_CAMPAIGN_SELECTOR;
|
|
26
|
+
private static readonly CHAT_CONTAINER_SELECTOR;
|
|
27
|
+
isPendingSendAPIEvent: boolean;
|
|
28
|
+
coolDownTime: number;
|
|
29
|
+
cooldownState: {
|
|
30
|
+
isActive: boolean;
|
|
31
|
+
startTime: number;
|
|
32
|
+
expiryTime: number;
|
|
33
|
+
};
|
|
34
|
+
isVisitorAlreadyChatting: boolean;
|
|
35
|
+
private chatSessionInfo;
|
|
36
|
+
private static readonly CHAT_SESSION_STORAGE_KEY;
|
|
25
37
|
constructor(config: any);
|
|
26
38
|
/**
|
|
27
39
|
* Generates a unique browser session ID for the campaign trigger session
|
|
@@ -438,7 +450,7 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
438
450
|
evaluateGroupConditions(groupConditions: any, actualValues: any): boolean;
|
|
439
451
|
/**
|
|
440
452
|
* Updates individual condition satisfaction states with different persistence logic for rules vs exclusions
|
|
441
|
-
* RULES: Selective persistence (
|
|
453
|
+
* RULES: Selective persistence (country, city persist; pageVisitCount, user, timeSpent, hoverOn dynamic)
|
|
442
454
|
* EXCLUSIONS: Always dynamic re-evaluation (no persistence for any condition type)
|
|
443
455
|
* @param groupConditions - Group conditions object
|
|
444
456
|
* @param actualValues - Actual values to compare against
|
|
@@ -573,11 +585,58 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
573
585
|
* @param campId - Campaign ID
|
|
574
586
|
*/
|
|
575
587
|
triggerCampaignEvent(campInstanceId: string, campId: string): void;
|
|
588
|
+
/**
|
|
589
|
+
* Checks if any campaign template is active
|
|
590
|
+
* @returns Boolean indicating if any campaign template is active
|
|
591
|
+
*/
|
|
592
|
+
isActiveCampaignTemplate(): boolean;
|
|
576
593
|
/**
|
|
577
594
|
* Enhanced sendEvent method to work with new campaign structure
|
|
578
595
|
* @param pageObject - Page object with url and pageName
|
|
579
596
|
* @param type - Event type
|
|
580
597
|
*/
|
|
581
598
|
sendEvent(pageObject: any, type: any): void;
|
|
599
|
+
/**
|
|
600
|
+
* Checks if cooldown is currently active
|
|
601
|
+
* Optimized: Check in-memory state first, then handle expiry
|
|
602
|
+
* @returns Boolean indicating if cooldown is active
|
|
603
|
+
*/
|
|
604
|
+
isCooldownActive(): boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Starts cooldown timer after a campaign is triggered
|
|
607
|
+
* Converts minutes to milliseconds for calculations
|
|
608
|
+
*/
|
|
609
|
+
startCooldown(): void;
|
|
610
|
+
/**
|
|
611
|
+
* Clears cooldown state from memory and sessionStorage
|
|
612
|
+
*/
|
|
613
|
+
clearCooldown(): void;
|
|
614
|
+
/**
|
|
615
|
+
* Persists cooldown state to sessionStorage for multi-page apps
|
|
616
|
+
* No error handling needed - in-memory state continues to work in SPAs
|
|
617
|
+
*/
|
|
618
|
+
persistCooldownState(): void;
|
|
619
|
+
/**
|
|
620
|
+
* Restores cooldown state from sessionStorage on initialization
|
|
621
|
+
* Only called during page load/refresh - has error handling fallback
|
|
622
|
+
*/
|
|
623
|
+
restoreCooldownState(): void;
|
|
624
|
+
/**
|
|
625
|
+
* Initialize chat session state from sessionStorage
|
|
626
|
+
*/
|
|
627
|
+
initializeChatSessionState(): void;
|
|
628
|
+
/**
|
|
629
|
+
* Check if chat window is currently open
|
|
630
|
+
* Note: When minimize class is present, chat window is actually OPEN
|
|
631
|
+
* @returns true if chat window is open, false if closed/minimized
|
|
632
|
+
*/
|
|
633
|
+
isChatWindowOpen(): boolean;
|
|
634
|
+
/**
|
|
635
|
+
* Update chat session state based on received events
|
|
636
|
+
* Handles Session_Start, Session_End, and Bot_Active events
|
|
637
|
+
* @param eventType - Type of event received
|
|
638
|
+
* @param data - Event data
|
|
639
|
+
*/
|
|
640
|
+
updateChatSessionState(eventType: 'Session_Start' | 'Session_End' | 'Bot_Active', data: any): void;
|
|
582
641
|
}
|
|
583
642
|
export default ProactiveWebCampaignPlugin;
|