@tracktor/shared-module 2.30.1 → 2.31.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.
@@ -1,9 +1,12 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { ServerEvent } from '../chat/types';
3
3
  type EventListener = (event: ServerEvent) => void;
4
+ type ChatContext = "client" | "supplier";
4
5
  export interface ChatProviderProps {
5
6
  token?: string;
6
7
  url?: string;
8
+ context?: ChatContext;
9
+ wsPath?: string;
7
10
  enabled?: boolean;
8
11
  reconnect?: boolean;
9
12
  }
@@ -21,5 +24,5 @@ export interface ChatContextValue {
21
24
  sendMessage: (threadId: string, body: string) => void;
22
25
  }
23
26
  export declare const ChatContext: import('react').Context<ChatContextValue | null>;
24
- declare const ChatProvider: ({ children, reconnect, enabled, url, token }: PropsWithChildren<ChatProviderProps>) => import("react/jsx-runtime").JSX.Element;
27
+ declare const ChatProvider: ({ children, token, url, wsPath, reconnect, enabled, context, }: PropsWithChildren<ChatProviderProps>) => import("react/jsx-runtime").JSX.Element;
25
28
  export default ChatProvider;