ChatFormData
@gravity-rail/sdk / ChatFormData
Interface: ChatFormData
Properties
agentEnabled?
optionalagentEnabled:boolean
Deprecated
Send assistantKind. Accepted as an alias: false ⇒ 'human'.
agentMemberId?
optionalagentMemberId:number|null
Deprecated
Use assistantMemberId. Kept as a client-side alias.
assistantChatModelConfig?
optionalassistantChatModelConfig:Record<string,unknown> |null
assistantChatModelId?
optionalassistantChatModelId:string|null
assistantKind?
optionalassistantKind:"human"|"ai"
Who answers this chat. The explicit form of the intent agentEnabled used
to encode: a boolean cannot tell "this chat has no AI at all" (dm) apart
from "this chat's AI is suspended while a person takes a shift"
(assignment answered by a human), and the server derives paused from
exactly that difference. Prefer this over agentEnabled.
assistantMemberId?
optionalassistantMemberId:number|null
The member acting as assistant. Set iff assistantKind is 'human'.
assistantName?
optionalassistantName:string|null
Per-chat display-name fork; null/omitted uses the Workflow revision.
assistantRealtimeModelConfig?
optionalassistantRealtimeModelConfig:Record<string,unknown> |null
assistantRealtimeModelId?
optionalassistantRealtimeModelId:string|null
browserChannel?
optionalbrowserChannel:"web-chat"|"web-voice"|null
Browser surface that started a web chat. The Chat still persists as
web-chat; this lets workflow greeting selection distinguish browser
voice from browser text when an author configured an override.
channel
channel:
string
chatType?
optionalchatType:string
id?
optionalid:number
inboxId?
optionalinboxId:number|null
initialMessage?
optionalinitialMessage:string|null
Optional human-typed initial SMS/email message body. Treated as PHI: never log it client-side beyond the textarea state. Empty/whitespace-only values are dropped before sending.
interactionMode?
optionalinteractionMode:InteractionSessionResponseMode|null
How a browser Chat opens. Prefer this over browserChannel.
isTest?
optionalisTest:boolean
Assert that this chat is a test chat. Not authoritative.
The server derives isTest from the counterparty member's provenance —
the member must be a TEST member, or an anonymous member created by a test
run. Sending true for an ordinary identified member is rejected with
HTTP 400 and the stable code test_provenance_required; sending false
(or omitting it) does not make a test member's chat live.
To create a test chat, create or select a test member first.
labelIds?
optionallabelIds:number[]
memberId?
optionalmemberId:number|null
muted?
optionalmuted:boolean
participants?
optionalparticipants:ChatParticipantFormData[]
paused?
optionalpaused:boolean
phoneNumberId?
optionalphoneNumberId:number|null
siteId?
optionalsiteId:number|null
title?
optionaltitle:string
userMemberId?
optionaluserMemberId:number|null
The chat's user participant, stated explicitly. memberId remains the
wire field the server reads; this names the same member without the
"…unless it's the caller" caveat.
workflowId?
optionalworkflowId:number|null
workflowRevisionId?
optionalworkflowRevisionId:number|null
workflowRevisionUuid?
optionalworkflowRevisionUuid:string|null
workflowUuid?
optionalworkflowUuid:string|null