@@ -411,6 +411,8 @@ internal interface _UniFFILib : Library {
411
411
): Long
412
412
fun uniffi_xmtpv3_fn_method_ffigroup_find_messages (`ptr`: Pointer ,`opts`: RustBuffer .ByValue ,_uniffi_out_err : RustCallStatus ,
413
413
): RustBuffer .ByValue
414
+ fun uniffi_xmtpv3_fn_method_ffigroup_group_metadata (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
415
+ ): Pointer
414
416
fun uniffi_xmtpv3_fn_method_ffigroup_id (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
415
417
): RustBuffer .ByValue
416
418
fun uniffi_xmtpv3_fn_method_ffigroup_is_active (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
@@ -425,6 +427,14 @@ internal interface _UniFFILib : Library {
425
427
): Pointer
426
428
fun uniffi_xmtpv3_fn_method_ffigroup_sync (`ptr`: Pointer ,
427
429
): Pointer
430
+ fun uniffi_xmtpv3_fn_free_ffigroupmetadata (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
431
+ ): Unit
432
+ fun uniffi_xmtpv3_fn_method_ffigroupmetadata_conversation_type (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
433
+ ): RustBuffer .ByValue
434
+ fun uniffi_xmtpv3_fn_method_ffigroupmetadata_creator_account_address (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
435
+ ): RustBuffer .ByValue
436
+ fun uniffi_xmtpv3_fn_method_ffigroupmetadata_policy_type (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
437
+ ): RustBuffer .ByValue
428
438
fun uniffi_xmtpv3_fn_free_ffistreamcloser (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
429
439
): Unit
430
440
fun uniffi_xmtpv3_fn_method_ffistreamcloser_end (`ptr`: Pointer ,_uniffi_out_err : RustCallStatus ,
@@ -655,6 +665,8 @@ internal interface _UniFFILib : Library {
655
665
): Short
656
666
fun uniffi_xmtpv3_checksum_method_ffigroup_find_messages (
657
667
): Short
668
+ fun uniffi_xmtpv3_checksum_method_ffigroup_group_metadata (
669
+ ): Short
658
670
fun uniffi_xmtpv3_checksum_method_ffigroup_id (
659
671
): Short
660
672
fun uniffi_xmtpv3_checksum_method_ffigroup_is_active (
@@ -669,6 +681,12 @@ internal interface _UniFFILib : Library {
669
681
): Short
670
682
fun uniffi_xmtpv3_checksum_method_ffigroup_sync (
671
683
): Short
684
+ fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_conversation_type (
685
+ ): Short
686
+ fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_creator_account_address (
687
+ ): Short
688
+ fun uniffi_xmtpv3_checksum_method_ffigroupmetadata_policy_type (
689
+ ): Short
672
690
fun uniffi_xmtpv3_checksum_method_ffistreamcloser_end (
673
691
): Short
674
692
fun uniffi_xmtpv3_checksum_method_ffistreamcloser_is_closed (
@@ -789,6 +807,9 @@ private fun uniffiCheckApiChecksums(lib: _UniFFILib) {
789
807
if (lib.uniffi_xmtpv3_checksum_method_ffigroup_find_messages() != 61973 .toShort()) {
790
808
throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
791
809
}
810
+ if (lib.uniffi_xmtpv3_checksum_method_ffigroup_group_metadata() != 3690 .toShort()) {
811
+ throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
812
+ }
792
813
if (lib.uniffi_xmtpv3_checksum_method_ffigroup_id() != 35243 .toShort()) {
793
814
throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
794
815
}
@@ -810,6 +831,15 @@ private fun uniffiCheckApiChecksums(lib: _UniFFILib) {
810
831
if (lib.uniffi_xmtpv3_checksum_method_ffigroup_sync() != 9422 .toShort()) {
811
832
throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
812
833
}
834
+ if (lib.uniffi_xmtpv3_checksum_method_ffigroupmetadata_conversation_type() != 37015 .toShort()) {
835
+ throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
836
+ }
837
+ if (lib.uniffi_xmtpv3_checksum_method_ffigroupmetadata_creator_account_address() != 1906 .toShort()) {
838
+ throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
839
+ }
840
+ if (lib.uniffi_xmtpv3_checksum_method_ffigroupmetadata_policy_type() != 22845 .toShort()) {
841
+ throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
842
+ }
813
843
if (lib.uniffi_xmtpv3_checksum_method_ffistreamcloser_end() != 47211 .toShort()) {
814
844
throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
815
845
}
@@ -1398,7 +1428,8 @@ public interface FfiGroupInterface {
1398
1428
@Throws(GenericException ::class )
1399
1429
suspend fun `addMembers` (`accountAddresses`: List <String >)
1400
1430
fun `createdAtNs` (): Long @Throws (GenericException ::class)
1401
- fun `findMessages` (`opts`: FfiListMessagesOptions ): List <FfiMessage >
1431
+ fun `findMessages` (`opts`: FfiListMessagesOptions ): List <FfiMessage >@Throws (GenericException ::class)
1432
+ fun `groupMetadata` (): FfiGroupMetadata
1402
1433
fun `id` (): ByteArray @Throws (GenericException ::class)
1403
1434
fun `isActive` (): Boolean @Throws (GenericException ::class)
1404
1435
fun `listMembers` (): List <FfiGroupMember >@Throws (GenericException ::class)
@@ -1471,6 +1502,18 @@ class FfiGroup(
1471
1502
FfiConverterSequenceTypeFfiMessage .lift(it)
1472
1503
}
1473
1504
1505
+
1506
+ @Throws(GenericException ::class )override fun `groupMetadata` (): FfiGroupMetadata =
1507
+ callWithPointer {
1508
+ rustCallWithError(GenericException ) { _status ->
1509
+ _UniFFILib .INSTANCE .uniffi_xmtpv3_fn_method_ffigroup_group_metadata(it,
1510
+
1511
+ _status )
1512
+ }
1513
+ }.let {
1514
+ FfiConverterTypeFfiGroupMetadata .lift(it)
1515
+ }
1516
+
1474
1517
override fun `id` (): ByteArray =
1475
1518
callWithPointer {
1476
1519
rustCall() { _status ->
@@ -1621,6 +1664,98 @@ public object FfiConverterTypeFfiGroup: FfiConverter<FfiGroup, Pointer> {
1621
1664
1622
1665
1623
1666
1667
+ public interface FfiGroupMetadataInterface {
1668
+
1669
+ fun `conversationType` (): String
1670
+ fun `creatorAccountAddress` (): String @Throws (GenericException ::class)
1671
+ fun `policyType` (): GroupPermissions
1672
+ companion object
1673
+ }
1674
+
1675
+ class FfiGroupMetadata (
1676
+ pointer : Pointer
1677
+ ) : FFIObject(pointer), FfiGroupMetadataInterface {
1678
+
1679
+ /* *
1680
+ * Disconnect the object from the underlying Rust object.
1681
+ *
1682
+ * It can be called more than once, but once called, interacting with the object
1683
+ * causes an `IllegalStateException`.
1684
+ *
1685
+ * Clients **must** call this method once done with the object, or cause a memory leak.
1686
+ */
1687
+ override protected fun freeRustArcPtr () {
1688
+ rustCall() { status ->
1689
+ _UniFFILib .INSTANCE .uniffi_xmtpv3_fn_free_ffigroupmetadata(this .pointer, status)
1690
+ }
1691
+ }
1692
+
1693
+ override fun `conversationType` (): String =
1694
+ callWithPointer {
1695
+ rustCall() { _status ->
1696
+ _UniFFILib .INSTANCE .uniffi_xmtpv3_fn_method_ffigroupmetadata_conversation_type(it,
1697
+
1698
+ _status )
1699
+ }
1700
+ }.let {
1701
+ FfiConverterString .lift(it)
1702
+ }
1703
+
1704
+ override fun `creatorAccountAddress` (): String =
1705
+ callWithPointer {
1706
+ rustCall() { _status ->
1707
+ _UniFFILib .INSTANCE .uniffi_xmtpv3_fn_method_ffigroupmetadata_creator_account_address(it,
1708
+
1709
+ _status )
1710
+ }
1711
+ }.let {
1712
+ FfiConverterString .lift(it)
1713
+ }
1714
+
1715
+
1716
+ @Throws(GenericException ::class )override fun `policyType` (): GroupPermissions =
1717
+ callWithPointer {
1718
+ rustCallWithError(GenericException ) { _status ->
1719
+ _UniFFILib .INSTANCE .uniffi_xmtpv3_fn_method_ffigroupmetadata_policy_type(it,
1720
+
1721
+ _status )
1722
+ }
1723
+ }.let {
1724
+ FfiConverterTypeGroupPermissions .lift(it)
1725
+ }
1726
+
1727
+
1728
+
1729
+
1730
+ companion object
1731
+
1732
+ }
1733
+
1734
+ public object FfiConverterTypeFfiGroupMetadata: FfiConverter<FfiGroupMetadata, Pointer> {
1735
+ override fun lower (value : FfiGroupMetadata ): Pointer = value.callWithPointer { it }
1736
+
1737
+ override fun lift (value : Pointer ): FfiGroupMetadata {
1738
+ return FfiGroupMetadata (value)
1739
+ }
1740
+
1741
+ override fun read (buf : ByteBuffer ): FfiGroupMetadata {
1742
+ // The Rust code always writes pointers as 8 bytes, and will
1743
+ // fail to compile if they don't fit.
1744
+ return lift(Pointer (buf.getLong()))
1745
+ }
1746
+
1747
+ override fun allocationSize (value : FfiGroupMetadata ) = 8
1748
+
1749
+ override fun write (value : FfiGroupMetadata , buf : ByteBuffer ) {
1750
+ // The Rust code always expects pointers written as 8 bytes,
1751
+ // and will fail to compile if they don't fit.
1752
+ buf.putLong(Pointer .nativeValue(lower(value)))
1753
+ }
1754
+ }
1755
+
1756
+
1757
+
1758
+
1624
1759
public interface FfiStreamCloserInterface {
1625
1760
1626
1761
fun `end` ()
@@ -2547,6 +2682,7 @@ sealed class GenericException(message: String): Exception(message) {
2547
2682
class ApiException (message : String ) : GenericException(message)
2548
2683
class GroupException (message : String ) : GenericException(message)
2549
2684
class Signature (message : String ) : GenericException(message)
2685
+ class GroupMetadata (message : String ) : GenericException(message)
2550
2686
class Generic (message : String ) : GenericException(message)
2551
2687
2552
2688
@@ -2565,7 +2701,8 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer<GenericExcep
2565
2701
4 -> GenericException .ApiException (FfiConverterString .read(buf))
2566
2702
5 -> GenericException .GroupException (FfiConverterString .read(buf))
2567
2703
6 -> GenericException .Signature (FfiConverterString .read(buf))
2568
- 7 -> GenericException .Generic (FfiConverterString .read(buf))
2704
+ 7 -> GenericException .GroupMetadata (FfiConverterString .read(buf))
2705
+ 8 -> GenericException .Generic (FfiConverterString .read(buf))
2569
2706
else -> throw RuntimeException (" invalid error enum value, something is very wrong!!" )
2570
2707
}
2571
2708
@@ -2601,10 +2738,14 @@ public object FfiConverterTypeGenericError : FfiConverterRustBuffer<GenericExcep
2601
2738
buf.putInt(6 )
2602
2739
Unit
2603
2740
}
2604
- is GenericException .Generic -> {
2741
+ is GenericException .GroupMetadata -> {
2605
2742
buf.putInt(7 )
2606
2743
Unit
2607
2744
}
2745
+ is GenericException .Generic -> {
2746
+ buf.putInt(8 )
2747
+ Unit
2748
+ }
2608
2749
}.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
2609
2750
}
2610
2751
0 commit comments