@@ -854,7 +854,7 @@ private fun uniffiCheckApiChecksums(lib: _UniFFILib) {
854
854
if (lib.uniffi_xmtpv3_checksum_method_ffigroup_remove_members() != 1645 .toShort()) {
855
855
throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
856
856
}
857
- if (lib.uniffi_xmtpv3_checksum_method_ffigroup_send() != 55957 .toShort()) {
857
+ if (lib.uniffi_xmtpv3_checksum_method_ffigroup_send() != 2523 .toShort()) {
858
858
throw RuntimeException (" UniFFI API checksum mismatch: try cleaning and rebuilding your project" )
859
859
}
860
860
if (lib.uniffi_xmtpv3_checksum_method_ffigroup_stream() != 7482 .toShort()) {
@@ -1505,7 +1505,7 @@ public interface FfiGroupInterface {
1505
1505
fun `listMembers` (): List <FfiGroupMember >@Throws (GenericException ::class)
1506
1506
suspend fun `processStreamedGroupMessage` (`envelopeBytes`: ByteArray ): FfiMessage @Throws (GenericException ::class)
1507
1507
suspend fun `removeMembers` (`accountAddresses`: List <String >)@Throws(GenericException : :class)
1508
- suspend fun `send` (`contentBytes`: ByteArray )@Throws(GenericException : :class)
1508
+ suspend fun `send` (`contentBytes`: ByteArray ): ByteArray @Throws (GenericException ::class)
1509
1509
suspend fun `stream` (`messageCallback`: FfiMessageCallback ): FfiStreamCloser @Throws (GenericException ::class)
1510
1510
suspend fun `sync` ()
1511
1511
companion object
@@ -1676,20 +1676,19 @@ class FfiGroup(
1676
1676
1677
1677
@Throws(GenericException ::class )
1678
1678
@Suppress(" ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE" )
1679
- override suspend fun `send` (`contentBytes`: ByteArray ) {
1679
+ override suspend fun `send` (`contentBytes`: ByteArray ) : ByteArray {
1680
1680
return uniffiRustCallAsync(
1681
1681
callWithPointer { thisPtr ->
1682
1682
_UniFFILib .INSTANCE .uniffi_xmtpv3_fn_method_ffigroup_send(
1683
1683
thisPtr,
1684
1684
FfiConverterByteArray .lower(`contentBytes`),
1685
1685
)
1686
1686
},
1687
- { future, continuation -> _UniFFILib .INSTANCE .ffi_xmtpv3_rust_future_poll_void (future, continuation) },
1688
- { future, continuation -> _UniFFILib .INSTANCE .ffi_xmtpv3_rust_future_complete_void (future, continuation) },
1689
- { future -> _UniFFILib .INSTANCE .ffi_xmtpv3_rust_future_free_void (future) },
1687
+ { future, continuation -> _UniFFILib .INSTANCE .ffi_xmtpv3_rust_future_poll_rust_buffer (future, continuation) },
1688
+ { future, continuation -> _UniFFILib .INSTANCE .ffi_xmtpv3_rust_future_complete_rust_buffer (future, continuation) },
1689
+ { future -> _UniFFILib .INSTANCE .ffi_xmtpv3_rust_future_free_rust_buffer (future) },
1690
1690
// lift function
1691
- { Unit },
1692
-
1691
+ { FfiConverterByteArray .lift(it) },
1693
1692
// Error FFI converter
1694
1693
GenericException .ErrorHandler ,
1695
1694
)
@@ -2484,7 +2483,8 @@ public object FfiConverterTypeFfiListConversationsOptions: FfiConverterRustBuffe
2484
2483
data class FfiListMessagesOptions (
2485
2484
var `sentBeforeNs`: Long? ,
2486
2485
var `sentAfterNs`: Long? ,
2487
- var `limit`: Long?
2486
+ var `limit`: Long? ,
2487
+ var `deliveryStatus`: FfiDeliveryStatus ?
2488
2488
) {
2489
2489
2490
2490
companion object
@@ -2496,19 +2496,22 @@ public object FfiConverterTypeFfiListMessagesOptions: FfiConverterRustBuffer<Ffi
2496
2496
FfiConverterOptionalLong .read(buf),
2497
2497
FfiConverterOptionalLong .read(buf),
2498
2498
FfiConverterOptionalLong .read(buf),
2499
+ FfiConverterOptionalTypeFfiDeliveryStatus .read(buf),
2499
2500
)
2500
2501
}
2501
2502
2502
2503
override fun allocationSize (value : FfiListMessagesOptions ) = (
2503
2504
FfiConverterOptionalLong .allocationSize(value.`sentBeforeNs`) +
2504
2505
FfiConverterOptionalLong .allocationSize(value.`sentAfterNs`) +
2505
- FfiConverterOptionalLong .allocationSize(value.`limit`)
2506
+ FfiConverterOptionalLong .allocationSize(value.`limit`) +
2507
+ FfiConverterOptionalTypeFfiDeliveryStatus .allocationSize(value.`deliveryStatus`)
2506
2508
)
2507
2509
2508
2510
override fun write (value : FfiListMessagesOptions , buf : ByteBuffer ) {
2509
2511
FfiConverterOptionalLong .write(value.`sentBeforeNs`, buf)
2510
2512
FfiConverterOptionalLong .write(value.`sentAfterNs`, buf)
2511
2513
FfiConverterOptionalLong .write(value.`limit`, buf)
2514
+ FfiConverterOptionalTypeFfiDeliveryStatus .write(value.`deliveryStatus`, buf)
2512
2515
}
2513
2516
}
2514
2517
@@ -2521,7 +2524,8 @@ data class FfiMessage (
2521
2524
var `convoId`: ByteArray ,
2522
2525
var `addrFrom`: String ,
2523
2526
var `content`: ByteArray ,
2524
- var `kind`: FfiGroupMessageKind
2527
+ var `kind`: FfiGroupMessageKind ,
2528
+ var `deliveryStatus`: FfiDeliveryStatus
2525
2529
) {
2526
2530
2527
2531
companion object
@@ -2536,6 +2540,7 @@ public object FfiConverterTypeFfiMessage: FfiConverterRustBuffer<FfiMessage> {
2536
2540
FfiConverterString .read(buf),
2537
2541
FfiConverterByteArray .read(buf),
2538
2542
FfiConverterTypeFfiGroupMessageKind .read(buf),
2543
+ FfiConverterTypeFfiDeliveryStatus .read(buf),
2539
2544
)
2540
2545
}
2541
2546
@@ -2545,7 +2550,8 @@ public object FfiConverterTypeFfiMessage: FfiConverterRustBuffer<FfiMessage> {
2545
2550
FfiConverterByteArray .allocationSize(value.`convoId`) +
2546
2551
FfiConverterString .allocationSize(value.`addrFrom`) +
2547
2552
FfiConverterByteArray .allocationSize(value.`content`) +
2548
- FfiConverterTypeFfiGroupMessageKind .allocationSize(value.`kind`)
2553
+ FfiConverterTypeFfiGroupMessageKind .allocationSize(value.`kind`) +
2554
+ FfiConverterTypeFfiDeliveryStatus .allocationSize(value.`deliveryStatus`)
2549
2555
)
2550
2556
2551
2557
override fun write (value : FfiMessage , buf : ByteBuffer ) {
@@ -2555,6 +2561,7 @@ public object FfiConverterTypeFfiMessage: FfiConverterRustBuffer<FfiMessage> {
2555
2561
FfiConverterString .write(value.`addrFrom`, buf)
2556
2562
FfiConverterByteArray .write(value.`content`, buf)
2557
2563
FfiConverterTypeFfiGroupMessageKind .write(value.`kind`, buf)
2564
+ FfiConverterTypeFfiDeliveryStatus .write(value.`deliveryStatus`, buf)
2558
2565
}
2559
2566
}
2560
2567
@@ -2767,6 +2774,30 @@ public object FfiConverterTypeFfiV2SubscribeRequest: FfiConverterRustBuffer<FfiV
2767
2774
2768
2775
2769
2776
2777
+ enum class FfiDeliveryStatus {
2778
+ UNPUBLISHED ,PUBLISHED ,FAILED ;
2779
+ companion object
2780
+ }
2781
+
2782
+ public object FfiConverterTypeFfiDeliveryStatus: FfiConverterRustBuffer<FfiDeliveryStatus> {
2783
+ override fun read (buf : ByteBuffer ) = try {
2784
+ FfiDeliveryStatus .values()[buf.getInt() - 1 ]
2785
+ } catch (e: IndexOutOfBoundsException ) {
2786
+ throw RuntimeException (" invalid enum value, something is very wrong!!" , e)
2787
+ }
2788
+
2789
+ override fun allocationSize (value : FfiDeliveryStatus ) = 4
2790
+
2791
+ override fun write (value : FfiDeliveryStatus , buf : ByteBuffer ) {
2792
+ buf.putInt(value.ordinal + 1 )
2793
+ }
2794
+ }
2795
+
2796
+
2797
+
2798
+
2799
+
2800
+
2770
2801
enum class FfiGroupMessageKind {
2771
2802
APPLICATION ,MEMBERSHIP_CHANGE ;
2772
2803
companion object
@@ -3591,6 +3622,35 @@ public object FfiConverterOptionalTypeFfiPagingInfo: FfiConverterRustBuffer<FfiP
3591
3622
3592
3623
3593
3624
3625
+ public object FfiConverterOptionalTypeFfiDeliveryStatus: FfiConverterRustBuffer<FfiDeliveryStatus?> {
3626
+ override fun read (buf : ByteBuffer ): FfiDeliveryStatus ? {
3627
+ if (buf.get().toInt() == 0 ) {
3628
+ return null
3629
+ }
3630
+ return FfiConverterTypeFfiDeliveryStatus .read(buf)
3631
+ }
3632
+
3633
+ override fun allocationSize (value : FfiDeliveryStatus ? ): Int {
3634
+ if (value == null ) {
3635
+ return 1
3636
+ } else {
3637
+ return 1 + FfiConverterTypeFfiDeliveryStatus .allocationSize(value)
3638
+ }
3639
+ }
3640
+
3641
+ override fun write (value : FfiDeliveryStatus ? , buf : ByteBuffer ) {
3642
+ if (value == null ) {
3643
+ buf.put(0 )
3644
+ } else {
3645
+ buf.put(1 )
3646
+ FfiConverterTypeFfiDeliveryStatus .write(value, buf)
3647
+ }
3648
+ }
3649
+ }
3650
+
3651
+
3652
+
3653
+
3594
3654
public object FfiConverterOptionalTypeGroupPermissions: FfiConverterRustBuffer<GroupPermissions?> {
3595
3655
override fun read (buf : ByteBuffer ): GroupPermissions ? {
3596
3656
if (buf.get().toInt() == 0 ) {
0 commit comments