From bd0f64a3cc101423361dade1cc68559dd36bb105 Mon Sep 17 00:00:00 2001 From: David Gilman Date: Wed, 2 Apr 2025 22:41:39 -0700 Subject: [PATCH] [auth0-python] Add auth0-python stubs (#13716) --- pyrightconfig.stricter.json | 1 + .../@tests/stubtest_allowlist.txt | 17 +++ stubs/auth0-python/METADATA.toml | 3 + stubs/auth0-python/auth0/__init__.pyi | 7 + stubs/auth0-python/auth0/asyncify.pyi | 6 + .../auth0/authentication/__init__.pyi | 10 ++ .../authentication/async_token_verifier.pyi | 27 ++++ .../authentication/back_channel_login.pyi | 4 + .../auth0/authentication/base.pyi | 31 ++++ .../authentication/client_authentication.pyi | 13 ++ .../auth0/authentication/database.pyi | 21 +++ .../auth0/authentication/delegated.pyi | 12 ++ .../auth0/authentication/enterprise.pyi | 5 + .../auth0/authentication/get_token.pyi | 21 +++ .../auth0/authentication/passwordless.pyi | 5 + .../pushed_authorization_requests.pyi | 4 + .../auth0/authentication/revoke_token.pyi | 4 + .../auth0/authentication/social.pyi | 4 + .../auth0/authentication/token_verifier.pyi | 29 ++++ .../auth0/authentication/users.pyi | 11 ++ stubs/auth0-python/auth0/exceptions.pyi | 14 ++ .../auth0/management/__init__.pyi | 63 ++++++++ .../auth0-python/auth0/management/actions.pyi | 64 +++++++++ .../auth0/management/async_auth0.pyi | 15 ++ .../auth0/management/attack_protection.pyi | 30 ++++ stubs/auth0-python/auth0/management/auth0.pyi | 67 +++++++++ .../auth0/management/blacklists.pyi | 21 +++ .../auth0/management/branding.pyi | 38 +++++ .../auth0/management/client_credentials.pyi | 26 ++++ .../auth0/management/client_grants.pyi | 60 ++++++++ .../auth0-python/auth0/management/clients.pyi | 44 ++++++ .../auth0/management/connections.pyi | 48 +++++++ .../auth0/management/custom_domains.pyi | 28 ++++ .../auth0/management/device_credentials.pyi | 44 ++++++ .../auth0/management/email_templates.pyi | 24 ++++ .../auth0-python/auth0/management/emails.pyi | 26 ++++ .../auth0-python/auth0/management/grants.pyi | 34 +++++ .../auth0/management/guardian.pyi | 38 +++++ stubs/auth0-python/auth0/management/hooks.pyi | 52 +++++++ stubs/auth0-python/auth0/management/jobs.pyi | 42 ++++++ .../auth0/management/log_streams.pyi | 29 ++++ stubs/auth0-python/auth0/management/logs.pyi | 44 ++++++ .../auth0/management/organizations.pyi | 134 ++++++++++++++++++ .../auth0-python/auth0/management/prompts.pyi | 28 ++++ .../auth0/management/resource_servers.pyi | 28 ++++ stubs/auth0-python/auth0/management/roles.pyi | 63 ++++++++ stubs/auth0-python/auth0/management/rules.pyi | 46 ++++++ .../auth0/management/rules_configs.pyi | 24 ++++ stubs/auth0-python/auth0/management/stats.pyi | 24 ++++ .../auth0-python/auth0/management/tenants.pyi | 22 +++ .../auth0-python/auth0/management/tickets.pyi | 22 +++ .../auth0/management/user_blocks.pyi | 26 ++++ stubs/auth0-python/auth0/management/users.pyi | 117 +++++++++++++++ .../auth0/management/users_by_email.pyi | 24 ++++ stubs/auth0-python/auth0/rest.pyi | 48 +++++++ stubs/auth0-python/auth0/rest_async.pyi | 29 ++++ stubs/auth0-python/auth0/types.pyi | 5 + stubs/auth0-python/auth0/utils.pyi | 1 + 58 files changed, 1727 insertions(+) create mode 100644 stubs/auth0-python/@tests/stubtest_allowlist.txt create mode 100644 stubs/auth0-python/METADATA.toml create mode 100644 stubs/auth0-python/auth0/__init__.pyi create mode 100644 stubs/auth0-python/auth0/asyncify.pyi create mode 100644 stubs/auth0-python/auth0/authentication/__init__.pyi create mode 100644 stubs/auth0-python/auth0/authentication/async_token_verifier.pyi create mode 100644 stubs/auth0-python/auth0/authentication/back_channel_login.pyi create mode 100644 stubs/auth0-python/auth0/authentication/base.pyi create mode 100644 stubs/auth0-python/auth0/authentication/client_authentication.pyi create mode 100644 stubs/auth0-python/auth0/authentication/database.pyi create mode 100644 stubs/auth0-python/auth0/authentication/delegated.pyi create mode 100644 stubs/auth0-python/auth0/authentication/enterprise.pyi create mode 100644 stubs/auth0-python/auth0/authentication/get_token.pyi create mode 100644 stubs/auth0-python/auth0/authentication/passwordless.pyi create mode 100644 stubs/auth0-python/auth0/authentication/pushed_authorization_requests.pyi create mode 100644 stubs/auth0-python/auth0/authentication/revoke_token.pyi create mode 100644 stubs/auth0-python/auth0/authentication/social.pyi create mode 100644 stubs/auth0-python/auth0/authentication/token_verifier.pyi create mode 100644 stubs/auth0-python/auth0/authentication/users.pyi create mode 100644 stubs/auth0-python/auth0/exceptions.pyi create mode 100644 stubs/auth0-python/auth0/management/__init__.pyi create mode 100644 stubs/auth0-python/auth0/management/actions.pyi create mode 100644 stubs/auth0-python/auth0/management/async_auth0.pyi create mode 100644 stubs/auth0-python/auth0/management/attack_protection.pyi create mode 100644 stubs/auth0-python/auth0/management/auth0.pyi create mode 100644 stubs/auth0-python/auth0/management/blacklists.pyi create mode 100644 stubs/auth0-python/auth0/management/branding.pyi create mode 100644 stubs/auth0-python/auth0/management/client_credentials.pyi create mode 100644 stubs/auth0-python/auth0/management/client_grants.pyi create mode 100644 stubs/auth0-python/auth0/management/clients.pyi create mode 100644 stubs/auth0-python/auth0/management/connections.pyi create mode 100644 stubs/auth0-python/auth0/management/custom_domains.pyi create mode 100644 stubs/auth0-python/auth0/management/device_credentials.pyi create mode 100644 stubs/auth0-python/auth0/management/email_templates.pyi create mode 100644 stubs/auth0-python/auth0/management/emails.pyi create mode 100644 stubs/auth0-python/auth0/management/grants.pyi create mode 100644 stubs/auth0-python/auth0/management/guardian.pyi create mode 100644 stubs/auth0-python/auth0/management/hooks.pyi create mode 100644 stubs/auth0-python/auth0/management/jobs.pyi create mode 100644 stubs/auth0-python/auth0/management/log_streams.pyi create mode 100644 stubs/auth0-python/auth0/management/logs.pyi create mode 100644 stubs/auth0-python/auth0/management/organizations.pyi create mode 100644 stubs/auth0-python/auth0/management/prompts.pyi create mode 100644 stubs/auth0-python/auth0/management/resource_servers.pyi create mode 100644 stubs/auth0-python/auth0/management/roles.pyi create mode 100644 stubs/auth0-python/auth0/management/rules.pyi create mode 100644 stubs/auth0-python/auth0/management/rules_configs.pyi create mode 100644 stubs/auth0-python/auth0/management/stats.pyi create mode 100644 stubs/auth0-python/auth0/management/tenants.pyi create mode 100644 stubs/auth0-python/auth0/management/tickets.pyi create mode 100644 stubs/auth0-python/auth0/management/user_blocks.pyi create mode 100644 stubs/auth0-python/auth0/management/users.pyi create mode 100644 stubs/auth0-python/auth0/management/users_by_email.pyi create mode 100644 stubs/auth0-python/auth0/rest.pyi create mode 100644 stubs/auth0-python/auth0/rest_async.pyi create mode 100644 stubs/auth0-python/auth0/types.pyi create mode 100644 stubs/auth0-python/auth0/utils.pyi diff --git a/pyrightconfig.stricter.json b/pyrightconfig.stricter.json index ee21eb97e..54d64e5f1 100644 --- a/pyrightconfig.stricter.json +++ b/pyrightconfig.stricter.json @@ -24,6 +24,7 @@ "stdlib/tkinter/ttk.pyi", "stubs/aiofiles/aiofiles/tempfile/temptypes.pyi", "stubs/antlr4-python3-runtime", + "stubs/auth0-python", "stubs/Authlib", "stubs/aws-xray-sdk", "stubs/beautifulsoup4", diff --git a/stubs/auth0-python/@tests/stubtest_allowlist.txt b/stubs/auth0-python/@tests/stubtest_allowlist.txt new file mode 100644 index 000000000..8264245ad --- /dev/null +++ b/stubs/auth0-python/@tests/stubtest_allowlist.txt @@ -0,0 +1,17 @@ +# Omit tests +auth0\.test.* + +# Omit _async functions because they aren't present in the code +auth0\..*_async + +# Inconsistently implemented, ommitted +auth0.asyncify.AsyncRestClient.file_post +auth0.authentication.async_token_verifier.AsyncRestClient.file_post +auth0.management.Auth0\..* +auth0.rest_async.AsyncRestClient.file_post +auth0.authentication.async_token_verifier.AsyncTokenVerifier.verify + +# TYPE_CHECKING override makes these show up wrong +auth0.management.async_auth0.RestClientOptions +auth0.management.auth0.RestClientOptions +auth0.rest.RequestsResponse diff --git a/stubs/auth0-python/METADATA.toml b/stubs/auth0-python/METADATA.toml new file mode 100644 index 000000000..86faedcae --- /dev/null +++ b/stubs/auth0-python/METADATA.toml @@ -0,0 +1,3 @@ +version = "4.8.*" +upstream_repository = "https://github.com/auth0/auth0-python" +requires = ["cryptography", "types-requests"] diff --git a/stubs/auth0-python/auth0/__init__.pyi b/stubs/auth0-python/auth0/__init__.pyi new file mode 100644 index 000000000..3dfa028c9 --- /dev/null +++ b/stubs/auth0-python/auth0/__init__.pyi @@ -0,0 +1,7 @@ +from auth0.exceptions import ( + Auth0Error as Auth0Error, + RateLimitError as RateLimitError, + TokenValidationError as TokenValidationError, +) + +__all__ = ("Auth0Error", "RateLimitError", "TokenValidationError") diff --git a/stubs/auth0-python/auth0/asyncify.pyi b/stubs/auth0-python/auth0/asyncify.pyi new file mode 100644 index 000000000..37c0503bc --- /dev/null +++ b/stubs/auth0-python/auth0/asyncify.pyi @@ -0,0 +1,6 @@ +from auth0.authentication import Users as Users +from auth0.authentication.base import AuthenticationBase as AuthenticationBase +from auth0.rest import RestClientOptions as RestClientOptions +from auth0.rest_async import AsyncRestClient as AsyncRestClient + +def asyncify(cls): ... diff --git a/stubs/auth0-python/auth0/authentication/__init__.pyi b/stubs/auth0-python/auth0/authentication/__init__.pyi new file mode 100644 index 000000000..d6263712a --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/__init__.pyi @@ -0,0 +1,10 @@ +from .database import Database as Database +from .delegated import Delegated as Delegated +from .enterprise import Enterprise as Enterprise +from .get_token import GetToken as GetToken +from .passwordless import Passwordless as Passwordless +from .revoke_token import RevokeToken as RevokeToken +from .social import Social as Social +from .users import Users as Users + +__all__ = ("Database", "Delegated", "Enterprise", "GetToken", "Passwordless", "RevokeToken", "Social", "Users") diff --git a/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi b/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi new file mode 100644 index 000000000..a65856b03 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/async_token_verifier.pyi @@ -0,0 +1,27 @@ +from _typeshed import Incomplete + +from .. import TokenValidationError as TokenValidationError +from ..rest_async import AsyncRestClient as AsyncRestClient +from .token_verifier import ( + AsymmetricSignatureVerifier as AsymmetricSignatureVerifier, + JwksFetcher as JwksFetcher, + TokenVerifier as TokenVerifier, +) + +class AsyncAsymmetricSignatureVerifier(AsymmetricSignatureVerifier): + def __init__(self, jwks_url: str, algorithm: str = "RS256") -> None: ... + def set_session(self, session) -> None: ... + +class AsyncJwksFetcher(JwksFetcher): + def __init__(self, *args, **kwargs) -> None: ... + def set_session(self, session) -> None: ... + async def get_key(self, key_id: str): ... + +class AsyncTokenVerifier(TokenVerifier): + iss: Incomplete + aud: Incomplete + leeway: Incomplete + def __init__( + self, signature_verifier: AsyncAsymmetricSignatureVerifier, issuer: str, audience: str, leeway: int = 0 + ) -> None: ... + def set_session(self, session) -> None: ... diff --git a/stubs/auth0-python/auth0/authentication/back_channel_login.pyi b/stubs/auth0-python/auth0/authentication/back_channel_login.pyi new file mode 100644 index 000000000..7e45855fa --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/back_channel_login.pyi @@ -0,0 +1,4 @@ +from .base import AuthenticationBase as AuthenticationBase + +class BackChannelLogin(AuthenticationBase): + def back_channel_login(self, binding_message: str, login_hint: str, scope: str, **kwargs): ... diff --git a/stubs/auth0-python/auth0/authentication/base.pyi b/stubs/auth0-python/auth0/authentication/base.pyi new file mode 100644 index 000000000..e67c3c414 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/base.pyi @@ -0,0 +1,31 @@ +from _typeshed import Incomplete + +from auth0.rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from auth0.types import RequestData as RequestData + +from .client_authentication import add_client_authentication as add_client_authentication + +UNKNOWN_ERROR: str + +class AuthenticationBase: + domain: Incomplete + client_id: Incomplete + client_secret: Incomplete + client_assertion_signing_key: Incomplete + client_assertion_signing_alg: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + client_id: str, + client_secret: str | None = None, + client_assertion_signing_key: str | None = None, + client_assertion_signing_alg: str | None = None, + telemetry: bool = True, + timeout: float | tuple[float, float] = 5.0, + protocol: str = "https", + ) -> None: ... + def post(self, url: str, data: RequestData | None = None, headers: dict[str, str] | None = None): ... + def authenticated_post(self, url: str, data: dict[str, Incomplete], headers: dict[str, str] | None = None): ... + def get(self, url: str, params: dict[str, Incomplete] | None = None, headers: dict[str, str] | None = None): ... diff --git a/stubs/auth0-python/auth0/authentication/client_authentication.pyi b/stubs/auth0-python/auth0/authentication/client_authentication.pyi new file mode 100644 index 000000000..e75647fe0 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/client_authentication.pyi @@ -0,0 +1,13 @@ +from _typeshed import Incomplete + +def create_client_assertion_jwt( + domain: str, client_id: str, client_assertion_signing_key: str, client_assertion_signing_alg: str | None +) -> str: ... +def add_client_authentication( + payload: dict[str, Incomplete], + domain: str, + client_id: str, + client_secret: str | None, + client_assertion_signing_key: str | None, + client_assertion_signing_alg: str | None, +) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/authentication/database.pyi b/stubs/auth0-python/auth0/authentication/database.pyi new file mode 100644 index 000000000..e08752c27 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/database.pyi @@ -0,0 +1,21 @@ +from _typeshed import Incomplete + +from .base import AuthenticationBase as AuthenticationBase + +class Database(AuthenticationBase): + def signup( + self, + email: str, + password: str, + connection: str, + username: str | None = None, + user_metadata: dict[str, Incomplete] | None = None, + given_name: str | None = None, + family_name: str | None = None, + name: str | None = None, + nickname: str | None = None, + picture: str | None = None, + ) -> dict[str, Incomplete]: ... + def change_password( + self, email: str, connection: str, password: str | None = None, organization: str | None = None + ) -> str: ... diff --git a/stubs/auth0-python/auth0/authentication/delegated.pyi b/stubs/auth0-python/auth0/authentication/delegated.pyi new file mode 100644 index 000000000..cedc50b05 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/delegated.pyi @@ -0,0 +1,12 @@ +from .base import AuthenticationBase as AuthenticationBase + +class Delegated(AuthenticationBase): + def get_token( + self, + target: str, + api_type: str, + grant_type: str, + id_token: str | None = None, + refresh_token: str | None = None, + scope: str = "openid", + ): ... diff --git a/stubs/auth0-python/auth0/authentication/enterprise.pyi b/stubs/auth0-python/auth0/authentication/enterprise.pyi new file mode 100644 index 000000000..a438ec9a0 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/enterprise.pyi @@ -0,0 +1,5 @@ +from .base import AuthenticationBase as AuthenticationBase + +class Enterprise(AuthenticationBase): + def saml_metadata(self): ... + def wsfed_metadata(self): ... diff --git a/stubs/auth0-python/auth0/authentication/get_token.pyi b/stubs/auth0-python/auth0/authentication/get_token.pyi new file mode 100644 index 000000000..64457306c --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/get_token.pyi @@ -0,0 +1,21 @@ +from .base import AuthenticationBase as AuthenticationBase + +class GetToken(AuthenticationBase): + def authorization_code(self, code: str, redirect_uri: str | None, grant_type: str = "authorization_code"): ... + def authorization_code_pkce( + self, code_verifier: str, code: str, redirect_uri: str | None, grant_type: str = "authorization_code" + ): ... + def client_credentials(self, audience: str, grant_type: str = "client_credentials", organization: str | None = None): ... + def login( + self, + username: str, + password: str, + scope: str | None = None, + realm: str | None = None, + audience: str | None = None, + grant_type: str = "http://auth0.com/oauth/grant-type/password-realm", + forwarded_for: str | None = None, + ): ... + def refresh_token(self, refresh_token: str, scope: str = "", grant_type: str = "refresh_token"): ... + def passwordless_login(self, username: str, otp: str, realm: str, scope: str, audience: str): ... + def backchannel_login(self, auth_req_id: str, grant_type: str = "urn:openid:params:grant-type:ciba"): ... diff --git a/stubs/auth0-python/auth0/authentication/passwordless.pyi b/stubs/auth0-python/auth0/authentication/passwordless.pyi new file mode 100644 index 000000000..841c6f4fc --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/passwordless.pyi @@ -0,0 +1,5 @@ +from .base import AuthenticationBase as AuthenticationBase + +class Passwordless(AuthenticationBase): + def email(self, email: str, send: str = "link", auth_params: dict[str, str] | None = None): ... + def sms(self, phone_number: str): ... diff --git a/stubs/auth0-python/auth0/authentication/pushed_authorization_requests.pyi b/stubs/auth0-python/auth0/authentication/pushed_authorization_requests.pyi new file mode 100644 index 000000000..67bdc0074 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/pushed_authorization_requests.pyi @@ -0,0 +1,4 @@ +from .base import AuthenticationBase as AuthenticationBase + +class PushedAuthorizationRequests(AuthenticationBase): + def pushed_authorization_request(self, response_type: str, redirect_uri: str, **kwargs): ... diff --git a/stubs/auth0-python/auth0/authentication/revoke_token.pyi b/stubs/auth0-python/auth0/authentication/revoke_token.pyi new file mode 100644 index 000000000..7190be6c6 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/revoke_token.pyi @@ -0,0 +1,4 @@ +from .base import AuthenticationBase as AuthenticationBase + +class RevokeToken(AuthenticationBase): + def revoke_refresh_token(self, token: str): ... diff --git a/stubs/auth0-python/auth0/authentication/social.pyi b/stubs/auth0-python/auth0/authentication/social.pyi new file mode 100644 index 000000000..b63c702fd --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/social.pyi @@ -0,0 +1,4 @@ +from .base import AuthenticationBase as AuthenticationBase + +class Social(AuthenticationBase): + def login(self, access_token: str, connection: str, scope: str = "openid"): ... diff --git a/stubs/auth0-python/auth0/authentication/token_verifier.pyi b/stubs/auth0-python/auth0/authentication/token_verifier.pyi new file mode 100644 index 000000000..c8c38ca3b --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/token_verifier.pyi @@ -0,0 +1,29 @@ +from _typeshed import Incomplete +from typing import ClassVar + +from auth0.exceptions import TokenValidationError as TokenValidationError + +class SignatureVerifier: + DISABLE_JWT_CHECKS: ClassVar[dict[str, bool]] + def __init__(self, algorithm: str) -> None: ... + async def verify_signature(self, token: str) -> dict[str, Incomplete]: ... + +class SymmetricSignatureVerifier(SignatureVerifier): + def __init__(self, shared_secret: str, algorithm: str = "HS256") -> None: ... + +class JwksFetcher: + CACHE_TTL: ClassVar[int] + def __init__(self, jwks_url: str, cache_ttl: int = ...) -> None: ... + def get_key(self, key_id: str): ... + +class AsymmetricSignatureVerifier(SignatureVerifier): + def __init__(self, jwks_url: str, algorithm: str = "RS256", cache_ttl: int = ...) -> None: ... + +class TokenVerifier: + iss: Incomplete + aud: Incomplete + leeway: Incomplete + def __init__(self, signature_verifier: SignatureVerifier, issuer: str, audience: str, leeway: int = 0) -> None: ... + def verify( + self, token: str, nonce: str | None = None, max_age: int | None = None, organization: str | None = None + ) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/authentication/users.pyi b/stubs/auth0-python/auth0/authentication/users.pyi new file mode 100644 index 000000000..c5a15db52 --- /dev/null +++ b/stubs/auth0-python/auth0/authentication/users.pyi @@ -0,0 +1,11 @@ +from _typeshed import Incomplete + +from auth0.rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from auth0.types import TimeoutType as TimeoutType + +class Users: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__(self, domain: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = "https") -> None: ... + def userinfo(self, access_token: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/exceptions.pyi b/stubs/auth0-python/auth0/exceptions.pyi new file mode 100644 index 000000000..f500aad79 --- /dev/null +++ b/stubs/auth0-python/auth0/exceptions.pyi @@ -0,0 +1,14 @@ +from _typeshed import Incomplete + +class Auth0Error(Exception): + status_code: Incomplete + error_code: Incomplete + message: Incomplete + content: Incomplete + def __init__(self, status_code: int, error_code: str, message: str, content: Incomplete | None = None) -> None: ... + +class RateLimitError(Auth0Error): + reset_at: Incomplete + def __init__(self, error_code: str, message: str, reset_at: int) -> None: ... + +class TokenValidationError(Exception): ... diff --git a/stubs/auth0-python/auth0/management/__init__.pyi b/stubs/auth0-python/auth0/management/__init__.pyi new file mode 100644 index 000000000..37f4aa7c2 --- /dev/null +++ b/stubs/auth0-python/auth0/management/__init__.pyi @@ -0,0 +1,63 @@ +from .actions import Actions as Actions +from .attack_protection import AttackProtection as AttackProtection +from .auth0 import Auth0 as Auth0 +from .blacklists import Blacklists as Blacklists +from .branding import Branding as Branding +from .client_credentials import ClientCredentials as ClientCredentials +from .client_grants import ClientGrants as ClientGrants +from .clients import Clients as Clients +from .connections import Connections as Connections +from .custom_domains import CustomDomains as CustomDomains +from .device_credentials import DeviceCredentials as DeviceCredentials +from .email_templates import EmailTemplates as EmailTemplates +from .emails import Emails as Emails +from .grants import Grants as Grants +from .guardian import Guardian as Guardian +from .hooks import Hooks as Hooks +from .jobs import Jobs as Jobs +from .log_streams import LogStreams as LogStreams +from .logs import Logs as Logs +from .organizations import Organizations as Organizations +from .resource_servers import ResourceServers as ResourceServers +from .roles import Roles as Roles +from .rules import Rules as Rules +from .rules_configs import RulesConfigs as RulesConfigs +from .stats import Stats as Stats +from .tenants import Tenants as Tenants +from .tickets import Tickets as Tickets +from .user_blocks import UserBlocks as UserBlocks +from .users import Users as Users +from .users_by_email import UsersByEmail as UsersByEmail + +__all__ = ( + "Auth0", + "Actions", + "AttackProtection", + "Blacklists", + "Branding", + "ClientCredentials", + "ClientGrants", + "Clients", + "Connections", + "CustomDomains", + "DeviceCredentials", + "EmailTemplates", + "Emails", + "Grants", + "Guardian", + "Hooks", + "Jobs", + "LogStreams", + "Logs", + "Organizations", + "ResourceServers", + "Roles", + "RulesConfigs", + "Rules", + "Stats", + "Tenants", + "Tickets", + "UserBlocks", + "UsersByEmail", + "Users", +) diff --git a/stubs/auth0-python/auth0/management/actions.pyi b/stubs/auth0-python/auth0/management/actions.pyi new file mode 100644 index 000000000..bce092dff --- /dev/null +++ b/stubs/auth0-python/auth0/management/actions.pyi @@ -0,0 +1,64 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Actions: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get_actions( + self, + trigger_id: str | None = None, + action_name: str | None = None, + deployed: bool | None = None, + installed: bool = False, + page: int | None = None, + per_page: int | None = None, + ): ... + async def get_actions_async( + self, + trigger_id: str | None = None, + action_name: str | None = None, + deployed: bool | None = None, + installed: bool = False, + page: int | None = None, + per_page: int | None = None, + ): ... + def create_action(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_action_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def update_action(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_action_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_action(self, id: str) -> dict[str, Incomplete]: ... + async def get_action_async(self, id: str) -> dict[str, Incomplete]: ... + def delete_action(self, id: str, force: bool = False): ... + async def delete_action_async(self, id: str, force: bool = False): ... + def get_triggers(self) -> dict[str, Incomplete]: ... + async def get_triggers_async(self) -> dict[str, Incomplete]: ... + def get_execution(self, id: str) -> dict[str, Incomplete]: ... + async def get_execution_async(self, id: str) -> dict[str, Incomplete]: ... + def get_action_versions(self, id: str, page: int | None = None, per_page: int | None = None) -> dict[str, Incomplete]: ... + async def get_action_versions_async( + self, id: str, page: int | None = None, per_page: int | None = None + ) -> dict[str, Incomplete]: ... + def get_trigger_bindings(self, id: str, page: int | None = None, per_page: int | None = None) -> dict[str, Incomplete]: ... + async def get_trigger_bindings_async( + self, id: str, page: int | None = None, per_page: int | None = None + ) -> dict[str, Incomplete]: ... + def get_action_version(self, action_id: str, version_id: str) -> dict[str, Incomplete]: ... + async def get_action_version_async(self, action_id: str, version_id: str) -> dict[str, Incomplete]: ... + def deploy_action(self, id: str) -> dict[str, Incomplete]: ... + async def deploy_action_async(self, id: str) -> dict[str, Incomplete]: ... + def rollback_action_version(self, action_id: str, version_id: str) -> dict[str, Incomplete]: ... + async def rollback_action_version_async(self, action_id: str, version_id: str) -> dict[str, Incomplete]: ... + def update_trigger_bindings(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_trigger_bindings_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/async_auth0.pyi b/stubs/auth0-python/auth0/management/async_auth0.pyi new file mode 100644 index 000000000..6b3f78886 --- /dev/null +++ b/stubs/auth0-python/auth0/management/async_auth0.pyi @@ -0,0 +1,15 @@ +from types import TracebackType +from typing_extensions import Self + +from auth0.rest import RestClientOptions as RestClientOptions + +from ..asyncify import asyncify as asyncify +from .auth0 import Auth0 as Auth0 + +class AsyncAuth0: + def __init__(self, domain: str, token: str, rest_options: RestClientOptions | None = None) -> None: ... + def set_session(self, session) -> None: ... + async def __aenter__(self) -> Self: ... + async def __aexit__( + self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None + ) -> None: ... diff --git a/stubs/auth0-python/auth0/management/attack_protection.pyi b/stubs/auth0-python/auth0/management/attack_protection.pyi new file mode 100644 index 000000000..d84ecc180 --- /dev/null +++ b/stubs/auth0-python/auth0/management/attack_protection.pyi @@ -0,0 +1,30 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class AttackProtection: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get_breached_password_detection(self) -> dict[str, Incomplete]: ... + async def get_breached_password_detection_async(self) -> dict[str, Incomplete]: ... + def update_breached_password_detection(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_breached_password_detection_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_brute_force_protection(self) -> dict[str, Incomplete]: ... + async def get_brute_force_protection_async(self) -> dict[str, Incomplete]: ... + def update_brute_force_protection(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_brute_force_protection_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_suspicious_ip_throttling(self) -> dict[str, Incomplete]: ... + async def get_suspicious_ip_throttling_async(self) -> dict[str, Incomplete]: ... + def update_suspicious_ip_throttling(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_suspicious_ip_throttling_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/auth0.pyi b/stubs/auth0-python/auth0/management/auth0.pyi new file mode 100644 index 000000000..14f7e64ca --- /dev/null +++ b/stubs/auth0-python/auth0/management/auth0.pyi @@ -0,0 +1,67 @@ +from _typeshed import Incomplete + +from auth0.rest import RestClientOptions as RestClientOptions + +from .actions import Actions as Actions +from .attack_protection import AttackProtection as AttackProtection +from .blacklists import Blacklists as Blacklists +from .branding import Branding as Branding +from .client_credentials import ClientCredentials as ClientCredentials +from .client_grants import ClientGrants as ClientGrants +from .clients import Clients as Clients +from .connections import Connections as Connections +from .custom_domains import CustomDomains as CustomDomains +from .device_credentials import DeviceCredentials as DeviceCredentials +from .email_templates import EmailTemplates as EmailTemplates +from .emails import Emails as Emails +from .grants import Grants as Grants +from .guardian import Guardian as Guardian +from .hooks import Hooks as Hooks +from .jobs import Jobs as Jobs +from .log_streams import LogStreams as LogStreams +from .logs import Logs as Logs +from .organizations import Organizations as Organizations +from .prompts import Prompts as Prompts +from .resource_servers import ResourceServers as ResourceServers +from .roles import Roles as Roles +from .rules import Rules as Rules +from .rules_configs import RulesConfigs as RulesConfigs +from .stats import Stats as Stats +from .tenants import Tenants as Tenants +from .tickets import Tickets as Tickets +from .user_blocks import UserBlocks as UserBlocks +from .users import Users as Users +from .users_by_email import UsersByEmail as UsersByEmail + +class Auth0: + actions: Incomplete + attack_protection: Incomplete + blacklists: Incomplete + branding: Incomplete + client_credentials: Incomplete + client_grants: Incomplete + clients: Incomplete + connections: Incomplete + custom_domains: Incomplete + device_credentials: Incomplete + email_templates: Incomplete + emails: Incomplete + grants: Incomplete + guardian: Incomplete + hooks: Incomplete + jobs: Incomplete + log_streams: Incomplete + logs: Incomplete + organizations: Incomplete + prompts: Incomplete + resource_servers: Incomplete + roles: Incomplete + rules_configs: Incomplete + rules: Incomplete + stats: Incomplete + tenants: Incomplete + tickets: Incomplete + user_blocks: Incomplete + users_by_email: Incomplete + users: Incomplete + def __init__(self, domain: str, token: str, rest_options: RestClientOptions | None = None) -> None: ... diff --git a/stubs/auth0-python/auth0/management/blacklists.pyi b/stubs/auth0-python/auth0/management/blacklists.pyi new file mode 100644 index 000000000..9baf22376 --- /dev/null +++ b/stubs/auth0-python/auth0/management/blacklists.pyi @@ -0,0 +1,21 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Blacklists: + url: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get(self, aud: str | None = None) -> list[dict[str, str]]: ... + async def get_async(self, aud: str | None = None) -> list[dict[str, str]]: ... + def create(self, jti: str, aud: str | None = None) -> dict[str, str]: ... + async def create_async(self, jti: str, aud: str | None = None) -> dict[str, str]: ... diff --git a/stubs/auth0-python/auth0/management/branding.pyi b/stubs/auth0-python/auth0/management/branding.pyi new file mode 100644 index 000000000..71be39cf4 --- /dev/null +++ b/stubs/auth0-python/auth0/management/branding.pyi @@ -0,0 +1,38 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Branding: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get(self) -> dict[str, Incomplete]: ... + async def get_async(self) -> dict[str, Incomplete]: ... + def update(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_template_universal_login(self) -> dict[str, Incomplete]: ... + async def get_template_universal_login_async(self) -> dict[str, Incomplete]: ... + def delete_template_universal_login(self): ... + async def delete_template_universal_login_async(self): ... + def update_template_universal_login(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_template_universal_login_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_default_branding_theme(self) -> dict[str, Incomplete]: ... + async def get_default_branding_theme_async(self) -> dict[str, Incomplete]: ... + def get_branding_theme(self, theme_id: str) -> dict[str, Incomplete]: ... + async def get_branding_theme_async(self, theme_id: str) -> dict[str, Incomplete]: ... + def delete_branding_theme(self, theme_id: str): ... + async def delete_branding_theme_async(self, theme_id: str): ... + def update_branding_theme(self, theme_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_branding_theme_async(self, theme_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def create_branding_theme(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_branding_theme_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/client_credentials.pyi b/stubs/auth0-python/auth0/management/client_credentials.pyi new file mode 100644 index 000000000..895f79bcc --- /dev/null +++ b/stubs/auth0-python/auth0/management/client_credentials.pyi @@ -0,0 +1,26 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class ClientCredentials: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all(self, client_id: str) -> list[dict[str, Incomplete]]: ... + async def all_async(self, client_id: str) -> list[dict[str, Incomplete]]: ... + def get(self, client_id: str, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, client_id: str, id: str) -> dict[str, Incomplete]: ... + def create(self, client_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, client_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete(self, client_id: str, id: str) -> dict[str, Incomplete]: ... + async def delete_async(self, client_id: str, id: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/client_grants.pyi b/stubs/auth0-python/auth0/management/client_grants.pyi new file mode 100644 index 000000000..bae2e974d --- /dev/null +++ b/stubs/auth0-python/auth0/management/client_grants.pyi @@ -0,0 +1,60 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class ClientGrants: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all( + self, + audience: str | None = None, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + client_id: str | None = None, + allow_any_organization: bool | None = None, + ) -> dict[str, Incomplete]: ... + async def all_async( + self, + audience: str | None = None, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + client_id: str | None = None, + allow_any_organization: bool | None = None, + ) -> dict[str, Incomplete]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_organizations( + self, + id: str, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + from_param: str | None = None, + take: int | None = None, + ) -> dict[str, Incomplete]: ... + async def get_organizations_async( + self, + id: str, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + from_param: str | None = None, + take: int | None = None, + ) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/clients.pyi b/stubs/auth0-python/auth0/management/clients.pyi new file mode 100644 index 000000000..1144a33b3 --- /dev/null +++ b/stubs/auth0-python/auth0/management/clients.pyi @@ -0,0 +1,44 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Clients: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all( + self, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + extra_params: dict[str, Incomplete] | None = None, + ) -> list[dict[str, Incomplete]]: ... + async def all_async( + self, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + extra_params: dict[str, Incomplete] | None = None, + ) -> list[dict[str, Incomplete]]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get(self, id: str, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + async def get_async(self, id: str, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def rotate_secret(self, id: str) -> dict[str, Incomplete]: ... + async def rotate_secret_async(self, id: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/connections.pyi b/stubs/auth0-python/auth0/management/connections.pyi new file mode 100644 index 000000000..a7b53124c --- /dev/null +++ b/stubs/auth0-python/auth0/management/connections.pyi @@ -0,0 +1,48 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Connections: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all( + self, + strategy: str | None = None, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + extra_params: dict[str, Incomplete] | None = None, + name: str | None = None, + ) -> list[dict[str, Incomplete]]: ... + async def all_async( + self, + strategy: str | None = None, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + extra_params: dict[str, Incomplete] | None = None, + name: str | None = None, + ) -> list[dict[str, Incomplete]]: ... + def get(self, id: str, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + async def get_async(self, id: str, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete_user_by_email(self, id: str, email: str): ... + async def delete_user_by_email_async(self, id: str, email: str): ... diff --git a/stubs/auth0-python/auth0/management/custom_domains.pyi b/stubs/auth0-python/auth0/management/custom_domains.pyi new file mode 100644 index 000000000..84b0a1859 --- /dev/null +++ b/stubs/auth0-python/auth0/management/custom_domains.pyi @@ -0,0 +1,28 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class CustomDomains: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all(self) -> list[dict[str, Incomplete]]: ... + async def all_async(self) -> list[dict[str, Incomplete]]: ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def create_new(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_new_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def verify(self, id: str) -> dict[str, Incomplete]: ... + async def verify_async(self, id: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/device_credentials.pyi b/stubs/auth0-python/auth0/management/device_credentials.pyi new file mode 100644 index 000000000..3d1f8e4f3 --- /dev/null +++ b/stubs/auth0-python/auth0/management/device_credentials.pyi @@ -0,0 +1,44 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class DeviceCredentials: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get( + self, + user_id: str, + client_id: str, + type: str, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ): ... + async def get_async( + self, + user_id: str, + client_id: str, + type: str, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ): ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... diff --git a/stubs/auth0-python/auth0/management/email_templates.pyi b/stubs/auth0-python/auth0/management/email_templates.pyi new file mode 100644 index 000000000..9a4e8919d --- /dev/null +++ b/stubs/auth0-python/auth0/management/email_templates.pyi @@ -0,0 +1,24 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class EmailTemplates: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get(self, template_name: str) -> dict[str, Incomplete]: ... + async def get_async(self, template_name: str) -> dict[str, Incomplete]: ... + def update(self, template_name: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, template_name: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/emails.pyi b/stubs/auth0-python/auth0/management/emails.pyi new file mode 100644 index 000000000..f681b1ea9 --- /dev/null +++ b/stubs/auth0-python/auth0/management/emails.pyi @@ -0,0 +1,26 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Emails: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get(self, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + async def get_async(self, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + def config(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def config_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete(self): ... + async def delete_async(self): ... + def update(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/grants.pyi b/stubs/auth0-python/auth0/management/grants.pyi new file mode 100644 index 000000000..e7946afc5 --- /dev/null +++ b/stubs/auth0-python/auth0/management/grants.pyi @@ -0,0 +1,34 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Grants: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all( + self, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + extra_params: dict[str, Incomplete] | None = None, + ): ... + async def all_async( + self, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + extra_params: dict[str, Incomplete] | None = None, + ): ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... diff --git a/stubs/auth0-python/auth0/management/guardian.pyi b/stubs/auth0-python/auth0/management/guardian.pyi new file mode 100644 index 000000000..19e46a0e2 --- /dev/null +++ b/stubs/auth0-python/auth0/management/guardian.pyi @@ -0,0 +1,38 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Guardian: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all_factors(self) -> list[dict[str, Incomplete]]: ... + async def all_factors_async(self) -> list[dict[str, Incomplete]]: ... + def update_factor(self, name: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_factor_async(self, name: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def update_templates(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_templates_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_templates(self) -> dict[str, Incomplete]: ... + async def get_templates_async(self) -> dict[str, Incomplete]: ... + def get_enrollment(self, id: str) -> dict[str, Incomplete]: ... + async def get_enrollment_async(self, id: str) -> dict[str, Incomplete]: ... + def delete_enrollment(self, id: str): ... + async def delete_enrollment_async(self, id: str): ... + def create_enrollment_ticket(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_enrollment_ticket_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_factor_providers(self, factor_name: str, name: str) -> dict[str, Incomplete]: ... + async def get_factor_providers_async(self, factor_name: str, name: str) -> dict[str, Incomplete]: ... + def update_factor_providers(self, factor_name: str, name: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_factor_providers_async( + self, factor_name: str, name: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/hooks.pyi b/stubs/auth0-python/auth0/management/hooks.pyi new file mode 100644 index 000000000..37ceddff4 --- /dev/null +++ b/stubs/auth0-python/auth0/management/hooks.pyi @@ -0,0 +1,52 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Hooks: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all( + self, + enabled: bool = True, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ): ... + async def all_async( + self, + enabled: bool = True, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ): ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get(self, id: str, fields: list[str] | None = None) -> dict[str, Incomplete]: ... + async def get_async(self, id: str, fields: list[str] | None = None) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_secrets(self, id: str) -> dict[str, Incomplete]: ... + async def get_secrets_async(self, id: str) -> dict[str, Incomplete]: ... + def add_secrets(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def add_secrets_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete_secrets(self, id: str, body: list[str]): ... + async def delete_secrets_async(self, id: str, body: list[str]): ... + def update_secrets(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_secrets_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/jobs.pyi b/stubs/auth0-python/auth0/management/jobs.pyi new file mode 100644 index 000000000..7ac769952 --- /dev/null +++ b/stubs/auth0-python/auth0/management/jobs.pyi @@ -0,0 +1,42 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Jobs: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... + def get_failed_job(self, id: str) -> dict[str, Incomplete]: ... + async def get_failed_job_async(self, id: str) -> dict[str, Incomplete]: ... + def export_users(self, body: dict[str, Incomplete]): ... + async def export_users_async(self, body: dict[str, Incomplete]): ... + def import_users( + self, + connection_id: str, + file_obj, + upsert: bool = False, + send_completion_email: bool = True, + external_id: str | None = None, + ) -> dict[str, Incomplete]: ... + async def import_users_async( + self, + connection_id: str, + file_obj, + upsert: bool = False, + send_completion_email: bool = True, + external_id: str | None = None, + ) -> dict[str, Incomplete]: ... + def send_verification_email(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def send_verification_email_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/log_streams.pyi b/stubs/auth0-python/auth0/management/log_streams.pyi new file mode 100644 index 000000000..85dcd9226 --- /dev/null +++ b/stubs/auth0-python/auth0/management/log_streams.pyi @@ -0,0 +1,29 @@ +from _typeshed import Incomplete +from builtins import list as _list + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class LogStreams: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def list(self) -> _list[dict[str, Incomplete]]: ... + async def list_async(self) -> _list[dict[str, Incomplete]]: ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete(self, id: str) -> dict[str, Incomplete]: ... + async def delete_async(self, id: str) -> dict[str, Incomplete]: ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/logs.pyi b/stubs/auth0-python/auth0/management/logs.pyi new file mode 100644 index 000000000..a5ac9e4c7 --- /dev/null +++ b/stubs/auth0-python/auth0/management/logs.pyi @@ -0,0 +1,44 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Logs: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def search( + self, + page: int = 0, + per_page: int = 50, + sort: str | None = None, + q: str | None = None, + include_totals: bool = True, + fields: list[str] | None = None, + from_param: str | None = None, + take: int | None = None, + include_fields: bool = True, + ) -> dict[str, Incomplete]: ... + async def search_async( + self, + page: int = 0, + per_page: int = 50, + sort: str | None = None, + q: str | None = None, + include_totals: bool = True, + fields: list[str] | None = None, + from_param: str | None = None, + take: int | None = None, + include_fields: bool = True, + ) -> dict[str, Incomplete]: ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/organizations.pyi b/stubs/auth0-python/auth0/management/organizations.pyi new file mode 100644 index 000000000..9dc1205b3 --- /dev/null +++ b/stubs/auth0-python/auth0/management/organizations.pyi @@ -0,0 +1,134 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Organizations: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all_organizations( + self, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = True, + from_param: str | None = None, + take: int | None = None, + ) -> dict[str, Incomplete]: ... + async def all_organizations_async( + self, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = True, + from_param: str | None = None, + take: int | None = None, + ) -> dict[str, Incomplete]: ... + def get_organization_by_name(self, name: str | None = None) -> dict[str, Incomplete]: ... + async def get_organization_by_name_async(self, name: str | None = None) -> dict[str, Incomplete]: ... + def get_organization(self, id: str) -> dict[str, Incomplete]: ... + async def get_organization_async(self, id: str) -> dict[str, Incomplete]: ... + def create_organization(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_organization_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def update_organization(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_organization_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete_organization(self, id: str): ... + async def delete_organization_async(self, id: str): ... + def all_organization_connections( + self, id: str, page: int | None = None, per_page: int | None = None + ) -> list[dict[str, Incomplete]]: ... + async def all_organization_connections_async( + self, id: str, page: int | None = None, per_page: int | None = None + ) -> list[dict[str, Incomplete]]: ... + def get_organization_connection(self, id: str, connection_id: str) -> dict[str, Incomplete]: ... + async def get_organization_connection_async(self, id: str, connection_id: str) -> dict[str, Incomplete]: ... + def create_organization_connection(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_organization_connection_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def update_organization_connection( + self, id: str, connection_id: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... + async def update_organization_connection_async( + self, id: str, connection_id: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... + def delete_organization_connection(self, id: str, connection_id: str): ... + async def delete_organization_connection_async(self, id: str, connection_id: str): ... + def all_organization_members( + self, + id: str, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = True, + from_param: str | None = None, + take: int | None = None, + fields: list[str] | None = None, + include_fields: bool = True, + ) -> dict[str, Incomplete]: ... + async def all_organization_members_async( + self, + id: str, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = True, + from_param: str | None = None, + take: int | None = None, + fields: list[str] | None = None, + include_fields: bool = True, + ) -> dict[str, Incomplete]: ... + def create_organization_members(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_organization_members_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete_organization_members(self, id: str, body: dict[str, Incomplete]): ... + async def delete_organization_members_async(self, id: str, body: dict[str, Incomplete]): ... + def all_organization_member_roles( + self, id: str, user_id: str, page: int | None = None, per_page: int | None = None, include_totals: bool = False + ) -> list[dict[str, Incomplete]]: ... + async def all_organization_member_roles_async( + self, id: str, user_id: str, page: int | None = None, per_page: int | None = None, include_totals: bool = False + ) -> list[dict[str, Incomplete]]: ... + def create_organization_member_roles(self, id: str, user_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_organization_member_roles_async( + self, id: str, user_id: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... + def delete_organization_member_roles(self, id: str, user_id: str, body: dict[str, Incomplete]): ... + async def delete_organization_member_roles_async(self, id: str, user_id: str, body: dict[str, Incomplete]): ... + def all_organization_invitations( + self, id: str, page: int | None = None, per_page: int | None = None, include_totals: bool = False + ) -> dict[str, Incomplete]: ... + async def all_organization_invitations_async( + self, id: str, page: int | None = None, per_page: int | None = None, include_totals: bool = False + ) -> dict[str, Incomplete]: ... + def get_organization_invitation(self, id: str, invitaton_id: str) -> dict[str, Incomplete]: ... + async def get_organization_invitation_async(self, id: str, invitaton_id: str) -> dict[str, Incomplete]: ... + def create_organization_invitation(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_organization_invitation_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def delete_organization_invitation(self, id: str, invitation_id: str): ... + async def delete_organization_invitation_async(self, id: str, invitation_id: str): ... + def get_client_grants( + self, + id: str, + audience: str | None = None, + client_id: str | None = None, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ) -> dict[str, Incomplete]: ... + async def get_client_grants_async( + self, + id: str, + audience: str | None = None, + client_id: str | None = None, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ) -> dict[str, Incomplete]: ... + def add_client_grant(self, id: str, grant_id: str) -> dict[str, Incomplete]: ... + async def add_client_grant_async(self, id: str, grant_id: str) -> dict[str, Incomplete]: ... + def delete_client_grant(self, id: str, grant_id: str) -> dict[str, Incomplete]: ... + async def delete_client_grant_async(self, id: str, grant_id: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/prompts.pyi b/stubs/auth0-python/auth0/management/prompts.pyi new file mode 100644 index 000000000..37376d758 --- /dev/null +++ b/stubs/auth0-python/auth0/management/prompts.pyi @@ -0,0 +1,28 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Prompts: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get(self) -> dict[str, Incomplete]: ... + async def get_async(self) -> dict[str, Incomplete]: ... + def update(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_custom_text(self, prompt: str, language: str): ... + async def get_custom_text_async(self, prompt: str, language: str): ... + def update_custom_text(self, prompt: str, language: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_custom_text_async( + self, prompt: str, language: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/resource_servers.pyi b/stubs/auth0-python/auth0/management/resource_servers.pyi new file mode 100644 index 000000000..8e6ca07b0 --- /dev/null +++ b/stubs/auth0-python/auth0/management/resource_servers.pyi @@ -0,0 +1,28 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class ResourceServers: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get_all(self, page: int | None = None, per_page: int | None = None, include_totals: bool = False): ... + async def get_all_async(self, page: int | None = None, per_page: int | None = None, include_totals: bool = False): ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/roles.pyi b/stubs/auth0-python/auth0/management/roles.pyi new file mode 100644 index 000000000..1cb8b1ff9 --- /dev/null +++ b/stubs/auth0-python/auth0/management/roles.pyi @@ -0,0 +1,63 @@ +from _typeshed import Incomplete +from builtins import list as _list + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Roles: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def list( + self, page: int = 0, per_page: int = 25, include_totals: bool = True, name_filter: str | None = None + ) -> dict[str, Incomplete]: ... + async def list_async( + self, page: int = 0, per_page: int = 25, include_totals: bool = True, name_filter: str | None = None + ) -> dict[str, Incomplete]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def list_users( + self, + id: str, + page: int = 0, + per_page: int = 25, + include_totals: bool = True, + from_param: str | None = None, + take: int | None = None, + ) -> dict[str, Incomplete]: ... + async def list_users_async( + self, + id: str, + page: int = 0, + per_page: int = 25, + include_totals: bool = True, + from_param: str | None = None, + take: int | None = None, + ) -> dict[str, Incomplete]: ... + def add_users(self, id: str, users: _list[str]) -> dict[str, Incomplete]: ... + async def add_users_async(self, id: str, users: _list[str]) -> dict[str, Incomplete]: ... + def list_permissions( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + async def list_permissions_async( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + def remove_permissions(self, id: str, permissions: _list[dict[str, str]]): ... + async def remove_permissions_async(self, id: str, permissions: _list[dict[str, str]]): ... + def add_permissions(self, id: str, permissions: _list[dict[str, str]]) -> dict[str, Incomplete]: ... + async def add_permissions_async(self, id: str, permissions: _list[dict[str, str]]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/rules.pyi b/stubs/auth0-python/auth0/management/rules.pyi new file mode 100644 index 000000000..1eac99eb6 --- /dev/null +++ b/stubs/auth0-python/auth0/management/rules.pyi @@ -0,0 +1,46 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Rules: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all( + self, + stage: str = "login_success", + enabled: bool = True, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ) -> dict[str, Incomplete]: ... + async def all_async( + self, + stage: str = "login_success", + enabled: bool = True, + fields: list[str] | None = None, + include_fields: bool = True, + page: int | None = None, + per_page: int | None = None, + include_totals: bool = False, + ) -> dict[str, Incomplete]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get(self, id: str, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + async def get_async(self, id: str, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/rules_configs.pyi b/stubs/auth0-python/auth0/management/rules_configs.pyi new file mode 100644 index 000000000..f276a18d9 --- /dev/null +++ b/stubs/auth0-python/auth0/management/rules_configs.pyi @@ -0,0 +1,24 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class RulesConfigs: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def all(self) -> list[dict[str, Incomplete]]: ... + async def all_async(self) -> list[dict[str, Incomplete]]: ... + def unset(self, key: str): ... + async def unset_async(self, key: str): ... + def set(self, key: str, value: str) -> dict[str, Incomplete]: ... + async def set_async(self, key: str, value: str) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/stats.pyi b/stubs/auth0-python/auth0/management/stats.pyi new file mode 100644 index 000000000..f3128be12 --- /dev/null +++ b/stubs/auth0-python/auth0/management/stats.pyi @@ -0,0 +1,24 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Stats: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def active_users(self) -> int: ... + async def active_users_async(self) -> int: ... + def daily_stats(self, from_date: str | None = None, to_date: str | None = None) -> list[dict[str, Incomplete]]: ... + async def daily_stats_async( + self, from_date: str | None = None, to_date: str | None = None + ) -> list[dict[str, Incomplete]]: ... diff --git a/stubs/auth0-python/auth0/management/tenants.pyi b/stubs/auth0-python/auth0/management/tenants.pyi new file mode 100644 index 000000000..12a4df7ad --- /dev/null +++ b/stubs/auth0-python/auth0/management/tenants.pyi @@ -0,0 +1,22 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Tenants: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get(self, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + async def get_async(self, fields: list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + def update(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/tickets.pyi b/stubs/auth0-python/auth0/management/tickets.pyi new file mode 100644 index 000000000..236596687 --- /dev/null +++ b/stubs/auth0-python/auth0/management/tickets.pyi @@ -0,0 +1,22 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Tickets: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def create_email_verification(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_email_verification_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def create_pswd_change(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_pswd_change_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... diff --git a/stubs/auth0-python/auth0/management/user_blocks.pyi b/stubs/auth0-python/auth0/management/user_blocks.pyi new file mode 100644 index 000000000..7417dd514 --- /dev/null +++ b/stubs/auth0-python/auth0/management/user_blocks.pyi @@ -0,0 +1,26 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class UserBlocks: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def get_by_identifier(self, identifier: str) -> dict[str, Incomplete]: ... + async def get_by_identifier_async(self, identifier: str) -> dict[str, Incomplete]: ... + def unblock_by_identifier(self, identifier: dict[str, Incomplete]): ... + async def unblock_by_identifier_async(self, identifier: dict[str, Incomplete]): ... + def get(self, id: str) -> dict[str, Incomplete]: ... + async def get_async(self, id: str) -> dict[str, Incomplete]: ... + def unblock(self, id: str): ... + async def unblock_async(self, id: str): ... diff --git a/stubs/auth0-python/auth0/management/users.pyi b/stubs/auth0-python/auth0/management/users.pyi new file mode 100644 index 000000000..6ba1283d6 --- /dev/null +++ b/stubs/auth0-python/auth0/management/users.pyi @@ -0,0 +1,117 @@ +from _typeshed import Incomplete +from builtins import list as _list + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class Users: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def list( + self, + page: int = 0, + per_page: int = 25, + sort: str | None = None, + connection: str | None = None, + q: str | None = None, + search_engine: str | None = None, + include_totals: bool = True, + fields: _list[str] | None = None, + include_fields: bool = True, + ) -> dict[str, Incomplete]: ... + async def list_async( + self, + page: int = 0, + per_page: int = 25, + sort: str | None = None, + connection: str | None = None, + q: str | None = None, + search_engine: str | None = None, + include_totals: bool = True, + fields: _list[str] | None = None, + include_fields: bool = True, + ) -> dict[str, Incomplete]: ... + def create(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_async(self, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def get(self, id: str, fields: _list[str] | None = None, include_fields: bool = True) -> dict[str, Incomplete]: ... + async def get_async( + self, id: str, fields: _list[str] | None = None, include_fields: bool = True + ) -> dict[str, Incomplete]: ... + def delete(self, id: str): ... + async def delete_async(self, id: str): ... + def update(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_async(self, id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def list_organizations( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + async def list_organizations_async( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + def list_roles(self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True) -> dict[str, Incomplete]: ... + async def list_roles_async( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + def remove_roles(self, id: str, roles: _list[str]): ... + async def remove_roles_async(self, id: str, roles: _list[str]): ... + def add_roles(self, id: str, roles: _list[str]) -> dict[str, Incomplete]: ... + async def add_roles_async(self, id: str, roles: _list[str]) -> dict[str, Incomplete]: ... + def list_permissions( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + async def list_permissions_async( + self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True + ) -> dict[str, Incomplete]: ... + def remove_permissions(self, id: str, permissions: _list[str]): ... + async def remove_permissions_async(self, id: str, permissions: _list[str]): ... + def add_permissions(self, id: str, permissions: _list[str]) -> dict[str, Incomplete]: ... + async def add_permissions_async(self, id: str, permissions: _list[str]) -> dict[str, Incomplete]: ... + def delete_multifactor(self, id: str, provider: str): ... + async def delete_multifactor_async(self, id: str, provider: str): ... + def delete_authenticators(self, id: str): ... + async def delete_authenticators_async(self, id: str): ... + def unlink_user_account(self, id: str, provider: str, user_id: str): ... + async def unlink_user_account_async(self, id: str, provider: str, user_id: str): ... + def link_user_account(self, user_id: str, body: dict[str, Incomplete]) -> _list[dict[str, Incomplete]]: ... + async def link_user_account_async(self, user_id: str, body: dict[str, Incomplete]) -> _list[dict[str, Incomplete]]: ... + def regenerate_recovery_code(self, user_id: str) -> dict[str, Incomplete]: ... + async def regenerate_recovery_code_async(self, user_id: str) -> dict[str, Incomplete]: ... + def get_guardian_enrollments(self, user_id: str) -> dict[str, Incomplete]: ... + async def get_guardian_enrollments_async(self, user_id: str) -> dict[str, Incomplete]: ... + def get_log_events( + self, user_id: str, page: int = 0, per_page: int = 50, sort: str | None = None, include_totals: bool = False + ) -> dict[str, Incomplete]: ... + async def get_log_events_async( + self, user_id: str, page: int = 0, per_page: int = 50, sort: str | None = None, include_totals: bool = False + ) -> dict[str, Incomplete]: ... + def invalidate_remembered_browsers(self, user_id: str) -> dict[str, Incomplete]: ... + async def invalidate_remembered_browsers_async(self, user_id: str) -> dict[str, Incomplete]: ... + def get_authentication_methods(self, user_id: str) -> dict[str, Incomplete]: ... + async def get_authentication_methods_async(self, user_id: str) -> dict[str, Incomplete]: ... + def get_authentication_method_by_id(self, user_id: str, authentication_method_id: str) -> dict[str, Incomplete]: ... + async def get_authentication_method_by_id_async( + self, user_id: str, authentication_method_id: str + ) -> dict[str, Incomplete]: ... + def create_authentication_method(self, user_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def create_authentication_method_async(self, user_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def update_authentication_methods(self, user_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + async def update_authentication_methods_async(self, user_id: str, body: dict[str, Incomplete]) -> dict[str, Incomplete]: ... + def update_authentication_method_by_id( + self, user_id: str, authentication_method_id: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... + async def update_authentication_method_by_id_async( + self, user_id: str, authentication_method_id: str, body: dict[str, Incomplete] + ) -> dict[str, Incomplete]: ... + def delete_authentication_methods(self, user_id: str): ... + async def delete_authentication_methods_async(self, user_id: str): ... + def delete_authentication_method_by_id(self, user_id: str, authentication_method_id: str): ... + async def delete_authentication_method_by_id_async(self, user_id: str, authentication_method_id: str): ... diff --git a/stubs/auth0-python/auth0/management/users_by_email.pyi b/stubs/auth0-python/auth0/management/users_by_email.pyi new file mode 100644 index 000000000..177fe7b09 --- /dev/null +++ b/stubs/auth0-python/auth0/management/users_by_email.pyi @@ -0,0 +1,24 @@ +from _typeshed import Incomplete + +from ..rest import RestClient as RestClient, RestClientOptions as RestClientOptions +from ..types import TimeoutType as TimeoutType + +class UsersByEmail: + domain: Incomplete + protocol: Incomplete + client: Incomplete + def __init__( + self, + domain: str, + token: str, + telemetry: bool = True, + timeout: TimeoutType = 5.0, + protocol: str = "https", + rest_options: RestClientOptions | None = None, + ) -> None: ... + def search_users_by_email( + self, email: str, fields: list[str] | None = None, include_fields: bool = True + ) -> list[dict[str, Incomplete]]: ... + async def search_users_by_email_async( + self, email: str, fields: list[str] | None = None, include_fields: bool = True + ) -> list[dict[str, Incomplete]]: ... diff --git a/stubs/auth0-python/auth0/rest.pyi b/stubs/auth0-python/auth0/rest.pyi new file mode 100644 index 000000000..131dd1d75 --- /dev/null +++ b/stubs/auth0-python/auth0/rest.pyi @@ -0,0 +1,48 @@ +from _typeshed import Incomplete +from collections.abc import Mapping + +import requests +from auth0.exceptions import Auth0Error as Auth0Error, RateLimitError as RateLimitError +from auth0.rest_async import RequestsResponse as RequestsResponse +from auth0.types import RequestData as RequestData, TimeoutType as TimeoutType + +UNKNOWN_ERROR: str + +class RestClientOptions: + telemetry: Incomplete + timeout: Incomplete + retries: Incomplete + def __init__(self, telemetry: bool = True, timeout: TimeoutType = 5.0, retries: int = 3) -> None: ... + +class RestClient: + options: Incomplete + jwt: Incomplete + base_headers: Incomplete + telemetry: Incomplete + timeout: Incomplete + def __init__( + self, jwt: str | None, telemetry: bool = True, timeout: TimeoutType = 5.0, options: RestClientOptions | None = None + ) -> None: ... + def MAX_REQUEST_RETRIES(self) -> int: ... + def MAX_REQUEST_RETRY_JITTER(self) -> int: ... + def MAX_REQUEST_RETRY_DELAY(self) -> int: ... + def MIN_REQUEST_RETRY_DELAY(self) -> int: ... + def get(self, url: str, params: dict[str, Incomplete] | None = None, headers: dict[str, str] | None = None): ... + def post(self, url: str, data: RequestData | None = None, headers: dict[str, str] | None = None): ... + def file_post(self, url: str, data: RequestData | None = None, files: dict[str, Incomplete] | None = None): ... + def patch(self, url: str, data: RequestData | None = None): ... + def put(self, url: str, data: RequestData | None = None): ... + def delete(self, url: str, params: dict[str, Incomplete] | None = None, data: RequestData | None = None): ... + +class Response: + def __init__(self, status_code: int, content, headers: Mapping[str, str]) -> None: ... + def content(self): ... + +class JsonResponse(Response): + def __init__(self, response: requests.Response | RequestsResponse) -> None: ... + +class PlainResponse(Response): + def __init__(self, response: requests.Response | RequestsResponse) -> None: ... + +class EmptyResponse(Response): + def __init__(self, status_code: int) -> None: ... diff --git a/stubs/auth0-python/auth0/rest_async.pyi b/stubs/auth0-python/auth0/rest_async.pyi new file mode 100644 index 000000000..7bc59c471 --- /dev/null +++ b/stubs/auth0-python/auth0/rest_async.pyi @@ -0,0 +1,29 @@ +from _typeshed import Incomplete + +from auth0.exceptions import RateLimitError as RateLimitError +from auth0.types import RequestData as RequestData + +from .rest import ( + EmptyResponse as EmptyResponse, + JsonResponse as JsonResponse, + PlainResponse as PlainResponse, + Response as Response, + RestClient as RestClient, +) + +class AsyncRestClient(RestClient): + timeout: Incomplete + def __init__(self, *args, **kwargs) -> None: ... + def set_session(self, session) -> None: ... + async def get(self, url: str, params: dict[str, Incomplete] | None = None, headers: dict[str, str] | None = None): ... + async def post(self, url: str, data: RequestData | None = None, headers: dict[str, str] | None = None): ... + async def file_post(self, *args, **kwargs): ... + async def patch(self, url: str, data: RequestData | None = None): ... + async def put(self, url: str, data: RequestData | None = None): ... + async def delete(self, url: str, params: dict[str, Incomplete] | None = None, data: RequestData | None = None): ... + +class RequestsResponse: + status_code: Incomplete + headers: Incomplete + text: Incomplete + def __init__(self, response, text: str) -> None: ... diff --git a/stubs/auth0-python/auth0/types.pyi b/stubs/auth0-python/auth0/types.pyi new file mode 100644 index 000000000..385643dc7 --- /dev/null +++ b/stubs/auth0-python/auth0/types.pyi @@ -0,0 +1,5 @@ +from _typeshed import Incomplete +from typing_extensions import TypeAlias + +TimeoutType: TypeAlias = float | tuple[float, float] +RequestData: TypeAlias = dict[str, Incomplete] | list[Incomplete] diff --git a/stubs/auth0-python/auth0/utils.pyi b/stubs/auth0-python/auth0/utils.pyi new file mode 100644 index 000000000..611cd037c --- /dev/null +++ b/stubs/auth0-python/auth0/utils.pyi @@ -0,0 +1 @@ +def is_async_available() -> bool: ...