Spatio.Api.Files (spatio_sdk v0.0.2)

API calls for all endpoints tagged Files.

Summary

Functions

Finalize a chunked-upload session and create the file row.

Extract text content from a PDF (or other supported file).

Fetch the block manifest for a chunked-uploaded file. Only meaningful for files uploaded via upload/chunked/*. Files uploaded via upload or upload/base64 return 404.

Fetch one file's metadata.

Mint a fresh signed download URL. Returns a JSON envelope with a pre-signed URL pointing at the backing storage. Clients follow the URL — the platform does not stream bytes through itself.

Begin a content-addressed chunked upload session. Client computes per-block hashes ahead of time and submits the list. The server replies with which blocks need uploading vs. already-on-server (deduplicated). Subsequent calls upload the missing blocks via uploadChunkedBlock, then commit.

List folders across connected file providers.

List files across connected file providers. Fan-out list. Returns files from every connected file provider unless filtered by ?accountId= or ?provider=. Folder contents are scoped via ?folderId=; omit for account root.

Aggregate list of files + folders for renderer file-browser views. Calls listFiles and listFileFolders in parallel and merges the results. Saves a round-trip when the UI shows both side-by-side.

Move a single file to a target folder.

Substring-match search across the caller's files. In-memory search — the platform lists up to ~500 files and filters locally on name (case-insensitive substring). Not suitable for global search across very large file libraries.

Update a file's metadata (name, folder, custom fields).

Upload one block for an open chunked-upload session.

Upload a file via multipart form. Multipart upload. Form field file carries the binary; auxiliary form fields scope the upload (folderId, workspaceId, organizationId, accountId). Max body size is currently 100 MB.

Upload a file via JSON with base64-encoded content. Equivalent to uploadFile for clients that can't post multipart bodies (e.g. browser fetch with strict CSP).

Workspace-scoped chunked-upload commit (RBAC-protected).

Workspace-scoped chunked-upload init (RBAC-protected).

Workspace-scoped list-folders (RBAC-protected).

Workspace-scoped list-files (RBAC-protected).

Workspace-scoped chunked-upload block (RBAC-protected).

Workspace-scoped multipart upload (RBAC-protected).

Functions

bulk_delete_files(connection, bulk_delete_files_request, opts \\ [])

Delete multiple files in one call.

Parameters

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

Returns

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

bulk_move_files(connection, bulk_move_files_request, opts \\ [])

Move multiple files to a target folder.

Parameters

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

Returns

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

commit_chunked_upload(connection, commit_chunked_upload_request, opts \\ [])

Finalize a chunked-upload session and create the file row.

Parameters

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

Returns

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

create_file_folder(connection, create_folder_request, opts \\ [])

Create a folder.

Parameters

  • connection (Spatio.Connection): Connection to server
  • create_folder_request (CreateFolderRequest):
  • 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.Folder.t} on success
  • {:error, Tesla.Env.t} on failure

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

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

Delete a file.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File 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

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

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

Extract text content from a PDF (or other supported file).

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File 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.
    • :pageStart (integer()):
    • :pageEnd (integer()):
    • :maxChars (integer()): Truncation limit; sets truncated: true when hit.

Returns

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

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

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

Fetch the block manifest for a chunked-uploaded file. Only meaningful for files uploaded via upload/chunked/*. Files uploaded via upload or upload/base64 return 404.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File 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.ChunkedFileManifest.t} on success
  • {:error, Tesla.Env.t} on failure

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

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

Fetch one file's metadata.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File 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.SpatioFile.t} on success
  • {:error, Tesla.Env.t} on failure

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

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

Mint a fresh signed download URL. Returns a JSON envelope with a pre-signed URL pointing at the backing storage. Clients follow the URL — the platform does not stream bytes through itself.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File 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.DownloadFileResponse.t} on success
  • {:error, Tesla.Env.t} on failure

init_chunked_upload(connection, init_chunked_upload_request, opts \\ [])

Begin a content-addressed chunked upload session. Client computes per-block hashes ahead of time and submits the list. The server replies with which blocks need uploading vs. already-on-server (deduplicated). Subsequent calls upload the missing blocks via uploadChunkedBlock, then commit.

Parameters

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

Returns

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

list_file_folders(connection, opts \\ [])

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

List folders across connected file providers.

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.
    • :parentId (String.t): Filter to children of this folder. Omit for root.
    • :workspaceId (String.t):
    • :organizationId (String.t):
    • :limit (integer()):
    • :offset (integer()):

Returns

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

list_files(connection, opts \\ [])

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

List files across connected file providers. Fan-out list. Returns files from every connected file provider unless filtered by ?accountId= or ?provider=. Folder contents are scoped via ?folderId=; omit for account root.

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.
    • :folderId (String.t): Filter to one folder. Omit for the account root.
    • :workspaceId (String.t):
    • :organizationId (String.t):
    • :limit (integer()):
    • :offset (integer()):
    • :sortBy (String.t): Provider-dependent. Common values: created_at, name, size.
    • :sortOrder (String.t):

Returns

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

list_files_and_folders(connection, opts \\ [])

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

Aggregate list of files + folders for renderer file-browser views. Calls listFiles and listFileFolders in parallel and merges the results. Saves a round-trip when the UI shows both side-by-side.

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.
    • :folderId (String.t): Filter to one folder. Omit for the account root.
    • :workspaceId (String.t):
    • :organizationId (String.t):
    • :limit (integer()):
    • :offset (integer()):
    • :sortBy (String.t):
    • :sortOrder (String.t):

Returns

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

move_file(connection, id, move_file_request, opts \\ [])

Move a single file to a target folder.

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File id.
  • move_file_request (MoveFileRequest):
  • 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.MoveFileResponse.t} on success
  • {:error, Tesla.Env.t} on failure

search_files(connection, query, opts \\ [])

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

Substring-match search across the caller's files. In-memory search — the platform lists up to ~500 files and filters locally on name (case-insensitive substring). Not suitable for global search across very large file libraries.

Parameters

  • connection (Spatio.Connection): Connection to server
  • query (String.t):
  • 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.
    • :folderId (String.t): Filter to one folder. Omit for the account root.
    • :workspaceId (String.t):
    • :organizationId (String.t):
    • :limit (integer()):
    • :offset (integer()):

Returns

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

update_file(connection, id, update_file_request, opts \\ [])

Update a file's metadata (name, folder, custom fields).

Parameters

  • connection (Spatio.Connection): Connection to server
  • id (String.t): File id.
  • update_file_request (UpdateFileRequest):
  • 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.SpatioFile.t} on success
  • {:error, Tesla.Env.t} on failure

upload_chunked_block(connection, session_id, block_hash, block, opts \\ [])

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

Upload one block for an open chunked-upload session.

Parameters

  • connection (Spatio.Connection): Connection to server
  • session_id (String.t):
  • block_hash (String.t):
  • block (String.t):
  • opts (keyword): Optional parameters
    • :blockIndex (integer()):

Returns

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

upload_file(connection, file, opts \\ [])

Upload a file via multipart form. Multipart upload. Form field file carries the binary; auxiliary form fields scope the upload (folderId, workspaceId, organizationId, accountId). Max body size is currently 100 MB.

Parameters

  • connection (Spatio.Connection): Connection to server
  • file (String.t): File bytes (multipart form field name file).
  • opts (keyword): Optional parameters
    • :folderId (String.t):
    • :workspaceId (String.t):
    • :organizationId (String.t):
    • :accountId (String.t):

Returns

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

upload_file_base64(connection, upload_file_base64_request, opts \\ [])

Upload a file via JSON with base64-encoded content. Equivalent to uploadFile for clients that can't post multipart bodies (e.g. browser fetch with strict CSP).

Parameters

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

Returns

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

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

@spec workspace_commit_chunked_upload(
  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()}

Workspace-scoped chunked-upload commit (RBAC-protected).

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

@spec workspace_create_file_folder(
  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()}

Workspace-scoped create-folder (RBAC-protected).

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_delete_file(connection, org, workspace, id, opts \\ [])

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

Workspace-scoped delete-file.

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_file(connection, org, workspace, id, opts \\ [])

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

Workspace-scoped get-file.

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_file_download(connection, org, workspace, id, opts \\ [])

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

Workspace-scoped signed-download URL.

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_file_manifest(connection, org, workspace, id, opts \\ [])

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

Workspace-scoped chunked-file manifest.

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

@spec workspace_init_chunked_upload(
  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()}

Workspace-scoped chunked-upload init (RBAC-protected).

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_list_file_folders(connection, org, workspace, opts \\ [])

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

Workspace-scoped list-folders (RBAC-protected).

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_list_files(connection, org, workspace, opts \\ [])

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

Workspace-scoped list-files (RBAC-protected).

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_file(connection, org, workspace, id, request_body, opts \\ [])

@spec workspace_move_file(
  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()}

Workspace-scoped move-file.

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_file(connection, org, workspace, id, request_body, opts \\ [])

@spec workspace_update_file(
  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()}

Workspace-scoped update-file.

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_upload_chunked_block(connection, org, workspace, body, opts \\ [])

@spec workspace_upload_chunked_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()}

Workspace-scoped chunked-upload block (RBAC-protected).

Parameters

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

Returns

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

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

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

Workspace-scoped multipart upload (RBAC-protected).

Parameters

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

Returns

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

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

@spec workspace_upload_file_base64(
  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()}

Workspace-scoped base64 upload (RBAC-protected).

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