diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-14 12:04:44 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | 6078e3b08616cfe2b3f9b3890f252ddd2e018a9b (patch) | |
tree | d2946ff89cdb13a565ebf3b77660cdfb9c6ac4df | |
parent | a7b617b886c3f56165a5aeb27631520a6e6e5d96 (diff) | |
download | wee-slack-6078e3b08616cfe2b3f9b3890f252ddd2e018a9b.tar.gz |
Create directory for slack in typings
-rw-r--r-- | slack/slack_api.py | 4 | ||||
-rw-r--r-- | typings/slack_api/slack_conversations_info.pyi (renamed from typings/slack_api.pyi) | 72 |
2 files changed, 38 insertions, 38 deletions
diff --git a/slack/slack_api.py b/slack/slack_api.py index 8408488..4d8df43 100644 --- a/slack/slack_api.py +++ b/slack/slack_api.py @@ -8,7 +8,7 @@ from slack.http import http_request from slack.shared import shared if TYPE_CHECKING: - from slack_api import SlackConversationInfoResponse + from slack_api.slack_conversations_info import SlackConversationsInfoResponse from slack.slack_conversation import SlackConversation from slack.slack_user import SlackUser @@ -56,7 +56,7 @@ class SlackApi: async def fetch_conversations_info( self, conversation: SlackConversation - ) -> SlackConversationInfoResponse: + ) -> SlackConversationsInfoResponse: return await self._fetch("conversations.info", {"channel": conversation.id}) async def fetch_users_conversations( diff --git a/typings/slack_api.pyi b/typings/slack_api/slack_conversations_info.pyi index 4842571..40a8997 100644 --- a/typings/slack_api.pyi +++ b/typings/slack_api/slack_conversations_info.pyi @@ -40,7 +40,7 @@ class SlackLatest(TypedDict): blocks: List[SlackBlock] team: str -class SlackConversationInfoCommon(TypedDict): +class SlackConversationsInfoCommon(TypedDict): id: str created: int is_archived: bool @@ -48,7 +48,7 @@ class SlackConversationInfoCommon(TypedDict): context_team_id: str last_read: str -class SlackConversationInfoCommonNotIm(SlackConversationInfoCommon): +class SlackConversationsInfoCommonNotIm(SlackConversationsInfoCommon): name: str is_channel: bool is_group: bool @@ -69,25 +69,25 @@ class SlackConversationInfoCommonNotIm(SlackConversationInfoCommon): purpose: SlackPurpose @final -class SlackConversationInfoPublic(SlackConversationInfoCommonNotIm): +class SlackConversationsInfoPublic(SlackConversationsInfoCommonNotIm): is_mpim: Literal[False] is_private: Literal[False] previous_names: List[str] # TODO: Check if private and mpim has this @final -class SlackConversationInfoPrivate(SlackConversationInfoCommonNotIm): +class SlackConversationsInfoPrivate(SlackConversationsInfoCommonNotIm): is_mpim: Literal[False] is_private: Literal[True] is_open: bool @final -class SlackConversationInfoMpim(SlackConversationInfoCommonNotIm): +class SlackConversationsInfoMpim(SlackConversationsInfoCommonNotIm): is_mpim: Literal[True] is_private: Literal[True] is_open: bool @final -class SlackConversationInfoIm(SlackConversationInfoCommon): +class SlackConversationsInfoIm(SlackConversationsInfoCommon): is_im: Literal[True] user: str latest: SlackLatest @@ -96,63 +96,63 @@ class SlackConversationInfoIm(SlackConversationInfoCommon): is_open: bool priority: int -SlackConversationInfoNotIm = ( - SlackConversationInfoPublic - | SlackConversationInfoPrivate - | SlackConversationInfoMpim +SlackConversationsInfoNotIm = ( + SlackConversationsInfoPublic + | SlackConversationsInfoPrivate + | SlackConversationsInfoMpim ) -SlackConversationInfo = SlackConversationInfoNotIm | SlackConversationInfoIm +SlackConversationsInfo = SlackConversationsInfoNotIm | SlackConversationsInfoIm @final -class SlackConversationInfoErrorResponse(TypedDict): +class SlackConversationsInfoErrorResponse(TypedDict): ok: Literal[False] error: str @final -class SlackConversationInfoPublicSuccessResponse(TypedDict): +class SlackConversationsInfoPublicSuccessResponse(TypedDict): ok: Literal[True] - channel: SlackConversationInfoPublic + channel: SlackConversationsInfoPublic @final -class SlackConversationInfoPrivateSuccessResponse(TypedDict): +class SlackConversationsInfoPrivateSuccessResponse(TypedDict): ok: Literal[True] - channel: SlackConversationInfoPrivate + channel: SlackConversationsInfoPrivate @final -class SlackConversationInfoMpimSuccessResponse(TypedDict): +class SlackConversationsInfoMpimSuccessResponse(TypedDict): ok: Literal[True] - channel: SlackConversationInfoMpim + channel: SlackConversationsInfoMpim @final -class SlackConversationInfoImSuccessResponse(TypedDict): +class SlackConversationsInfoImSuccessResponse(TypedDict): ok: Literal[True] - channel: SlackConversationInfoIm + channel: SlackConversationsInfoIm @final -class SlackConversationInfoNotImSuccessResponse(TypedDict): +class SlackConversationsInfoNotImSuccessResponse(TypedDict): ok: Literal[True] - channel: SlackConversationInfoNotIm + channel: SlackConversationsInfoNotIm @final -class SlackConversationInfoSuccessResponse(TypedDict): +class SlackConversationsInfoSuccessResponse(TypedDict): ok: Literal[True] - channel: SlackConversationInfo + channel: SlackConversationsInfo -SlackConversationInfoPublicResponse = ( - SlackConversationInfoPublicSuccessResponse | SlackConversationInfoErrorResponse +SlackConversationsInfoPublicResponse = ( + SlackConversationsInfoPublicSuccessResponse | SlackConversationsInfoErrorResponse ) -SlackConversationInfoPrivateResponse = ( - SlackConversationInfoPrivateSuccessResponse | SlackConversationInfoErrorResponse +SlackConversationsInfoPrivateResponse = ( + SlackConversationsInfoPrivateSuccessResponse | SlackConversationsInfoErrorResponse ) -SlackConversationInfoMpimResponse = ( - SlackConversationInfoMpimSuccessResponse | SlackConversationInfoErrorResponse +SlackConversationsInfoMpimResponse = ( + SlackConversationsInfoMpimSuccessResponse | SlackConversationsInfoErrorResponse ) -SlackConversationInfoImResponse = ( - SlackConversationInfoImSuccessResponse | SlackConversationInfoErrorResponse +SlackConversationsInfoImResponse = ( + SlackConversationsInfoImSuccessResponse | SlackConversationsInfoErrorResponse ) -SlackConversationInfoNotImResponse = ( - SlackConversationInfoNotImSuccessResponse | SlackConversationInfoErrorResponse +SlackConversationsInfoNotImResponse = ( + SlackConversationsInfoNotImSuccessResponse | SlackConversationsInfoErrorResponse ) -SlackConversationInfoResponse = ( - SlackConversationInfoSuccessResponse | SlackConversationInfoErrorResponse +SlackConversationsInfoResponse = ( + SlackConversationsInfoSuccessResponse | SlackConversationsInfoErrorResponse ) |