Interface: ChatInput
Chat payload accepted by url() / urlByChatId() / sendMessage(). Looser
than the strict REST ChatCreate body — used in TWO distinct wire flows that
each validate a different subset:
-
URL-signing (
url()/urlByChatId()) — validated by the backend'sChatIndexRequestcontroller (emby/app/Http/Requests/ChatIndexRequest.php). Recognizes:id,title,socket_port(≤4 chars),create(boolean),metadata.typeis ignored here — the URL-signing validator does not declare a rule forchat.type. -
REST (
sendMessage→chat.sendMessage) — validated bySendMessageRequest. Recognizestype,title,metadata(nocreate/socket_port— those are URL-signing-only).
normalizeChat() (libs/signing.ts) uses the UNION whitelist
(id/title/socket_port/create/type/metadata); anything else is dropped before
the wire. Each backend validator then ignores fields it doesn't know.
Properties
create?
optionalcreate?:boolean
id?
optionalid?:string
metadata?
optionalmetadata?:StringMap
socket_port?
optionalsocket_port?:string|number
title?
optionaltitle?:string
type?
optionaltype?:ChatType