@robylon/web-react-sdk 1.1.55-alpha.4 → 1.1.56
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ChatbotIframe.d.ts +0 -1
- package/dist/cjs/types/core/api.d.ts +1 -1
- package/dist/cjs/types/types.d.ts +0 -2
- package/dist/cjs/types/utils/chatbotSdk.d.ts +0 -2
- package/dist/cjs/types/utils/fetchData.d.ts +1 -5
- package/dist/cjs/types/utils/injectLauncherCdnWarmup.d.ts +1 -0
- package/dist/cjs/types/vanilla/components/ChatbotFloatingButton.d.ts +3 -0
- package/dist/cjs/types/vanilla/components/ChatbotIframe.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ChatbotIframe.d.ts +0 -1
- package/dist/esm/types/core/api.d.ts +1 -1
- package/dist/esm/types/types.d.ts +0 -2
- package/dist/esm/types/utils/chatbotSdk.d.ts +0 -2
- package/dist/esm/types/utils/fetchData.d.ts +1 -5
- package/dist/esm/types/utils/injectLauncherCdnWarmup.d.ts +1 -0
- package/dist/esm/types/vanilla/components/ChatbotFloatingButton.d.ts +3 -0
- package/dist/esm/types/vanilla/components/ChatbotIframe.d.ts +2 -2
- package/dist/index.d.ts +0 -2
- package/dist/umd/robylon-chatbot.js +1 -1
- package/dist/umd/robylon-chatbot.js.map +1 -1
- package/dist/umd/types/components/ChatbotIframe.d.ts +0 -1
- package/dist/umd/types/core/api.d.ts +1 -1
- package/dist/umd/types/types.d.ts +0 -2
- package/dist/umd/types/utils/chatbotSdk.d.ts +0 -2
- package/dist/umd/types/utils/fetchData.d.ts +1 -5
- package/dist/umd/types/utils/injectLauncherCdnWarmup.d.ts +1 -0
- package/dist/umd/types/vanilla/components/ChatbotFloatingButton.d.ts +3 -0
- package/dist/umd/types/vanilla/components/ChatbotIframe.d.ts +2 -2
- package/package.json +2 -18
- package/dist/cjs/types/constants/iframeActions.d.ts +0 -10
- package/dist/esm/types/constants/iframeActions.d.ts +0 -10
- package/dist/umd/types/constants/iframeActions.d.ts +0 -10
|
@@ -7,7 +7,6 @@ interface ChatbotIframeProps {
|
|
|
7
7
|
isVisible: boolean;
|
|
8
8
|
onClose: () => void;
|
|
9
9
|
onEvent?: ChatbotEventHandler;
|
|
10
|
-
onIframeLoaded?: () => void;
|
|
11
10
|
onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
|
|
12
11
|
position?: "Left" | "Right";
|
|
13
12
|
bottomSpacing?: number;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* @param userToken The user token (optional)
|
|
6
6
|
* @returns The chatbot configuration
|
|
7
7
|
*/
|
|
8
|
-
export declare const fetchChatbotConfig: (apiKey: string, userId?: string, userToken?: string
|
|
8
|
+
export declare const fetchChatbotConfig: (apiKey: string, userId?: string, userToken?: string) => Promise<any>;
|
|
@@ -24,7 +24,6 @@ export interface ChatbotConfig {
|
|
|
24
24
|
userProfile?: Record<string, any>;
|
|
25
25
|
domain: string;
|
|
26
26
|
show_launcher: boolean;
|
|
27
|
-
show_history?: boolean;
|
|
28
27
|
brand_colour: string;
|
|
29
28
|
image_url?: string;
|
|
30
29
|
chat_interface_config?: {
|
|
@@ -51,7 +50,6 @@ export interface ChatbotConfig {
|
|
|
51
50
|
delay: number;
|
|
52
51
|
};
|
|
53
52
|
launcher_size_multiplier?: number;
|
|
54
|
-
ws_url?: string;
|
|
55
53
|
}
|
|
56
54
|
interface RobylonSdkConfig {
|
|
57
55
|
chatbot_id: string;
|
|
@@ -47,11 +47,7 @@ interface ChatbotResponse {
|
|
|
47
47
|
};
|
|
48
48
|
show_launcher: boolean;
|
|
49
49
|
};
|
|
50
|
-
router_connection_info?: {
|
|
51
|
-
url?: string;
|
|
52
|
-
access_token?: string;
|
|
53
|
-
};
|
|
54
50
|
};
|
|
55
51
|
}
|
|
56
|
-
export declare const fetchChatbotConfig: (chatbotId: string, userId: string | null | number, token?: string
|
|
52
|
+
export declare const fetchChatbotConfig: (chatbotId: string, userId: string | null | number, token?: string) => Promise<ChatbotResponse>;
|
|
57
53
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ensureLauncherCdnWarmupLinks: () => void;
|
|
@@ -38,6 +38,9 @@ export declare class ChatbotFloatingButton {
|
|
|
38
38
|
* Renders the button element
|
|
39
39
|
*/
|
|
40
40
|
private render;
|
|
41
|
+
private getImageLauncherSrc;
|
|
42
|
+
private appendChevronSvg;
|
|
43
|
+
private tryUpdateImageLauncherInPlace;
|
|
41
44
|
private createLauncherElement;
|
|
42
45
|
private createTextLauncher;
|
|
43
46
|
private createTextualImageLauncher;
|
|
@@ -21,7 +21,6 @@ interface ChatbotIframeConfig {
|
|
|
21
21
|
timestamp: number;
|
|
22
22
|
data?: any;
|
|
23
23
|
}) => void;
|
|
24
|
-
onIframeLoaded?: () => void;
|
|
25
24
|
onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
|
|
26
25
|
position?: "Left" | "Right";
|
|
27
26
|
bottomSpacing?: number;
|
|
@@ -41,7 +40,8 @@ export declare class ChatbotIframe {
|
|
|
41
40
|
private resizeHandler;
|
|
42
41
|
private overridesPayloadCache;
|
|
43
42
|
private proactiveDataSentInRegistration;
|
|
44
|
-
private
|
|
43
|
+
private buildOverridesPayload;
|
|
44
|
+
private hasUserProvidedOverrides;
|
|
45
45
|
/**
|
|
46
46
|
* Creates a new ChatbotIframe
|
|
47
47
|
* @param config The iframe configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robylon/web-react-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.56",
|
|
4
4
|
"description": "React SDK for Robylon AI Chatbot",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -26,25 +26,9 @@
|
|
|
26
26
|
"version:staging": "npm version prerelease --preid=staging",
|
|
27
27
|
"version:production": "npm version patch",
|
|
28
28
|
"trigger:staging": "node scripts/trigger-staging-workflow.js",
|
|
29
|
-
"trigger:
|
|
30
|
-
"trigger:staging:alpha": "node scripts/trigger-staging-workflow.js --prerelease-id=alpha",
|
|
31
|
-
"trigger:staging:beta": "node scripts/trigger-staging-workflow.js --prerelease-id=beta",
|
|
32
|
-
"trigger:staging:rc": "node scripts/trigger-staging-workflow.js --prerelease-id=rc",
|
|
33
|
-
"trigger:production": "node scripts/trigger-production-workflow.js",
|
|
34
|
-
"trigger:production:version-only": "gh workflow run deploy-sdk.yml -f update_latest=false",
|
|
35
|
-
"trigger:production:alpha": "node scripts/trigger-production-workflow.js --prerelease-id=alpha",
|
|
36
|
-
"trigger:production:beta": "node scripts/trigger-production-workflow.js --prerelease-id=beta",
|
|
37
|
-
"trigger:production:rc": "node scripts/trigger-production-workflow.js --prerelease-id=rc",
|
|
29
|
+
"trigger:production": "gh workflow run deploy-sdk.yml",
|
|
38
30
|
"deploy:staging": "npm run version:staging && npm run trigger:staging",
|
|
39
|
-
"deploy:staging:version-only": "npm run version:staging && npm run trigger:staging:version-only",
|
|
40
|
-
"deploy:staging:alpha": "npm run trigger:staging:alpha",
|
|
41
|
-
"deploy:staging:beta": "npm run trigger:staging:beta",
|
|
42
|
-
"deploy:staging:rc": "npm run trigger:staging:rc",
|
|
43
31
|
"deploy:production": "npm run version:production && npm run trigger:production",
|
|
44
|
-
"deploy:production:version-only": "npm run version:production && npm run trigger:production:version-only",
|
|
45
|
-
"deploy:production:alpha": "npm run trigger:production:alpha",
|
|
46
|
-
"deploy:production:beta": "npm run trigger:production:beta",
|
|
47
|
-
"deploy:production:rc": "npm run trigger:production:rc",
|
|
48
32
|
"update-changelog": "node scripts/update-changelog.js",
|
|
49
33
|
"install-hooks": "node scripts/install-hooks.js",
|
|
50
34
|
"publish:staging": "node scripts/validate-publish.js staging && npm run build:staging:all && npm version prerelease --preid=staging --force && npm publish --tag staging && node scripts/create-version-tag.js",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum IframeAction {
|
|
2
|
-
UPDATE_OVERRIDES = "updateOverrides",
|
|
3
|
-
I_CAN_AUTHENTICATE = "i_can_authenticate",
|
|
4
|
-
I_LOADED_LAUNCHER = "i_loaded_launcher",
|
|
5
|
-
I_OPENED_IFRAME = "i_opened_iframe",
|
|
6
|
-
I_CLICKED_PROACTIVE_BUBBLE = "i_clicked_proactive_bubble",
|
|
7
|
-
CAPTURED_SESSION_DATA = "capturedSessionData",
|
|
8
|
-
UPDATE_USER_PROFILE = "updateUserProfile",
|
|
9
|
-
OPENED_IFRAME_EVENT = "openedIframe"
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum IframeAction {
|
|
2
|
-
UPDATE_OVERRIDES = "updateOverrides",
|
|
3
|
-
I_CAN_AUTHENTICATE = "i_can_authenticate",
|
|
4
|
-
I_LOADED_LAUNCHER = "i_loaded_launcher",
|
|
5
|
-
I_OPENED_IFRAME = "i_opened_iframe",
|
|
6
|
-
I_CLICKED_PROACTIVE_BUBBLE = "i_clicked_proactive_bubble",
|
|
7
|
-
CAPTURED_SESSION_DATA = "capturedSessionData",
|
|
8
|
-
UPDATE_USER_PROFILE = "updateUserProfile",
|
|
9
|
-
OPENED_IFRAME_EVENT = "openedIframe"
|
|
10
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum IframeAction {
|
|
2
|
-
UPDATE_OVERRIDES = "updateOverrides",
|
|
3
|
-
I_CAN_AUTHENTICATE = "i_can_authenticate",
|
|
4
|
-
I_LOADED_LAUNCHER = "i_loaded_launcher",
|
|
5
|
-
I_OPENED_IFRAME = "i_opened_iframe",
|
|
6
|
-
I_CLICKED_PROACTIVE_BUBBLE = "i_clicked_proactive_bubble",
|
|
7
|
-
CAPTURED_SESSION_DATA = "capturedSessionData",
|
|
8
|
-
UPDATE_USER_PROFILE = "updateUserProfile",
|
|
9
|
-
OPENED_IFRAME_EVENT = "openedIframe"
|
|
10
|
-
}
|