Type Alias: ApprovalDecision
ApprovalDecision = {
approved:true;input:unknown;messageId?:string;runId?:string;toolCallId:string;toolName:string; } | {approved:false;input:unknown;messageId?:string;reason:string;runId?:string;toolCallId:string;toolName:string; }
Payload ChatViewProps.onResolveToolApproval receives.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ approved: true; input: unknown; messageId?: string; runId?: string; toolCallId: string; toolName: string; }
approved
Section titled “approved”approved:
true
input:
unknown
messageId?
Section titled “messageId?”
optionalmessageId?:string
Assistant UI message that owns the approval card.
runId?
Section titled “runId?”
optionalrunId?:string
Mastra run id required to resume the suspended workflow. Native suspended-run discovery restores it for persisted approvals.
toolCallId
Section titled “toolCallId”toolCallId:
string
toolName
Section titled “toolName”toolName:
string
Type Literal
Section titled “Type Literal”{ approved: false; input: unknown; messageId?: string; reason: string; runId?: string; toolCallId: string; toolName: string; }
approved
Section titled “approved”approved:
false
input:
unknown
messageId?
Section titled “messageId?”
optionalmessageId?:string
Assistant UI message that owns the approval card.
reason
Section titled “reason”reason:
string
runId?
Section titled “runId?”
optionalrunId?:string
toolCallId
Section titled “toolCallId”toolCallId:
string
toolName
Section titled “toolName”toolName:
string