@hhgtech/hhg-components
Version:
Hello Health Group common components
39 lines (38 loc) • 1.59 kB
TypeScript
/// <reference types="react" />
import { SubotMessage, SubotNodeAction, SubotNodeItem, SubotNodeMessage } from "../../interfaces/types";
import { UserInfo } from "../../together/togetherComponentGlobalContext";
export type SubotInlineProps = {
id?: string | number;
isMobile?: boolean;
asPath?: string;
articleLink: string;
customUrl?: string;
};
export type SubotInlineContextProps = {
activeId?: string;
params: SubotMessage;
nodes: Array<SubotNodeItem>;
isMobile?: boolean;
getParams: () => SubotMessage;
onChange?: (message?: SubotMessage) => void;
onSubmit?: (nextNode?: SubotNodeMessage, message?: SubotMessage) => void;
onPrev?: () => void;
onNext?: (message?: SubotMessage) => void;
onReset?: () => void;
trackingCommonInline: Record<string, string | number | undefined | null>;
userInfo?: UserInfo;
};
export type ActionsClickProps = {
node_id: string | number;
actions: Array<SubotNodeAction>;
};
export declare const SubotInlineContext: import("react").Context<SubotInlineContextProps>;
/** inline click */
export declare const subotInlineClick: (data: SubotMessage) => Promise<any>;
/** inline impression */
export declare const subotInlineImpression: (data: SubotMessage) => Promise<any>;
/** inline message */
export declare const subotInlineMessage: (data: SubotMessage) => Promise<any>;
export declare const computeExtraSettingsForBot: (data: any) => any;
/** inline first node */
export declare const subotInlineFirstNode: (id?: string | number) => Promise<any>;