Spatio.Api.Actions (spatio_sdk v0.0.2)

API calls for all endpoints tagged Actions.

Summary

Functions

Renderer-side execute alias. The canonical endpoint is POST /v1/agent/actions/execute; this path delegates to the same handler.

Fetch a single core action by id.

List every action the agent platform exposes.

List renderer-curated "core actions" (command-palette + keybindings backing).

List actions tagged for a specific platform (notes, mail, ...).

Functions

execute_action(connection, execute_action_request, opts \\ [])

Renderer-side execute alias. The canonical endpoint is POST /v1/agent/actions/execute; this path delegates to the same handler.

Parameters

  • connection (Spatio.Connection): Connection to server
  • execute_action_request (ExecuteActionRequest):
  • opts (keyword): Optional parameters

Returns

  • {:ok, Spatio.Model.ExecuteActionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_core_action(connection, id, opts \\ [])

@spec get_core_action(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Spatio.Model.CoreAction.t()}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Fetch a single core action by id.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, Spatio.Model.CoreAction.t} on success
  • {:error, Tesla.Env.t} on failure

list_available_actions(connection, opts \\ [])

@spec list_available_actions(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, [Spatio.Model.ActionDescriptor.t()]}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List every action the agent platform exposes.

Parameters

  • connection (Spatio.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%ActionDescriptor{}, ...]} on success
  • {:error, Tesla.Env.t} on failure

list_core_actions(connection, opts \\ [])

@spec list_core_actions(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, Spatio.Model.CoreActionListResponse.t()}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List renderer-curated "core actions" (command-palette + keybindings backing).

Parameters

  • connection (Spatio.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, Spatio.Model.CoreActionListResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_core_actions_by_platform(connection, platform, opts \\ [])

@spec list_core_actions_by_platform(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, Spatio.Model.CoreActionListResponse.t()}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Core actions filtered to one platform.

Parameters

  • connection (Spatio.Connection): Connection to server
  • platform (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, Spatio.Model.CoreActionListResponse.t} on success
  • {:error, Tesla.Env.t} on failure

list_platform_actions(connection, platform, opts \\ [])

@spec list_platform_actions(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [Spatio.Model.ActionDescriptor.t()]}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

List actions tagged for a specific platform (notes, mail, ...).

Parameters

  • connection (Spatio.Connection): Connection to server
  • platform (String.t):
  • opts (keyword): Optional parameters

Returns

  • {:ok, [%ActionDescriptor{}, ...]} on success
  • {:error, Tesla.Env.t} on failure