@@ -4,11 +4,11 @@ part of dart_appwrite;
4
4
class Account extends Service {
5
5
Account (Client client): super (client);
6
6
7
- /// Get Account
8
- ///
7
+ /// Get Account
8
+ ///
9
9
/// Get currently logged in user data as JSON object.
10
- ///
11
- Future <models.User > get () async {
10
+ ///
11
+ Future <models.User > get () async {
12
12
final String path = '/account' ;
13
13
14
14
final Map <String , dynamic > params = {
@@ -28,8 +28,8 @@ class Account extends Service {
28
28
29
29
}
30
30
31
- /// Update Account Email
32
- ///
31
+ /// Update Account Email
32
+ ///
33
33
/// Update currently logged in user account email address. After changing user
34
34
/// address, the user confirmation status will get reset. A new confirmation
35
35
/// email is not sent automatically however you can use the send confirmation
@@ -38,8 +38,8 @@ class Account extends Service {
38
38
/// This endpoint can also be used to convert an anonymous account to a normal
39
39
/// one, by passing an email address and a new password.
40
40
///
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 {
43
43
final String path = '/account/email' ;
44
44
45
45
final Map <String , dynamic > params = {
@@ -61,12 +61,12 @@ class Account extends Service {
61
61
62
62
}
63
63
64
- /// Get Account Logs
65
- ///
64
+ /// Get Account Logs
65
+ ///
66
66
/// Get currently logged in user list of latest security activity logs. Each
67
67
/// 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 {
70
70
final String path = '/account/logs' ;
71
71
72
72
final Map <String , dynamic > params = {
@@ -88,11 +88,11 @@ class Account extends Service {
88
88
89
89
}
90
90
91
- /// Update Account Name
92
- ///
91
+ /// Update Account Name
92
+ ///
93
93
/// 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 {
96
96
final String path = '/account/name' ;
97
97
98
98
final Map <String , dynamic > params = {
@@ -113,13 +113,13 @@ class Account extends Service {
113
113
114
114
}
115
115
116
- /// Update Account Password
117
- ///
116
+ /// Update Account Password
117
+ ///
118
118
/// Update currently logged in user password. For validation, user is required
119
119
/// to pass in the new password, and the old password. For users created with
120
120
/// 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 {
123
123
final String path = '/account/password' ;
124
124
125
125
final Map <String , dynamic > params = {
@@ -141,15 +141,15 @@ class Account extends Service {
141
141
142
142
}
143
143
144
- /// Update Account Phone
145
- ///
144
+ /// Update Account Phone
145
+ ///
146
146
/// Update the currently logged in user's phone number. After updating the
147
147
/// phone number, the phone verification status will be reset. A confirmation
148
148
/// SMS is not sent automatically, however you can use the [POST
149
149
/// /account/verification/phone](/docs/client/account#accountCreatePhoneVerification)
150
150
/// 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 {
153
153
final String path = '/account/phone' ;
154
154
155
155
final Map <String , dynamic > params = {
@@ -171,11 +171,11 @@ class Account extends Service {
171
171
172
172
}
173
173
174
- /// Get Account Preferences
175
- ///
174
+ /// Get Account Preferences
175
+ ///
176
176
/// 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 {
179
179
final String path = '/account/prefs' ;
180
180
181
181
final Map <String , dynamic > params = {
@@ -195,13 +195,13 @@ class Account extends Service {
195
195
196
196
}
197
197
198
- /// Update Account Preferences
199
- ///
198
+ /// Update Account Preferences
199
+ ///
200
200
/// Update currently logged in user account preferences. The object you pass is
201
201
/// stored as is, and replaces any previous value. The maximum allowed prefs
202
202
/// 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 {
205
205
final String path = '/account/prefs' ;
206
206
207
207
final Map <String , dynamic > params = {
@@ -222,8 +222,8 @@ class Account extends Service {
222
222
223
223
}
224
224
225
- /// Create Password Recovery
226
- ///
225
+ /// Create Password Recovery
226
+ ///
227
227
/// Sends the user an email with a temporary secret key for password reset.
228
228
/// When the user clicks the confirmation link he is redirected back to your
229
229
/// app password reset URL with the secret key and email address values
@@ -232,8 +232,8 @@ class Account extends Service {
232
232
/// /account/recovery](/docs/client/account#accountUpdateRecovery) endpoint to
233
233
/// complete the process. The verification link sent to the user's email
234
234
/// 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 {
237
237
final String path = '/account/recovery' ;
238
238
239
239
final Map <String , dynamic > params = {
@@ -255,8 +255,8 @@ class Account extends Service {
255
255
256
256
}
257
257
258
- /// Create Password Recovery (confirmation)
259
- ///
258
+ /// Create Password Recovery (confirmation)
259
+ ///
260
260
/// Use this endpoint to complete the user account password reset. Both the
261
261
/// **userId** and **secret** arguments will be passed as query parameters to
262
262
/// the redirect URL you have provided when sending your request to the [POST
@@ -266,8 +266,8 @@ class Account extends Service {
266
266
/// Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md)
267
267
/// the only valid redirect URLs are the ones from domains you have set when
268
268
/// 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 {
271
271
final String path = '/account/recovery' ;
272
272
273
273
final Map <String , dynamic > params = {
@@ -291,12 +291,12 @@ class Account extends Service {
291
291
292
292
}
293
293
294
- /// Get Account Sessions
295
- ///
294
+ /// Get Account Sessions
295
+ ///
296
296
/// Get currently logged in user list of active sessions across different
297
297
/// devices.
298
- ///
299
- Future <models.SessionList > getSessions () async {
298
+ ///
299
+ Future <models.SessionList > getSessions () async {
300
300
final String path = '/account/sessions' ;
301
301
302
302
final Map <String , dynamic > params = {
@@ -316,12 +316,12 @@ class Account extends Service {
316
316
317
317
}
318
318
319
- /// Delete All Account Sessions
320
- ///
319
+ /// Delete All Account Sessions
320
+ ///
321
321
/// Delete all sessions from the user account and remove any sessions cookies
322
322
/// from the end client.
323
- ///
324
- Future deleteSessions () async {
323
+ ///
324
+ Future deleteSessions () async {
325
325
final String path = '/account/sessions' ;
326
326
327
327
final Map <String , dynamic > params = {
@@ -341,12 +341,12 @@ class Account extends Service {
341
341
342
342
}
343
343
344
- /// Get Session By ID
345
- ///
344
+ /// Get Session By ID
345
+ ///
346
346
/// Use this endpoint to get a logged in user's session using a Session ID.
347
347
/// 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 {
350
350
final String path = '/account/sessions/{sessionId}' .replaceAll ('{sessionId}' , sessionId);
351
351
352
352
final Map <String , dynamic > params = {
@@ -366,13 +366,13 @@ class Account extends Service {
366
366
367
367
}
368
368
369
- /// Update Session (Refresh Tokens)
370
- ///
369
+ /// Update Session (Refresh Tokens)
370
+ ///
371
371
/// Access tokens have limited lifespan and expire to mitigate security risks.
372
372
/// If session was created using an OAuth provider, this route can be used to
373
373
/// "refresh" the access token.
374
- ///
375
- Future <models.Session > updateSession ({required String sessionId}) async {
374
+ ///
375
+ Future <models.Session > updateSession ({required String sessionId}) async {
376
376
final String path = '/account/sessions/{sessionId}' .replaceAll ('{sessionId}' , sessionId);
377
377
378
378
final Map <String , dynamic > params = {
@@ -392,14 +392,14 @@ class Account extends Service {
392
392
393
393
}
394
394
395
- /// Delete Account Session
396
- ///
395
+ /// Delete Account Session
396
+ ///
397
397
/// Use this endpoint to log out the currently logged in user from all their
398
398
/// account sessions across all of their different devices. When using the
399
399
/// Session ID argument, only the unique session ID provided is deleted.
400
400
///
401
- ///
402
- Future deleteSession ({required String sessionId}) async {
401
+ ///
402
+ Future deleteSession ({required String sessionId}) async {
403
403
final String path = '/account/sessions/{sessionId}' .replaceAll ('{sessionId}' , sessionId);
404
404
405
405
final Map <String , dynamic > params = {
@@ -419,13 +419,13 @@ class Account extends Service {
419
419
420
420
}
421
421
422
- /// Update Account Status
423
- ///
422
+ /// Update Account Status
423
+ ///
424
424
/// Block the currently logged in user account. Behind the scene, the user
425
425
/// record is not deleted but permanently blocked from any access. To
426
426
/// completely delete a user, use the Users API instead.
427
- ///
428
- Future <models.User > updateStatus () async {
427
+ ///
428
+ Future <models.User > updateStatus () async {
429
429
final String path = '/account/status' ;
430
430
431
431
final Map <String , dynamic > params = {
@@ -445,8 +445,8 @@ class Account extends Service {
445
445
446
446
}
447
447
448
- /// Create Email Verification
449
- ///
448
+ /// Create Email Verification
449
+ ///
450
450
/// Use this endpoint to send a verification message to your user email address
451
451
/// to confirm they are the valid owners of that address. Both the **userId**
452
452
/// and **secret** arguments will be passed as query parameters to the URL you
@@ -462,8 +462,8 @@ class Account extends Service {
462
462
/// the only valid redirect URLs are the ones from domains you have set when
463
463
/// adding your platforms in the console interface.
464
464
///
465
- ///
466
- Future <models.Token > createVerification ({required String url}) async {
465
+ ///
466
+ Future <models.Token > createVerification ({required String url}) async {
467
467
final String path = '/account/verification' ;
468
468
469
469
final Map <String , dynamic > params = {
@@ -484,14 +484,14 @@ class Account extends Service {
484
484
485
485
}
486
486
487
- /// Create Email Verification (confirmation)
488
- ///
487
+ /// Create Email Verification (confirmation)
488
+ ///
489
489
/// Use this endpoint to complete the user email verification process. Use both
490
490
/// the **userId** and **secret** parameters that were attached to your app URL
491
491
/// to verify the user email ownership. If confirmed this route will return a
492
492
/// 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 {
495
495
final String path = '/account/verification' ;
496
496
497
497
final Map <String , dynamic > params = {
@@ -513,16 +513,16 @@ class Account extends Service {
513
513
514
514
}
515
515
516
- /// Create Phone Verification
517
- ///
516
+ /// Create Phone Verification
517
+ ///
518
518
/// Use this endpoint to send a verification SMS to the currently logged in
519
519
/// user. This endpoint is meant for use after updating a user's phone number
520
520
/// using the [accountUpdatePhone] (/docs/client/account#accountUpdatePhone)
521
521
/// endpoint. Learn more about how to [complete the verification
522
522
/// process](/docs/client/account#accountUpdatePhoneVerification). The
523
523
/// 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 {
526
526
final String path = '/account/verification/phone' ;
527
527
528
528
final Map <String , dynamic > params = {
@@ -542,14 +542,14 @@ class Account extends Service {
542
542
543
543
}
544
544
545
- /// Create Phone Verification (confirmation)
546
- ///
545
+ /// Create Phone Verification (confirmation)
546
+ ///
547
547
/// Use this endpoint to complete the user phone verification process. Use the
548
548
/// **userId** and **secret** that were sent to your user's phone number to
549
549
/// verify the user email ownership. If confirmed this route will return a 200
550
550
/// 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 {
553
553
final String path = '/account/verification/phone' ;
554
554
555
555
final Map <String , dynamic > params = {
0 commit comments