Module

FPO.Dto.DocumentDto.DocumentHistory

This module provides DTOs for document-wide history endpoints. It matches the swagger.json specification for /docs/{documentID}/history.

#DocumentHistory

newtype DocumentHistory

Document history response from /docs/{documentID}/history endpoint Matches swagger DocumentHistory schema

Constructors

Instances

#DocumentHistoryItem

data DocumentHistoryItem

A document history item can be either a tree revision (structure change) or a text revision (content change in a specific text element). Matches swagger DocumentHistoryItem oneOf schema

Constructors

Instances

#TreeRevisionHeader

newtype TreeRevisionHeader

Header for tree revisions (document structure changes) Matches swagger TreeRevisionHeader schema

Constructors

Instances

#TreeRevisionHistory

newtype TreeRevisionHistory

Tree revision history response from /docs/{documentID}/tree/history endpoint Contains only tree revisions (document structure changes) Matches swagger TreeRevisionHistory schema

Constructors

Instances

#getDocumentID

getDocumentID :: DocumentHistory -> DocumentID

Get the document ID from the history response

#getHistoryItems

getHistoryItems :: DocumentHistory -> Array DocumentHistoryItem

Get all history items from the history response

#isTreeItem

isTreeItem :: DocumentHistoryItem -> Boolean

Check if an item is a tree revision

#isTextItem

isTextItem :: DocumentHistoryItem -> Boolean

Check if an item is a text revision

#getItemHeader

getItemHeader :: DocumentHistoryItem -> TreeRevisionHeader

Get the header from any history item

#getTextElementID

getTextElementID :: DocumentHistoryItem -> Maybe Int

Get the text element ID from a text history item (returns Nothing for tree items)

#getTreeRevisionIdentifier

#getTreeRevisionTimestamp

#getTreeRevisionAuthor

#getTreeHistoryDocumentID

getTreeHistoryDocumentID :: TreeRevisionHistory -> DocumentID

Get the document ID from the tree history response

#getTreeHistoryItems

getTreeHistoryItems :: TreeRevisionHistory -> Array TreeRevisionHeader

Get all tree revision headers from the tree history response

Modules