@robylon/web-react-sdk 1.1.32-staging.0 → 1.1.32

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.
Files changed (84) hide show
  1. package/README.md +452 -101
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/ChatbotContainer/ChatbotContainer.d.ts +5 -0
  5. package/dist/cjs/types/components/ChatbotFloatingButton.d.ts +3 -0
  6. package/dist/cjs/types/components/ChatbotIframe.d.ts +2 -0
  7. package/dist/cjs/types/components/RobylonChatbot.d.ts +3 -0
  8. package/dist/cjs/types/constants/fontStyles.d.ts +2 -0
  9. package/dist/cjs/types/core/api.d.ts +8 -0
  10. package/dist/cjs/types/core/config.d.ts +34 -0
  11. package/dist/cjs/types/core/events.d.ts +22 -0
  12. package/dist/cjs/types/core/index.d.ts +4 -0
  13. package/dist/cjs/types/core/state.d.ts +34 -0
  14. package/dist/cjs/types/index.d.ts +2 -0
  15. package/dist/cjs/types/types.d.ts +33 -0
  16. package/dist/cjs/types/utils/fetchData.d.ts +16 -0
  17. package/dist/cjs/types/vanilla/components/ChatbotContainer.d.ts +45 -0
  18. package/dist/cjs/types/vanilla/components/ChatbotFloatingButton.d.ts +72 -0
  19. package/dist/cjs/types/vanilla/components/ChatbotIframe.d.ts +73 -0
  20. package/dist/cjs/types/vanilla/index.d.ts +35 -0
  21. package/dist/esm/index.js +1 -1
  22. package/dist/esm/index.js.map +1 -1
  23. package/dist/esm/types/components/ChatbotContainer/ChatbotContainer.d.ts +5 -0
  24. package/dist/esm/types/components/ChatbotFloatingButton.d.ts +3 -0
  25. package/dist/esm/types/components/ChatbotIframe.d.ts +2 -0
  26. package/dist/esm/types/components/RobylonChatbot.d.ts +3 -0
  27. package/dist/esm/types/constants/fontStyles.d.ts +2 -0
  28. package/dist/esm/types/core/api.d.ts +8 -0
  29. package/dist/esm/types/core/config.d.ts +34 -0
  30. package/dist/esm/types/core/events.d.ts +22 -0
  31. package/dist/esm/types/core/index.d.ts +4 -0
  32. package/dist/esm/types/core/state.d.ts +34 -0
  33. package/dist/esm/types/index.d.ts +2 -0
  34. package/dist/esm/types/types.d.ts +33 -0
  35. package/dist/esm/types/utils/fetchData.d.ts +16 -0
  36. package/dist/esm/types/vanilla/components/ChatbotContainer.d.ts +45 -0
  37. package/dist/esm/types/vanilla/components/ChatbotFloatingButton.d.ts +72 -0
  38. package/dist/esm/types/vanilla/components/ChatbotIframe.d.ts +73 -0
  39. package/dist/esm/types/vanilla/index.d.ts +35 -0
  40. package/dist/index.d.ts +71 -1
  41. package/dist/umd/robylon-chatbot.js +2 -0
  42. package/dist/umd/robylon-chatbot.js.map +1 -0
  43. package/dist/umd/types/components/ChatbotContainer/ChatbotContainer.d.ts +15 -0
  44. package/dist/umd/types/components/ChatbotContainer/index.d.ts +1 -0
  45. package/dist/umd/types/components/ChatbotFloatingButton.d.ts +15 -0
  46. package/dist/umd/types/components/ChatbotIframe.d.ts +14 -0
  47. package/dist/umd/types/components/ErrorBoundary.d.ts +15 -0
  48. package/dist/umd/types/components/RobylonChatbot.d.ts +14 -0
  49. package/dist/umd/types/config.d.ts +5 -0
  50. package/dist/umd/types/constants/errorConstants.d.ts +60 -0
  51. package/dist/umd/types/constants/fontStyles.d.ts +2 -0
  52. package/dist/umd/types/core/api.d.ts +8 -0
  53. package/dist/umd/types/core/config.d.ts +34 -0
  54. package/dist/umd/types/core/events.d.ts +22 -0
  55. package/dist/umd/types/core/index.d.ts +4 -0
  56. package/dist/umd/types/core/state.d.ts +34 -0
  57. package/dist/umd/types/hooks/useChatbot.d.ts +2 -0
  58. package/dist/umd/types/hooks/useChatbotEvents.d.ts +12 -0
  59. package/dist/umd/types/hooks/useChatbotState.d.ts +16 -0
  60. package/dist/umd/types/hooks/useWhyDidYouUpdate.d.ts +5 -0
  61. package/dist/umd/types/index.d.ts +5 -0
  62. package/dist/umd/types/services/ErrorTrackingService.d.ts +38 -0
  63. package/dist/umd/types/types/events.d.ts +22 -0
  64. package/dist/umd/types/types/state.d.ts +5 -0
  65. package/dist/umd/types/types.d.ts +71 -0
  66. package/dist/umd/types/utils/chatbotSdk.d.ts +23 -0
  67. package/dist/umd/types/utils/colorUtils.d.ts +1 -0
  68. package/dist/umd/types/utils/cookieUtils.d.ts +6 -0
  69. package/dist/umd/types/utils/environment.d.ts +12 -0
  70. package/dist/umd/types/utils/fetchData.d.ts +46 -0
  71. package/dist/umd/types/utils/logger.d.ts +6 -0
  72. package/dist/umd/types/utils/misc.d.ts +1 -0
  73. package/dist/umd/types/utils/originalFetchDataFile.d.ts +1 -0
  74. package/dist/umd/types/utils/systemInfo.d.ts +13 -0
  75. package/dist/umd/types/utils/version.d.ts +1 -0
  76. package/dist/umd/types/vanilla/components/ChatbotContainer.d.ts +45 -0
  77. package/dist/umd/types/vanilla/components/ChatbotFloatingButton.d.ts +72 -0
  78. package/dist/umd/types/vanilla/components/ChatbotIframe.d.ts +73 -0
  79. package/dist/umd/types/vanilla/index.d.ts +35 -0
  80. package/package.json +28 -9
  81. package/dist/cjs/types/types/config.d.ts +0 -33
  82. package/dist/cjs/types/types/index.d.ts +0 -16
  83. package/dist/esm/types/types/config.d.ts +0 -33
  84. package/dist/esm/types/types/index.d.ts +0 -16
