Jido.Chat.ModalResult (Jido Chat v1.0.0)

Copy Markdown View Source

Typed normalized modal-open result.

Summary

Functions

Builds modal result from serialized data.

Creates a normalized modal result.

Returns the Zoi schema for ModalResult.

Serializes modal result into plain map with type marker.

Types

t()

@type t() :: %Jido.Chat.ModalResult{
  external_message_id: nil | nil | binary(),
  external_room_id: nil | nil | any(),
  id: binary(),
  metadata: map(),
  raw: nil | nil | any(),
  status: :opened | :accepted | :failed
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds modal result from serialized data.

new(attrs)

@spec new(map()) :: t()

Creates a normalized modal result.

schema()

Returns the Zoi schema for ModalResult.

to_map(result)

@spec to_map(t()) :: map()

Serializes modal result into plain map with type marker.