react-chatbotify
Version:
A modern React library for creating flexible and extensible chatbots.
56 lines • 2.3 kB
TypeScript
import { Params } from "./Params";
/**
* Defines the attributes allowed within a conversation block.
*/
export type Block = {
message?: string | void | ((params: Params) => string | void) | ((params: Params) => Promise<string | void>);
options?: Array<string> | ((params: Params) => Array<string>) | ((params: Params) => Promise<Array<string>>) | {
items: Array<string>;
sendOutput?: boolean;
reusable?: boolean;
} | ((params: Params) => {
items: Array<string>;
sendOutput?: boolean;
reusable?: boolean;
}) | ((params: Params) => Promise<{
items: Array<string>;
sendOutput?: boolean;
reusable?: boolean;
}>);
checkboxes?: Array<string> | ((params: Params) => Array<string>) | ((params: Params) => Promise<Array<string>>) | {
items: Array<string>;
max?: number;
min?: number;
sendOutput?: boolean;
reusable?: boolean;
} | ((params: Params) => {
items: Array<string>;
max?: number;
min?: number;
sendOutput?: boolean;
reusable?: boolean;
}) | ((params: Params) => Promise<{
items: Array<string>;
max?: number;
min?: number;
sendOutput?: boolean;
reusable?: boolean;
}>);
component?: JSX.Element | void | ((params: Params) => JSX.Element | void) | ((params: Params) => Promise<JSX.Element | void>);
chatDisabled?: boolean | ((params: Params) => boolean) | ((params: Params) => Promise<boolean>);
isSensitive?: boolean | ((params: Params) => boolean) | ((params: Params) => Promise<boolean>);
transition?: number | {
duration: number;
interruptable?: boolean;
} | void | ((params: Params) => number | {
duration: number;
interruptable?: boolean;
} | void) | ((params: Params) => Promise<number | {
duration: number;
interruptable?: boolean;
} | void>);
function?: ((params: Params) => void) | ((params: Params) => Promise<void>);
file?: ((params: Params) => void) | ((params: Params) => Promise<void>);
path?: string | null | undefined | ((params: Params) => string | null | undefined) | ((params: Params) => Promise<string | null | undefined>);
};
//# sourceMappingURL=Block.d.ts.map