@botonic/react
Version:
Build Chatbots using React
25 lines (24 loc) • 1.03 kB
TypeScript
import { ClientUser } from '../webchat/context/types';
import { WebchatTheme } from '../webchat/theme/types';
/**
* Returns the value of a property defined in bot's theme based on WEBCHAT.CUSTOM_PROPERTIES dictionary.
* It gives preference to nested defined properties (e.g.: header.style) over plain properties (e.g.: headerStyle).
* If property doesn't exist, returns the defaultValue.
*/
export declare const _getThemeProperty: (theme: WebchatTheme) => (property: string, defaultValue?: any) => any;
export declare const createUser: () => {
id: string;
name: string;
};
export declare const initSession: (session: any) => {
user: {
id: string;
name: string;
};
};
export declare function updateUserLocaleAndCountry(user: Partial<ClientUser>): Partial<ClientUser>;
export declare const shouldKeepSessionOnReload: ({ initialDevSettings, devSettings, }: {
initialDevSettings: any;
devSettings: any;
}) => any;
export declare const getServerErrorMessage: (serverConfig: any) => any;