@@ -4,11 +4,11 @@ part of dart_appwrite;
44class Account extends Service {
55 Account (Client client): super (client);
66
7- /// Get Account
8- ///
7+ /// Get Account
8+ ///
99 /// Get currently logged in user data as JSON object.
10- ///
11- Future <models.User > get () async {
10+ ///
11+ Future <models.User > get () async {
1212 final String path = '/account' ;
1313
1414 final Map <String , dynamic > params = {
@@ -28,8 +28,8 @@ class Account extends Service {
2828
2929 }
3030
31- /// Update Account Email
32- ///
31+ /// Update Account Email
32+ ///
3333 /// Update currently logged in user account email address. After changing user
3434 /// address, the user confirmation status will get reset. A new confirmation
3535 /// email is not sent automatically however you can use the send confirmation
@@ -38,8 +38,8 @@ class Account extends Service {
3838 /// This endpoint can also be used to convert an anonymous account to a normal
3939 /// one, by passing an email address and a new password.
4040 ///
41- ///
42- Future <models.User > updateEmail ({required String email, required String password}) async {
41+ ///
42+ Future <models.User > updateEmail ({required String email, required String password}) async {
4343 final String path = '/account/email' ;
4444
4545 final Map <String , dynamic > params = {
@@ -61,12 +61,12 @@ class Account extends Service {
6161
6262 }
6363
64- /// Get Account Logs
65- ///
64+ /// Get Account Logs
65+ ///
6666 /// Get currently logged in user list of latest security activity logs. Each
6767 /// log returns user IP address, location and date and time of log.
68- ///
69- Future <models.LogList > getLogs ({int ? limit, int ? offset}) async {
68+ ///
69+ Future <models.LogList > getLogs ({int ? limit, int ? offset}) async {
7070 final String path = '/account/logs' ;
7171
7272 final Map <String , dynamic > params = {
@@ -88,11 +88,11 @@ class Account extends Service {
8888
8989 }
9090
91- /// Update Account Name
92- ///
91+ /// Update Account Name
92+ ///
9393 /// Update currently logged in user account name.
94- ///
95- Future <models.User > updateName ({required String name}) async {
94+ ///
95+ Future <models.User > updateName ({required String name}) async {
9696 final String path = '/account/name' ;
9797
9898 final Map <String , dynamic > params = {
@@ -113,13 +113,13 @@ class Account extends Service {
113113
114114 }
115115
116- /// Update Account Password
117- ///
116+ /// Update Account Password
117+ ///
118118 /// Update currently logged in user password. For validation, user is required
119119 /// to pass in the new password, and the old password. For users created with
120120 /// OAuth, Team Invites and Magic URL, oldPassword is optional.
121- ///
122- Future <models.User > updatePassword ({required String password, String ? oldPassword}) async {
121+ ///
122+ Future <models.User > updatePassword ({required String password, String ? oldPassword}) async {
123123 final String path = '/account/password' ;
124124
125125 final Map <String , dynamic > params = {
@@ -141,15 +141,15 @@ class Account extends Service {
141141
142142 }
143143
144- /// Update Account Phone
145- ///
144+ /// Update Account Phone
145+ ///
146146 /// Update the currently logged in user's phone number. After updating the
147147 /// phone number, the phone verification status will be reset. A confirmation
148148 /// SMS is not sent automatically, however you can use the [POST
149149 /// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
150150 /// endpoint to send a confirmation SMS.
151- ///
152- Future <models.User > updatePhone ({required String number, required String password}) async {
151+ ///
152+ Future <models.User > updatePhone ({required String number, required String password}) async {
153153 final String path = '/account/phone' ;
154154
155155 final Map <String , dynamic > params = {
@@ -171,11 +171,11 @@ class Account extends Service {
171171
172172 }
173173
174- /// Get Account Preferences
175- ///
174+ /// Get Account Preferences
175+ ///
176176 /// Get currently logged in user preferences as a key-value object.
177- ///
178- Future <models.Preferences > getPrefs () async {
177+ ///
178+ Future <models.Preferences > getPrefs () async {
179179 final String path = '/account/prefs' ;
180180
181181 final Map <String , dynamic > params = {
@@ -195,13 +195,13 @@ class Account extends Service {
195195
196196 }
197197
198- /// Update Account Preferences
199- ///
198+ /// Update Account Preferences
199+ ///
200200 /// Update currently logged in user account preferences. The object you pass is
201201 /// stored as is, and replaces any previous value. The maximum allowed prefs
202202 /// size is 64kB and throws error if exceeded.
203- ///
204- Future <models.User > updatePrefs ({required Map prefs}) async {
203+ ///
204+ Future <models.User > updatePrefs ({required Map prefs}) async {
205205 final String path = '/account/prefs' ;
206206
207207 final Map <String , dynamic > params = {
@@ -222,8 +222,8 @@ class Account extends Service {
222222
223223 }
224224
225- /// Create Password Recovery
226- ///
225+ /// Create Password Recovery
226+ ///
227227 /// Sends the user an email with a temporary secret key for password reset.
228228 /// When the user clicks the confirmation link he is redirected back to your
229229 /// app password reset URL with the secret key and email address values
@@ -232,8 +232,8 @@ class Account extends Service {
232232 /// /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to
233233 /// complete the process. The verification link sent to the user's email
234234 /// address is valid for 1 hour.
235- ///
236- Future <models.Token > createRecovery ({required String email, required String url}) async {
235+ ///
236+ Future <models.Token > createRecovery ({required String email, required String url}) async {
237237 final String path = '/account/recovery' ;
238238
239239 final Map <String , dynamic > params = {
@@ -255,8 +255,8 @@ class Account extends Service {
255255
256256 }
257257
258- /// Create Password Recovery (confirmation)
259- ///
258+ /// Create Password Recovery (confirmation)
259+ ///
260260 /// Use this endpoint to complete the user account password reset. Both the
261261 /// **userId** and **secret** arguments will be passed as query parameters to
262262 /// the redirect URL you have provided when sending your request to the [POST
@@ -266,8 +266,8 @@ class Account extends Service {
266266 /// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
267267 /// the only valid redirect URLs are the ones from domains you have set when
268268 /// adding your platforms in the console interface.
269- ///
270- Future <models.Token > updateRecovery ({required String userId, required String secret, required String password, required String passwordAgain}) async {
269+ ///
270+ Future <models.Token > updateRecovery ({required String userId, required String secret, required String password, required String passwordAgain}) async {
271271 final String path = '/account/recovery' ;
272272
273273 final Map <String , dynamic > params = {
@@ -291,12 +291,12 @@ class Account extends Service {
291291
292292 }
293293
294- /// Get Account Sessions
295- ///
294+ /// Get Account Sessions
295+ ///
296296 /// Get currently logged in user list of active sessions across different
297297 /// devices.
298- ///
299- Future <models.SessionList > getSessions () async {
298+ ///
299+ Future <models.SessionList > getSessions () async {
300300 final String path = '/account/sessions' ;
301301
302302 final Map <String , dynamic > params = {
@@ -316,12 +316,12 @@ class Account extends Service {
316316
317317 }
318318
319- /// Delete All Account Sessions
320- ///
319+ /// Delete All Account Sessions
320+ ///
321321 /// Delete all sessions from the user account and remove any sessions cookies
322322 /// from the end client.
323- ///
324- Future deleteSessions () async {
323+ ///
324+ Future deleteSessions () async {
325325 final String path = '/account/sessions' ;
326326
327327 final Map <String , dynamic > params = {
@@ -341,12 +341,12 @@ class Account extends Service {
341341
342342 }
343343
344- /// Get Session By ID
345- ///
344+ /// Get Session By ID
345+ ///
346346 /// Use this endpoint to get a logged in user's session using a Session ID.
347347 /// Inputting 'current' will return the current session being used.
348- ///
349- Future <models.Session > getSession ({required String sessionId}) async {
348+ ///
349+ Future <models.Session > getSession ({required String sessionId}) async {
350350 final String path = '/account/sessions/{sessionId}' .replaceAll ('{sessionId}' , sessionId);
351351
352352 final Map <String , dynamic > params = {
@@ -366,13 +366,13 @@ class Account extends Service {
366366
367367 }
368368
369- /// Update Session (Refresh Tokens)
370- ///
369+ /// Update Session (Refresh Tokens)
370+ ///
371371 /// Access tokens have limited lifespan and expire to mitigate security risks.
372372 /// If session was created using an OAuth provider, this route can be used to
373373 /// "refresh" the access token.
374- ///
375- Future <models.Session > updateSession ({required String sessionId}) async {
374+ ///
375+ Future <models.Session > updateSession ({required String sessionId}) async {
376376 final String path = '/account/sessions/{sessionId}' .replaceAll ('{sessionId}' , sessionId);
377377
378378 final Map <String , dynamic > params = {
@@ -392,14 +392,14 @@ class Account extends Service {
392392
393393 }
394394
395- /// Delete Account Session
396- ///
395+ /// Delete Account Session
396+ ///
397397 /// Use this endpoint to log out the currently logged in user from all their
398398 /// account sessions across all of their different devices. When using the
399399 /// Session ID argument, only the unique session ID provided is deleted.
400400 ///
401- ///
402- Future deleteSession ({required String sessionId}) async {
401+ ///
402+ Future deleteSession ({required String sessionId}) async {
403403 final String path = '/account/sessions/{sessionId}' .replaceAll ('{sessionId}' , sessionId);
404404
405405 final Map <String , dynamic > params = {
@@ -419,13 +419,13 @@ class Account extends Service {
419419
420420 }
421421
422- /// Update Account Status
423- ///
422+ /// Update Account Status
423+ ///
424424 /// Block the currently logged in user account. Behind the scene, the user
425425 /// record is not deleted but permanently blocked from any access. To
426426 /// completely delete a user, use the Users API instead.
427- ///
428- Future <models.User > updateStatus () async {
427+ ///
428+ Future <models.User > updateStatus () async {
429429 final String path = '/account/status' ;
430430
431431 final Map <String , dynamic > params = {
@@ -445,8 +445,8 @@ class Account extends Service {
445445
446446 }
447447
448- /// Create Email Verification
449- ///
448+ /// Create Email Verification
449+ ///
450450 /// Use this endpoint to send a verification message to your user email address
451451 /// to confirm they are the valid owners of that address. Both the **userId**
452452 /// and **secret** arguments will be passed as query parameters to the URL you
@@ -462,8 +462,8 @@ class Account extends Service {
462462 /// the only valid redirect URLs are the ones from domains you have set when
463463 /// adding your platforms in the console interface.
464464 ///
465- ///
466- Future <models.Token > createVerification ({required String url}) async {
465+ ///
466+ Future <models.Token > createVerification ({required String url}) async {
467467 final String path = '/account/verification' ;
468468
469469 final Map <String , dynamic > params = {
@@ -484,14 +484,14 @@ class Account extends Service {
484484
485485 }
486486
487- /// Create Email Verification (confirmation)
488- ///
487+ /// Create Email Verification (confirmation)
488+ ///
489489 /// Use this endpoint to complete the user email verification process. Use both
490490 /// the **userId** and **secret** parameters that were attached to your app URL
491491 /// to verify the user email ownership. If confirmed this route will return a
492492 /// 200 status code.
493- ///
494- Future <models.Token > updateVerification ({required String userId, required String secret}) async {
493+ ///
494+ Future <models.Token > updateVerification ({required String userId, required String secret}) async {
495495 final String path = '/account/verification' ;
496496
497497 final Map <String , dynamic > params = {
@@ -513,16 +513,16 @@ class Account extends Service {
513513
514514 }
515515
516- /// Create Phone Verification
517- ///
516+ /// Create Phone Verification
517+ ///
518518 /// Use this endpoint to send a verification SMS to the currently logged in
519519 /// user. This endpoint is meant for use after updating a user's phone number
520520 /// using the [accountUpdatePhone] (/docs/client/account#accountUpdatePhone)
521521 /// endpoint. Learn more about how to [complete the verification
522522 /// process](/docs/client/account#accountUpdatePhoneVerification). The
523523 /// verification code sent to the user's phone number is valid for 15 minutes.
524- ///
525- Future <models.Token > createPhoneVerification () async {
524+ ///
525+ Future <models.Token > createPhoneVerification () async {
526526 final String path = '/account/verification/phone' ;
527527
528528 final Map <String , dynamic > params = {
@@ -542,14 +542,14 @@ class Account extends Service {
542542
543543 }
544544
545- /// Create Phone Verification (confirmation)
546- ///
545+ /// Create Phone Verification (confirmation)
546+ ///
547547 /// Use this endpoint to complete the user phone verification process. Use the
548548 /// **userId** and **secret** that were sent to your user's phone number to
549549 /// verify the user email ownership. If confirmed this route will return a 200
550550 /// status code.
551- ///
552- Future <models.Token > updatePhoneVerification ({required String userId, required String secret}) async {
551+ ///
552+ Future <models.Token > updatePhoneVerification ({required String userId, required String secret}) async {
553553 final String path = '/account/verification/phone' ;
554554
555555 final Map <String , dynamic > params = {
0 commit comments