Skip to content

Commit b58a6d4

Browse files
committed
Fix casing
1 parent 691f6dc commit b58a6d4

File tree

3 files changed

+0
-944
lines changed

3 files changed

+0
-944
lines changed

appwrite/services/account.py

Lines changed: 0 additions & 268 deletions
Original file line numberDiff line numberDiff line change
@@ -260,40 +260,6 @@ def update_mfa(self, mfa: bool) -> Dict[str, Any]:
260260
'content-type': 'application/json',
261261
}, api_params)
262262

263-
def create_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]:
264-
"""
265-
Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
266-
267-
.. deprecated::1.8.0
268-
This API has been deprecated since 1.8.0. Please use `account.create_mfa_authenticator` instead.
269-
Parameters
270-
----------
271-
type : AuthenticatorType
272-
Type of authenticator. Must be `totp`
273-
274-
Returns
275-
-------
276-
Dict[str, Any]
277-
API response as a dictionary
278-
279-
Raises
280-
------
281-
AppwriteException
282-
If API request fails
283-
"""
284-
285-
api_path = '/account/mfa/authenticators/{type}'
286-
api_params = {}
287-
if type is None:
288-
raise AppwriteException('Missing required parameter: "type"')
289-
290-
api_path = api_path.replace('{type}', type)
291-
292-
293-
return self.client.call('post', api_path, {
294-
'content-type': 'application/json',
295-
}, api_params)
296-
297263
def create_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]:
298264
"""
299265
Add an authenticator app to be used as an MFA factor. Verify the authenticator using the [verify authenticator](/docs/references/cloud/client-web/account#updateMfaAuthenticator) method.
@@ -330,8 +296,6 @@ def update_mfa_authenticator(self, type: AuthenticatorType, otp: str) -> Dict[st
330296
"""
331297
Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
332298
333-
.. deprecated::1.8.0
334-
This API has been deprecated since 1.8.0. Please use `account.update_mfa_authenticator` instead.
335299
Parameters
336300
----------
337301
type : AuthenticatorType
@@ -366,78 +330,6 @@ def update_mfa_authenticator(self, type: AuthenticatorType, otp: str) -> Dict[st
366330
'content-type': 'application/json',
367331
}, api_params)
368332

