@@ -584,7 +584,7 @@ open class Account: Service {
584584 open func updateMfaChallenge(
585585 challengeId: String ,
586586 otp: String
587- ) async throws -> Any {
587+ ) async throws -> AppwriteModels . Session {
588588 let apiPath : String = " /account/mfa/challenge "
589589
590590 let apiParams : [ String : Any ? ] = [
@@ -596,11 +596,17 @@ open class Account: Service {
596596 " content-type " : " application/json "
597597 ]
598598
599+ let converter : ( Any ) -> AppwriteModels . Session = { response in
600+ return AppwriteModels . Session. from ( map: response as! [ String : Any ] )
601+ }
602+
599603 return try await client. call (
600604 method: " PUT " ,
601605 path: apiPath,
602606 headers: apiHeaders,
603- params: apiParams )
607+ params: apiParams,
608+ converter: converter
609+ )
604610 }
605611
606612 ///
@@ -1599,6 +1605,12 @@ open class Account: Service {
15991605 ///
16001606 /// Create push target
16011607 ///
1608+ /// Use this endpoint to register a device for push notifications. Provide a
1609+ /// target ID (custom or generated using ID.unique()), a device identifier
1610+ /// (usually a device token), and optionally specify which provider should send
1611+ /// notifications to this target. The target is automatically linked to the
1612+ /// current session and includes device information like brand and model.
1613+ ///
16021614 /// @param String targetId
16031615 /// @param String identifier
16041616 /// @param String providerId
@@ -1638,6 +1650,12 @@ open class Account: Service {
16381650 ///
16391651 /// Update push target
16401652 ///
1653+ /// Update the currently logged in user's push notification target. You can
1654+ /// modify the target's identifier (device token) and provider ID (token,
1655+ /// email, phone etc.). The target must exist and belong to the current user.
1656+ /// If you change the provider ID, notifications will be sent through the new
1657+ /// messaging provider instead.
1658+ ///
16411659 /// @param String targetId
16421660 /// @param String identifier
16431661 /// @throws Exception
@@ -1674,6 +1692,10 @@ open class Account: Service {
16741692 ///
16751693 /// Delete push target
16761694 ///
1695+ /// Delete a push notification target for the currently logged in user. After
1696+ /// deletion, the device will no longer receive push notifications. The target
1697+ /// must exist and belong to the current user.
1698+ ///
16771699 /// @param String targetId
16781700 /// @throws Exception
16791701 /// @return array
@@ -1758,9 +1780,7 @@ open class Account: Service {
17581780 /// [POST
17591781 /// /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
17601782 /// endpoint to complete the login process. The link sent to the user's email
1761- /// address is valid for 1 hour. If you are on a mobile device you can leave
1762- /// the URL parameter empty, so that the login completion will be handled by
1763- /// your Appwrite instance by default.
1783+ /// address is valid for 1 hour.
17641784 ///
17651785 /// A user is limited to 10 active sessions at a time by default. [Learn more
17661786 /// about session
0 commit comments