aboutsummaryrefslogtreecommitdiffstats
path: root/typings/slack_api.pyi
blob: 48290470189e71b079bc40a0aa94354ffb293039 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
from typing import TypedDict

class SlackTopic(TypedDict):
    value: str
    creator: str
    last_set: int

class SlackPurpose(TypedDict):
    value: str
    creator: str
    last_set: int

class SlackConversationCommon(TypedDict):
    id: str

class SlackConversationCommonNotIm(SlackConversationCommon):
    created: int
    creator: str
    is_archived: bool
    is_channel: bool
    is_ext_shared: bool
    is_general: bool
    is_group: bool
    is_im: bool
    is_member: bool
    is_mpim: bool
    is_org_shared: bool
    is_pending_ext_shared: bool
    is_private: bool
    is_shared: bool
    name_normalized: str
    name: str
    num_members: int
    parent_conversation: None
    pending_connected_team_ids: list
    pending_shared: list
    previous_names: list[str]
    purpose: SlackPurpose
    shared_team_ids: list[str]
    topic: SlackTopic
    unlinked: int

class SlackConversationPublic(SlackConversationCommonNotIm):
    num_members: int
    previous_names: list[str]

class SlackConversationPrivate(SlackConversationCommonNotIm):
    num_members: int

class SlackConversationMpim(SlackConversationCommonNotIm):
    num_members: int

class SlackConversationGroup(SlackConversationCommonNotIm):
    is_open: bool
    last_read: str
    priority: int

class SlackConversationIm(SlackConversationCommon):
    created: int
    is_archived: bool
    is_im: bool
    is_org_shared: bool
    is_user_deleted: bool
    priority: int
    user: str

SlackConversationNotIm = (
    SlackConversationPublic
    | SlackConversationPrivate
    | SlackConversationMpim
    | SlackConversationGroup
)
SlackConversation = SlackConversationNotIm | SlackConversationIm