WidgetsOption
type WidgetsOption = { onAction?: ( action: { payload?: Record<string, unknown>; type: string; }, widgetItem: { id: string; widget: Card | ListView; }, ) => Promise<void>;};
Properties
Section titled “Properties”onAction()?
Section titled “onAction()?”optional onAction: (action: { payload?: Record<string, unknown>; type: string;}, widgetItem: { id: string; widget: | Card | ListView;}) => Promise<void>;
Called when a widget action is triggered. See https://openai.github.io/chatkit/guides/widget-actions/ for details.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
|
{ |
|
|
|
|
|
|
|
|
|
Returns
Section titled “Returns”Promise
<void
>