pub async fn get_doc_id( state: AppState, ref_id: Uuid, ) -> Result<DocumentId, AppError>
Gets the Automerge document ID for the head snapshot of a ref.