@@ -0,0 +1,23 @@
1
+ import { ChatbotConfig } from "../types";
2
+ export declare class ChatbotEmbed {
3
+ private config;
4
+ private logoContainer;
5
+ private iframe;
6
+ private bubblePromptContainer;
7
+ private chatBtnImage;
8
+ constructor(config: ChatbotConfig);
9
+ private onCloseListener;
10
+ private validateDomain;
11
+ private createChatBubblContainer;
12
+ private createMessageBubble;
13
+ private createFloatingButton;
14
+ private loadImage;
15
+ private createIframe;
16
+ private adjustIframeWidth;
17
+ private loadSvgInline;
18
+ private toggleIcon;
19
+ private toggleIframe;
20
+ private closeIframe;
21
+ init(): void;
22
+ }
23
+ export declare const initializeRobylonSdk: (config: ChatbotConfig, setIsInitialized: (value: boolean) => void, setError: (error: string | null) => void) => void;
@@ -0,0 +1 @@
1
+ export declare const getBestFontColor: (backgroundColor: string, contrastThreshold?: number) => string;
@@ -0,0 +1,6 @@
1
+ export declare const generateUUID: () => string;
2
+ export declare const getCookie: (name: string) => string | undefined;
3
+ export declare const setCookie: (name: string, value: string, days: number) => void;
4
+ export declare const getLocalStorage: () => string;
5
+ export declare const getSessionStorage: () => string;
6
+ export declare const getCookies: (isTeachmint: boolean) => any;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Checks if code is running in a browser environment
3
+ */
4
+ export declare const isBrowser: () => boolean;
5
+ /**
6
+ * Gets environment configuration
7
+ */
8
+ export declare const getEnvironmentConfig: () => {
9
+ copilotUrl: string;
10
+ environment: string;
11
+ apiUrl: string;
12
+ };
@@ -0,0 +1,46 @@
1
+ import { ChatbotInterfaceType, LauncherType, WidgetPositionEnums } from "../types";
2
+ interface ChatbotResponse {
3
+ user: {
4
+ token: string;
5
+ user_info: {
6
+ email: string;
7
+ user_id: string;
8
+ name: string;
9
+ };
10
+ org_info: {
11
+ org_id: string;
12
+ org_name: string;
13
+ role: string;
14
+ auth_status: string;
15
+ domain: string;
16
+ brand_config: {
17
+ display_name: string;
18
+ redirect_url: string;
19
+ colors?: {
20
+ brand_color: string;
21
+ title_bar_color?: string;
22
+ };
23
+ launcher_logo_url?: string;
24
+ welcome_message: string;
25
+ image_url: string;
26
+ interface_properties: {
27
+ position: WidgetPositionEnums;
28
+ side_spacing: number;
29
+ bottom_spacing: number;
30
+ };
31
+ interface_type: ChatbotInterfaceType;
32
+ launcher_type: LauncherType;
33
+ launcher_properties: {
34
+ text: string;
35
+ };
36
+ images: {
37
+ launcher_image_url: {
38
+ url: string;
39
+ };
40
+ };
41
+ };
42
+ };
43
+ };
44
+ }
45
+ export declare const fetchChatbotConfig: (chatbotId: string, userId: string | null | number, token?: string) => Promise<ChatbotResponse>;
46
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare const logger: {
2
+ log: (...args: any[]) => void;
3
+ error: (...args: any[]) => void;
4
+ warn: (...args: any[]) => void;
5
+ info: (...args: any[]) => void;
6
+ };
@@ -0,0 +1 @@
1
+ export declare function generateUUID(): string;
@@ -0,0 +1 @@
1
+ export declare const originalFetchData: (url: string, payload: any) => Promise<any>;
@@ -0,0 +1,13 @@
1
+ interface SystemInfo {
2
+ platform: string;
3
+ os: string;
4
+ browser: string;
5
+ sdk_version: string;
6
+ device: string;
7
+ screen_size: {
8
+ width: number;
9
+ height: number;
10
+ };
11
+ }
12
+ export declare const getSystemInfo: () => SystemInfo;
13
+ export {};
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION: string;
@@ -0,0 +1,45 @@
1
+ import { ChatbotConfig } from "../../types";
2
+ /**
3
+ * Class representing the ChatbotContainer component
4
+ * Container component that wraps the floating button and iframe
5
+ * to allow styling them as a single unit
6
+ */
7
+ export declare class ChatbotContainer {
8
+ private containerElement;
9
+ private resizeObserver;
10
+ private handleResizeFunction;
11
+ private config;
12
+ /**
13
+ * Creates a new ChatbotContainer
14
+ */
15
+ constructor(config: ChatbotConfig, position?: "Left" | "Right", sideSpacing?: number, bottomSpacing?: number);
16
+ /**
17
+ * Renders the container element
18
+ */
19
+ private render;
20
+ /**
21
+ * Apply styles based on screen width
22
+ */
23
+ private applyStyles;
24
+ /**
25
+ * Handle resize event
26
+ */
27
+ private handleResize;
28
+ /**
29
+ * Set up resize listener to adjust styles on window resize
30
+ */
31
+ private setupResizeListener;
32
+ /**
33
+ * Mounts the container to the DOM
34
+ */
35
+ private mount;
36
+ /**
37
+ * Gets the container element
38
+ * @returns The container element
39
+ */
40
+ getElement(): HTMLDivElement;
41
+ /**
42
+ * Unmounts and destroys the container
43
+ */
44
+ destroy(): void;
45
+ }
@@ -0,0 +1,72 @@
1
+ import { ChatbotConfig } from "../../types";
2
+ import { ChatbotEventType, AllEventTypes } from "../../types/events";
3
+ /**
4
+ * Interface for the ChatbotFloatingButton configuration
5
+ */
6
+ interface ChatbotFloatingButtonConfig {
7
+ config: ChatbotConfig;
8
+ toggleIframe: () => void;
9
+ isIframeVisible: boolean;
10
+ onEvent?: (event: {
11
+ type: ChatbotEventType;
12
+ timestamp: number;
13
+ data?: any;
14
+ }) => void;
15
+ onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
16
+ position?: "Left" | "Right";
17
+ sideSpacing?: number;
18
+ bottomSpacing?: number;
19
+ }
20
+ /**
21
+ * Class representing the ChatbotFloatingButton component
22
+ */
23
+ export declare class ChatbotFloatingButton {
24
+ private buttonElement;
25
+ private config;
26
+ private resizeObserver;
27
+ private handleResizeFunction;
28
+ /**
29
+ * Creates a new ChatbotFloatingButton
30
+ * @param config The button configuration
31
+ */
32
+ constructor(config: ChatbotFloatingButtonConfig);
33
+ /**
34
+ * Renders the button element
35
+ */
36
+ private render;
37
+ private createLauncherElement;
38
+ private createTextLauncher;
39
+ private createTextualImageLauncher;
40
+ /**
41
+ * Apply responsive styles based on screen width
42
+ * @param baseStyles The base styles to apply
43
+ */
44
+ private applyResponsiveStyles;
45
+ /**
46
+ * Handle resize event
47
+ */
48
+ private handleResize;
49
+ /**
50
+ * Set up resize listener to adjust styles on window resize
51
+ */
52
+ private setupResizeListener;
53
+ /**
54
+ * Gets the button element
55
+ * @returns The button element
56
+ */
57
+ getElement(): HTMLDivElement;
58
+ /**
59
+ * Mounts the button to the DOM
60
+ */
61
+ private mount;
62
+ /**
63
+ * Updates the button with new configuration
64
+ * @param config The new configuration
65
+ */
66
+ update(config: Partial<ChatbotFloatingButtonConfig>): void;
67
+ /**
68
+ * Unmounts and destroys the button
69
+ */
70
+ destroy(): void;
71
+ }
72
+ export {};
@@ -0,0 +1,73 @@
1
+ import { ChatbotConfig } from "../../types";
2
+ import { ChatbotEventType, AllEventTypes } from "../../types/events";
3
+ /**
4
+ * Interface for the ChatbotIframe configuration
5
+ */
6
+ interface ChatbotIframeConfig {
7
+ config: ChatbotConfig;
8
+ isVisible: boolean;
9
+ onClose: () => void;
10
+ onEvent?: (event: {
11
+ type: ChatbotEventType;
12
+ timestamp: number;
13
+ data?: any;
14
+ }) => void;
15
+ onInternalEvent: (eventType: AllEventTypes, additionalData?: Record<string, any>) => void;
16
+ position?: "Left" | "Right";
17
+ bottomSpacing?: number;
18
+ }
19
+ /**
20
+ * Class representing the ChatbotIframe component
21
+ */
22
+ export declare class ChatbotIframe {
23
+ private iframeElement;
24
+ private config;
25
+ private isInitialized;
26
+ private hasRegistered;
27
+ private resizeHandler;
28
+ /**
29
+ * Creates a new ChatbotIframe
30
+ * @param config The iframe configuration
31
+ */
32
+ constructor(config: ChatbotIframeConfig);
33
+ /**
34
+ * Gets the iframe element
35
+ * @returns The iframe element
36
+ */
37
+ getElement(): HTMLIFrameElement;
38
+ /**
39
+ * Renders the iframe element
40
+ */
41
+ private render;
42
+ /**
43
+ * Applies responsive styles based on window width
44
+ */
45
+ private applyResponsiveStyles;
46
+ /**
47
+ * Initializes the iframe
48
+ */
49
+ private initialize;
50
+ /**
51
+ * Sets up event listeners
52
+ */
53
+ private setupEventListeners;
54
+ /**
55
+ * Handles messages from the iframe
56
+ */
57
+ private handleMessage;
58
+ /**
59
+ * Updates the iframe visibility
60
+ * @param isVisible Whether the iframe should be visible
61
+ */
62
+ updateVisibility(isVisible: boolean): void;
63
+ /**
64
+ * Updates the iframe with new configuration
65
+ * @param config The new configuration
66
+ */
67
+ update(config: Partial<ChatbotIframeConfig>): void;
68
+ /**
69
+ * Unmounts and destroys the iframe
70
+ */
71
+ destroy(): void;
72
+ }
73
+ export {};
@@ -0,0 +1,35 @@
1
+ import { ChatbotEvent } from "../types/events";
2
+ /**
3
+ * Interface for the RobylonChatbot configuration
4
+ */
5
+ export interface RobylonChatbotConfig {
6
+ api_key: string;
7
+ user_id?: string | null | number;
8
+ user_token?: string;
9
+ user_profile?: Record<string, any>;
10
+ onEvent?: (event: ChatbotEvent) => void;
11
+ position?: "Left" | "Right" | string;
12
+ sideSpacing?: number | string;
13
+ bottomSpacing?: number | string;
14
+ }
15
+ /**
16
+ * RobylonChatbot instance interface
17
+ */
18
+ export interface RobylonChatbotInstance {
19
+ show: () => void;
20
+ hide: () => void;
21
+ toggle: () => void;
22
+ destroy: () => void;
23
+ getState: () => string;
24
+ }
25
+ /**
26
+ * Creates a new RobylonChatbot instance
27
+ * @param config The chatbot configuration
28
+ * @returns A RobylonChatbot instance
29
+ */
30
+ export declare function create(config: RobylonChatbotConfig): RobylonChatbotInstance;
31
+ declare const _default: {
32
+ create: typeof create;
33
+ getState: () => string;
34
+ };
35
+ export default _default;
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@robylon/web-react-sdk",
3
- "version": "1.1.32-staging.0",
3
+ "version": "1.1.32",
4
4
  "description": "React SDK for Robylon AI Chatbot",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "unpkg": "dist/umd/robylon-chatbot.js",
