neochat-widget
Version:
Universal JavaScript SDK and Widget for NeoChat AI Assistant
19 lines (18 loc) • 597 B
TypeScript
import { NeoChat } from '../index';
import type { NeoChatConfig } from '../types';
import './styles/widget.scss';
declare global {
interface Window {
NeoChat: {
init: (config: WidgetConfig | string) => NeoChat | undefined;
};
}
}
interface WidgetConfig extends Omit<NeoChatConfig, 'container'> {
containerId?: string;
container?: string | HTMLElement;
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
autoOpen?: boolean;
}
declare const initWidget: (config: WidgetConfig) => NeoChat;
export { NeoChat, initWidget as init };