@im-more/dsh-slack 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/cordis.patch.yml +13 -0
- package/lib/index.js +2659 -0
- package/lib/index.js.map +1 -0
- package/lib/types/bot.d.ts +66 -0
- package/lib/types/bot.d.ts.map +1 -0
- package/lib/types/bot.js +165 -0
- package/lib/types/bot.js.map +1 -0
- package/lib/types/config.d.ts +49 -0
- package/lib/types/config.d.ts.map +1 -0
- package/lib/types/config.js +54 -0
- package/lib/types/config.js.map +1 -0
- package/lib/types/decode.d.ts +126 -0
- package/lib/types/decode.d.ts.map +1 -0
- package/lib/types/decode.js +396 -0
- package/lib/types/decode.js.map +1 -0
- package/lib/types/errors.d.ts +61 -0
- package/lib/types/errors.d.ts.map +1 -0
- package/lib/types/errors.js +196 -0
- package/lib/types/errors.js.map +1 -0
- package/lib/types/identity.d.ts +27 -0
- package/lib/types/identity.d.ts.map +1 -0
- package/lib/types/identity.js +35 -0
- package/lib/types/identity.js.map +1 -0
- package/lib/types/index.d.ts +14 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js +14 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/modes/mrkdwn.d.ts +17 -0
- package/lib/types/modes/mrkdwn.d.ts.map +1 -0
- package/lib/types/modes/mrkdwn.js +123 -0
- package/lib/types/modes/mrkdwn.js.map +1 -0
- package/lib/types/modes/shared.d.ts +164 -0
- package/lib/types/modes/shared.d.ts.map +1 -0
- package/lib/types/modes/shared.js +411 -0
- package/lib/types/modes/shared.js.map +1 -0
- package/lib/types/mrkdwn.d.ts +41 -0
- package/lib/types/mrkdwn.d.ts.map +1 -0
- package/lib/types/mrkdwn.js +137 -0
- package/lib/types/mrkdwn.js.map +1 -0
- package/lib/types/request.d.ts +225 -0
- package/lib/types/request.d.ts.map +1 -0
- package/lib/types/request.js +330 -0
- package/lib/types/request.js.map +1 -0
- package/lib/types/send.d.ts +74 -0
- package/lib/types/send.d.ts.map +1 -0
- package/lib/types/send.js +200 -0
- package/lib/types/send.js.map +1 -0
- package/lib/types/transport/socket.d.ts +58 -0
- package/lib/types/transport/socket.d.ts.map +1 -0
- package/lib/types/transport/socket.js +297 -0
- package/lib/types/transport/socket.js.map +1 -0
- package/lib/types/transport/webhook.d.ts +48 -0
- package/lib/types/transport/webhook.d.ts.map +1 -0
- package/lib/types/transport/webhook.js +210 -0
- package/lib/types/transport/webhook.js.map +1 -0
- package/lib/types/types/admin.d.ts +682 -0
- package/lib/types/types/admin.d.ts.map +1 -0
- package/lib/types/types/admin.js +172 -0
- package/lib/types/types/admin.js.map +1 -0
- package/lib/types/types/api.d.ts +20 -0
- package/lib/types/types/api.d.ts.map +1 -0
- package/lib/types/types/api.js +7 -0
- package/lib/types/types/api.js.map +1 -0
- package/lib/types/types/apps.d.ts +138 -0
- package/lib/types/types/apps.d.ts.map +1 -0
- package/lib/types/types/apps.js +28 -0
- package/lib/types/types/apps.js.map +1 -0
- package/lib/types/types/auth.d.ts +36 -0
- package/lib/types/types/auth.d.ts.map +1 -0
- package/lib/types/types/auth.js +10 -0
- package/lib/types/types/auth.js.map +1 -0
- package/lib/types/types/bots.d.ts +32 -0
- package/lib/types/types/bots.d.ts.map +1 -0
- package/lib/types/types/bots.js +7 -0
- package/lib/types/types/bots.js.map +1 -0
- package/lib/types/types/calls.d.ts +82 -0
- package/lib/types/types/calls.d.ts.map +1 -0
- package/lib/types/types/calls.js +22 -0
- package/lib/types/types/calls.js.map +1 -0
- package/lib/types/types/chat.d.ts +208 -0
- package/lib/types/types/chat.d.ts.map +1 -0
- package/lib/types/types/chat.js +34 -0
- package/lib/types/types/chat.js.map +1 -0
- package/lib/types/types/conversations.d.ts +266 -0
- package/lib/types/types/conversations.d.ts.map +1 -0
- package/lib/types/types/conversations.js +58 -0
- package/lib/types/types/conversations.js.map +1 -0
- package/lib/types/types/definition.d.ts +505 -0
- package/lib/types/types/definition.d.ts.map +1 -0
- package/lib/types/types/definition.js +2 -0
- package/lib/types/types/definition.js.map +1 -0
- package/lib/types/types/dialog.d.ts +20 -0
- package/lib/types/types/dialog.d.ts.map +1 -0
- package/lib/types/types/dialog.js +7 -0
- package/lib/types/types/dialog.js.map +1 -0
- package/lib/types/types/dnd.d.ts +70 -0
- package/lib/types/types/dnd.d.ts.map +1 -0
- package/lib/types/types/dnd.js +19 -0
- package/lib/types/types/dnd.js.map +1 -0
- package/lib/types/types/emoji.d.ts +18 -0
- package/lib/types/types/emoji.d.ts.map +1 -0
- package/lib/types/types/emoji.js +7 -0
- package/lib/types/types/emoji.js.map +1 -0
- package/lib/types/types/events/base-events.d.ts +235 -0
- package/lib/types/types/events/base-events.d.ts.map +1 -0
- package/lib/types/types/events/base-events.js +3 -0
- package/lib/types/types/events/base-events.js.map +1 -0
- package/lib/types/types/events/index.d.ts +97 -0
- package/lib/types/types/events/index.d.ts.map +1 -0
- package/lib/types/types/events/index.js +3 -0
- package/lib/types/types/events/index.js.map +1 -0
- package/lib/types/types/events/message-events.d.ts +215 -0
- package/lib/types/types/events/message-events.d.ts.map +1 -0
- package/lib/types/types/events/message-events.js +3 -0
- package/lib/types/types/events/message-events.js.map +1 -0
- package/lib/types/types/files.d.ts +189 -0
- package/lib/types/types/files.d.ts.map +1 -0
- package/lib/types/types/files.js +43 -0
- package/lib/types/types/files.js.map +1 -0
- package/lib/types/types/index.d.ts +82 -0
- package/lib/types/types/index.d.ts.map +1 -0
- package/lib/types/types/index.js +29 -0
- package/lib/types/types/index.js.map +1 -0
- package/lib/types/types/internal.d.ts +17 -0
- package/lib/types/types/internal.d.ts.map +1 -0
- package/lib/types/types/internal.js +60 -0
- package/lib/types/types/internal.js.map +1 -0
- package/lib/types/types/migration.d.ts +25 -0
- package/lib/types/types/migration.d.ts.map +1 -0
- package/lib/types/types/migration.js +7 -0
- package/lib/types/types/migration.js.map +1 -0
- package/lib/types/types/oauth.d.ts +50 -0
- package/lib/types/types/oauth.d.ts.map +1 -0
- package/lib/types/types/oauth.js +13 -0
- package/lib/types/types/oauth.js.map +1 -0
- package/lib/types/types/pins.d.ts +39 -0
- package/lib/types/types/pins.d.ts.map +1 -0
- package/lib/types/types/pins.js +13 -0
- package/lib/types/types/pins.js.map +1 -0
- package/lib/types/types/reactions.d.ts +75 -0
- package/lib/types/types/reactions.d.ts.map +1 -0
- package/lib/types/types/reactions.js +16 -0
- package/lib/types/types/reactions.js.map +1 -0
- package/lib/types/types/reminders.d.ts +64 -0
- package/lib/types/types/reminders.d.ts.map +1 -0
- package/lib/types/types/reminders.js +19 -0
- package/lib/types/types/reminders.js.map +1 -0
- package/lib/types/types/rtm.d.ts +30 -0
- package/lib/types/types/rtm.d.ts.map +1 -0
- package/lib/types/types/rtm.js +7 -0
- package/lib/types/types/rtm.js.map +1 -0
- package/lib/types/types/search.d.ts +24 -0
- package/lib/types/types/search.d.ts.map +1 -0
- package/lib/types/types/search.js +7 -0
- package/lib/types/types/search.js.map +1 -0
- package/lib/types/types/stars.d.ts +56 -0
- package/lib/types/types/stars.d.ts.map +1 -0
- package/lib/types/types/stars.js +13 -0
- package/lib/types/types/stars.js.map +1 -0
- package/lib/types/types/team.d.ts +98 -0
- package/lib/types/types/team.d.ts.map +1 -0
- package/lib/types/types/team.js +19 -0
- package/lib/types/types/team.js.map +1 -0
- package/lib/types/types/usergroups.d.ts +103 -0
- package/lib/types/types/usergroups.d.ts.map +1 -0
- package/lib/types/types/usergroups.js +25 -0
- package/lib/types/types/usergroups.js.map +1 -0
- package/lib/types/types/users.d.ts +169 -0
- package/lib/types/types/users.d.ts.map +1 -0
- package/lib/types/types/users.js +40 -0
- package/lib/types/types/users.js.map +1 -0
- package/lib/types/types/views.d.ts +56 -0
- package/lib/types/types/views.d.ts.map +1 -0
- package/lib/types/types/views.js +16 -0
- package/lib/types/types/views.js.map +1 -0
- package/lib/types/types/workflows.d.ts +45 -0
- package/lib/types/types/workflows.d.ts.map +1 -0
- package/lib/types/types/workflows.js +13 -0
- package/lib/types/types/workflows.js.map +1 -0
- package/package.json +65 -3
- package/src/bot.ts +273 -0
- package/src/config.ts +92 -0
- package/src/decode.ts +489 -0
- package/src/errors.ts +230 -0
- package/src/identity.ts +59 -0
- package/src/index.ts +64 -0
- package/src/modes/mrkdwn.ts +159 -0
- package/src/modes/shared.ts +515 -0
- package/src/mrkdwn.ts +146 -0
- package/src/request.ts +449 -0
- package/src/send.ts +300 -0
- package/src/transport/socket.ts +393 -0
- package/src/transport/webhook.ts +269 -0
- package/src/types/admin.ts +910 -0
- package/src/types/api.ts +28 -0
- package/src/types/apps.ts +175 -0
- package/src/types/auth.ts +49 -0
- package/src/types/bots.ts +40 -0
- package/src/types/calls.ts +110 -0
- package/src/types/chat.ts +255 -0
- package/src/types/conversations.ts +342 -0
- package/src/types/definition.ts +530 -0
- package/src/types/dialog.ts +28 -0
- package/src/types/dnd.ts +94 -0
- package/src/types/emoji.ts +26 -0
- package/src/types/events/base-events.ts +281 -0
- package/src/types/events/index.ts +125 -0
- package/src/types/events/message-events.ts +253 -0
- package/src/types/files.ts +245 -0
- package/src/types/index.ts +84 -0
- package/src/types/internal.ts +60 -0
- package/src/types/migration.ts +34 -0
- package/src/types/oauth.ts +66 -0
- package/src/types/pins.ts +55 -0
- package/src/types/reactions.ts +95 -0
- package/src/types/reminders.ts +88 -0
- package/src/types/rtm.ts +38 -0
- package/src/types/search.ts +32 -0
- package/src/types/stars.ts +72 -0
- package/src/types/team.ts +122 -0
- package/src/types/usergroups.ts +135 -0
- package/src/types/users.ts +221 -0
- package/src/types/views.ts +76 -0
- package/src/types/workflows.ts +61 -0
- package/README.md +0 -3
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
export namespace Definitions {
|
|
2
|
+
export type BotProfile = {
|
|
3
|
+
app_id: string
|
|
4
|
+
deleted: boolean
|
|
5
|
+
icons: {
|
|
6
|
+
image_36: string
|
|
7
|
+
image_48: string
|
|
8
|
+
image_72: string
|
|
9
|
+
}
|
|
10
|
+
id: string
|
|
11
|
+
name: string
|
|
12
|
+
team_id: string
|
|
13
|
+
updated: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Channel = {
|
|
17
|
+
accepted_user: string
|
|
18
|
+
created: number
|
|
19
|
+
creator: string
|
|
20
|
+
id: string
|
|
21
|
+
is_archived: boolean
|
|
22
|
+
is_channel: boolean
|
|
23
|
+
is_frozen: boolean
|
|
24
|
+
is_general: boolean
|
|
25
|
+
is_member: boolean
|
|
26
|
+
is_moved: number
|
|
27
|
+
is_mpim: boolean
|
|
28
|
+
is_non_threadable: boolean
|
|
29
|
+
is_org_shared: boolean
|
|
30
|
+
is_pending_ext_shared: boolean
|
|
31
|
+
is_private: boolean
|
|
32
|
+
is_read_only: boolean
|
|
33
|
+
is_shared: boolean
|
|
34
|
+
is_thread_only: boolean
|
|
35
|
+
last_read: string
|
|
36
|
+
latest: Definitions.Message
|
|
37
|
+
members: string[]
|
|
38
|
+
name: string
|
|
39
|
+
name_normalized: string
|
|
40
|
+
num_members: number
|
|
41
|
+
pending_shared: string[]
|
|
42
|
+
previous_names: string[]
|
|
43
|
+
priority: unknown
|
|
44
|
+
purpose: {
|
|
45
|
+
creator: string
|
|
46
|
+
last_set: number
|
|
47
|
+
value: string
|
|
48
|
+
}
|
|
49
|
+
topic: {
|
|
50
|
+
creator: string
|
|
51
|
+
last_set: number
|
|
52
|
+
value: string
|
|
53
|
+
}
|
|
54
|
+
unlinked: number
|
|
55
|
+
unread_count: number
|
|
56
|
+
unread_count_display: number
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export type Comment = {
|
|
60
|
+
comment: string
|
|
61
|
+
created: number
|
|
62
|
+
id: string
|
|
63
|
+
is_intro: boolean
|
|
64
|
+
is_starred: boolean
|
|
65
|
+
num_stars: number
|
|
66
|
+
pinned_info: {
|
|
67
|
+
}
|
|
68
|
+
pinned_to: string[]
|
|
69
|
+
reactions: Definitions.Reaction[]
|
|
70
|
+
timestamp: number
|
|
71
|
+
user: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type Comments = unknown[]
|
|
75
|
+
|
|
76
|
+
export type Conversation = {
|
|
77
|
+
accepted_user: string
|
|
78
|
+
connected_team_ids: string[]
|
|
79
|
+
conversation_host_id: string
|
|
80
|
+
created: number
|
|
81
|
+
creator: string
|
|
82
|
+
display_counts: {
|
|
83
|
+
display_counts: number
|
|
84
|
+
guest_counts: number
|
|
85
|
+
}
|
|
86
|
+
enterprise_id: string
|
|
87
|
+
has_pins: boolean
|
|
88
|
+
id: string
|
|
89
|
+
internal_team_ids: string[]
|
|
90
|
+
is_archived: boolean
|
|
91
|
+
is_channel: boolean
|
|
92
|
+
is_ext_shared: boolean
|
|
93
|
+
is_frozen: boolean
|
|
94
|
+
is_general: boolean
|
|
95
|
+
is_global_shared: boolean
|
|
96
|
+
is_group: boolean
|
|
97
|
+
is_im: boolean
|
|
98
|
+
is_member: boolean
|
|
99
|
+
is_moved: number
|
|
100
|
+
is_mpim: boolean
|
|
101
|
+
is_non_threadable: boolean
|
|
102
|
+
is_open: boolean
|
|
103
|
+
is_org_default: boolean
|
|
104
|
+
is_org_mandatory: boolean
|
|
105
|
+
is_org_shared: boolean
|
|
106
|
+
is_pending_ext_shared: boolean
|
|
107
|
+
is_private: boolean
|
|
108
|
+
is_read_only: boolean
|
|
109
|
+
is_shared: boolean
|
|
110
|
+
is_starred: boolean
|
|
111
|
+
is_thread_only: boolean
|
|
112
|
+
last_read: string
|
|
113
|
+
latest: Definitions.Message
|
|
114
|
+
members: string[]
|
|
115
|
+
name: string
|
|
116
|
+
name_normalized: string
|
|
117
|
+
num_members: number
|
|
118
|
+
parent_conversation: string
|
|
119
|
+
pending_connected_team_ids: string[]
|
|
120
|
+
pending_shared: string[]
|
|
121
|
+
pin_count: number
|
|
122
|
+
previous_names: string[]
|
|
123
|
+
priority: unknown
|
|
124
|
+
purpose: {
|
|
125
|
+
creator: string
|
|
126
|
+
last_set: number
|
|
127
|
+
value: string
|
|
128
|
+
}
|
|
129
|
+
shared_team_ids: string[]
|
|
130
|
+
shares: {
|
|
131
|
+
accepted_user: string
|
|
132
|
+
is_active: boolean
|
|
133
|
+
team: Definitions.Team
|
|
134
|
+
user: string
|
|
135
|
+
}[]
|
|
136
|
+
timezone_count: number
|
|
137
|
+
topic: {
|
|
138
|
+
creator: string
|
|
139
|
+
last_set: number
|
|
140
|
+
value: string
|
|
141
|
+
}
|
|
142
|
+
unlinked: number
|
|
143
|
+
unread_count: number
|
|
144
|
+
unread_count_display: number
|
|
145
|
+
use_case: string
|
|
146
|
+
user: string
|
|
147
|
+
version: number
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export type EnterpriseUser = {
|
|
151
|
+
enterprise_id: string
|
|
152
|
+
enterprise_name: string
|
|
153
|
+
id: string
|
|
154
|
+
is_admin: boolean
|
|
155
|
+
is_owner: boolean
|
|
156
|
+
teams: string[]
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export type ExternalOrgMigrations = {
|
|
160
|
+
current: {
|
|
161
|
+
date_started: number
|
|
162
|
+
team_id: string
|
|
163
|
+
}[]
|
|
164
|
+
date_updated: number
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type File = {
|
|
168
|
+
channels: string[]
|
|
169
|
+
comments_count: number
|
|
170
|
+
created: number
|
|
171
|
+
date_delete: number
|
|
172
|
+
display_as_bot: boolean
|
|
173
|
+
editable: boolean
|
|
174
|
+
editor: string
|
|
175
|
+
external_id: string
|
|
176
|
+
external_type: string
|
|
177
|
+
external_url: string
|
|
178
|
+
filetype: string
|
|
179
|
+
groups: string[]
|
|
180
|
+
has_rich_preview: boolean
|
|
181
|
+
id: string
|
|
182
|
+
image_exif_rotation: number
|
|
183
|
+
ims: string[]
|
|
184
|
+
is_external: boolean
|
|
185
|
+
is_public: boolean
|
|
186
|
+
is_starred: boolean
|
|
187
|
+
is_tombstoned: boolean
|
|
188
|
+
last_editor: string
|
|
189
|
+
mimetype: string
|
|
190
|
+
mode: string
|
|
191
|
+
name: string
|
|
192
|
+
non_owner_editable: boolean
|
|
193
|
+
num_stars: number
|
|
194
|
+
original_h: number
|
|
195
|
+
original_w: number
|
|
196
|
+
permalink: string
|
|
197
|
+
permalink_public: string
|
|
198
|
+
pinned_info: {
|
|
199
|
+
}
|
|
200
|
+
pinned_to: string[]
|
|
201
|
+
pretty_type: string
|
|
202
|
+
preview: string
|
|
203
|
+
public_url_shared: boolean
|
|
204
|
+
reactions: Definitions.Reaction[]
|
|
205
|
+
shares: {
|
|
206
|
+
private: unknown
|
|
207
|
+
public: unknown
|
|
208
|
+
}
|
|
209
|
+
size: number
|
|
210
|
+
source_team: string
|
|
211
|
+
state: string
|
|
212
|
+
thumb_1024: string
|
|
213
|
+
thumb_1024_h: number
|
|
214
|
+
thumb_1024_w: number
|
|
215
|
+
thumb_160: string
|
|
216
|
+
thumb_360: string
|
|
217
|
+
thumb_360_h: number
|
|
218
|
+
thumb_360_w: number
|
|
219
|
+
thumb_480: string
|
|
220
|
+
thumb_480_h: number
|
|
221
|
+
thumb_480_w: number
|
|
222
|
+
thumb_64: string
|
|
223
|
+
thumb_720: string
|
|
224
|
+
thumb_720_h: number
|
|
225
|
+
thumb_720_w: number
|
|
226
|
+
thumb_80: string
|
|
227
|
+
thumb_800: string
|
|
228
|
+
thumb_800_h: number
|
|
229
|
+
thumb_800_w: number
|
|
230
|
+
thumb_960: string
|
|
231
|
+
thumb_960_h: number
|
|
232
|
+
thumb_960_w: number
|
|
233
|
+
thumb_tiny: string
|
|
234
|
+
timestamp: number
|
|
235
|
+
title: string
|
|
236
|
+
updated: number
|
|
237
|
+
url_private: string
|
|
238
|
+
url_private_download: string
|
|
239
|
+
user: string
|
|
240
|
+
user_team: string
|
|
241
|
+
username: string
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type Icon = {
|
|
245
|
+
image_102: string
|
|
246
|
+
image_132: string
|
|
247
|
+
image_230: string
|
|
248
|
+
image_34: string
|
|
249
|
+
image_44: string
|
|
250
|
+
image_68: string
|
|
251
|
+
image_88: string
|
|
252
|
+
image_default: boolean
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export type Message = {
|
|
256
|
+
attachments: {
|
|
257
|
+
fallback: string
|
|
258
|
+
id: number
|
|
259
|
+
image_bytes: number
|
|
260
|
+
image_height: number
|
|
261
|
+
image_url: string
|
|
262
|
+
image_width: number
|
|
263
|
+
}[]
|
|
264
|
+
blocks: {
|
|
265
|
+
type: string
|
|
266
|
+
}[]
|
|
267
|
+
bot_id: string
|
|
268
|
+
bot_profile: Definitions.BotProfile
|
|
269
|
+
client_msg_id: string
|
|
270
|
+
comment: Definitions.Comment
|
|
271
|
+
display_as_bot: boolean
|
|
272
|
+
file: Definitions.File
|
|
273
|
+
files: Definitions.File[]
|
|
274
|
+
icons: {
|
|
275
|
+
emoji: string
|
|
276
|
+
image_64: string
|
|
277
|
+
}
|
|
278
|
+
inviter: string
|
|
279
|
+
is_delayed_message: boolean
|
|
280
|
+
is_intro: boolean
|
|
281
|
+
is_starred: boolean
|
|
282
|
+
last_read: string
|
|
283
|
+
latest_reply: string
|
|
284
|
+
name: string
|
|
285
|
+
old_name: string
|
|
286
|
+
parent_user_id: string
|
|
287
|
+
permalink: string
|
|
288
|
+
pinned_to: string[]
|
|
289
|
+
purpose: string
|
|
290
|
+
reactions: Definitions.Reaction[]
|
|
291
|
+
reply_count: number
|
|
292
|
+
reply_users: string[]
|
|
293
|
+
reply_users_count: number
|
|
294
|
+
source_team: string
|
|
295
|
+
subscribed: boolean
|
|
296
|
+
subtype: string
|
|
297
|
+
team: string
|
|
298
|
+
text: string
|
|
299
|
+
thread_ts: string
|
|
300
|
+
topic: string
|
|
301
|
+
ts: string
|
|
302
|
+
type: string
|
|
303
|
+
unread_count: number
|
|
304
|
+
upload: boolean
|
|
305
|
+
user: string
|
|
306
|
+
user_profile: Definitions.UserProfileShort
|
|
307
|
+
user_team: string
|
|
308
|
+
username: string
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export type Paging = {
|
|
312
|
+
count: number
|
|
313
|
+
page: number
|
|
314
|
+
pages: number
|
|
315
|
+
per_page: number
|
|
316
|
+
spill: number
|
|
317
|
+
total: number
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export type PrimaryOwner = {
|
|
321
|
+
email: string
|
|
322
|
+
id: string
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export type Reaction = {
|
|
326
|
+
count: number
|
|
327
|
+
name: string
|
|
328
|
+
users: string[]
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export type Reminder = {
|
|
332
|
+
complete_ts: number
|
|
333
|
+
creator: string
|
|
334
|
+
id: string
|
|
335
|
+
recurring: boolean
|
|
336
|
+
text: string
|
|
337
|
+
time: number
|
|
338
|
+
user: string
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export type Resources = {
|
|
342
|
+
excluded_ids: string[]
|
|
343
|
+
ids: string[]
|
|
344
|
+
wildcard: boolean
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
export type ResponseMetadata = {
|
|
348
|
+
next_cursor: string
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export type Scopes = string[]
|
|
352
|
+
|
|
353
|
+
export type Subteam = {
|
|
354
|
+
auto_provision: boolean
|
|
355
|
+
auto_type: unknown
|
|
356
|
+
channel_count: number
|
|
357
|
+
created_by: string
|
|
358
|
+
date_create: number
|
|
359
|
+
date_delete: number
|
|
360
|
+
date_update: number
|
|
361
|
+
deleted_by: unknown
|
|
362
|
+
description: string
|
|
363
|
+
enterprise_subteam_id: string
|
|
364
|
+
handle: string
|
|
365
|
+
id: string
|
|
366
|
+
is_external: boolean
|
|
367
|
+
is_subteam: boolean
|
|
368
|
+
is_usergroup: boolean
|
|
369
|
+
name: string
|
|
370
|
+
prefs: {
|
|
371
|
+
channels: string[]
|
|
372
|
+
groups: string[]
|
|
373
|
+
}
|
|
374
|
+
team_id: string
|
|
375
|
+
updated_by: string
|
|
376
|
+
user_count: number
|
|
377
|
+
users: string[]
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
export type Team = {
|
|
381
|
+
archived: boolean
|
|
382
|
+
avatar_base_url: string
|
|
383
|
+
created: number
|
|
384
|
+
date_create: number
|
|
385
|
+
deleted: boolean
|
|
386
|
+
description: unknown
|
|
387
|
+
discoverable: unknown
|
|
388
|
+
domain: string
|
|
389
|
+
email_domain: string
|
|
390
|
+
enterprise_id: string
|
|
391
|
+
enterprise_name: string
|
|
392
|
+
external_org_migrations: Definitions.ExternalOrgMigrations
|
|
393
|
+
has_compliance_export: boolean
|
|
394
|
+
icon: Definitions.Icon
|
|
395
|
+
id: string
|
|
396
|
+
is_assigned: boolean
|
|
397
|
+
is_enterprise: number
|
|
398
|
+
is_over_storage_limit: boolean
|
|
399
|
+
limit_ts: number
|
|
400
|
+
locale: string
|
|
401
|
+
messages_count: number
|
|
402
|
+
msg_edit_window_mins: number
|
|
403
|
+
name: string
|
|
404
|
+
over_integrations_limit: boolean
|
|
405
|
+
over_storage_limit: boolean
|
|
406
|
+
pay_prod_cur: string
|
|
407
|
+
plan: string
|
|
408
|
+
primary_owner: Definitions.PrimaryOwner
|
|
409
|
+
sso_provider: {
|
|
410
|
+
label: string
|
|
411
|
+
name: string
|
|
412
|
+
type: string
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
export type TeamProfileField = {
|
|
417
|
+
field_name: unknown
|
|
418
|
+
hint: string
|
|
419
|
+
id: string
|
|
420
|
+
is_hidden: boolean
|
|
421
|
+
label: string
|
|
422
|
+
options: unknown
|
|
423
|
+
ordering: unknown
|
|
424
|
+
possible_values: unknown
|
|
425
|
+
type: string
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export type TeamProfileFieldOption = {
|
|
429
|
+
is_custom: unknown
|
|
430
|
+
is_multiple_entry: unknown
|
|
431
|
+
is_protected: unknown
|
|
432
|
+
is_scim: unknown
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
export type User = {
|
|
436
|
+
color: string
|
|
437
|
+
deleted: boolean
|
|
438
|
+
enterprise_user: Definitions.EnterpriseUser
|
|
439
|
+
has_2fa: boolean
|
|
440
|
+
id: string
|
|
441
|
+
is_admin: boolean
|
|
442
|
+
is_app_user: boolean
|
|
443
|
+
is_bot: boolean
|
|
444
|
+
is_external: boolean
|
|
445
|
+
is_forgotten: boolean
|
|
446
|
+
is_invited_user: boolean
|
|
447
|
+
is_owner: boolean
|
|
448
|
+
is_primary_owner: boolean
|
|
449
|
+
is_restricted: boolean
|
|
450
|
+
is_stranger: boolean
|
|
451
|
+
is_ultra_restricted: boolean
|
|
452
|
+
locale: string
|
|
453
|
+
name: string
|
|
454
|
+
presence: string
|
|
455
|
+
profile: Definitions.UserProfile
|
|
456
|
+
real_name: string
|
|
457
|
+
team: string
|
|
458
|
+
team_id: string
|
|
459
|
+
team_profile: {
|
|
460
|
+
fields: Definitions.TeamProfileField[]
|
|
461
|
+
}
|
|
462
|
+
two_factor_type: string
|
|
463
|
+
tz: unknown
|
|
464
|
+
tz_label: string
|
|
465
|
+
tz_offset: unknown
|
|
466
|
+
updated: unknown
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export type UserProfile = {
|
|
470
|
+
always_active: boolean
|
|
471
|
+
api_app_id: string
|
|
472
|
+
avatar_hash: string
|
|
473
|
+
bot_id: string
|
|
474
|
+
display_name: string
|
|
475
|
+
display_name_normalized: string
|
|
476
|
+
email: unknown
|
|
477
|
+
fields: unknown
|
|
478
|
+
first_name: unknown
|
|
479
|
+
guest_expiration_ts: unknown
|
|
480
|
+
guest_invited_by: unknown
|
|
481
|
+
image_1024: unknown
|
|
482
|
+
image_192: unknown
|
|
483
|
+
image_24: unknown
|
|
484
|
+
image_32: unknown
|
|
485
|
+
image_48: unknown
|
|
486
|
+
image_512: unknown
|
|
487
|
+
image_72: unknown
|
|
488
|
+
image_original: unknown
|
|
489
|
+
is_app_user: boolean
|
|
490
|
+
is_custom_image: boolean
|
|
491
|
+
is_restricted: unknown
|
|
492
|
+
is_ultra_restricted: unknown
|
|
493
|
+
last_avatar_image_hash: string
|
|
494
|
+
last_name: unknown
|
|
495
|
+
memberships_count: number
|
|
496
|
+
name: unknown
|
|
497
|
+
phone: string
|
|
498
|
+
pronouns: string
|
|
499
|
+
real_name: string
|
|
500
|
+
real_name_normalized: string
|
|
501
|
+
skype: string
|
|
502
|
+
status_default_emoji: string
|
|
503
|
+
status_default_text: string
|
|
504
|
+
status_default_text_canonical: unknown
|
|
505
|
+
status_emoji: string
|
|
506
|
+
status_expiration: number
|
|
507
|
+
status_text: string
|
|
508
|
+
status_text_canonical: unknown
|
|
509
|
+
team: string
|
|
510
|
+
title: string
|
|
511
|
+
updated: number
|
|
512
|
+
user_id: string
|
|
513
|
+
username: unknown
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export type UserProfileShort = {
|
|
517
|
+
avatar_hash: string
|
|
518
|
+
display_name: string
|
|
519
|
+
display_name_normalized: string
|
|
520
|
+
first_name: unknown
|
|
521
|
+
image_72: string
|
|
522
|
+
is_restricted: boolean
|
|
523
|
+
is_ultra_restricted: boolean
|
|
524
|
+
name: string
|
|
525
|
+
real_name: string
|
|
526
|
+
real_name_normalized: string
|
|
527
|
+
team: string
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Internal } from './internal.ts'
|
|
2
|
+
|
|
3
|
+
Internal.define({
|
|
4
|
+
'/dialog.open': {
|
|
5
|
+
GET: { 'dialogOpen': true },
|
|
6
|
+
},
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export namespace Dialog {
|
|
10
|
+
export namespace Params {
|
|
11
|
+
export interface Open {
|
|
12
|
+
dialog: string
|
|
13
|
+
trigger_id: string
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module './internal' {
|
|
19
|
+
interface Internal {
|
|
20
|
+
/**
|
|
21
|
+
* Open a dialog with a user
|
|
22
|
+
* @see https://api.slack.com/methods/dialog.open
|
|
23
|
+
*/
|
|
24
|
+
dialogOpen(token: TokenInput, params: Dialog.Params.Open): Promise<{
|
|
25
|
+
ok: boolean
|
|
26
|
+
}>
|
|
27
|
+
}
|
|
28
|
+
}
|
package/src/types/dnd.ts
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Internal } from './internal.ts'
|
|
2
|
+
|
|
3
|
+
Internal.define({
|
|
4
|
+
'/dnd.endDnd': {
|
|
5
|
+
POST: { 'dndEndDnd': true },
|
|
6
|
+
},
|
|
7
|
+
'/dnd.endSnooze': {
|
|
8
|
+
POST: { 'dndEndSnooze': true },
|
|
9
|
+
},
|
|
10
|
+
'/dnd.info': {
|
|
11
|
+
GET: { 'dndInfo': false },
|
|
12
|
+
},
|
|
13
|
+
'/dnd.setSnooze': {
|
|
14
|
+
POST: { 'dndSetSnooze': false },
|
|
15
|
+
},
|
|
16
|
+
'/dnd.teamInfo': {
|
|
17
|
+
GET: { 'dndTeamInfo': false },
|
|
18
|
+
},
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
export namespace Dnd {
|
|
22
|
+
export namespace Params {
|
|
23
|
+
export interface EndDnd {
|
|
24
|
+
}
|
|
25
|
+
export interface EndSnooze {
|
|
26
|
+
}
|
|
27
|
+
export interface Info {
|
|
28
|
+
user?: string
|
|
29
|
+
}
|
|
30
|
+
export interface SetSnooze {
|
|
31
|
+
num_minutes: string
|
|
32
|
+
}
|
|
33
|
+
export interface TeamInfo {
|
|
34
|
+
users?: string
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare module './internal' {
|
|
40
|
+
interface Internal {
|
|
41
|
+
/**
|
|
42
|
+
* Ends the current user's Do Not Disturb session immediately.
|
|
43
|
+
* @see https://api.slack.com/methods/dnd.endDnd
|
|
44
|
+
*/
|
|
45
|
+
dndEndDnd(token: TokenInput): Promise<{
|
|
46
|
+
ok: boolean
|
|
47
|
+
}>
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Ends the current user's snooze mode immediately.
|
|
51
|
+
* @see https://api.slack.com/methods/dnd.endSnooze
|
|
52
|
+
*/
|
|
53
|
+
dndEndSnooze(token: TokenInput): Promise<{
|
|
54
|
+
dnd_enabled: boolean
|
|
55
|
+
next_dnd_end_ts: number
|
|
56
|
+
next_dnd_start_ts: number
|
|
57
|
+
ok: boolean
|
|
58
|
+
snooze_enabled: boolean
|
|
59
|
+
}>
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves a user's current Do Not Disturb status.
|
|
63
|
+
* @see https://api.slack.com/methods/dnd.info
|
|
64
|
+
*/
|
|
65
|
+
dndInfo(token: TokenInput, params: Dnd.Params.Info): Promise<{
|
|
66
|
+
dnd_enabled: boolean
|
|
67
|
+
next_dnd_end_ts: number
|
|
68
|
+
next_dnd_start_ts: number
|
|
69
|
+
ok: boolean
|
|
70
|
+
snooze_enabled?: boolean
|
|
71
|
+
snooze_endtime?: number
|
|
72
|
+
snooze_remaining?: number
|
|
73
|
+
}>
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Turns on Do Not Disturb mode for the current user, or changes its duration.
|
|
77
|
+
* @see https://api.slack.com/methods/dnd.setSnooze
|
|
78
|
+
*/
|
|
79
|
+
dndSetSnooze(token: TokenInput, params: Dnd.Params.SetSnooze): Promise<{
|
|
80
|
+
ok: boolean
|
|
81
|
+
snooze_enabled: boolean
|
|
82
|
+
snooze_endtime: number
|
|
83
|
+
snooze_remaining: number
|
|
84
|
+
}>
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves the Do Not Disturb status for up to 50 users on a team.
|
|
88
|
+
* @see https://api.slack.com/methods/dnd.teamInfo
|
|
89
|
+
*/
|
|
90
|
+
dndTeamInfo(token: TokenInput, params: Dnd.Params.TeamInfo): Promise<{
|
|
91
|
+
ok: boolean
|
|
92
|
+
}>
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Internal } from './internal.ts'
|
|
2
|
+
|
|
3
|
+
Internal.define({
|
|
4
|
+
'/emoji.list': {
|
|
5
|
+
GET: { 'emojiList': false },
|
|
6
|
+
},
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
export namespace Emoji {
|
|
10
|
+
export namespace Params {
|
|
11
|
+
export interface List {
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module './internal' {
|
|
17
|
+
interface Internal {
|
|
18
|
+
/**
|
|
19
|
+
* Lists custom emoji for a team.
|
|
20
|
+
* @see https://api.slack.com/methods/emoji.list
|
|
21
|
+
*/
|
|
22
|
+
emojiList(token: TokenInput): Promise<{
|
|
23
|
+
ok: boolean
|
|
24
|
+
}>
|
|
25
|
+
}
|
|
26
|
+
}
|