8
9
  "files": [
9
10
  "dist",
10
11
  "README.md",
@@ -12,20 +13,38 @@
12
13
  ],
13
14
  "scripts": {
14
15
  "clean": "rm -rf dist",
15
- "build:development": "npm run clean && cross-env NODE_ENV=development rollup -c",
16
- "build:staging": "npm run clean && cross-env NODE_ENV=staging PUBLISH_TYPE=staging rollup -c",
17
- "build:production": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production rollup -c",
18
- "build": "npm run build:development",
19
- "publish:staging": "node scripts/validate-publish.js staging && npm run build:staging && npm version prerelease --preid=staging --force && npm publish --tag staging && node scripts/create-version-tag.js",
20
- "publish:production": "node scripts/validate-publish.js production && npm run build:production && node scripts/publish-version.js && npm publish --tag latest && node scripts/create-version-tag.js",
21
- "publish:hotfix": "node scripts/validate-publish.js hotfix && npm run build:production && npm version prerelease --preid=patch && npm publish --tag hotfix && node scripts/create-version-tag.js",
16
+ "build:development": "npm run clean && cross-env NODE_ENV=development TARGET=npm rollup -c",
17
+ "build:staging": "npm run clean && cross-env NODE_ENV=staging PUBLISH_TYPE=staging TARGET=npm rollup -c",
18
+ "build:production": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production TARGET=npm rollup -c",
19
+ "build:development:unpkg": "npm run clean && cross-env NODE_ENV=development TARGET=unpkg rollup -c",
20
+ "build:staging:unpkg": "npm run clean && cross-env NODE_ENV=staging PUBLISH_TYPE=staging TARGET=unpkg rollup -c",
21
+ "build:production:unpkg": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production TARGET=unpkg rollup -c",
22
+ "build:development:all": "npm run clean && cross-env NODE_ENV=development TARGET=all rollup -c",
23
+ "build:staging:all": "npm run clean && cross-env NODE_ENV=staging PUBLISH_TYPE=staging TARGET=all rollup -c",
24
+ "build:production:all": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production TARGET=all rollup -c",
25
+ "build": "npm run build:development:all",
26
+ "version:staging": "npm version prerelease --preid=staging",
27
+ "version:production": "npm version patch",
28
+ "trigger:staging": "node scripts/trigger-staging-workflow.js",
29
+ "trigger:production": "gh workflow run deploy-sdk.yml",
30
+ "deploy:staging": "npm run version:staging && npm run trigger:staging",
31
+ "deploy:production": "npm run version:production && npm run trigger:production",
32
+ "update-changelog": "node scripts/update-changelog.js",
33
+ "install-hooks": "node scripts/install-hooks.js",
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",
35
+ "publish:production": "node scripts/validate-publish.js production && npm run build:production:all && node scripts/publish-version.js && npm publish --tag latest && node scripts/create-version-tag.js",
36
+ "publish:hotfix": "node scripts/validate-publish.js hotfix && npm run build:production:all && npm version prerelease --preid=patch && npm publish --tag hotfix && node scripts/create-version-tag.js",
22
37
  "test": "jest",
23
38
  "test:watch": "jest --watch",
24
39
  "lint": "eslint src/**/*.{ts,tsx}",
25
40
  "lint:fix": "eslint src/**/*.{ts,tsx} --fix",
26
41
  "prepare": "node scripts/husky-setup.js",
27
42
  "branch": "node scripts/create-branch.js",
28
- "release": "node scripts/release.js"
43
+ "release": "node scripts/release.js",
44
+ "build:vanilla": "cross-env TARGET=unpkg rollup -c",
45
+ "build:development:cloudfront": "npm run clean && cross-env NODE_ENV=development TARGET=cloudfront rollup -c",
46
+ "build:staging:cloudfront": "npm run clean && cross-env NODE_ENV=staging PUBLISH_TYPE=staging TARGET=cloudfront rollup -c",
47
+ "build:production:cloudfront": "npm run clean && cross-env NODE_ENV=production PUBLISH_TYPE=production TARGET=cloudfront rollup -c"
29
48
  },
