@@ -624,8 +624,28 @@ public protocol ClientProtocol : AnyObject {
624
624
*/
625
625
func cachedAvatarUrl() throws -> String?
626
626
627
+ /**
628
+ * Lets the user know whether this is an `m.login.password` based
629
+ * auth and if the account can actually be deactivated
630
+ */
631
+ func canDeactivateAccount() -> Bool
632
+
627
633
func createRoom(request: CreateRoomParameters) async throws -> String
628
634
635
+ /**
636
+ * Deactivate this account definitively.
637
+ * Similarly to `encryption::reset_identity` this
638
+ * will only work with password-based authentication (`m.login.password`)
639
+ *
640
+ * # Arguments
641
+ *
642
+ * * `auth_data` - This request uses the [User-Interactive Authentication
643
+ * API][uiaa]. The first request needs to set this to `None` and will
644
+ * always fail and the same request needs to be made but this time with
645
+ * some `auth_data` provided.
646
+ */
647
+ func deactivateAccount(authData: AuthData?, eraseData: Bool) async throws
648
+
629
649
/**
630
650
* Deletes a pusher of given pusher ids
631
651
*/
@@ -1033,6 +1053,17 @@ open func cachedAvatarUrl()throws -> String? {
1033
1053
uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url(self.uniffiClonePointer(),$0
1034
1054
)
1035
1055
})
1056
+ }
1057
+
1058
+ /**
1059
+ * Lets the user know whether this is an `m.login.password` based
1060
+ * auth and if the account can actually be deactivated
1061
+ */
1062
+ open func canDeactivateAccount() -> Bool {
1063
+ return try! FfiConverterBool.lift(try! rustCall() {
1064
+ uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account(self.uniffiClonePointer(),$0
1065
+ )
1066
+ })
1036
1067
}
1037
1068
1038
1069
open func createRoom(request: CreateRoomParameters)async throws -> String {
@@ -1052,6 +1083,35 @@ open func createRoom(request: CreateRoomParameters)async throws -> String {
1052
1083
)
1053
1084
}
1054
1085
1086
+ /**
1087
+ * Deactivate this account definitively.
1088
+ * Similarly to `encryption::reset_identity` this
1089
+ * will only work with password-based authentication (`m.login.password`)
1090
+ *
1091
+ * # Arguments
1092
+ *
1093
+ * * `auth_data` - This request uses the [User-Interactive Authentication
1094
+ * API][uiaa]. The first request needs to set this to `None` and will
1095
+ * always fail and the same request needs to be made but this time with
1096
+ * some `auth_data` provided.
1097
+ */
1098
+ open func deactivateAccount(authData: AuthData?, eraseData: Bool)async throws {
1099
+ return
1100
+ try await uniffiRustCallAsync(
1101
+ rustFutureFunc: {
1102
+ uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account(
1103
+ self.uniffiClonePointer(),
1104
+ FfiConverterOptionTypeAuthData.lower(authData),FfiConverterBool.lower(eraseData)
1105
+ )
1106
+ },
1107
+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_void,
1108
+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_void,
1109
+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_void,
1110
+ liftFunc: { $0 },
1111
+ errorHandler: FfiConverterTypeClientError.lift
1112
+ )
1113
+ }
1114
+
1055
1115
/**
1056
1116
* Deletes a pusher of given pusher ids
1057
1117
*/
@@ -27230,9 +27290,15 @@ private var initializationResult: InitializationResult = {
27230
27290
if (uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 58990) {
27231
27291
return InitializationResult.apiChecksumMismatch
27232
27292
}
27293
+ if (uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() != 39890) {
27294
+ return InitializationResult.apiChecksumMismatch
27295
+ }
27233
27296
if (uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 52700) {
27234
27297
return InitializationResult.apiChecksumMismatch
27235
27298
}
27299
+ if (uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() != 20658) {
27300
+ return InitializationResult.apiChecksumMismatch
27301
+ }
27236
27302
if (uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 45990) {
27237
27303
return InitializationResult.apiChecksumMismatch
27238
27304
}
0 commit comments