opendesk-react-native 0.0.0-stage → 0.1.2
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/LICENSE +21 -0
- package/README.md +132 -2
- package/lib/api.d.ts +43 -0
- package/lib/api.js +114 -0
- package/lib/client.d.ts +120 -0
- package/lib/client.js +505 -0
- package/lib/errors.d.ts +8 -0
- package/lib/errors.js +17 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +29 -0
- package/lib/react.d.ts +33 -0
- package/lib/react.js +72 -0
- package/lib/realtime.d.ts +51 -0
- package/lib/realtime.js +124 -0
- package/lib/storage.d.ts +48 -0
- package/lib/storage.js +63 -0
- package/lib/types.d.ts +203 -0
- package/lib/types.js +6 -0
- package/lib/ui/BotFace.d.ts +13 -0
- package/lib/ui/BotFace.js +103 -0
- package/lib/ui/OpenDeskChat.d.ts +27 -0
- package/lib/ui/OpenDeskChat.js +636 -0
- package/lib/ui/OpenDeskLauncher.d.ts +12 -0
- package/lib/ui/OpenDeskLauncher.js +46 -0
- package/lib/ui/icons.d.ts +23 -0
- package/lib/ui/icons.js +95 -0
- package/lib/ui/strings.d.ts +53 -0
- package/lib/ui/strings.js +58 -0
- package/lib/ui/theme.d.ts +51 -0
- package/lib/ui/theme.js +89 -0
- package/package.json +43 -4
- package/src/api.ts +172 -0
- package/src/client.ts +659 -0
- package/src/errors.ts +16 -0
- package/src/index.ts +25 -0
- package/src/react.tsx +109 -0
- package/src/realtime.ts +166 -0
- package/src/storage.ts +93 -0
- package/src/types.ts +200 -0
- package/src/ui/BotFace.tsx +163 -0
- package/src/ui/OpenDeskChat.tsx +1318 -0
- package/src/ui/OpenDeskLauncher.tsx +69 -0
- package/src/ui/icons.tsx +162 -0
- package/src/ui/strings.ts +57 -0
- package/src/ui/theme.ts +127 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { UploadFile } from '../types';
|
|
2
|
+
import { type ChatStrings } from './strings';
|
|
3
|
+
export interface OpenDeskChatProps {
|
|
4
|
+
/** Opens straight into this conversation instead of the home screen. */
|
|
5
|
+
initialConversationId?: string;
|
|
6
|
+
/** Shown as a close button in the header when given. */
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
/**
|
|
9
|
+
* Lets the visitor attach a file. Wire it to your picker (expo-image-picker,
|
|
10
|
+
* expo-document-picker…) and resolve `{ uri, name, type }`, a web `File`, or null when cancelled.
|
|
11
|
+
* Without it the attach button is hidden.
|
|
12
|
+
*/
|
|
13
|
+
pickAttachment?: () => Promise<UploadFile | null>;
|
|
14
|
+
/** Overrides the widget's brand colour. */
|
|
15
|
+
accentColor?: string;
|
|
16
|
+
/** Overrides the widget's theme setting. */
|
|
17
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
18
|
+
/** Replaces any of the built-in English strings. */
|
|
19
|
+
strings?: Partial<ChatStrings>;
|
|
20
|
+
/** Height of any navigation header above the chat, so the keyboard never covers the composer on iOS. */
|
|
21
|
+
keyboardVerticalOffset?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A drop-in support screen that mirrors openDesk's web widget: the home screen, the thread
|
|
25
|
+
* with AI streaming, actions and handoff, and the composer with attachments.
|
|
26
|
+
*/
|
|
27
|
+
export declare function OpenDeskChat({ initialConversationId, onClose, pickAttachment, accentColor, theme: themeSetting, strings: stringOverrides, keyboardVerticalOffset, }: OpenDeskChatProps): import("react").JSX.Element;
|