@ensembleapp/client-sdk 0.0.1 → 0.0.3

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/index.d.ts CHANGED
@@ -175,7 +175,7 @@ interface EmbeddableChatWidgetConfig extends PopupChatWidgetProps {
175
175
  }
176
176
  declare global {
177
177
  interface Window {
178
- ChatWidget: {
178
+ ChatWidget?: {
179
179
  init: (config: EmbeddableChatWidgetConfig) => Promise<void>;
180
180
  destroy: () => void;
181
181
  hide: () => void;
@@ -0,0 +1,22 @@
1
+ import type { EmbeddableChatWidgetConfig } from './widget';
2
+
3
+ export interface ChatWidgetGlobal {
4
+ init: (config: EmbeddableChatWidgetConfig) => Promise<void>;
5
+ destroy: () => void;
6
+ hide: () => void;
7
+ show: () => void;
8
+ updateConfig: (config: Partial<EmbeddableChatWidgetConfig>) => void;
9
+ updateToken: (token: string) => void;
10
+ }
11
+
12
+ declare global {
13
+ interface Window {
14
+ ChatWidget?: ChatWidgetGlobal;
15
+ chatWidgetConfig?: EmbeddableChatWidgetConfig;
16
+ }
17
+ }
18
+
19
+ export type { EmbeddableChatWidgetConfig };
20
+ export type { ChatWidgetGlobal };
21
+
22
+ export {};