@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.
Files changed (226) hide show
  1. package/LICENSE +21 -0
  2. package/cordis.patch.yml +13 -0
  3. package/lib/index.js +2659 -0
  4. package/lib/index.js.map +1 -0
  5. package/lib/types/bot.d.ts +66 -0
  6. package/lib/types/bot.d.ts.map +1 -0
  7. package/lib/types/bot.js +165 -0
  8. package/lib/types/bot.js.map +1 -0
  9. package/lib/types/config.d.ts +49 -0
  10. package/lib/types/config.d.ts.map +1 -0
  11. package/lib/types/config.js +54 -0
  12. package/lib/types/config.js.map +1 -0
  13. package/lib/types/decode.d.ts +126 -0
  14. package/lib/types/decode.d.ts.map +1 -0
  15. package/lib/types/decode.js +396 -0
  16. package/lib/types/decode.js.map +1 -0
  17. package/lib/types/errors.d.ts +61 -0
  18. package/lib/types/errors.d.ts.map +1 -0
  19. package/lib/types/errors.js +196 -0
  20. package/lib/types/errors.js.map +1 -0
  21. package/lib/types/identity.d.ts +27 -0
  22. package/lib/types/identity.d.ts.map +1 -0
  23. package/lib/types/identity.js +35 -0
  24. package/lib/types/identity.js.map +1 -0
  25. package/lib/types/index.d.ts +14 -0
  26. package/lib/types/index.d.ts.map +1 -0
  27. package/lib/types/index.js +14 -0
  28. package/lib/types/index.js.map +1 -0
  29. package/lib/types/modes/mrkdwn.d.ts +17 -0
  30. package/lib/types/modes/mrkdwn.d.ts.map +1 -0
  31. package/lib/types/modes/mrkdwn.js +123 -0
  32. package/lib/types/modes/mrkdwn.js.map +1 -0
  33. package/lib/types/modes/shared.d.ts +164 -0
  34. package/lib/types/modes/shared.d.ts.map +1 -0
  35. package/lib/types/modes/shared.js +411 -0
  36. package/lib/types/modes/shared.js.map +1 -0
  37. package/lib/types/mrkdwn.d.ts +41 -0
  38. package/lib/types/mrkdwn.d.ts.map +1 -0
  39. package/lib/types/mrkdwn.js +137 -0
  40. package/lib/types/mrkdwn.js.map +1 -0
  41. package/lib/types/request.d.ts +225 -0
  42. package/lib/types/request.d.ts.map +1 -0
  43. package/lib/types/request.js +330 -0
  44. package/lib/types/request.js.map +1 -0
  45. package/lib/types/send.d.ts +74 -0
  46. package/lib/types/send.d.ts.map +1 -0
  47. package/lib/types/send.js +200 -0
  48. package/lib/types/send.js.map +1 -0
  49. package/lib/types/transport/socket.d.ts +58 -0
  50. package/lib/types/transport/socket.d.ts.map +1 -0
  51. package/lib/types/transport/socket.js +297 -0
  52. package/lib/types/transport/socket.js.map +1 -0
  53. package/lib/types/transport/webhook.d.ts +48 -0
  54. package/lib/types/transport/webhook.d.ts.map +1 -0
  55. package/lib/types/transport/webhook.js +210 -0
  56. package/lib/types/transport/webhook.js.map +1 -0
  57. package/lib/types/types/admin.d.ts +682 -0
  58. package/lib/types/types/admin.d.ts.map +1 -0
  59. package/lib/types/types/admin.js +172 -0
  60. package/lib/types/types/admin.js.map +1 -0
  61. package/lib/types/types/api.d.ts +20 -0
  62. package/lib/types/types/api.d.ts.map +1 -0
  63. package/lib/types/types/api.js +7 -0
  64. package/lib/types/types/api.js.map +1 -0
  65. package/lib/types/types/apps.d.ts +138 -0
  66. package/lib/types/types/apps.d.ts.map +1 -0
  67. package/lib/types/types/apps.js +28 -0
  68. package/lib/types/types/apps.js.map +1 -0
  69. package/lib/types/types/auth.d.ts +36 -0
  70. package/lib/types/types/auth.d.ts.map +1 -0
  71. package/lib/types/types/auth.js +10 -0
  72. package/lib/types/types/auth.js.map +1 -0
  73. package/lib/types/types/bots.d.ts +32 -0
  74. package/lib/types/types/bots.d.ts.map +1 -0
  75. package/lib/types/types/bots.js +7 -0
  76. package/lib/types/types/bots.js.map +1 -0
  77. package/lib/types/types/calls.d.ts +82 -0
  78. package/lib/types/types/calls.d.ts.map +1 -0
  79. package/lib/types/types/calls.js +22 -0
  80. package/lib/types/types/calls.js.map +1 -0
  81. package/lib/types/types/chat.d.ts +208 -0
  82. package/lib/types/types/chat.d.ts.map +1 -0
  83. package/lib/types/types/chat.js +34 -0
  84. package/lib/types/types/chat.js.map +1 -0
  85. package/lib/types/types/conversations.d.ts +266 -0
  86. package/lib/types/types/conversations.d.ts.map +1 -0
  87. package/lib/types/types/conversations.js +58 -0
  88. package/lib/types/types/conversations.js.map +1 -0
  89. package/lib/types/types/definition.d.ts +505 -0
  90. package/lib/types/types/definition.d.ts.map +1 -0
  91. package/lib/types/types/definition.js +2 -0
  92. package/lib/types/types/definition.js.map +1 -0
  93. package/lib/types/types/dialog.d.ts +20 -0
  94. package/lib/types/types/dialog.d.ts.map +1 -0
  95. package/lib/types/types/dialog.js +7 -0
  96. package/lib/types/types/dialog.js.map +1 -0
  97. package/lib/types/types/dnd.d.ts +70 -0
  98. package/lib/types/types/dnd.d.ts.map +1 -0
  99. package/lib/types/types/dnd.js +19 -0
  100. package/lib/types/types/dnd.js.map +1 -0
  101. package/lib/types/types/emoji.d.ts +18 -0
  102. package/lib/types/types/emoji.d.ts.map +1 -0
  103. package/lib/types/types/emoji.js +7 -0
  104. package/lib/types/types/emoji.js.map +1 -0
  105. package/lib/types/types/events/base-events.d.ts +235 -0
  106. package/lib/types/types/events/base-events.d.ts.map +1 -0
  107. package/lib/types/types/events/base-events.js +3 -0
  108. package/lib/types/types/events/base-events.js.map +1 -0
  109. package/lib/types/types/events/index.d.ts +97 -0
  110. package/lib/types/types/events/index.d.ts.map +1 -0
  111. package/lib/types/types/events/index.js +3 -0
  112. package/lib/types/types/events/index.js.map +1 -0
  113. package/lib/types/types/events/message-events.d.ts +215 -0
  114. package/lib/types/types/events/message-events.d.ts.map +1 -0
  115. package/lib/types/types/events/message-events.js +3 -0
  116. package/lib/types/types/events/message-events.js.map +1 -0
  117. package/lib/types/types/files.d.ts +189 -0
  118. package/lib/types/types/files.d.ts.map +1 -0
  119. package/lib/types/types/files.js +43 -0
  120. package/lib/types/types/files.js.map +1 -0
  121. package/lib/types/types/index.d.ts +82 -0
  122. package/lib/types/types/index.d.ts.map +1 -0
  123. package/lib/types/types/index.js +29 -0
  124. package/lib/types/types/index.js.map +1 -0
  125. package/lib/types/types/internal.d.ts +17 -0
  126. package/lib/types/types/internal.d.ts.map +1 -0
  127. package/lib/types/types/internal.js +60 -0
  128. package/lib/types/types/internal.js.map +1 -0
  129. package/lib/types/types/migration.d.ts +25 -0
  130. package/lib/types/types/migration.d.ts.map +1 -0
  131. package/lib/types/types/migration.js +7 -0
  132. package/lib/types/types/migration.js.map +1 -0
  133. package/lib/types/types/oauth.d.ts +50 -0
  134. package/lib/types/types/oauth.d.ts.map +1 -0
  135. package/lib/types/types/oauth.js +13 -0
  136. package/lib/types/types/oauth.js.map +1 -0
  137. package/lib/types/types/pins.d.ts +39 -0
  138. package/lib/types/types/pins.d.ts.map +1 -0
  139. package/lib/types/types/pins.js +13 -0
  140. package/lib/types/types/pins.js.map +1 -0
  141. package/lib/types/types/reactions.d.ts +75 -0
  142. package/lib/types/types/reactions.d.ts.map +1 -0
  143. package/lib/types/types/reactions.js +16 -0
  144. package/lib/types/types/reactions.js.map +1 -0
  145. package/lib/types/types/reminders.d.ts +64 -0
  146. package/lib/types/types/reminders.d.ts.map +1 -0
  147. package/lib/types/types/reminders.js +19 -0
  148. package/lib/types/types/reminders.js.map +1 -0
  149. package/lib/types/types/rtm.d.ts +30 -0
  150. package/lib/types/types/rtm.d.ts.map +1 -0
  151. package/lib/types/types/rtm.js +7 -0
  152. package/lib/types/types/rtm.js.map +1 -0
  153. package/lib/types/types/search.d.ts +24 -0
  154. package/lib/types/types/search.d.ts.map +1 -0
  155. package/lib/types/types/search.js +7 -0
  156. package/lib/types/types/search.js.map +1 -0
  157. package/lib/types/types/stars.d.ts +56 -0
  158. package/lib/types/types/stars.d.ts.map +1 -0
  159. package/lib/types/types/stars.js +13 -0
  160. package/lib/types/types/stars.js.map +1 -0
  161. package/lib/types/types/team.d.ts +98 -0
  162. package/lib/types/types/team.d.ts.map +1 -0
  163. package/lib/types/types/team.js +19 -0
  164. package/lib/types/types/team.js.map +1 -0
  165. package/lib/types/types/usergroups.d.ts +103 -0
  166. package/lib/types/types/usergroups.d.ts.map +1 -0
  167. package/lib/types/types/usergroups.js +25 -0
  168. package/lib/types/types/usergroups.js.map +1 -0
  169. package/lib/types/types/users.d.ts +169 -0
  170. package/lib/types/types/users.d.ts.map +1 -0
  171. package/lib/types/types/users.js +40 -0
  172. package/lib/types/types/users.js.map +1 -0
  173. package/lib/types/types/views.d.ts +56 -0
  174. package/lib/types/types/views.d.ts.map +1 -0
  175. package/lib/types/types/views.js +16 -0
  176. package/lib/types/types/views.js.map +1 -0
  177. package/lib/types/types/workflows.d.ts +45 -0
  178. package/lib/types/types/workflows.d.ts.map +1 -0
  179. package/lib/types/types/workflows.js +13 -0
  180. package/lib/types/types/workflows.js.map +1 -0
  181. package/package.json +65 -3
  182. package/src/bot.ts +273 -0
  183. package/src/config.ts +92 -0
  184. package/src/decode.ts +489 -0
  185. package/src/errors.ts +230 -0
  186. package/src/identity.ts +59 -0
  187. package/src/index.ts +64 -0
  188. package/src/modes/mrkdwn.ts +159 -0
  189. package/src/modes/shared.ts +515 -0
  190. package/src/mrkdwn.ts +146 -0
  191. package/src/request.ts +449 -0
  192. package/src/send.ts +300 -0
  193. package/src/transport/socket.ts +393 -0
  194. package/src/transport/webhook.ts +269 -0
  195. package/src/types/admin.ts +910 -0
  196. package/src/types/api.ts +28 -0
  197. package/src/types/apps.ts +175 -0
  198. package/src/types/auth.ts +49 -0
  199. package/src/types/bots.ts +40 -0
  200. package/src/types/calls.ts +110 -0
  201. package/src/types/chat.ts +255 -0
  202. package/src/types/conversations.ts +342 -0
  203. package/src/types/definition.ts +530 -0
  204. package/src/types/dialog.ts +28 -0
  205. package/src/types/dnd.ts +94 -0
  206. package/src/types/emoji.ts +26 -0
  207. package/src/types/events/base-events.ts +281 -0
  208. package/src/types/events/index.ts +125 -0
  209. package/src/types/events/message-events.ts +253 -0
  210. package/src/types/files.ts +245 -0
  211. package/src/types/index.ts +84 -0
  212. package/src/types/internal.ts +60 -0
  213. package/src/types/migration.ts +34 -0
  214. package/src/types/oauth.ts +66 -0
  215. package/src/types/pins.ts +55 -0
  216. package/src/types/reactions.ts +95 -0
  217. package/src/types/reminders.ts +88 -0
  218. package/src/types/rtm.ts +38 -0
  219. package/src/types/search.ts +32 -0
  220. package/src/types/stars.ts +72 -0
  221. package/src/types/team.ts +122 -0
  222. package/src/types/usergroups.ts +135 -0
  223. package/src/types/users.ts +221 -0
  224. package/src/types/views.ts +76 -0
  225. package/src/types/workflows.ts +61 -0
  226. package/README.md +0 -3
