@botonic/react
Version:
Build Chatbots using React
19 lines (18 loc) • 712 B
TypeScript
/// <reference types="react" />
import { Session as CoreSession } from '@botonic/core';
import { ActionRequest } from './index-types';
export declare const RequestContext: import("react").Context<ActionRequest>;
export interface CloseWebviewOptions {
payload?: string;
path?: string;
params?: Record<string, any>;
}
export interface WebviewRequestContextType {
params: Record<string, string>;
session: Partial<CoreSession>;
getUserCountry: () => string;
getUserLocale: () => string;
getSystemLocale: () => string;
closeWebview: (options?: CloseWebviewOptions) => Promise<void>;
}
export declare const WebviewRequestContext: import("react").Context<WebviewRequestContextType>;