import type { AIUIFormat } from './AIUIDocument'; /** * What the person did in a reply's UI, such as tapping a place or submitting a form. It goes to * the agent as their next message: `label` is its text and `aiUIActionJSON(action)` what it * carries. The counterpart of `AIUIAction` in StreamChatAI. */ export type AIUIAction = { /** The format of the UI it came from. */ format: AIUIFormat; /** What the person did, in their words, such as "Tell me more about St. Naum". */ label: string; /** The reply whose UI it came from. */ messageId: string; /** * What happened, such as an event of an app's component (`ask_about`) or OpenUI's * `continue_conversation`. */ name: string; /** The details in the format's own shape, such as what was chosen and a form's values. */ payload: Record; }; /** The action as the JSON object an agent's backend reads. */ export type AIUIActionJSON = { format: AIUIFormat; message_id: string; name: string; payload: Record; v: 1; }; /** The custom field of the person's message that holds the action. */ export declare const AI_UI_ACTION_CUSTOM_DATA_KEY = "ai_ui_action"; /** * The most an action may take as JSON. The agents router refuses a larger one, and its * refusal would lose the person's message with it. */ export declare const AI_UI_ACTION_MAX_BYTES: number; /** * The action as the JSON object an agent's backend reads, such as the `uiAction` of * `session.responses.create(action.label, { uiAction })`. The label is not in it: it is the * text of the person's message. */ export declare const aiUIActionJSON: (action: AIUIAction) => AIUIActionJSON; /** * Why the agent's backend would refuse the action, or `undefined` when it would take it: it * names its reply, its format and what happened, in at most `AI_UI_ACTION_MAX_BYTES` of JSON. */ export declare const aiUIActionProblem: (action: AIUIAction) => string | undefined; //# sourceMappingURL=AIUIAction.d.ts.map