@@ -0,0 +1,910 @@
1
+ import { Internal } from './internal.ts'
2
+ import { Definitions } from './definition.ts'
3
+
4
+ Internal.define({
5
+ '/admin.apps.approve': {
6
+ POST: { 'adminAppsApprove': true },
7
+ },
8
+ '/admin.apps.approved.list': {
9
+ GET: { 'adminAppsApprovedList': false },
10
+ },
11
+ '/admin.apps.requests.list': {
12
+ GET: { 'adminAppsRequestsList': false },
13
+ },
14
+ '/admin.apps.restrict': {
15
+ POST: { 'adminAppsRestrict': true },
16
+ },
17
+ '/admin.apps.restricted.list': {
18
+ GET: { 'adminAppsRestrictedList': false },
19
+ },
20
+ '/admin.conversations.archive': {
21
+ POST: { 'adminConversationsArchive': true },
22
+ },
23
+ '/admin.conversations.convertToPrivate': {
24
+ POST: { 'adminConversationsConvertToPrivate': true },
25
+ },
26
+ '/admin.conversations.create': {
27
+ POST: { 'adminConversationsCreate': true },
28
+ },
29
+ '/admin.conversations.delete': {
30
+ POST: { 'adminConversationsDelete': true },
31
+ },
32
+ '/admin.conversations.disconnectShared': {
33
+ POST: { 'adminConversationsDisconnectShared': true },
34
+ },
35
+ '/admin.conversations.ekm.listOriginalConnectedChannelInfo': {
36
+ GET: { 'adminConversationsEkmListOriginalConnectedChannelInfo': false },
37
+ },
38
+ '/admin.conversations.getConversationPrefs': {
39
+ GET: { 'adminConversationsGetConversationPrefs': true },
40
+ },
41
+ '/admin.conversations.getTeams': {
42
+ GET: { 'adminConversationsGetTeams': true },
43
+ },
44
+ '/admin.conversations.invite': {
45
+ POST: { 'adminConversationsInvite': true },
46
+ },
47
+ '/admin.conversations.rename': {
48
+ POST: { 'adminConversationsRename': true },
49
+ },
50
+ '/admin.conversations.restrictAccess.addGroup': {
51
+ POST: { 'adminConversationsRestrictAccessAddGroup': false },
52
+ },
53
+ '/admin.conversations.restrictAccess.listGroups': {
54
+ GET: { 'adminConversationsRestrictAccessListGroups': false },
55
+ },
56
+ '/admin.conversations.restrictAccess.removeGroup': {
57
+ POST: { 'adminConversationsRestrictAccessRemoveGroup': false },
58
+ },
59
+ '/admin.conversations.search': {
60
+ GET: { 'adminConversationsSearch': true },
61
+ },
62
+ '/admin.conversations.setConversationPrefs': {
63
+ POST: { 'adminConversationsSetConversationPrefs': true },
64
+ },
65
+ '/admin.conversations.setTeams': {
66
+ POST: { 'adminConversationsSetTeams': true },
67
+ },
68
+ '/admin.conversations.unarchive': {
69
+ POST: { 'adminConversationsUnarchive': true },
70
+ },
71
+ '/admin.emoji.add': {
72
+ POST: { 'adminEmojiAdd': false },
73
+ },
74
+ '/admin.emoji.addAlias': {
75
+ POST: { 'adminEmojiAddAlias': false },
76
+ },
77
+ '/admin.emoji.list': {
78
+ GET: { 'adminEmojiList': false },
79
+ },
80
+ '/admin.emoji.remove': {
81
+ POST: { 'adminEmojiRemove': false },
82
+ },
83
+ '/admin.emoji.rename': {
84
+ POST: { 'adminEmojiRename': false },
85
+ },
86
+ '/admin.inviteRequests.approve': {
87
+ POST: { 'adminInviteRequestsApprove': true },
88
+ },
89
+ '/admin.inviteRequests.approved.list': {
90
+ GET: { 'adminInviteRequestsApprovedList': true },
91
+ },
92
+ '/admin.inviteRequests.denied.list': {
93
+ GET: { 'adminInviteRequestsDeniedList': true },
94
+ },
95
+ '/admin.inviteRequests.deny': {
96
+ POST: { 'adminInviteRequestsDeny': true },
97
+ },
98
+ '/admin.inviteRequests.list': {
99
+ GET: { 'adminInviteRequestsList': true },
100
+ },
101
+ '/admin.teams.admins.list': {
102
+ GET: { 'adminTeamsAdminsList': false },
103
+ },
104
+ '/admin.teams.create': {
105
+ POST: { 'adminTeamsCreate': true },
106
+ },
107
+ '/admin.teams.list': {
108
+ GET: { 'adminTeamsList': true },
109
+ },
110
+ '/admin.teams.owners.list': {
111
+ GET: { 'adminTeamsOwnersList': false },
112
+ },
113
+ '/admin.teams.settings.info': {
114
+ GET: { 'adminTeamsSettingsInfo': true },
115
+ },
116
+ '/admin.teams.settings.setDefaultChannels': {
117
+ POST: { 'adminTeamsSettingsSetDefaultChannels': false },
118
+ },
119
+ '/admin.teams.settings.setDescription': {
120
+ POST: { 'adminTeamsSettingsSetDescription': true },
121
+ },
122
+ '/admin.teams.settings.setDiscoverability': {
123
+ POST: { 'adminTeamsSettingsSetDiscoverability': true },
124
+ },
125
+ '/admin.teams.settings.setIcon': {
126
+ POST: { 'adminTeamsSettingsSetIcon': false },
127
+ },
128
+ '/admin.teams.settings.setName': {
129
+ POST: { 'adminTeamsSettingsSetName': true },
130
+ },
131
+ '/admin.usergroups.addChannels': {
132
+ POST: { 'adminUsergroupsAddChannels': true },
133
+ },
134
+ '/admin.usergroups.addTeams': {
135
+ POST: { 'adminUsergroupsAddTeams': true },
136
+ },
137
+ '/admin.usergroups.listChannels': {
138
+ GET: { 'adminUsergroupsListChannels': true },
139
+ },
140
+ '/admin.usergroups.removeChannels': {
141
+ POST: { 'adminUsergroupsRemoveChannels': true },
142
+ },
143
+ '/admin.users.assign': {
144
+ POST: { 'adminUsersAssign': true },
145
+ },
146
+ '/admin.users.invite': {
147
+ POST: { 'adminUsersInvite': true },
148
+ },
149
+ '/admin.users.list': {
150
+ GET: { 'adminUsersList': true },
151
+ },
152
+ '/admin.users.remove': {
153
+ POST: { 'adminUsersRemove': true },
154
+ },
155
+ '/admin.users.session.invalidate': {
156
+ POST: { 'adminUsersSessionInvalidate': true },
157
+ },
158
+ '/admin.users.session.reset': {
159
+ POST: { 'adminUsersSessionReset': true },
160
+ },
161
+ '/admin.users.setAdmin': {
162
+ POST: { 'adminUsersSetAdmin': true },
163
+ },
164
+ '/admin.users.setExpiration': {
165
+ POST: { 'adminUsersSetExpiration': true },
166
+ },
167
+ '/admin.users.setOwner': {
168
+ POST: { 'adminUsersSetOwner': true },
169
+ },
170
+ '/admin.users.setRegular': {
171
+ POST: { 'adminUsersSetRegular': true },
172
+ },
173
+ })
174
+
175
+ export namespace Admin {
176
+ export namespace Params {
177
+ export interface AppsApprove {
178
+ app_id?: string
179
+ request_id?: string
180
+ team_id?: string
181
+ }
182
+ export interface AppsApprovedList {
183
+ limit?: number
184
+ cursor?: string
185
+ team_id?: string
186
+ enterprise_id?: string
187
+ }
188
+ export interface AppsRequestsList {
189
+ limit?: number
190
+ cursor?: string
191
+ team_id?: string
192
+ }
193
+ export interface AppsRestrict {
194
+ app_id?: string
195
+ request_id?: string
196
+ team_id?: string
197
+ }
198
+ export interface AppsRestrictedList {
199
+ limit?: number
200
+ cursor?: string
201
+ team_id?: string
202
+ enterprise_id?: string
203
+ }
204
+ export interface ConversationsArchive {
205
+ channel_id: string
206
+ }
207
+ export interface ConversationsConvertToPrivate {
208
+ channel_id: string
209
+ }
210
+ export interface ConversationsCreate {
211
+ name: string
212
+ description?: string
213
+ is_private: boolean
214
+ org_wide?: boolean
215
+ team_id?: string
216
+ }
217
+ export interface ConversationsDelete {
218
+ channel_id: string
219
+ }
220
+ export interface ConversationsDisconnectShared {
221
+ channel_id: string
222
+ leaving_team_ids?: string
223
+ }
224
+ export interface ConversationsEkmListOriginalConnectedChannelInfo {
225
+ channel_ids?: string
226
+ team_ids?: string
227
+ limit?: number
228
+ cursor?: string
229
+ }
230
+ export interface ConversationsGetConversationPrefs {
231
+ channel_id: string
232
+ }
233
+ export interface ConversationsGetTeams {
234
+ channel_id: string
235
+ cursor?: string
236
+ limit?: number
237
+ }
238
+ export interface ConversationsInvite {
239
+ user_ids: string
240
+ channel_id: string
241
+ }
242
+ export interface ConversationsRename {
243
+ channel_id: string
244
+ name: string
245
+ }
246
+ export interface ConversationsRestrictAccessAddGroup {
247
+ team_id?: string
248
+ group_id: string
249
+ channel_id: string
250
+ }
251
+ export interface ConversationsRestrictAccessListGroups {
252
+ channel_id: string
253
+ team_id?: string
254
+ }
255
+ export interface ConversationsRestrictAccessRemoveGroup {
256
+ team_id: string
257
+ group_id: string
258
+ channel_id: string
259
+ }
260
+ export interface ConversationsSearch {
261
+ team_ids?: string
262
+ query?: string
263
+ limit?: number
264
+ cursor?: string
265
+ search_channel_types?: string
266
+ sort?: string
267
+ sort_dir?: string
268
+ }
269
+ export interface ConversationsSetConversationPrefs {
270
+ channel_id: string
271
+ prefs: string
272
+ }
273
+ export interface ConversationsSetTeams {
274
+ channel_id: string
275
+ team_id?: string
276
+ target_team_ids?: string
277
+ org_channel?: boolean
278
+ }
279
+ export interface ConversationsUnarchive {
280
+ channel_id: string
281
+ }
282
+ export interface EmojiAdd {
283
+ name: string
284
+ url: string
285
+ }
286
+ export interface EmojiAddAlias {
287
+ name: string
288
+ alias_for: string
289
+ }
290
+ export interface EmojiList {
291
+ cursor?: string
292
+ limit?: number
293
+ }
294
+ export interface EmojiRemove {
295
+ name: string
296
+ }
297
+ export interface EmojiRename {
298
+ name: string
299
+ new_name: string
300
+ }
301
+ export interface InviteRequestsApprove {
302
+ team_id?: string
303
+ invite_request_id: string
304
+ }
305
+ export interface InviteRequestsApprovedList {
306
+ team_id?: string
307
+ cursor?: string
308
+ limit?: number
309
+ }
310
+ export interface InviteRequestsDeniedList {
311
+ team_id?: string
312
+ cursor?: string
313
+ limit?: number
314
+ }
315
+ export interface InviteRequestsDeny {
316
+ team_id?: string
317
+ invite_request_id: string
318
+ }
319
+ export interface InviteRequestsList {
320
+ team_id?: string
321
+ cursor?: string
322
+ limit?: number
323
+ }
324
+ export interface TeamsAdminsList {
325
+ limit?: number
326
+ cursor?: string
327
+ team_id: string
328
+ }
329
+ export interface TeamsCreate {
330
+ team_domain: string
331
+ team_name: string
332
+ team_description?: string
333
+ team_discoverability?: string
334
+ }
335
+ export interface TeamsList {
336
+ limit?: number
337
+ cursor?: string
338
+ }
339
+ export interface TeamsOwnersList {
340
+ team_id: string
341
+ limit?: number
342
+ cursor?: string
343
+ }
344
+ export interface TeamsSettingsInfo {
345
+ team_id: string
346
+ }
347
+ export interface TeamsSettingsSetDefaultChannels {
348
+ team_id: string
349
+ channel_ids: string
350
+ }
351
+ export interface TeamsSettingsSetDescription {
352
+ team_id: string
353
+ description: string
354
+ }
355
+ export interface TeamsSettingsSetDiscoverability {
356
+ team_id: string
357
+ discoverability: string
358
+ }
359
+ export interface TeamsSettingsSetIcon {
360
+ image_url: string
361
+ team_id: string
362
+ }
363
+ export interface TeamsSettingsSetName {
364
+ team_id: string
365
+ name: string
366
+ }
367
+ export interface UsergroupsAddChannels {
368
+ usergroup_id: string
369
+ team_id?: string
370
+ channel_ids: string
371
+ }
372
+ export interface UsergroupsAddTeams {
373
+ usergroup_id: string
374
+ team_ids: string
375
+ auto_provision?: boolean
376
+ }
377
+ export interface UsergroupsListChannels {
378
+ usergroup_id: string
379
+ team_id?: string
380
+ include_num_members?: boolean
381
+ }
382
+ export interface UsergroupsRemoveChannels {
383
+ usergroup_id: string
384
+ channel_ids: string
385
+ }
386
+ export interface UsersAssign {
387
+ team_id: string
388
+ user_id: string
389
+ is_restricted?: boolean
390
+ is_ultra_restricted?: boolean
391
+ channel_ids?: string
392
+ }
393
+ export interface UsersInvite {
394
+ team_id: string
395
+ email: string
396
+ channel_ids: string
397
+ custom_message?: string
398
+ real_name?: string
399
+ resend?: boolean
400
+ is_restricted?: boolean
401
+ is_ultra_restricted?: boolean
402
+ guest_expiration_ts?: string
403
+ }
404
+ export interface UsersList {
405
+ team_id: string
406
+ cursor?: string
407
+ limit?: number
408
+ }
409
+ export interface UsersRemove {
410
+ team_id: string
411
+ user_id: string
412
+ }
413
+ export interface UsersSessionInvalidate {
414
+ team_id: string
415
+ session_id: number
416
+ }
417
+ export interface UsersSessionReset {
418
+ user_id: string
419
+ mobile_only?: boolean
420
+ web_only?: boolean
421
+ }
422
+ export interface UsersSetAdmin {
423
+ team_id: string
424
+ user_id: string
425
+ }
426
+ export interface UsersSetExpiration {
427
+ team_id: string
428
+ user_id: string
429
+ expiration_ts: number
430
+ }
431
+ export interface UsersSetOwner {
432
+ team_id: string
433
+ user_id: string
434
+ }
435
+ export interface UsersSetRegular {
436
+ team_id: string
437
+ user_id: string
438
+ }
439
+ }
440
+ }
441
+
442
+ declare module './internal' {
443
+ interface Internal {
444
+ /**
445
+ * Approve an app for installation on a workspace.
446
+ * @see https://api.slack.com/methods/admin.apps.approve
447
+ */
448
+ adminAppsApprove(token: TokenInput, params: Admin.Params.AppsApprove): Promise<{
449
+ ok: boolean
450
+ }>
451
+
452
+ /**
453
+ * List approved apps for an org or workspace.
454
+ * @see https://api.slack.com/methods/admin.apps.approved.list
455
+ */
456
+ adminAppsApprovedList(token: TokenInput, params: Admin.Params.AppsApprovedList): Promise<{
457
+ ok: boolean
458
+ }>
459
+
460
+ /**
461
+ * List app requests for a team/workspace.
462
+ * @see https://api.slack.com/methods/admin.apps.requests.list
463
+ */
464
+ adminAppsRequestsList(token: TokenInput, params: Admin.Params.AppsRequestsList): Promise<{
465
+ ok: boolean
466
+ }>
467
+
468
+ /**
469
+ * Restrict an app for installation on a workspace.
470
+ * @see https://api.slack.com/methods/admin.apps.restrict
471
+ */
472
+ adminAppsRestrict(token: TokenInput, params: Admin.Params.AppsRestrict): Promise<{
473
+ ok: boolean
474
+ }>
475
+
476
+ /**
477
+ * List restricted apps for an org or workspace.
478
+ * @see https://api.slack.com/methods/admin.apps.restricted.list
479
+ */
480
+ adminAppsRestrictedList(token: TokenInput, params: Admin.Params.AppsRestrictedList): Promise<{
481
+ ok: boolean
482
+ }>
483
+
484
+ /**
485
+ * Archive a public or private channel.
486
+ * @see https://api.slack.com/methods/admin.conversations.archive
487
+ */
488
+ adminConversationsArchive(token: TokenInput, params: Admin.Params.ConversationsArchive): Promise<{
489
+ ok: boolean
490
+ }>
491
+
492
+ /**
493
+ * Convert a public channel to a private channel.
494
+ * @see https://api.slack.com/methods/admin.conversations.convertToPrivate
495
+ */
496
+ adminConversationsConvertToPrivate(token: TokenInput, params: Admin.Params.ConversationsConvertToPrivate): Promise<{
497
+ ok: boolean
498
+ }>
499
+
500
+ /**
501
+ * Create a public or private channel-based conversation.
502
+ * @see https://api.slack.com/methods/admin.conversations.create
503
+ */
504
+ adminConversationsCreate(token: TokenInput, params: Admin.Params.ConversationsCreate): Promise<{
505
+ channel_id?: string
506
+ ok: boolean
507
+ }>
508
+
509
+ /**
510
+ * Delete a public or private channel.
511
+ * @see https://api.slack.com/methods/admin.conversations.delete
512
+ */
513
+ adminConversationsDelete(token: TokenInput, params: Admin.Params.ConversationsDelete): Promise<{
514
+ ok: boolean
515
+ }>
516
+
517
+ /**
518
+ * Disconnect a connected channel from one or more workspaces.
519
+ * @see https://api.slack.com/methods/admin.conversations.disconnectShared
520
+ */
521
+ adminConversationsDisconnectShared(token: TokenInput, params: Admin.Params.ConversationsDisconnectShared): Promise<{
522
+ ok: boolean
523
+ }>
524
+
525
+ /**
526
+ * List all disconnected channels
527
+ * — i.e., channels that were once connected to other workspaces and then disconnected
528
+ * — and the corresponding original channel IDs for key revocation with EKM.
529
+ * @see https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo
530
+ */
531
+ adminConversationsEkmListOriginalConnectedChannelInfo(token: TokenInput, params: Admin.Params.ConversationsEkmListOriginalConnectedChannelInfo): Promise<{
532
+ ok: boolean
533
+ }>
534
+
535
+ /**
536
+ * Get conversation preferences for a public or private channel.
537
+ * @see https://api.slack.com/methods/admin.conversations.getConversationPrefs
538
+ */
539
+ adminConversationsGetConversationPrefs(token: TokenInput, params: Admin.Params.ConversationsGetConversationPrefs): Promise<{
540
+ ok: boolean
541
+ prefs?: {
542
+ can_thread: {
543
+ type: string[]
544
+ user: string[]
545
+ }
546
+ who_can_post: {
547
+ type: string[]
548
+ user: string[]
549
+ }
550
+ }
551
+ }>
552
+
553
+ /**
554
+ * Get all the workspaces a given public or private channel is connected to within this Enterprise org.
555
+ * @see https://api.slack.com/methods/admin.conversations.getTeams
556
+ */
557
+ adminConversationsGetTeams(token: TokenInput, params: Admin.Params.ConversationsGetTeams): Promise<{
558
+ ok: boolean
559
+ response_metadata?: {
560
+ next_cursor: string
561
+ }
562
+ team_ids: string[]
563
+ }>
564
+
565
+ /**
566
+ * Invite a user to a public or private channel.
567
+ * @see https://api.slack.com/methods/admin.conversations.invite
568
+ */
569
+ adminConversationsInvite(token: TokenInput, params: Admin.Params.ConversationsInvite): Promise<{
570
+ ok: boolean
571
+ }>
572
+
573
+ /**
574
+ * Rename a public or private channel.
575
+ * @see https://api.slack.com/methods/admin.conversations.rename
576
+ */
577
+ adminConversationsRename(token: TokenInput, params: Admin.Params.ConversationsRename): Promise<{
578
+ ok: boolean
579
+ }>
580
+
581
+ /**
582
+ * Add an allowlist of IDP groups for accessing a channel
583
+ * @see https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup
584
+ */
585
+ adminConversationsRestrictAccessAddGroup(token: TokenInput, params: Admin.Params.ConversationsRestrictAccessAddGroup): Promise<{
586
+ ok: boolean
587
+ }>
588
+
589
+ /**
590
+ * List all IDP Groups linked to a channel
591
+ * @see https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups
592
+ */
593
+ adminConversationsRestrictAccessListGroups(token: TokenInput, params: Admin.Params.ConversationsRestrictAccessListGroups): Promise<{
594
+ ok: boolean
595
+ }>
596
+
597
+ /**
598
+ * Remove a linked IDP group linked from a private channel
599
+ * @see https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup
600
+ */
601
+ adminConversationsRestrictAccessRemoveGroup(token: TokenInput, params: Admin.Params.ConversationsRestrictAccessRemoveGroup): Promise<{
602
+ ok: boolean
603
+ }>
604
+
605
+ /**
606
+ * Search for public or private channels in an Enterprise organization.
607
+ * @see https://api.slack.com/methods/admin.conversations.search
608
+ */
609
+ adminConversationsSearch(token: TokenInput, params: Admin.Params.ConversationsSearch): Promise<{
610
+ channels: Definitions.Channel[]
611
+ next_cursor: string
612
+ }>
613
+
614
+ /**
615
+ * Set the posting permissions for a public or private channel.
616
+ * @see https://api.slack.com/methods/admin.conversations.setConversationPrefs
617
+ */
618
+ adminConversationsSetConversationPrefs(token: TokenInput, params: Admin.Params.ConversationsSetConversationPrefs): Promise<{
619
+ ok: boolean
620
+ }>
621
+
622
+ /**
623
+ * Set the workspaces in an Enterprise grid org that connect to a public or private channel.
624
+ * @see https://api.slack.com/methods/admin.conversations.setTeams
625
+ */
626
+ adminConversationsSetTeams(token: TokenInput, params: Admin.Params.ConversationsSetTeams): Promise<{
627
+ ok: boolean
628
+ }>
629
+
630
+ /**
631
+ * Unarchive a public or private channel.
632
+ * @see https://api.slack.com/methods/admin.conversations.unarchive
633
+ */
634
+ adminConversationsUnarchive(token: TokenInput, params: Admin.Params.ConversationsUnarchive): Promise<{
635
+ ok: boolean
636
+ }>
637
+
638
+ /**
639
+ * Add an emoji.
640
+ * @see https://api.slack.com/methods/admin.emoji.add
641
+ */
642
+ adminEmojiAdd(token: TokenInput, params: Admin.Params.EmojiAdd): Promise<{
643
+ ok: boolean
644
+ }>
645
+
646
+ /**
647
+ * Add an emoji alias.
648
+ * @see https://api.slack.com/methods/admin.emoji.addAlias
649
+ */
650
+ adminEmojiAddAlias(token: TokenInput, params: Admin.Params.EmojiAddAlias): Promise<{
651
+ ok: boolean
652
+ }>
653
+
654
+ /**
655
+ * List emoji for an Enterprise Grid organization.
656
+ * @see https://api.slack.com/methods/admin.emoji.list
657
+ */
658
+ adminEmojiList(token: TokenInput, params: Admin.Params.EmojiList): Promise<{
659
+ ok: boolean
660
+ }>
661
+
662
+ /**
663
+ * Remove an emoji across an Enterprise Grid organization
664
+ * @see https://api.slack.com/methods/admin.emoji.remove
665
+ */
666
+ adminEmojiRemove(token: TokenInput, params: Admin.Params.EmojiRemove): Promise<{
667
+ ok: boolean
668
+ }>
669
+
670
+ /**
671
+ * Rename an emoji.
672
+ * @see https://api.slack.com/methods/admin.emoji.rename
673
+ */
674
+ adminEmojiRename(token: TokenInput, params: Admin.Params.EmojiRename): Promise<{
675
+ ok: boolean
676
+ }>
677
+
678
+ /**
679
+ * Approve a workspace invite request.
680
+ * @see https://api.slack.com/methods/admin.inviteRequests.approve
681
+ */
682
+ adminInviteRequestsApprove(token: TokenInput, params: Admin.Params.InviteRequestsApprove): Promise<{
683
+ ok: boolean
684
+ }>
685
+
686
+ /**
687
+ * List all approved workspace invite requests.
688
+ * @see https://api.slack.com/methods/admin.inviteRequests.approved.list
689
+ */
690
+ adminInviteRequestsApprovedList(token: TokenInput, params: Admin.Params.InviteRequestsApprovedList): Promise<{
691
+ ok: boolean
692
+ }>
693
+
694
+ /**
695
+ * List all denied workspace invite requests.
696
+ * @see https://api.slack.com/methods/admin.inviteRequests.denied.list
697
+ */
698
+ adminInviteRequestsDeniedList(token: TokenInput, params: Admin.Params.InviteRequestsDeniedList): Promise<{
699
+ ok: boolean
700
+ }>
701
+
702
+ /**
703
+ * Deny a workspace invite request.
704
+ * @see https://api.slack.com/methods/admin.inviteRequests.deny
705
+ */
706
+ adminInviteRequestsDeny(token: TokenInput, params: Admin.Params.InviteRequestsDeny): Promise<{
707
+ ok: boolean
708
+ }>
709
+
710
+ /**
711
+ * List all pending workspace invite requests.
712
+ * @see https://api.slack.com/methods/admin.inviteRequests.list
713
+ */
714
+ adminInviteRequestsList(token: TokenInput, params: Admin.Params.InviteRequestsList): Promise<{
715
+ ok: boolean
716
+ }>
717
+
718
+ /**
719
+ * List all of the admins on a given workspace.
720
+ * @see https://api.slack.com/methods/admin.teams.admins.list
721
+ */
722
+ adminTeamsAdminsList(token: TokenInput, params: Admin.Params.TeamsAdminsList): Promise<{
723
+ ok: boolean
724
+ }>
725
+
726
+ /**
727
+ * Create an Enterprise team.
728
+ * @see https://api.slack.com/methods/admin.teams.create
729
+ */
730
+ adminTeamsCreate(token: TokenInput, params: Admin.Params.TeamsCreate): Promise<{
731
+ ok: boolean
732
+ }>
733
+
734
+ /**
735
+ * List all teams on an Enterprise organization
736
+ * @see https://api.slack.com/methods/admin.teams.list
737
+ */
738
+ adminTeamsList(token: TokenInput, params: Admin.Params.TeamsList): Promise<{
739
+ ok: boolean
740
+ }>
741
+
742
+ /**
743
+ * List all of the owners on a given workspace.
744
+ * @see https://api.slack.com/methods/admin.teams.owners.list
745
+ */
746
+ adminTeamsOwnersList(token: TokenInput, params: Admin.Params.TeamsOwnersList): Promise<{
747
+ ok: boolean
748
+ }>
749
+
750
+ /**
751
+ * Fetch information about settings in a workspace
752
+ * @see https://api.slack.com/methods/admin.teams.settings.info
753
+ */
754
+ adminTeamsSettingsInfo(token: TokenInput, params: Admin.Params.TeamsSettingsInfo): Promise<{
755
+ ok: boolean
756
+ }>
757
+
758
+ /**
759
+ * Set the default channels of a workspace.
760
+ * @see https://api.slack.com/methods/admin.teams.settings.setDefaultChannels
761
+ */
762
+ adminTeamsSettingsSetDefaultChannels(token: TokenInput, params: Admin.Params.TeamsSettingsSetDefaultChannels): Promise<{
763
+ ok: boolean
764
+ }>
765
+
766
+ /**
767
+ * Set the description of a given workspace.
768
+ * @see https://api.slack.com/methods/admin.teams.settings.setDescription
769
+ */
770
+ adminTeamsSettingsSetDescription(token: TokenInput, params: Admin.Params.TeamsSettingsSetDescription): Promise<{
771
+ ok: boolean
772
+ }>
773
+
774
+ /**
775
+ * An API method that allows admins to set the discoverability of a given workspace
776
+ * @see https://api.slack.com/methods/admin.teams.settings.setDiscoverability
777
+ */
778
+ adminTeamsSettingsSetDiscoverability(token: TokenInput, params: Admin.Params.TeamsSettingsSetDiscoverability): Promise<{
779
+ ok: boolean
780
+ }>
781
+
782
+ /**
783
+ * Sets the icon of a workspace.
784
+ * @see https://api.slack.com/methods/admin.teams.settings.setIcon
785
+ */
786
+ adminTeamsSettingsSetIcon(token: TokenInput, params: Admin.Params.TeamsSettingsSetIcon): Promise<{
787
+ ok: boolean
788
+ }>
789
+
790
+ /**
791
+ * Set the name of a given workspace.
792
+ * @see https://api.slack.com/methods/admin.teams.settings.setName
793
+ */
794
+ adminTeamsSettingsSetName(token: TokenInput, params: Admin.Params.TeamsSettingsSetName): Promise<{
795
+ ok: boolean
796
+ }>
797
+
798
+ /**
799
+ * Add one or more default channels to an IDP group.
800
+ * @see https://api.slack.com/methods/admin.usergroups.addChannels
801
+ */
802
+ adminUsergroupsAddChannels(token: TokenInput, params: Admin.Params.UsergroupsAddChannels): Promise<{
803
+ ok: boolean
804
+ }>
805
+
806
+ /**
807
+ * Associate one or more default workspaces with an organization-wide IDP group.
808
+ * @see https://api.slack.com/methods/admin.usergroups.addTeams
809
+ */
810
+ adminUsergroupsAddTeams(token: TokenInput, params: Admin.Params.UsergroupsAddTeams): Promise<{
811
+ ok: boolean
812
+ }>
813
+
814
+ /**
815
+ * List the channels linked to an org-level IDP group (user group).
816
+ * @see https://api.slack.com/methods/admin.usergroups.listChannels
817
+ */
818
+ adminUsergroupsListChannels(token: TokenInput, params: Admin.Params.UsergroupsListChannels): Promise<{
819
+ ok: boolean
820
+ }>
821
+
822
+ /**
823
+ * Remove one or more default channels from an org-level IDP group (user group).
824
+ * @see https://api.slack.com/methods/admin.usergroups.removeChannels
825
+ */
826
+ adminUsergroupsRemoveChannels(token: TokenInput, params: Admin.Params.UsergroupsRemoveChannels): Promise<{
827
+ ok: boolean
828
+ }>
829
+
830
+ /**
831
+ * Add an Enterprise user to a workspace.
832
+ * @see https://api.slack.com/methods/admin.users.assign
833
+ */
834
+ adminUsersAssign(token: TokenInput, params: Admin.Params.UsersAssign): Promise<{
835
+ ok: boolean
836
+ }>
837
+
838
+ /**
839
+ * Invite a user to a workspace.
840
+ * @see https://api.slack.com/methods/admin.users.invite
841
+ */
842
+ adminUsersInvite(token: TokenInput, params: Admin.Params.UsersInvite): Promise<{
843
+ ok: boolean
844
+ }>
845
+
846
+ /**
847
+ * List users on a workspace
848
+ * @see https://api.slack.com/methods/admin.users.list
849
+ */
850
+ adminUsersList(token: TokenInput, params: Admin.Params.UsersList): Promise<{
851
+ ok: boolean
852
+ }>
853
+
854
+ /**
855
+ * Remove a user from a workspace.
856
+ * @see https://api.slack.com/methods/admin.users.remove
857
+ */
858
+ adminUsersRemove(token: TokenInput, params: Admin.Params.UsersRemove): Promise<{
859
+ ok: boolean
860
+ }>
861
+
862
+ /**
863
+ * Invalidate a single session for a user by session_id
864
+ * @see https://api.slack.com/methods/admin.users.session.invalidate
865
+ */
866
+ adminUsersSessionInvalidate(token: TokenInput, params: Admin.Params.UsersSessionInvalidate): Promise<{
867
+ ok: boolean
868
+ }>
869
+
870
+ /**
871
+ * Wipes all valid sessions on all devices for a given user
872
+ * @see https://api.slack.com/methods/admin.users.session.reset
873
+ */
874
+ adminUsersSessionReset(token: TokenInput, params: Admin.Params.UsersSessionReset): Promise<{
875
+ ok: boolean
876
+ }>
877
+
878
+ /**
879
+ * Set an existing guest, regular user, or owner to be an admin user.
880
+ * @see https://api.slack.com/methods/admin.users.setAdmin
881
+ */
882
+ adminUsersSetAdmin(token: TokenInput, params: Admin.Params.UsersSetAdmin): Promise<{
883
+ ok: boolean
884
+ }>
885
+
886
+ /**
887
+ * Set an expiration for a guest user
888
+ * @see https://api.slack.com/methods/admin.users.setExpiration
889
+ */
890
+ adminUsersSetExpiration(token: TokenInput, params: Admin.Params.UsersSetExpiration): Promise<{
891
+ ok: boolean
892
+ }>
893
+
894
+ /**
895
+ * Set an existing guest, regular user, or admin user to be a workspace owner.
896
+ * @see https://api.slack.com/methods/admin.users.setOwner
897
+ */
898
+ adminUsersSetOwner(token: TokenInput, params: Admin.Params.UsersSetOwner): Promise<{
899
+ ok: boolean
900
+ }>
901
+
902
+ /**
903
+ * Set an existing guest user, admin user, or owner to be a regular user.
904
+ * @see https://api.slack.com/methods/admin.users.setRegular
905
+ */
906
+ adminUsersSetRegular(token: TokenInput, params: Admin.Params.UsersSetRegular): Promise<{
907
+ ok: boolean
908
+ }>
909
+ }
910
+ }