Spatio.Api.Notes (spatio_sdk v0.0.2)

API calls for all endpoints tagged Notes.

Summary

Functions

Create a note. Creates a new note under the target account. The target is resolved in this order: accountId field on the body → ?accountId= query → provider field on the body → ?provider= query → the caller's single connected account (errors with ambiguous_account if more than one is connected and no selector is supplied).

Soft-delete (native) or hard-delete (provider) a comment. Allowed for the comment author and for the note owner.

Disable public sharing. Owner-only. Subsequent public viewer requests 404.

Enable (or update password on) public sharing. Owner-only. Calling with an empty body or setPassword: false flips the note public without changing the password. With setPassword: true, applies password (empty string clears).

Fetch one comment. Useful for permalink hydration when the renderer deep-links into a reply thread.

Fetch share settings for a note. Owner-only. Returns the current public-share configuration, including the share token and computed public viewer URL when the note is currently public.

Fetch a publicly shared note. Unauthenticated. The share token is the credential. For password-protected notes the password is supplied via the ?password= query param; the response distinguishes "no password supplied" from "wrong password" so the viewer can render the right prompt. Unknown tokens and disabled-share notes both return 404 to prevent token enumeration.

List blocks under a note. Returns the block tree for a note, paginated. Block listing always targets a single account (the one that owns the note) so it does not fan out — the response is a plain { blocks, total }.

List comments on a note. Returns active (non-deleted) comments. When ?accountId= targets an external provider that supports comments (e.g. Notion), the provider is queried directly; otherwise the native store is used.

List notes across connected accounts. Fan-out list. Returns every note visible to the caller across every connected notes provider, paginated by limit / offset. Pass ?accountId= or ?provider= to scope to a single source.

Rotate the share token, invalidating any outstanding URLs.

Edit a comment. Only the comment author can edit. The note owner can delete via DELETE but cannot rewrite.

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Parameters

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

Returns

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

Functions

create_block(connection, id, create_block_request, opts \\ [])

