DocumentApi

interface DocumentApi

Represents a Document API that allows to create, load and store documents. Please call all this methods in IO thread if possible as they performs file operations.

Functions

Link copied to clipboard
abstract fun createDocument(documentImageSizeLimit: Int = Document.DEFAULT_DOCUMENT_IMAGE_SIZE_LIMIT): Result<Document>

Create a new document. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun deleteAllDocuments(): Result<Unit>

Delete all stores documents. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun deleteDocument(uuid: String): Result<Unit>

Delete a document by its ID. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun isDocumentExist(documentId: String): Result<Boolean>

Check if a document with the given ID exists. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard
abstract fun loadDocument(documentId: String): Result<Document>

Load a document by its ID. This is an IO operation and is not recommended to execute in the UI thread.

Link copied to clipboard

Get all stored documents. This is an IO operation and is not recommended to execute in the UI thread.