@koredev/kore-web-sdk 11.16.0-rc.bb5e5e7 → 11.16.0-rc.ca1738e
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/esm/kore-web-sdk-chat.min.js +1 -1
- package/dist/esm/kore-web-sdk-widgets.js +1 -1
- package/dist/esm/plugins/agent-desktop.js +1 -1
- package/dist/esm/plugins/proactive-web-campaign.js +1 -1
- package/dist/esm/plugins/v2-kore-web-sdk-widgets.js +1 -1
- package/dist/plugins/proactiveWebCampaign/proactiveWebCampaign.d.ts +66 -1
- package/dist/umd/kore-web-sdk-umd-chat.min.js +1 -1
- package/dist/umd/kore-web-sdk-umd-widgets.js +1 -1
- package/dist/umd/plugins/agent-desktop-umd.js +1 -1
- package/dist/umd/plugins/proactive-web-campaign.js +1 -1
- package/dist/umd/plugins/v2-kore-web-sdk-widgets.js +1 -1
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
14
14
|
pageChangeDebounceTimer: any;
|
|
15
15
|
customDataObject: any;
|
|
16
16
|
isInitialPageLoaded: boolean;
|
|
17
|
+
browserSessionId: string;
|
|
17
18
|
flattenedCustomData: any;
|
|
18
19
|
previousFlattenedCustomData: any;
|
|
19
20
|
customColumnConfig: Set<string>;
|
|
@@ -21,7 +22,24 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
21
22
|
customDataChangeMap: any;
|
|
22
23
|
static readonly CUSTOM_OPERATORS: string[];
|
|
23
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;
|
|
24
37
|
constructor(config: any);
|
|
38
|
+
/**
|
|
39
|
+
* Generates a unique browser session ID for the campaign trigger session
|
|
40
|
+
* @returns Unique browser session ID
|
|
41
|
+
*/
|
|
42
|
+
generateBrowserSessionId(): string;
|
|
25
43
|
onHostCreate(): void;
|
|
26
44
|
onInit(): void;
|
|
27
45
|
onUrlChange(callback: () => void): void;
|
|
@@ -432,7 +450,7 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
432
450
|
evaluateGroupConditions(groupConditions: any, actualValues: any): boolean;
|
|
433
451
|
/**
|
|
434
452
|
* Updates individual condition satisfaction states with different persistence logic for rules vs exclusions
|
|
435
|
-
* RULES: Selective persistence (
|
|
453
|
+
* RULES: Selective persistence (country, city persist; pageVisitCount, user, timeSpent, hoverOn dynamic)
|
|
436
454
|
* EXCLUSIONS: Always dynamic re-evaluation (no persistence for any condition type)
|
|
437
455
|
* @param groupConditions - Group conditions object
|
|
438
456
|
* @param actualValues - Actual values to compare against
|
|
@@ -567,11 +585,58 @@ declare class ProactiveWebCampaignPlugin {
|
|
|
567
585
|
* @param campId - Campaign ID
|
|
568
586
|
*/
|
|
569
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;
|
|
570
593
|
/**
|
|
571
594
|
* Enhanced sendEvent method to work with new campaign structure
|
|
572
595
|
* @param pageObject - Page object with url and pageName
|
|
573
596
|
* @param type - Event type
|
|
574
597
|
*/
|
|
575
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;
|
|
576
641
|
}
|
|
577
642
|
export default ProactiveWebCampaignPlugin;
|