turbodesk-livechat-react-native 0.1.0-alpha.24 → 0.1.0-alpha.25

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,63 +1,59 @@
1
- import type { VisitorProfile } from "../core/visitor-params";
2
- import type { WsConnectionState } from "../realtime/ws-client";
3
- import type { AppearanceMode, ThemeConfig } from "../ui/theme";
4
-
5
- export type EmbedConfigLoadState = "loading" | "ready" | "error";
6
-
7
- export type LiveChatProviderProps = {
8
- widgetId: string;
9
- apiBaseUrl: string;
10
- userId?: string;
11
- userToken?: string;
12
- authCallback?: () => Promise<string | null | undefined>;
13
- visitorProfile?: VisitorProfile;
14
- appearance?: AppearanceMode;
15
- useBrandThemingForChat?: boolean;
16
- theme?: Partial<ThemeConfig>;
17
- fcmToken?: string;
18
- fcmTokenPlatform?: "ios" | "android";
19
- children: React.ReactNode;
20
- };
21
-
22
- export type LiveChatContextValue = {
23
- // identity
24
- widgetId: string;
25
- userId: string;
26
- userToken: string | undefined;
27
- setToken: (token: string | null | undefined) => void;
28
- logout: () => void;
29
-
30
- // visitor query params
31
- visitorProfile: VisitorProfile | undefined;
32
- visitorQueryParams: Record<string, string> | null;
33
-
34
- // widget config
35
- widgetConfig: any;
36
- widgetName: string;
37
- widgetGreeting: string;
38
- embedLoadState: EmbedConfigLoadState;
39
- embedLoadError: string | null;
40
-
41
- // unread
42
- totalUnread: number;
43
- setTotalUnread: React.Dispatch<React.SetStateAction<number>>;
44
-
45
- // chat open/visible state
46
- isOpen: boolean;
47
- open: () => void;
48
- close: () => void;
49
- isVisible: boolean;
50
- show: () => void;
51
- hide: () => void;
52
-
53
- // WS
54
- wsClient: import("../realtime/ws-client").WsClient | null;
55
- connectionState: WsConnectionState;
56
-
57
- // active conversation (used to suppress foreground push notifications)
58
- activeConversationId: string | null;
59
- setActiveConversationId: (id: string | null) => void;
60
-
61
- // theme
62
- theme: ThemeConfig;
63
- };
1
+ import type { VisitorProfile } from "../core/visitor-params";
2
+ import type { WsConnectionState } from "../realtime/ws-client";
3
+ import type { AppearanceMode, ThemeConfig } from "../ui/theme";
4
+
5
+ export type EmbedConfigLoadState = "loading" | "ready" | "error";
6
+
7
+ export type LiveChatProviderProps = {
8
+ widgetId: string;
9
+ apiBaseUrl: string;
10
+ userId?: string;
11
+ userToken?: string;
12
+ authCallback?: () => Promise<string | null | undefined>;
13
+ visitorProfile?: VisitorProfile;
14
+ appearance?: AppearanceMode;
15
+ useBrandThemingForChat?: boolean;
16
+ theme?: Partial<ThemeConfig>;
17
+ fcmToken?: string;
18
+ fcmTokenPlatform?: "ios" | "android";
19
+ children: React.ReactNode;
20
+ };
21
+
22
+ export type LiveChatContextValue = {
23
+ // identity
24
+ widgetId: string;
25
+ userId: string;
26
+ userToken: string | undefined;
27
+ setToken: (token: string | null | undefined) => void;
28
+ logout: () => void;
29
+
30
+ // visitor query params
31
+ visitorProfile: VisitorProfile | undefined;
32
+ visitorQueryParams: Record<string, string> | null;
33
+
34
+ // widget config
35
+ widgetConfig: any;
36
+ widgetName: string;
37
+ widgetGreeting: string;
38
+ embedLoadState: EmbedConfigLoadState;
39
+ embedLoadError: string | null;
40
+
41
+ // unread
42
+ totalUnread: number;
43
+ setTotalUnread: React.Dispatch<React.SetStateAction<number>>;
44
+
45
+ // chat open/visible state
46
+ isOpen: boolean;
47
+ open: () => void;
48
+ close: () => void;
49
+ isVisible: boolean;
50
+ show: () => void;
51
+ hide: () => void;
52
+
53
+ // WS
54
+ wsClient: import("../realtime/ws-client").WsClient | null;
55
+ connectionState: WsConnectionState;
56
+
57
+ // theme
58
+ theme: ThemeConfig;
59
+ };