Jido.Chat.OptionsLoadEvent (Jido Chat v1.2.0)

Copy Markdown View Source

Normalized request to load options for an external or dynamic select.

Summary

Functions

Builds an options-load event from serialized data.

Creates a normalized options-load event.

Returns the schema for an options-load event.

Serializes the options-load event.

Types

t()

@type t() :: %Jido.Chat.OptionsLoadEvent{
  action_id: binary(),
  adapter: nil | nil | any(),
  adapter_name: nil | nil | atom(),
  channel_id: nil | nil | binary(),
  id: binary(),
  limit: nil | nil | integer(),
  message_id: nil | nil | binary(),
  metadata: map(),
  query: binary(),
  raw: map(),
  thread_id: nil | nil | binary(),
  timeout_ms: nil | nil | integer(),
  user:
    nil
    | nil
    | %Jido.Chat.Author{
        email: term(),
        full_name: term(),
        id: term(),
        is_bot: term(),
        is_me: term(),
        is_system: term(),
        metadata: term(),
        user_id: term(),
        user_name: term()
      },
  view_id: nil | nil | binary()
}

Functions

from_map(map)

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

Builds an options-load event from serialized data.

new(event)

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

Creates a normalized options-load event.

schema()

Returns the schema for an options-load event.

to_map(event)

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

Serializes the options-load event.