@@ -283,7 +283,7 @@ class Account extends Service {
283
283
/// the flow, use
284
284
/// [createMfaChallenge] (/docs/references/cloud/client-web/account#createMfaChallenge)
285
285
/// method.
286
- Future updateMfaChallenge (
286
+ Future <models. Session > updateMfaChallenge (
287
287
{required String challengeId, required String otp}) async {
288
288
const String apiPath = '/account/mfa/challenge' ;
289
289
@@ -299,7 +299,7 @@ class Account extends Service {
299
299
final res = await client.call (HttpMethod .put,
300
300
path: apiPath, params: apiParams, headers: apiHeaders);
301
301
302
- return res.data;
302
+ return models. Session . fromMap ( res.data) ;
303
303
}
304
304
305
305
/// List factors
@@ -862,6 +862,11 @@ class Account extends Service {
862
862
863
863
/// Create push target
864
864
///
865
+ /// Use this endpoint to register a device for push notifications. Provide a
866
+ /// target ID (custom or generated using ID.unique()), a device identifier
867
+ /// (usually a device token), and optionally specify which provider should send
868
+ /// notifications to this target. The target is automatically linked to the
869
+ /// current session and includes device information like brand and model.
865
870
Future <models.Target > createPushTarget (
866
871
{required String targetId,
867
872
required String identifier,
@@ -886,6 +891,11 @@ class Account extends Service {
886
891
887
892
/// Update push target
888
893
///
894
+ /// Update the currently logged in user's push notification target. You can
895
+ /// modify the target's identifier (device token) and provider ID (token,
896
+ /// email, phone etc.). The target must exist and belong to the current user.
897
+ /// If you change the provider ID, notifications will be sent through the new
898
+ /// messaging provider instead.
889
899
Future <models.Target > updatePushTarget (
890
900
{required String targetId, required String identifier}) async {
891
901
final String apiPath =
@@ -907,6 +917,9 @@ class Account extends Service {
907
917
908
918
/// Delete push target
909
919
///
920
+ /// Delete a push notification target for the currently logged in user. After
921
+ /// deletion, the device will no longer receive push notifications. The target
922
+ /// must exist and belong to the current user.
910
923
Future deletePushTarget ({required String targetId}) async {
911
924
final String apiPath =
912
925
'/account/targets/{targetId}/push' .replaceAll ('{targetId}' , targetId);
@@ -965,9 +978,7 @@ class Account extends Service {
965
978
/// [POST
966
979
/// /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession)
967
980
/// endpoint to complete the login process. The link sent to the user's email
968
- /// address is valid for 1 hour. If you are on a mobile device you can leave
969
- /// the URL parameter empty, so that the login completion will be handled by
970
- /// your Appwrite instance by default.
981
+ /// address is valid for 1 hour.
971
982
///
972
983
/// A user is limited to 10 active sessions at a time by default. [Learn more
973
984
/// about session
0 commit comments