getDocumentHistory static method
List a document's kept versions, newest first, with sizes but not bodies (client-side HISTORY). The body is a JSON array.
Implementation
static Future<DocumentFrameResponse> getDocumentHistory(
P2PStream stream, {
required PeerId ownerPeerId,
required String path,
int? maxVersions,
}) async {
return _exchange(
stream,
DocumentFrame.encodeRequest(
operation: 'HISTORY',
ownerPeerId: ownerPeerId,
path: path,
maxVersions: maxVersions,
),
'listing document history',
);
}