369-
def update_mfa_authenticator(self, type: AuthenticatorType, otp: str) -> Dict[str, Any]:
370-
"""
371-
Verify an authenticator app after adding it using the [add authenticator](/docs/references/cloud/client-web/account#createMfaAuthenticator) method.
372-
373-
Parameters
374-
----------
375-
type : AuthenticatorType
376-
Type of authenticator.
377-
otp : str
378-
Valid verification token.
379-
380-
Returns
381-
-------
382-
Dict[str, Any]
383-
API response as a dictionary
384-
385-
Raises
386-
------
387-
AppwriteException
388-
If API request fails
389-
"""
390-
391-
api_path = '/account/mfa/authenticators/{type}'
392-
api_params = {}
393-
if type is None:
394-
raise AppwriteException('Missing required parameter: "type"')
395-
396-
if otp is None:
397-
raise AppwriteException('Missing required parameter: "otp"')
398-
399-
api_path = api_path.replace('{type}', type)
400-
401-
api_params['otp'] = otp
402-
403-
return self.client.call('put', api_path, {
404-
'content-type': 'application/json',
405-
}, api_params)
406-
407-
def delete_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]:
408-
"""
409-
Delete an authenticator for a user by ID.
410-
411-
.. deprecated::1.8.0
412-
This API has been deprecated since 1.8.0. Please use `account.delete_mfa_authenticator` instead.
413-
Parameters
414-
----------
415-
type : AuthenticatorType
416-
Type of authenticator.
417-
418-
Returns
419-
-------
420-
Dict[str, Any]
421-
API response as a dictionary
422-
423-
Raises
424-
------
425-
AppwriteException
426-
If API request fails
427-
"""
428-
429-
api_path = '/account/mfa/authenticators/{type}'
430-
api_params = {}
431-
if type is None:
432-
raise AppwriteException('Missing required parameter: "type"')
433-
434-
api_path = api_path.replace('{type}', type)
435-
436-
437-
return self.client.call('delete', api_path, {
438-
'content-type': 'application/json',
439-
}, api_params)
440-
441333
def delete_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]:
442334
"""
443335
Delete an authenticator for a user by ID.
@@ -470,40 +362,6 @@ def delete_mfa_authenticator(self, type: AuthenticatorType) -> Dict[str, Any]:
470362
'content-type': 'application/json',
471363
}, api_params)
472364

473-
def create_mfa_challenge(self, factor: AuthenticationFactor) -> Dict[str, Any]:
474-
"""
475-
Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
476-
477-
.. deprecated::1.8.0
478-
This API has been deprecated since 1.8.0. Please use `account.create_mfa_challenge` instead.
479-
Parameters
480-
----------
481-
factor : AuthenticationFactor
482-
Factor used for verification. Must be one of following: `email`, `phone`, `totp`, `recoveryCode`.
483-
484-
Returns
485-
-------
486-
Dict[str, Any]
487-
API response as a dictionary
488-
489-
Raises
490-
------
491-
AppwriteException
492-
If API request fails
493-
"""
494-
495-
api_path = '/account/mfa/challenge'
496-
api_params = {}
497-
if factor is None:
498-
raise AppwriteException('Missing required parameter: "factor"')
499-
500-
501-
api_params['factor'] = factor
502-
503-
return self.client.call('post', api_path, {
504-
'content-type': 'application/json',
505-
}, api_params)
506-
507365
def create_mfa_challenge(self, factor: AuthenticationFactor) -> Dict[str, Any]:
508366
"""
509367
Begin the process of MFA verification after sign-in. Finish the flow with [updateMfaChallenge](/docs/references/cloud/client-web/account#updateMfaChallenge) method.
@@ -540,8 +398,6 @@ def update_mfa_challenge(self, challenge_id: str, otp: str) -> Dict[str, Any]:
540398
"""
541399
Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
542400
543-
.. deprecated::1.8.0
544-
This API has been deprecated since 1.8.0. Please use `account.update_mfa_challenge` instead.
545401
Parameters
546402
----------
547403
challenge_id : str
@@ -576,65 +432,6 @@ def update_mfa_challenge(self, challenge_id: str, otp: str) -> Dict[str, Any]:
576432
'content-type': 'application/json',
577433
}, api_params)
578434

579-
def update_mfa_challenge(self, challenge_id: str, otp: str) -> Dict[str, Any]:
580-
"""
581-
Complete the MFA challenge by providing the one-time password. Finish the process of MFA verification by providing the one-time password. To begin the flow, use [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
582-
583-
Parameters
584-
----------
585-
challenge_id : str
586-
ID of the challenge.
587-
otp : str
588-
Valid verification token.
589-
590-
Returns
591-
-------
592-
Dict[str, Any]
593-
API response as a dictionary
594-
595-
Raises
596-
------
597-
AppwriteException
598-
If API request fails
599-
"""
600-
601-
api_path = '/account/mfa/challenge'
602-
api_params = {}
603-
if challenge_id is None:
604-
raise AppwriteException('Missing required parameter: "challenge_id"')
605-
606-
if otp is None:
607-
raise AppwriteException('Missing required parameter: "otp"')
608-
609-
610-
api_params['challengeId'] = challenge_id
611-
api_params['otp'] = otp
612-
613-
return self.client.call('put', api_path, {
614-
'content-type': 'application/json',
615-
}, api_params)
616-
617-
def list_mfa_factors(self) -> Dict[str, Any]:
618-
"""
619-
List the factors available on the account to be used as a MFA challange.
620-
621-
Returns
622-
-------
623-
Dict[str, Any]
624-
API response as a dictionary
625-
626-
Raises
627-
------
628-
AppwriteException
629-
If API request fails
630-
"""
631-
632-
api_path = '/account/mfa/factors'
633-
api_params = {}
634-
635-
return self.client.call('get', api_path, {
636-
}, api_params)
637-
638435
def list_mfa_factors(self) -> Dict[str, Any]:
639436
"""
640437
List the factors available on the account to be used as a MFA challange.
@@ -677,49 +474,6 @@ def get_mfa_recovery_codes(self) -> Dict[str, Any]:
677474
return self.client.call('get', api_path, {
678475
}, api_params)
679476

680-
def get_mfa_recovery_codes(self) -> Dict[str, Any]:
681-
"""
682-
Get recovery codes that can be used as backup for MFA flow. Before getting codes, they must be generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to read recovery codes.
683-
684-
Returns
685-
-------
686-
Dict[str, Any]
687-
API response as a dictionary
688-
689-
Raises
690-
------
691-
AppwriteException
692-
If API request fails
693-
"""
694-
695-
api_path = '/account/mfa/recovery-codes'
696-
api_params = {}
697-
698-
return self.client.call('get', api_path, {
699-
}, api_params)
700-
701-
def create_mfa_recovery_codes(self) -> Dict[str, Any]:
702-
"""
703-
Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
704-
705-
Returns
706-
-------
707-
Dict[str, Any]
708-
API response as a dictionary
709-
710-
Raises
711-
------
712-
AppwriteException
713-
If API request fails
714-
"""
715-
716-
api_path = '/account/mfa/recovery-codes'
717-
api_params = {}
718-
719-
return self.client.call('post', api_path, {
720-
'content-type': 'application/json',
721-
}, api_params)
722-
723477
def create_mfa_recovery_codes(self) -> Dict[str, Any]:
724478
"""
725479
Generate recovery codes as backup for MFA flow. It's recommended to generate and show then immediately after user successfully adds their authehticator. Recovery codes can be used as a MFA verification type in [createMfaChallenge](/docs/references/cloud/client-web/account#createMfaChallenge) method.
@@ -764,28 +518,6 @@ def update_mfa_recovery_codes(self) -> Dict[str, Any]:
764518
'content-type': 'application/json',
765519
}, api_params)
766520

767-
def update_mfa_recovery_codes(self) -> Dict[str, Any]:
768-
"""
769-
Regenerate recovery codes that can be used as backup for MFA flow. Before regenerating codes, they must be first generated using [createMfaRecoveryCodes](/docs/references/cloud/client-web/account#createMfaRecoveryCodes) method. An OTP challenge is required to regenreate recovery codes.
770-
771-
Returns
772-
-------
773-
Dict[str, Any]
774-
API response as a dictionary
775-
776-
Raises
777-
------
778-
AppwriteException
779-
If API request fails
780-
"""
781-
782-
api_path = '/account/mfa/recovery-codes'
783-
api_params = {}
784-
785-
return self.client.call('patch', api_path, {
786-
'content-type': 'application/json',
787-
}, api_params)
788-
789521
def update_name(self, name: str) -> Dict[str, Any]:
790522
"""
791523
Update currently logged in user account name.

0 commit comments

Comments
 (0)