/
githubmirror
/
oppia
Обзор
Документация
Войти
/
githubmirror
/
oppia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
stubs/firebase_admin/auth.pyi
249 строк
7 KB
Brian Rodriguez
Fix #24668: Add Beam Job for syncing Firebase and Oppia (#24934)
03 авг 2026, 02:11
Не верифицирован
03 авг 2026, 02:11
489b9d2
Код
Авторство
О чём код?
# TODO(#24855): Depend on official stubs rather than maintaining our own. import datetime from typing import ( Any, Callable, Dict, Iterator, List, Optional, Sequence, Union, ) from . import App class UserRecord: def __init__(self, data: Dict[str, Any]) -> None: ... @property def uid(self) -> str: ... @property def email(self) -> str: ... @property def custom_claims(self) -> Dict[str, str]: ... @property def disabled(self) -> bool: ... class UserProvider: def __init__( self, uid: str, provider_id: str, email: Optional[str], display_name: Optional[str], photo_url: Optional[str], ): ... @property def uid(self) -> str: ... @property def provider_id(self) -> str: ... @property def email(self) -> Optional[str]: ... @property def display_name(self) -> Optional[str]: ... @property def photo_url(self) -> Optional[str]: ... def to_dict(self) -> Dict[str, str]: ... class UserMetadata: def __init__( self, creation_timestamp: Optional[int] = None, last_sign_in_timestamp: Optional[int] = None, last_refresh_timestamp: Optional[int] = None, ): ... @property def creation_timestamp(self) -> int: ... @property def last_sign_in_timestamp(self) -> int: ... @property def last_refresh_timestamp(self) -> Optional[int]: ... class ImportUserRecord: def __init__( self, uid: str, email: Optional[str] = None, email_verified: Optional[bool] = None, display_name: Optional[str] = None, phone_number: Optional[str] = None, photo_url: Optional[str] = None, disabled: Optional[bool] = None, user_metadata: Optional[UserMetadata] = None, provider_data: Optional[List[UserProvider]] = None, custom_claims: Optional[Dict[str, Any]] = None, password_hash: Optional[bytes] = None, password_salt: Optional[bytes] = None, ): ... @property def uid(self) -> str: ... @property def email(self) -> Optional[str]: ... @property def display_name(self) -> Optional[str]: ... @property def phone_number(self) -> Optional[str]: ... @property def photo_url(self) -> Optional[str]: ... @property def disabled(self) -> bool: ... @property def password_hash(self) -> Optional[bytes]: ... @property def password_salt(self) -> Optional[bytes]: ... @property def user_metadata(self) -> Optional[UserMetadata]: ... @property def provider_data(self) -> Optional[List[UserProvider]]: ... @property def custom_claims(self) -> Optional[Dict[str, Any]]: ... def to_dict(self) -> Dict[str, Any]: ... class UserIdentifier: ... class UidIdentifier(UserIdentifier): def __init__(self, uid: str): ... @property def uid(self) -> str: ... class GetUsersResult: def __init__( self, users: Sequence[UserRecord], not_found: Sequence[UserIdentifier] ) -> None: ... @property def users(self) -> List[UserRecord]: ... @property def not_found(self) -> List[UserIdentifier]: ... class ExportedUserRecord(UserRecord): @property def password_hash(self) -> Optional[str]: ... @property def password_salt(self) -> Optional[str]: ... class ListUsersPage: def __init__( self, download: Callable[[Optional[str], int], Dict[str, Any]], page_token: Optional[str], max_results: int, ) -> None: ... @property def users(self) -> List[ExportedUserRecord]: ... @property def next_page_token(self) -> str: ... @property def has_next_page(self) -> bool: ... def get_next_page(self) -> ListUsersPage: ... def iterate_all(self) -> Iterator[ExportedUserRecord]: ... class ErrorInfo: def __init__(self, error: Dict[str, Union[int, str]]): ... @property def index(self) -> int: ... @property def reason(self) -> str: ... class UserImportResult: def __init__(self, result: Dict[str, Any], total: int): ... @property def success_count(self) -> int: ... @property def failure_count(self) -> int: ... @property def errors(self) -> List[ErrorInfo]: ... class _BatchDeleteAccountsResponse: @property def errors(self) -> List[ErrorInfo]: ... class DeleteUsersResult: def __init__(self, result: _BatchDeleteAccountsResponse, total: int): ... @property def success_count(self) -> int: ... @property def failure_count(self) -> int: ... @property def errors(self) -> List[ErrorInfo]: ... class UserImportHash: def __init__(self, name: str, data: Optional[bytes] = None): ... def to_dict(self) -> Dict[str, Any]: ... @classmethod def hmac_sha512(cls, key: bytes) -> UserImportHash: ... @classmethod def hmac_sha256(cls, key: bytes) -> UserImportHash: ... @classmethod def hmac_sha1(cls, key: bytes) -> UserImportHash: ... @classmethod def hmac_md5(cls, key: bytes) -> UserImportHash: ... @classmethod def md5(cls, rounds: int) -> UserImportHash: ... @classmethod def sha1(cls, rounds: int) -> UserImportHash: ... @classmethod def sha256(cls, rounds: int) -> UserImportHash: ... @classmethod def sha512(cls, rounds: int) -> UserImportHash: ... @classmethod def pbkdf_sha1(cls, rounds: int) -> UserImportHash: ... @classmethod def pbkdf2_sha256(cls, rounds: int) -> UserImportHash: ... @classmethod def scrypt( cls, key: bytes, rounds: int, memory_cost: int, salt_separator: Optional[bytes] = None, ) -> UserImportHash: ... @classmethod def bcrypt(cls) -> UserImportHash: ... @classmethod def standard_scrypt( cls, memory_cost: int, parallelization: int, block_size: int, derived_key_length: int, ) -> UserImportHash: ... def create_session_cookie( id_token: Optional[str], expires_in: Optional[datetime.timedelta], app: Optional[App] = ..., ) -> str: ... def create_user(**kwargs: Any) -> UserRecord: ... def import_users( users: List[ImportUserRecord], hash_alg: Optional[UserImportHash] = None, app: Optional[App] = None, ) -> UserImportResult: ... def update_user(uid: str, **kwargs: Any) -> UserRecord: ... def delete_user(uid: str) -> None: ... def delete_users( uids: List[str], app: Optional[App] = None ) -> DeleteUsersResult: ... def get_user(uid: str) -> UserRecord: ... def get_users(uids: List[UserIdentifier]) -> GetUsersResult: ... def set_custom_user_claims( uid: str, custom_claims: Optional[str], app: Optional[App] = ... ) -> None: ... def revoke_refresh_tokens(uid: str, app: Optional[App] = ...) -> None: ... def verify_session_cookie( session_cookie: str, check_revoked: bool = ..., app: Optional[App] = ... ) -> Dict[str, Any]: ... def list_users( page_token: Optional[str] = ..., max_results: int = ..., app: Optional[App] = ..., ) -> ListUsersPage: ... class UserNotFoundError(Exception): ... class ExpiredSessionCookieError(Exception): ... class RevokedSessionCookieError(Exception): ... class InvalidIdTokenError(Exception): ... class UidAlreadyExistsError(Exception): ... class UserDisabledError(Exception): ... class InternalError(Exception): ...