Skip to main content

ChatFormData

@gravity-rail/sdk


@gravity-rail/sdk / ChatFormData

Interface: ChatFormData

Properties​

agentEnabled?​

optional agentEnabled: boolean

Deprecated​

Send assistantKind. Accepted as an alias: false ⇒ 'human'.


agentMemberId?​

optional agentMemberId: number | null

Deprecated​

Use assistantMemberId. Kept as a client-side alias.


assistantChatModelConfig?​

optional assistantChatModelConfig: Record<string, unknown> | null


assistantChatModelId?​

optional assistantChatModelId: string | null


assistantKind?​

optional assistantKind: "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?​

optional assistantMemberId: number | null

The member acting as assistant. Set iff assistantKind is 'human'.


assistantName?​

optional assistantName: string | null

Per-chat display-name fork; null/omitted uses the Workflow revision.


assistantRealtimeModelConfig?​

optional assistantRealtimeModelConfig: Record<string, unknown> | null


assistantRealtimeModelId?​

optional assistantRealtimeModelId: string | null


browserChannel?​

optional browserChannel: "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?​

optional chatType: string


id?​

optional id: number


inboxId?​

optional inboxId: number | null


initialMessage?​

optional initialMessage: 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?​

optional interactionMode: InteractionSessionResponseMode | null

How a browser Chat opens. Prefer this over browserChannel.


isTest?​

optional isTest: 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?​

optional labelIds: number[]


memberId?​

optional memberId: number | null


muted?​

optional muted: boolean


participants?​

optional participants: ChatParticipantFormData[]


paused?​

optional paused: boolean


phoneNumberId?​

optional phoneNumberId: number | null


siteId?​

optional siteId: number | null


title?​

optional title: string


userMemberId?​

optional userMemberId: 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?​

optional workflowId: number | null


workflowRevisionId?​

optional workflowRevisionId: number | null


workflowRevisionUuid?​

optional workflowRevisionUuid: string | null


workflowUuid?​

optional workflowUuid: string | null