Column.Documents (Column v1.0.0)

Copy Markdown View Source

Document upload and retrieval.

Upload files (PDF, images, etc.) to Column for attachment to entities, evidence submissions, or compliance objects.

Upload a document

{:ok, doc} = Column.Documents.upload("/tmp/articles_of_incorporation.pdf",
  description: "Articles of Incorporation"
)

# Then reference doc["id"] when submitting entity evidence
Column.Entities.create_evidence("ent_123", %{
  document_id: doc["id"],
  document_type: "articles_of_incorporation"
})

Summary

Functions

Get a document by ID.

List all uploaded documents.

Upload a document file.

Types

id()

@type id() :: String.t()

opts()

@type opts() :: keyword()

result()

@type result() :: {:ok, map()} | {:error, Column.Error.t()}

Functions

get(id, opts \\ [])

@spec get(id(), opts()) :: result()

Get a document by ID.

list(opts \\ [])

@spec list(opts()) :: result()

List all uploaded documents.

upload(file_path, opts \\ [])

@spec upload(String.t(), opts()) :: result()

Upload a document file.

file_path is the local path to the file. Additional metadata can be passed as keyword options.