30
49
  "publishConfig": {
31
50
  "access": "public"
@@ -1,33 +0,0 @@
1
- export interface UserProfile {
2
- email: string;
3
- name: string;
4
- platform?: string;
5
- OS?: string;
6
- browser?: string;
7
- sdkVersion?: string;
8
- }
9
- export interface ChatbotStyles {
10
- buttonPosition?: "bottom-right" | "bottom-left";
11
- primaryColor?: string;
12
- buttonSize?: "small" | "medium" | "large";
13
- }
14
- export interface ChatbotConfig {
15
- chatbotId: string;
16
- userId: string;
17
- token: string;
18
- userProfile?: Record<string, any>;
19
- domain: string;
20
- brand_colour: string;
21
- image_url?: string;
22
- chat_interface_config?: {
23
- chat_bubble_prompts?: string[];
24
- display_name?: string;
25
- welcome_message?: string;
26
- };
27
- }
28
- export interface RobylonSdkConfig {
29
- chatbot_id: string;
30
- user_id: string;
31
- token?: string;
32
- userProfile: UserProfile;
33
- }
@@ -1,16 +0,0 @@
1
- export * from "./config";
2
- export * from "./state";
3
- export interface ChatbotConfig {
4
- chatbotId: string;
5
- userId: string;
6
- token: string;
7
- userProfile?: Record<string, any>;
8
- domain: string;
9
- brand_colour: string;
10
- image_url?: string;
11
- }
12
- export interface ChatbotState {
13
- isLoading: boolean;
14
- isInitialized: boolean;
15
- error: string | null;
16
- }
@@ -1,33 +0,0 @@
1
- export interface UserProfile {
2
- email: string;
3
- name: string;
4
- platform?: string;
5
- OS?: string;
6
- browser?: string;
7
- sdkVersion?: string;
8
- }
9
- export interface ChatbotStyles {
10
- buttonPosition?: "bottom-right" | "bottom-left";
11
- primaryColor?: string;
12
- buttonSize?: "small" | "medium" | "large";
13
- }
14
- export interface ChatbotConfig {
15
- chatbotId: string;
16
- userId: string;
17
- token: string;
18
- userProfile?: Record<string, any>;
19
- domain: string;
20
- brand_colour: string;
21
- image_url?: string;
22
- chat_interface_config?: {
23
- chat_bubble_prompts?: string[];
24
- display_name?: string;
25
- welcome_message?: string;
26
- };
27
- }
28
- export interface RobylonSdkConfig {
29
- chatbot_id: string;
30
- user_id: string;
31
- token?: string;
32
- userProfile: UserProfile;
33
- }
@@ -1,16 +0,0 @@
1
- export * from "./config";
2
- export * from "./state";
3
- export interface ChatbotConfig {
4
- chatbotId: string;
5
- userId: string;
6
- token: string;
7
- userProfile?: Record<string, any>;
8
- domain: string;
9
- brand_colour: string;
10
- image_url?: string;
11
- }
12
- export interface ChatbotState {
13
- isLoading: boolean;
14
- isInitialized: boolean;
15
- error: string | null;
16
- }