diff --git a/twitchio/__init__.py b/twitchio/__init__.py index 6a44ef89..c3a7f46f 100644 --- a/twitchio/__init__.py +++ b/twitchio/__init__.py @@ -28,6 +28,7 @@ __copyright__ = "Copyright 2017-Present (c) TwitchIO, PythonistaGuild" __version__ = "3.0.0dev" +from . import types_ as types from . import authentication as authentication, eventsub as eventsub, utils as utils, web as web from .assets import Asset as Asset diff --git a/twitchio/types_/__init__.py b/twitchio/types_/__init__.py index 6737ea59..a0459d1f 100644 --- a/twitchio/types_/__init__.py +++ b/twitchio/types_/__init__.py @@ -21,3 +21,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ + +from .colours import * +from .conduits import * +from .eventsub import * +from .options import * +from .requests import * +from .responses import * +from .tokens import * diff --git a/twitchio/types_/colours.py b/twitchio/types_/colours.py index f6a4daff..5dd305cd 100644 --- a/twitchio/types_/colours.py +++ b/twitchio/types_/colours.py @@ -25,6 +25,9 @@ from typing import TypedDict +__all__ = ("Colours", "Colors") + + class Colours(TypedDict): code: int hex: str diff --git a/twitchio/types_/conduits.py b/twitchio/types_/conduits.py index c5aca21c..8432ea13 100644 --- a/twitchio/types_/conduits.py +++ b/twitchio/types_/conduits.py @@ -24,6 +24,33 @@ from typing import Any, Literal, Never, NotRequired, TypeAlias, TypedDict +__all__ = ( + "WelcomeMetaData", + "KeepAliveMetaData", + "NotificationMetaData", + "ReconnectMetaData", + "RevocationMetaData", + "WelcomeSession", + "WelcomePayload", + "WelcomeMessage", + "KeepAliveMessage", + "Condition", + "NotificationTransport", + "NotificationSubscription", + "NotificationPayload", + "NotificationMessage", + "ReconnectSession", + "ReconnectPayload", + "ReconnectMessage", + "RevocationTransport", + "RevocationPayload", + "RevocationMessage", + "RevocationSubscription", + "WebsocketMessages", + "MetaData", + "MessageTypes", +) + class ShardTransport(TypedDict): method: Literal["websocket", "webhook"] @@ -76,7 +103,7 @@ class NotificationMetaData(TypedDict): subscription_version: str -class ReconnectMetadata(TypedDict): +class ReconnectMetaData(TypedDict): message_id: str message_type: Literal["session_reconnect"] message_timestamp: str @@ -166,7 +193,7 @@ class ReconnectPayload(TypedDict): class ReconnectMessage(TypedDict): - metadata: ReconnectMetadata + metadata: ReconnectMetaData payload: ReconnectPayload @@ -197,5 +224,5 @@ class RevocationMessage(TypedDict): WebsocketMessages: TypeAlias = WelcomeMessage | ReconnectMessage | RevocationMessage | NotificationMessage | KeepAliveMessage -MetaData: TypeAlias = WelcomeMetaData | ReconnectMetadata | RevocationMetaData | NotificationMetaData | KeepAliveMetaData +MetaData: TypeAlias = WelcomeMetaData | ReconnectMetaData | RevocationMetaData | NotificationMetaData | KeepAliveMetaData MessageTypes: TypeAlias = Literal["session_welcome", "session_reconnect", "session_keepalive", "notification", "revocation"] diff --git a/twitchio/types_/options.py b/twitchio/types_/options.py index 50a449bd..1803624b 100644 --- a/twitchio/types_/options.py +++ b/twitchio/types_/options.py @@ -31,6 +31,9 @@ from ..web.utils import BaseAdapter +__all__ = ("ClientOptions", "WaitPredicateT") + + class ClientOptions(TypedDict, total=False): redirect_uri: str | None scopes: Scopes | None