@@ -416,10 +416,10 @@ public protocol DocProtocol: AnyObject {
416416
417417 func applyEncodedChangesWithPatches( changes: [ UInt8 ] ) throws -> [ Patch ]
418418
419- func changes( ) -> [ ChangeHash ]
420-
421419 func changeByHash( hash: ChangeHash ) -> Change ?
422420
421+ func changes( ) -> [ ChangeHash ]
422+
423423 func commitWith( msg: String ? , time: Int64 )
424424
425425 func cursor( obj: ObjId , position: UInt64 ) throws -> Cursor
@@ -525,7 +525,6 @@ public protocol DocProtocol: AnyObject {
525525 func values( obj: ObjId ) throws -> [ Value ]
526526
527527 func valuesAt( obj: ObjId , heads: [ ChangeHash ] ) throws -> [ Value ]
528-
529528}
530529
531530public class Doc :
@@ -607,32 +606,45 @@ public class Doc:
607606 )
608607 }
609608
610- public func changes ( ) -> [ ChangeHash ] {
611- try ! FfiConverterSequenceTypeChangeHash . lift (
609+ public func changeByHash ( hash : ChangeHash ) -> Change ? {
610+ try ! FfiConverterOptionTypeChange . lift (
612611 try !
613612 rustCall {
614- uniffi_uniffi_automerge_fn_method_doc_changes (
613+ uniffi_uniffi_automerge_fn_method_doc_change_by_hash (
615614 self . uniffiClonePointer ( ) ,
615+
616+ FfiConverterTypeChangeHash . lower ( hash) ,
616617 $0
617618 )
618619 }
619620 )
620621 }
621622
622- public func changeByHash ( hash : ChangeHash ) -> Change ? {
623- try ! FfiConverterOptionTypeChange . lift (
623+ public func changes ( ) -> [ ChangeHash ] {
624+ try ! FfiConverterSequenceTypeChangeHash . lift (
624625 try !
625626 rustCall {
626- uniffi_uniffi_automerge_fn_method_doc_change_by_hash (
627+ uniffi_uniffi_automerge_fn_method_doc_changes (
627628 self . uniffiClonePointer ( ) ,
628-
629- FfiConverterTypeChangeHash . lower ( hash) ,
630629 $0
631630 )
632631 }
633632 )
634633 }
635634
635+ public func commitWith( msg: String ? , time: Int64 ) {
636+ try !
637+ rustCall {
638+ uniffi_uniffi_automerge_fn_method_doc_commit_with (
639+ self . uniffiClonePointer ( ) ,
640+
641+ FfiConverterOptionString . lower ( msg) ,
642+ FfiConverterInt64 . lower ( time) ,
643+ $0
644+ )
645+ }
646+ }
647+
636648 public func cursor( obj: ObjId , position: UInt64 ) throws -> Cursor {
637649 try FfiConverterTypeCursor . lift (
638650 rustCallWithError ( FfiConverterTypeDocError . lift) {
@@ -1238,18 +1250,6 @@ public class Doc:
12381250 }
12391251 )
12401252 }
1241- public func commitWith( msg: String ? , time: Int64 ) {
1242- try !
1243- rustCall {
1244- uniffi_uniffi_automerge_fn_method_doc_commit_with (
1245- self . uniffiClonePointer ( ) ,
1246-
1247- FfiConverterOptionString . lower ( msg) ,
1248- FfiConverterInt64 . lower ( time) ,
1249- $0
1250- )
1251- }
1252- }
12531253
12541254 public func save( ) -> [ UInt8 ] {
12551255 try ! FfiConverterSequenceUInt8 . lift (
0 commit comments