Typed normalized outbound payload used by thread/channel posting helpers.
Summary
Functions
Returns the best text fallback for the payload.
Builds post payload from serialized data.
Creates a normalized post payload.
Returns outbound attachments including normalized file uploads.
Returns the Zoi schema for PostPayload.
Builds a stream payload marker.
Builds a stream payload from chunk input.
Builds a text payload.
Serializes post payload into plain map with type marker.
Returns upload candidates preserving canonical file inputs where present.
Types
@type t() :: %Jido.Chat.PostPayload{ ast: nil | nil | any(), attachments: [ %Jido.Chat.Attachment{ data: term(), duration: term(), filename: term(), height: term(), kind: term(), media_type: term(), metadata: term(), path: term(), size_bytes: term(), url: term(), width: term() } ], card: nil | nil | any(), fallback_text: nil | nil | binary(), files: [ %Jido.Chat.FileUpload{ data: term(), duration: term(), filename: term(), height: term(), kind: term(), media_type: term(), metadata: term(), path: term(), size_bytes: term(), url: term(), width: term() } ], formatted: nil | nil | binary(), kind: :text | :markdown | :raw | :ast | :card | :stream, markdown: nil | nil | binary(), metadata: map(), raw: nil | nil | any(), stream: nil | nil | any(), text: nil | nil | binary() }
Functions
Returns the best text fallback for the payload.
Builds post payload from serialized data.
Creates a normalized post payload.
@spec outbound_attachments(t()) :: [Jido.Chat.Attachment.t()]
Returns outbound attachments including normalized file uploads.
Returns the Zoi schema for PostPayload.
@spec stream() :: t()
Builds a stream payload marker.
Builds a stream payload from chunk input.
Builds a text payload.
Serializes post payload into plain map with type marker.
@spec upload_candidates(t()) :: [Jido.Chat.Attachment.t() | Jido.Chat.FileUpload.t()]
Returns upload candidates preserving canonical file inputs where present.