@@ -350,6 +350,8 @@ open class Account: Service {
350350 ///
351351 /// Update MFA
352352 ///
353+ /// Enable or disable MFA on an account.
354+ ///
353355 /// @param Bool mfa
354356 /// @throws Exception
355357 /// @return array
@@ -384,6 +386,8 @@ open class Account: Service {
384386 ///
385387 /// Update MFA
386388 ///
389+ /// Enable or disable MFA on an account.
390+ ///
387391 /// @param Bool mfa
388392 /// @throws Exception
389393 /// @return array
@@ -433,6 +437,8 @@ open class Account: Service {
433437 ///
434438 /// Create MFA Challenge (confirmation)
435439 ///
440+ /// Complete the MFA challenge by providing the one-time password.
441+ ///
436442 /// @param String challengeId
437443 /// @param String otp
438444 /// @throws Exception
@@ -463,6 +469,8 @@ open class Account: Service {
463469 ///
464470 /// List Factors
465471 ///
472+ /// List the factors available on the account to be used as a MFA challange.
473+ ///
466474 /// @throws Exception
467475 /// @return array
468476 ///
@@ -492,6 +500,11 @@ open class Account: Service {
492500 ///
493501 /// Add Authenticator
494502 ///
503+ /// Add an authenticator app to be used as an MFA factor. Verify the
504+ /// authenticator using the [verify
505+ /// authenticator](/docs/references/cloud/client-web/account#verifyAuthenticator)
506+ /// method.
507+ ///
495508 /// @param AppwriteEnums.AuthenticatorType type
496509 /// @throws Exception
497510 /// @return array
@@ -524,6 +537,10 @@ open class Account: Service {
524537 ///
525538 /// Verify Authenticator
526539 ///
540+ /// Verify an authenticator app after adding it using the [add
541+ /// authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
542+ /// method.
543+ ///
527544 /// @param AppwriteEnums.AuthenticatorType type
528545 /// @param String otp
529546 /// @throws Exception
@@ -561,6 +578,10 @@ open class Account: Service {
561578 ///
562579 /// Verify Authenticator
563580 ///
581+ /// Verify an authenticator app after adding it using the [add
582+ /// authenticator](/docs/references/cloud/client-web/account#addAuthenticator)
583+ /// method.
584+ ///
564585 /// @param AppwriteEnums.AuthenticatorType type
565586 /// @param String otp
566587 /// @throws Exception
@@ -580,6 +601,8 @@ open class Account: Service {
580601 ///
581602 /// Delete Authenticator
582603 ///
604+ /// Delete an authenticator for a user by ID.
605+ ///
583606 /// @param AppwriteEnums.AuthenticatorType type
584607 /// @param String otp
585608 /// @throws Exception
@@ -617,6 +640,8 @@ open class Account: Service {
617640 ///
618641 /// Delete Authenticator
619642 ///
643+ /// Delete an authenticator for a user by ID.
644+ ///
620645 /// @param AppwriteEnums.AuthenticatorType type
621646 /// @param String otp
622647 /// @throws Exception
@@ -1158,7 +1183,7 @@ open class Account: Service {
11581183 }
11591184
11601185 ///
1161- /// Create session (deprecated)
1186+ /// Update magic URL session
11621187 ///
11631188 /// Use this endpoint to create a session from token. Provide the **userId**
11641189 /// and **secret** parameters from the successful response of authentication
@@ -1254,6 +1279,46 @@ open class Account: Service {
12541279 return true
12551280 }
12561281
1282+ ///
1283+ /// Update phone session
1284+ ///
1285+ /// Use this endpoint to create a session from token. Provide the **userId**
1286+ /// and **secret** parameters from the successful response of authentication
1287+ /// flows initiated by token creation. For example, magic URL and phone login.
1288+ ///
1289+ /// @param String userId
1290+ /// @param String secret
1291+ /// @throws Exception
1292+ /// @return array
1293+ ///
1294+ open func updatePhoneSession(
1295+ userId: String ,
1296+ secret: String
1297+ ) async throws -> AppwriteModels . Session {
1298+ let apiPath : String = " /account/sessions/phone "
1299+
1300+ let apiParams : [ String : Any ? ] = [
1301+ " userId " : userId,
1302+ " secret " : secret
1303+ ]
1304+
1305+ let apiHeaders : [ String : String ] = [
1306+ " content-type " : " application/json "
1307+ ]
1308+
1309+ let converter : ( Any ) -> AppwriteModels . Session = { response in
1310+ return AppwriteModels . Session. from ( map: response as! [ String : Any ] )
1311+ }
1312+
1313+ return try await client. call (
1314+ method: " PUT " ,
1315+ path: apiPath,
1316+ headers: apiHeaders,
1317+ params: apiParams,
1318+ converter: converter
1319+ )
1320+ }
1321+
12571322 ///
12581323 /// Create session
12591324 ///
@@ -1330,7 +1395,7 @@ open class Account: Service {
13301395 }
13311396
13321397 ///
1333- /// Update (or renew) a session
1398+ /// Update (or renew) session
13341399 ///
13351400 /// Extend session's expiry to increase it's lifespan. Extending a session is
13361401 /// useful when session length is short such as 5 minutes.
@@ -1448,7 +1513,7 @@ open class Account: Service {
14481513 }
14491514
14501515 ///
1451- /// Create a push target
1516+ /// Create push target
14521517 ///
14531518 /// @param String targetId
14541519 /// @param String identifier
@@ -1487,7 +1552,7 @@ open class Account: Service {
14871552 }
14881553
14891554 ///
1490- /// Update a push target
1555+ /// Update push target
14911556 ///
14921557 /// @param String targetId
14931558 /// @param String identifier
@@ -1523,7 +1588,7 @@ open class Account: Service {
15231588 }
15241589
15251590 ///
1526- /// Delete a push target
1591+ /// Delete push target
15271592 ///
15281593 /// @param String targetId
15291594 /// @throws Exception
0 commit comments