-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathTockOptions.ts
More file actions
24 lines (22 loc) · 1.07 KB
/
TockOptions.ts
File metadata and controls
24 lines (22 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { PartialDeep } from 'type-fest';
import TockAccessibility from './TockAccessibility';
import TockLocalStorage from './TockLocalStorage';
import { TockSettings } from './TockContext';
import { PostInitContext } from './PostInitContext';
export interface TockOptions extends PartialDeep<TockSettings> {
// a callback that will be executed once the chat is able to send and receive messages
afterInit?: (context: PostInitContext) => Promise<void>;
// An initial message to send to the backend to trigger a welcome sequence
// This message will be sent after the afterInit callback runs
openingMessage?: string;
// An optional function supplying extra HTTP headers for chat requests.
// Extra headers must be explicitly allowed by the server's CORS settings.
extraHeadersProvider?: () => Promise<Record<string, string>>;
timeoutBetweenMessage?: number;
widgets?: { [id: string]: (props: unknown) => JSX.Element };
disableSse?: boolean;
accessibility?: TockAccessibility;
localStorageHistory?: TockLocalStorage;
provideHintList: [];
}
export default TockOptions;