Spatio.Api.Misc (spatio_sdk v0.0.2)

API calls for all endpoints tagged Misc.

Summary

Functions

Single-shot identity + config bundle the renderer hits on first load. Replaces the legacy server-side hydration in app/layout.tsx.

Pending invitations the caller can accept during onboarding.

Read the caller's pinned-platform list (sidebar order).

Read the caller's per-platform sidebar/visibility preferences.

Legacy admin-tier platform settings read endpoint.

Async-thread / job-runner status snapshot.

Read the caller's effective per-resource permissions.

Recent activity feed for a workspace.

Read the renderer's saved pane layout for a workspace.

Replace the caller's platform preferences.

Reset platform preferences to defaults.

Update the caller's user profile (name, avatar, etc.).

Check whether an org slug is available.

Check whether a workspace slug is available.

Functions

delete_pinned_platform(connection, platform_id, opts \\ [])

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

Unpin a platform.

Parameters

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

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

get_bootstrap(connection, opts \\ [])

@spec get_bootstrap(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Single-shot identity + config bundle the renderer hits on first load. Replaces the legacy server-side hydration in app/layout.tsx.

Parameters

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

Returns

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

get_onboarding_invitations(connection, opts \\ [])

@spec get_onboarding_invitations(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Pending invitations the caller can accept during onboarding.

Parameters

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

Returns

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

get_pinned_platforms(connection, opts \\ [])

@spec get_pinned_platforms(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Read the caller's pinned-platform list (sidebar order).

Parameters

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

Returns

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

get_platform_preferences(connection, opts \\ [])

@spec get_platform_preferences(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Read the caller's per-platform sidebar/visibility preferences.

Parameters

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

Returns

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

get_platform_settings_legacy(connection, opts \\ [])

@spec get_platform_settings_legacy(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Legacy admin-tier platform settings read endpoint.

Parameters

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

Returns

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

get_threads_status(connection, opts \\ [])

@spec get_threads_status(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Async-thread / job-runner status snapshot.

Parameters

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

Returns

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

get_user_permissions(connection, opts \\ [])

@spec get_user_permissions(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Read the caller's effective per-resource permissions.

Parameters

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

Returns

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

get_workspace_activity(connection, opts \\ [])

@spec get_workspace_activity(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Recent activity feed for a workspace.

Parameters

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

Returns

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

get_workspace_layout(connection, workspace_id, opts \\ [])

@spec get_workspace_layout(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Read the renderer's saved pane layout for a workspace.

Parameters

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

Returns

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

put_pinned_platform(connection, request_body, opts \\ [])

@spec put_pinned_platform(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}

Pin a platform.

Parameters

  • connection (Spatio.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

put_platform_preferences(connection, request_body, opts \\ [])

@spec put_platform_preferences(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}

Replace the caller's platform preferences.

Parameters

  • connection (Spatio.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

put_workspace_layout(connection, workspace_id, request_body, opts \\ [])

@spec put_workspace_layout(
  Tesla.Env.client(),
  String.t(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}

Save the renderer's pane layout.

Parameters

  • connection (Spatio.Connection): Connection to server
  • workspace_id (String.t):
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

reorder_pinned_platforms(connection, request_body, opts \\ [])

@spec reorder_pinned_platforms(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}

Reorder the pinned-platform list.

Parameters

  • connection (Spatio.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

reset_platform_preferences(connection, opts \\ [])

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

Reset platform preferences to defaults.

Parameters

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

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

update_user_profile(connection, request_body, opts \\ [])

@spec update_user_profile(
  Tesla.Env.client(),
  %{optional(String.t()) => any()},
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Update the caller's user profile (name, avatar, etc.).

Parameters

  • connection (Spatio.Connection): Connection to server
  • request_body (%{optional(String.t) => any()}):
  • opts (keyword): Optional parameters

Returns

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

validate_organization_slug(connection, opts \\ [])

@spec validate_organization_slug(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Check whether an org slug is available.

Parameters

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

Returns

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

validate_workspace_slug(connection, opts \\ [])

@spec validate_workspace_slug(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, %{optional(String.t()) => any()}}
  | {:ok, Spatio.Model.ApiError.t()}
  | {:error, Tesla.Env.t()}

Check whether a workspace slug is available.

Parameters

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

Returns

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