@sciol/xyzen 0.0.9 → 0.1.0

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/app/App.d.ts CHANGED
@@ -1 +1,4 @@
1
- export declare function Xyzen(): import("react/jsx-runtime").JSX.Element | null;
1
+ export interface XyzenProps {
2
+ backendUrl?: string;
3
+ }
4
+ export declare function Xyzen({ backendUrl }: XyzenProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_BACKEND_URL = "http://localhost:8000";
@@ -8,6 +8,8 @@ declare class XyzenService {
8
8
  private ws;
9
9
  private onMessageCallback;
10
10
  private onStatusChangeCallback;
11
+ private backendUrl;
12
+ setBackendUrl(url: string): void;
11
13
  connect(sessionId: string, topicId: string, onMessage: ServiceCallback<Message>, onStatusChange: ServiceCallback<StatusChangePayload>): void;
12
14
  sendMessage(message: string): void;
13
15
  disconnect(): void;
@@ -32,6 +32,7 @@ export interface User {
32
32
  }
33
33
  export type Theme = "light" | "dark" | "system";
34
34
  interface XyzenState {
35
+ backendUrl: string;
35
36
  isXyzenOpen: boolean;
36
37
  panelWidth: number;
37
38
  activeChatChannel: string | null;
@@ -49,6 +50,7 @@ interface XyzenState {
49
50
  setActiveChatChannel: (channelUUID: string | null) => void;
50
51
  setTabIndex: (index: number) => void;
51
52
  setTheme: (theme: Theme) => void;
53
+ setBackendUrl: (url: string) => void;
52
54
  fetchChatHistory: () => Promise<void>;
53
55
  togglePinChat: (chatId: string) => void;
54
56
  connectToChannel: (sessionId: string, topicId: string) => void;