Insert a block in a note.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • create_block_request (CreateBlockRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

create_note(connection, create_note_request, opts \\ [])

Create a note. Creates a new note under the target account. The target is resolved in this order: accountId field on the body → ?accountId= query → provider field on the body → ?provider= query → the caller's single connected account (errors with ambiguous_account if more than one is connected and no selector is supplied).

Parameters

  • connection (Spatio.Connection): Connection to server
  • create_note_request (CreateNoteRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :provider (String.t): Provider id (e.g. native-notes, notion). Selects every connected account for the provider. Mutually exclusive with accountId.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

create_note_comment(connection, id, create_comment_request, opts \\ [])

Create a comment or reply.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • create_comment_request (CreateCommentRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Delete a block.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Block id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Delete a note.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

delete_note_comment(connection, id, comment_id, opts \\ [])

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

Soft-delete (native) or hard-delete (provider) a comment. Allowed for the comment author and for the note owner.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • comment_id (String.t): Comment id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Disable public sharing. Owner-only. Subsequent public viewer requests 404.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Enable (or update password on) public sharing. Owner-only. Calling with an empty body or setPassword: false flips the note public without changing the password. With setPassword: true, applies password (empty string clears).

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
    • :body (EnableShareRequest):

Returns

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

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

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

Fetch one block.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Block id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Fetch one note.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

get_note_comment(connection, id, comment_id, opts \\ [])

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

Fetch one comment. Useful for permalink hydration when the renderer deep-links into a reply thread.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • comment_id (String.t): Comment id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Fetch share settings for a note. Owner-only. Returns the current public-share configuration, including the share token and computed public viewer URL when the note is currently public.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

get_public_note(connection, token, opts \\ [])

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

Fetch a publicly shared note. Unauthenticated. The share token is the credential. For password-protected notes the password is supplied via the ?password= query param; the response distinguishes "no password supplied" from "wrong password" so the viewer can render the right prompt. Unknown tokens and disabled-share notes both return 404 to prevent token enumeration.

Parameters

  • connection (Spatio.Connection): Connection to server
  • token (String.t): Opaque public-share token.
  • opts (keyword): Optional parameters
    • :password (String.t): Optional viewer password.

Returns

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

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

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

List blocks under a note. Returns the block tree for a note, paginated. Block listing always targets a single account (the one that owns the note) so it does not fan out — the response is a plain { blocks, total }.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
    • :parent_id (String.t): Filter to children of this block id. Omit to list root-level blocks.
    • :limit (integer()):
    • :offset (integer()):

Returns

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

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

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

List comments on a note. Returns active (non-deleted) comments. When ?accountId= targets an external provider that supports comments (e.g. Notion), the provider is queried directly; otherwise the native store is used.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

list_notes(connection, opts \\ [])

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

List notes across connected accounts. Fan-out list. Returns every note visible to the caller across every connected notes provider, paginated by limit / offset. Pass ?accountId= or ?provider= to scope to a single source.

Parameters

  • connection (Spatio.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :provider (String.t): Provider id (e.g. native-notes, notion). Selects every connected account for the provider. Mutually exclusive with accountId.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.
    • :archived (boolean()): When true, return archived notes instead of active ones.
    • :parent_id (String.t): Filter to notes nested under this parent note id.
    • :tags ([String.t]): Repeatable. Filter to notes carrying every tag listed.
    • :limit (integer()): Max items to return. Defaults to 50.
    • :offset (integer()): Number of items to skip.
    • :sort_by (String.t): Sort field. Provider-dependent; the native provider supports updated_at, created_at, title.
    • :sort_order (String.t):

Returns

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

move_block(connection, id, move_block_request, opts \\ [])

Reparent or reorder a block.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Block id.
  • move_block_request (MoveBlockRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

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

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

Rotate the share token, invalidating any outstanding URLs.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

update_block(connection, id, update_block_request, opts \\ [])

Update a block (partial).

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Block id.
  • update_block_request (UpdateBlockRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

update_note(connection, id, update_note_request, opts \\ [])

Update a note (partial).

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • update_note_request (UpdateNoteRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

update_note_comment(connection, id, comment_id, update_comment_request, opts \\ [])

Edit a comment. Only the comment author can edit. The note owner can delete via DELETE but cannot rewrite.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): Note id.
  • comment_id (String.t): Comment id.
  • update_comment_request (UpdateCommentRequest):
  • opts (keyword): Optional parameters
    • :accountId (String.t): Connected-account row id. Selects which provider account this request targets when more than one is connected. Mutually exclusive with provider. If omitted on a list endpoint the call fans out across every connected account.
    • :"X-Workspace-ID" (String.t): Workspace scope for unscoped tokens. Workspace-scoped PATs and OAuth tokens carry this implicitly; for session/JWT auth without a scoped PAT, pass it explicitly.

Returns

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

workspace_create_note(connection, org, workspace, request_body, opts \\ [])

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

Parameters

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

Returns

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

workspace_create_note_block(connection, org, workspace, id, request_body, opts \\ [])

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

Parameters

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

Returns

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

workspace_delete_note(connection, org, workspace, id, opts \\ [])

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

Parameters

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

Returns

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

workspace_delete_note_block(connection, org, workspace, id, opts \\ [])

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

Parameters

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

Returns

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

workspace_get_note(connection, org, workspace, id, opts \\ [])

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

Parameters

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

Returns

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

workspace_get_note_block(connection, org, workspace, id, opts \\ [])

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

Parameters

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

Returns

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

workspace_list_note_blocks(connection, org, workspace, id, opts \\ [])

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

Parameters

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

Returns

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

workspace_list_notes(connection, org, workspace, opts \\ [])

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

Parameters

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

Returns

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

workspace_move_note_block(connection, org, workspace, id, request_body, opts \\ [])

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

Parameters

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

Returns

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

workspace_update_note(connection, org, workspace, id, request_body, opts \\ [])

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

Parameters

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

Returns

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

workspace_update_note_block(connection, org, workspace, id, request_body, opts \\ [])

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

Parameters

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

Returns

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