Spatio.Api.Settings (spatio_sdk v0.0.2)

API calls for all endpoints tagged Settings.

Summary

Functions

Bulk-update multiple settings rows in one round-trip.

Reset the caller's user-level settings.

Fetch the caller's user-level settings.

Read the caller's mail-read-receipts preference.

Read the caller's settings-write permissions matrix.

Fetch a specific user's settings (admin / self only).

Replace the caller's user-level settings.

Update the caller's mail-read-receipts preference.

Functions

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

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

Bulk-update multiple settings rows in one round-trip.

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

delete_current_user_settings(connection, opts \\ [])

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

Reset the caller's user-level settings.

Parameters

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

Returns

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

get_current_user_settings(connection, opts \\ [])

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

Fetch the caller's user-level settings.

Parameters

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

Returns

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

get_mail_read_receipts_pref(connection, opts \\ [])

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

Read the caller's mail-read-receipts preference.

Parameters

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

Returns

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

get_settings_permissions(connection, opts \\ [])

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

Read the caller's settings-write permissions matrix.

Parameters

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

Returns

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

get_user_settings(connection, user_id, opts \\ [])

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

Fetch a specific user's settings (admin / self only).

Parameters

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

Returns

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

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

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

Fetch workspace-level settings.

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_current_user_settings(connection, request_body, opts \\ [])

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

Replace the caller's user-level settings.

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

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

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

Update the caller's mail-read-receipts preference.

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_user_settings(connection, user_id, request_body, opts \\ [])

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

Replace a specific user's settings.

Parameters

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

Returns

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

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

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

Replace workspace-level settings.

Parameters

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

Returns

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