@distilled.cloud/slack 0.0.0 → 1.0.0-rc.11

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 (212) hide show
  1. package/LICENSE +201 -0
  2. package/lib/credentials.d.ts +27 -0
  3. package/lib/credentials.d.ts.map +1 -0
  4. package/lib/credentials.js +53 -0
  5. package/lib/credentials.js.map +1 -0
  6. package/lib/errors.d.ts +83 -0
  7. package/lib/errors.d.ts.map +1 -0
  8. package/lib/errors.js +59 -0
  9. package/lib/errors.js.map +1 -0
  10. package/lib/index.d.ts +17 -0
  11. package/lib/index.d.ts.map +1 -0
  12. package/lib/index.js +17 -0
  13. package/lib/index.js.map +1 -0
  14. package/lib/pagination.d.ts +31 -0
  15. package/lib/pagination.d.ts.map +1 -0
  16. package/lib/pagination.js +31 -0
  17. package/lib/pagination.js.map +1 -0
  18. package/lib/protocol.d.ts +18 -0
  19. package/lib/protocol.d.ts.map +1 -0
  20. package/lib/protocol.js +230 -0
  21. package/lib/protocol.js.map +1 -0
  22. package/lib/retry.d.ts +52 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +45 -0
  25. package/lib/retry.js.map +1 -0
  26. package/lib/services/admin.d.ts +2796 -0
  27. package/lib/services/admin.d.ts.map +1 -0
  28. package/lib/services/admin.js +3217 -0
  29. package/lib/services/admin.js.map +1 -0
  30. package/lib/services/api.d.ts +23 -0
  31. package/lib/services/api.d.ts.map +1 -0
  32. package/lib/services/api.js +26 -0
  33. package/lib/services/api.js.map +1 -0
  34. package/lib/services/apps.d.ts +568 -0
  35. package/lib/services/apps.d.ts.map +1 -0
  36. package/lib/services/apps.js +584 -0
  37. package/lib/services/apps.js.map +1 -0
  38. package/lib/services/assistant.d.ts +290 -0
  39. package/lib/services/assistant.d.ts.map +1 -0
  40. package/lib/services/assistant.js +232 -0
  41. package/lib/services/assistant.js.map +1 -0
  42. package/lib/services/auth.d.ts +90 -0
  43. package/lib/services/auth.d.ts.map +1 -0
  44. package/lib/services/auth.js +114 -0
  45. package/lib/services/auth.js.map +1 -0
  46. package/lib/services/blocks.d.ts +31 -0
  47. package/lib/services/blocks.d.ts.map +1 -0
  48. package/lib/services/blocks.js +31 -0
  49. package/lib/services/blocks.js.map +1 -0
  50. package/lib/services/bookmarks.d.ts +91 -0
  51. package/lib/services/bookmarks.d.ts.map +1 -0
  52. package/lib/services/bookmarks.js +98 -0
  53. package/lib/services/bookmarks.js.map +1 -0
  54. package/lib/services/bots.d.ts +60 -0
  55. package/lib/services/bots.d.ts.map +1 -0
  56. package/lib/services/bots.js +68 -0
  57. package/lib/services/bots.js.map +1 -0
  58. package/lib/services/calls.d.ts +124 -0
  59. package/lib/services/calls.d.ts.map +1 -0
  60. package/lib/services/calls.js +136 -0
  61. package/lib/services/calls.js.map +1 -0
  62. package/lib/services/canvases.d.ts +152 -0
  63. package/lib/services/canvases.d.ts.map +1 -0
  64. package/lib/services/canvases.js +152 -0
  65. package/lib/services/canvases.js.map +1 -0
  66. package/lib/services/chat.d.ts +525 -0
  67. package/lib/services/chat.d.ts.map +1 -0
  68. package/lib/services/chat.js +436 -0
  69. package/lib/services/chat.js.map +1 -0
  70. package/lib/services/conversations.d.ts +642 -0
  71. package/lib/services/conversations.d.ts.map +1 -0
  72. package/lib/services/conversations.js +769 -0
  73. package/lib/services/conversations.js.map +1 -0
  74. package/lib/services/dialog.d.ts +20 -0
  75. package/lib/services/dialog.d.ts.map +1 -0
  76. package/lib/services/dialog.js +27 -0
  77. package/lib/services/dialog.js.map +1 -0
  78. package/lib/services/dnd.d.ts +94 -0
  79. package/lib/services/dnd.d.ts.map +1 -0
  80. package/lib/services/dnd.js +111 -0
  81. package/lib/services/dnd.js.map +1 -0
  82. package/lib/services/emoji.d.ts +35 -0
  83. package/lib/services/emoji.d.ts.map +1 -0
  84. package/lib/services/emoji.js +40 -0
  85. package/lib/services/emoji.js.map +1 -0
  86. package/lib/services/entity.d.ts +93 -0
  87. package/lib/services/entity.d.ts.map +1 -0
  88. package/lib/services/entity.js +89 -0
  89. package/lib/services/entity.js.map +1 -0
  90. package/lib/services/files.d.ts +473 -0
  91. package/lib/services/files.d.ts.map +1 -0
  92. package/lib/services/files.js +510 -0
  93. package/lib/services/files.js.map +1 -0
  94. package/lib/services/functions.d.ts +235 -0
  95. package/lib/services/functions.d.ts.map +1 -0
  96. package/lib/services/functions.js +256 -0
  97. package/lib/services/functions.js.map +1 -0
  98. package/lib/services/index.d.ts +35 -0
  99. package/lib/services/index.d.ts.map +1 -0
  100. package/lib/services/index.js +36 -0
  101. package/lib/services/index.js.map +1 -0
  102. package/lib/services/lists.d.ts +300 -0
  103. package/lib/services/lists.d.ts.map +1 -0
  104. package/lib/services/lists.js +366 -0
  105. package/lib/services/lists.js.map +1 -0
  106. package/lib/services/migration.d.ts +34 -0
  107. package/lib/services/migration.d.ts.map +1 -0
  108. package/lib/services/migration.js +36 -0
  109. package/lib/services/migration.js.map +1 -0
  110. package/lib/services/oauth.d.ts +307 -0
  111. package/lib/services/oauth.d.ts.map +1 -0
  112. package/lib/services/oauth.js +278 -0
  113. package/lib/services/oauth.js.map +1 -0
  114. package/lib/services/openid.d.ts +86 -0
  115. package/lib/services/openid.d.ts.map +1 -0
  116. package/lib/services/openid.js +93 -0
  117. package/lib/services/openid.js.map +1 -0
  118. package/lib/services/pins.d.ts +64 -0
  119. package/lib/services/pins.d.ts.map +1 -0
  120. package/lib/services/pins.js +75 -0
  121. package/lib/services/pins.js.map +1 -0
  122. package/lib/services/reactions.d.ts +108 -0
  123. package/lib/services/reactions.d.ts.map +1 -0
  124. package/lib/services/reactions.js +119 -0
  125. package/lib/services/reactions.js.map +1 -0
  126. package/lib/services/reminders.d.ts +89 -0
  127. package/lib/services/reminders.d.ts.map +1 -0
  128. package/lib/services/reminders.js +109 -0
  129. package/lib/services/reminders.js.map +1 -0
  130. package/lib/services/rtm.d.ts +68 -0
  131. package/lib/services/rtm.d.ts.map +1 -0
  132. package/lib/services/rtm.js +74 -0
  133. package/lib/services/rtm.js.map +1 -0
  134. package/lib/services/search.d.ts +239 -0
  135. package/lib/services/search.d.ts.map +1 -0
  136. package/lib/services/search.js +190 -0
  137. package/lib/services/search.js.map +1 -0
  138. package/lib/services/stars.d.ts +126 -0
  139. package/lib/services/stars.d.ts.map +1 -0
  140. package/lib/services/stars.js +145 -0
  141. package/lib/services/stars.js.map +1 -0
  142. package/lib/services/team.d.ts +309 -0
  143. package/lib/services/team.d.ts.map +1 -0
  144. package/lib/services/team.js +333 -0
  145. package/lib/services/team.js.map +1 -0
  146. package/lib/services/tooling.d.ts +31 -0
  147. package/lib/services/tooling.d.ts.map +1 -0
  148. package/lib/services/tooling.js +38 -0
  149. package/lib/services/tooling.js.map +1 -0
  150. package/lib/services/usergroups.d.ts +183 -0
  151. package/lib/services/usergroups.d.ts.map +1 -0
  152. package/lib/services/usergroups.js +180 -0
  153. package/lib/services/usergroups.js.map +1 -0
  154. package/lib/services/users.d.ts +246 -0
  155. package/lib/services/users.d.ts.map +1 -0
  156. package/lib/services/users.js +309 -0
  157. package/lib/services/users.js.map +1 -0
  158. package/lib/services/views.d.ts +84 -0
  159. package/lib/services/views.d.ts.map +1 -0
  160. package/lib/services/views.js +95 -0
  161. package/lib/services/views.js.map +1 -0
  162. package/lib/services/workflows.d.ts +231 -0
  163. package/lib/services/workflows.d.ts.map +1 -0
  164. package/lib/services/workflows.js +238 -0
  165. package/lib/services/workflows.js.map +1 -0
  166. package/lib/traits.d.ts +11 -0
  167. package/lib/traits.d.ts.map +1 -0
  168. package/lib/traits.js +12 -0
  169. package/lib/traits.js.map +1 -0
  170. package/package.json +82 -4
  171. package/src/credentials.ts +86 -0
  172. package/src/errors.ts +101 -0
  173. package/src/index.ts +20 -0
  174. package/src/pagination.ts +35 -0
  175. package/src/protocol.ts +326 -0
  176. package/src/retry.ts +76 -0
  177. package/src/services/admin.ts +7722 -0
  178. package/src/services/api.ts +58 -0
  179. package/src/services/apps.ts +1441 -0
  180. package/src/services/assistant.ts +639 -0
  181. package/src/services/auth.ts +241 -0
  182. package/src/services/blocks.ts +80 -0
  183. package/src/services/bookmarks.ts +223 -0
  184. package/src/services/bots.ts +144 -0
  185. package/src/services/calls.ts +318 -0
  186. package/src/services/canvases.ts +392 -0
  187. package/src/services/chat.ts +1191 -0
  188. package/src/services/conversations.ts +1754 -0
  189. package/src/services/dialog.ts +55 -0
  190. package/src/services/dnd.ts +246 -0
  191. package/src/services/emoji.ts +91 -0
  192. package/src/services/entity.ts +225 -0
  193. package/src/services/files.ts +1192 -0
  194. package/src/services/functions.ts +642 -0
  195. package/src/services/index.ts +35 -0
  196. package/src/services/lists.ts +832 -0
  197. package/src/services/migration.ts +85 -0
  198. package/src/services/oauth.ts +658 -0
  199. package/src/services/openid.ts +243 -0
  200. package/src/services/pins.ts +167 -0
  201. package/src/services/reactions.ts +272 -0
  202. package/src/services/reminders.ts +240 -0
  203. package/src/services/rtm.ts +162 -0
  204. package/src/services/search.ts +507 -0
  205. package/src/services/stars.ts +323 -0
  206. package/src/services/team.ts +834 -0
  207. package/src/services/tooling.ts +78 -0
  208. package/src/services/usergroups.ts +441 -0
  209. package/src/services/users.ts +685 -0
  210. package/src/services/views.ts +212 -0
  211. package/src/services/workflows.ts +605 -0
  212. package/src/traits.ts +45 -0
@@ -0,0 +1,1754 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ SlackProtocol,
7
+ type SlackOpError,
8
+ type SlackOpContext,
9
+ } from "../protocol.ts";
10
+ import { slackPaginate } from "../pagination.ts";
11
+ import { SlackError, SlackRateLimited } from "../errors.ts";
12
+ import * as Retry from "../retry.ts";
13
+
14
+ export type { SlackOpError, SlackOpContext };
15
+
16
+ export interface AcceptSharedInviteRequest {
17
+ /** Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take. */
18
+ channel_name: string;
19
+ /** Whether the channel should be private. */
20
+ is_private?: boolean;
21
+ /** Whether you'd like to use your workspace's free trial to begin using Slack Connect. */
22
+ free_trial_accepted?: boolean;
23
+ /** ID of the invite that you’d like to accept. Must provide either `invite_id` or `channel_id`. See the [`shared_channel_invite_received`](/reference/events/shared_channel_invite_received) event payload for more details on how to retrieve the ID of the invitation. */
24
+ invite_id?: string;
25
+ /** ID of the channel that you'd like to accept. Must provide either `invite_id` or `channel_id`. */
26
+ channel_id?: string;
27
+ /** The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the `team_id` argument is required. */
28
+ team_id?: string;
29
+ }
30
+ export const AcceptSharedInviteRequest = /*@__PURE__*/ S.suspend(() =>
31
+ S.Struct({
32
+ channel_name: S.String,
33
+ is_private: S.optional(S.Boolean),
34
+ free_trial_accepted: S.optional(S.Boolean),
35
+ invite_id: S.optional(S.String),
36
+ channel_id: S.optional(S.String),
37
+ team_id: S.optional(S.String),
38
+ }).pipe(
39
+ T.Http({
40
+ method: "POST",
41
+ uri: "/conversations.acceptSharedInvite",
42
+ code: 200,
43
+ }),
44
+ ),
45
+ ).annotate({
46
+ identifier: "AcceptSharedInviteRequest",
47
+ }) as any as S.Schema<AcceptSharedInviteRequest>;
48
+
49
+ export interface AcceptSharedInviteResponse {
50
+ /** Always `true` (a failed call raises a typed error instead). */
51
+ ok: boolean;
52
+ /** Indicates if the shared channel invite was implicitly approved by the away team. */
53
+ implicit_approval: boolean;
54
+ channel_id: string;
55
+ invite_id: string;
56
+ /** Indicates if the acceptor can SCDM the inviter */
57
+ can_open_scdm: boolean;
58
+ }
59
+ export const AcceptSharedInviteResponse = /*@__PURE__*/ S.suspend(() =>
60
+ S.Struct({
61
+ ok: S.Boolean,
62
+ implicit_approval: S.Boolean,
63
+ channel_id: S.String,
64
+ invite_id: S.String,
65
+ can_open_scdm: S.Boolean,
66
+ }),
67
+ ).annotate({
68
+ identifier: "AcceptSharedInviteResponse",
69
+ }) as any as S.Schema<AcceptSharedInviteResponse>;
70
+
71
+ /** Object describing the text to send along with the invite. If this object is specified, both `text` and `is_override` are required properties. If `is_override` is set to `true`, `text` will override the original invitation message. Otherwise, `text` will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If `is_override` is set to `false`, the length of `text` and the user specified message on the invite request in total must be less than 560 characters. */
72
+ export interface ApproveRequestSharedInviteRequestMessage {
73
+ /** text to include along with email invite */
74
+ text: string;
75
+ /** When true will override the user specified message. Otherwise text will be appended to the user specified message on the invite request. */
76
+ is_override: boolean;
77
+ }
78
+ export const ApproveRequestSharedInviteRequestMessage = /*@__PURE__*/ S.suspend(
79
+ () =>
80
+ S.Struct({
81
+ text: S.String,
82
+ is_override: S.Boolean,
83
+ }),
84
+ ).annotate({
85
+ identifier: "ApproveRequestSharedInviteRequestMessage",
86
+ }) as any as S.Schema<ApproveRequestSharedInviteRequestMessage>;
87
+
88
+ export interface ApproveRequestSharedInviteRequest {
89
+ /** ID of the requested shared channel invite to approve. */
90
+ invite_id: string;
91
+ /** Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite. */
92
+ is_external_limited?: boolean;
93
+ /** Optional channel_id to which external user will be invited to. Will override the value on the requested invite. */
94
+ channel_id?: string;
95
+ /** Object describing the text to send along with the invite. If this object is specified, both `text` and `is_override` are required properties. If `is_override` is set to `true`, `text` will override the original invitation message. Otherwise, `text` will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If `is_override` is set to `false`, the length of `text` and the user specified message on the invite request in total must be less than 560 characters. */
96
+ message?: ApproveRequestSharedInviteRequestMessage;
97
+ }
98
+ export const ApproveRequestSharedInviteRequest = /*@__PURE__*/ S.suspend(() =>
99
+ S.Struct({
100
+ invite_id: S.String,
101
+ is_external_limited: S.optional(S.Boolean),
102
+ channel_id: S.optional(S.String),
103
+ message: S.optional(ApproveRequestSharedInviteRequestMessage),
104
+ }).pipe(
105
+ T.Http({
106
+ method: "POST",
107
+ uri: "/conversations.requestSharedInvite.approve",
108
+ code: 200,
109
+ }),
110
+ ),
111
+ ).annotate({
112
+ identifier: "ApproveRequestSharedInviteRequest",
113
+ }) as any as S.Schema<ApproveRequestSharedInviteRequest>;
114
+
115
+ export interface ApproveRequestSharedInviteResponse {
116
+ /** Always `true` (a failed call raises a typed error instead). */
117
+ ok: boolean;
118
+ invite_id: string;
119
+ confirmation_code?: string;
120
+ url?: string;
121
+ }
122
+ export const ApproveRequestSharedInviteResponse = /*@__PURE__*/ S.suspend(() =>
123
+ S.Struct({
124
+ ok: S.Boolean,
125
+ invite_id: S.String,
126
+ confirmation_code: S.optional(S.String),
127
+ url: S.optional(S.String),
128
+ }),
129
+ ).annotate({
130
+ identifier: "ApproveRequestSharedInviteResponse",
131
+ }) as any as S.Schema<ApproveRequestSharedInviteResponse>;
132
+
133
+ export interface ApproveSharedInviteRequest {
134
+ /** ID of the shared channel invite to approve */
135
+ invite_id: string;
136
+ /** The team or enterprise ID of the receiving party involved in the invitation you are approving */
137
+ target_team?: string;
138
+ }
139
+ export const ApproveSharedInviteRequest = /*@__PURE__*/ S.suspend(() =>
140
+ S.Struct({
141
+ invite_id: S.String,
142
+ target_team: S.optional(S.String),
143
+ }).pipe(
144
+ T.Http({
145
+ method: "POST",
146
+ uri: "/conversations.approveSharedInvite",
147
+ code: 200,
148
+ }),
149
+ ),
150
+ ).annotate({
151
+ identifier: "ApproveSharedInviteRequest",
152
+ }) as any as S.Schema<ApproveSharedInviteRequest>;
153
+
154
+ export interface ApproveSharedInviteResponse {
155
+ ok: boolean;
156
+ }
157
+ export const ApproveSharedInviteResponse = /*@__PURE__*/ S.suspend(() =>
158
+ S.Struct({
159
+ ok: S.Boolean,
160
+ }),
161
+ ).annotate({
162
+ identifier: "ApproveSharedInviteResponse",
163
+ }) as any as S.Schema<ApproveSharedInviteResponse>;
164
+
165
+ export interface ArchiveConversationRequest {
166
+ /** ID of conversation to archive */
167
+ channel: string;
168
+ }
169
+ export const ArchiveConversationRequest = /*@__PURE__*/ S.suspend(() =>
170
+ S.Struct({
171
+ channel: S.String,
172
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.archive", code: 200 })),
173
+ ).annotate({
174
+ identifier: "ArchiveConversationRequest",
175
+ }) as any as S.Schema<ArchiveConversationRequest>;
176
+
177
+ export interface ArchiveConversationResponse {
178
+ /** Always `true` (a failed call raises a typed error instead). */
179
+ ok: boolean;
180
+ }
181
+ export const ArchiveConversationResponse = /*@__PURE__*/ S.suspend(() =>
182
+ S.Struct({
183
+ ok: S.Boolean,
184
+ }),
185
+ ).annotate({
186
+ identifier: "ArchiveConversationResponse",
187
+ }) as any as S.Schema<ArchiveConversationResponse>;
188
+
189
+ export interface ConversationsCloseRequest {
190
+ /** Conversation to close. */
191
+ channel: string;
192
+ }
193
+ export const ConversationsCloseRequest = /*@__PURE__*/ S.suspend(() =>
194
+ S.Struct({
195
+ channel: S.String,
196
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.close", code: 200 })),
197
+ ).annotate({
198
+ identifier: "ConversationsCloseRequest",
199
+ }) as any as S.Schema<ConversationsCloseRequest>;
200
+
201
+ export interface ConversationsCloseResponse {
202
+ /** Always `true` (a failed call raises a typed error instead). */
203
+ ok: boolean;
204
+ already_closed?: boolean;
205
+ no_op?: boolean;
206
+ }
207
+ export const ConversationsCloseResponse = /*@__PURE__*/ S.suspend(() =>
208
+ S.Struct({
209
+ ok: S.Boolean,
210
+ already_closed: S.optional(S.Boolean),
211
+ no_op: S.optional(S.Boolean),
212
+ }),
213
+ ).annotate({
214
+ identifier: "ConversationsCloseResponse",
215
+ }) as any as S.Schema<ConversationsCloseResponse>;
216
+
217
+ export interface ConversationsHistoryRequest {
218
+ /** Conversation ID to fetch history for. */
219
+ channel: string;
220
+ /** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
221
+ cursor?: string;
222
+ /** Return all metadata associated with this message. */
223
+ include_all_metadata?: boolean;
224
+ /** Include messages with `oldest` or `latest` timestamps in results. Ignored unless either timestamp is specified. */
225
+ inclusive?: boolean;
226
+ /** Only messages before this Unix timestamp will be included in results. Default is the current time. */
227
+ latest?: string;
228
+ /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the conversation history hasn't been reached. Maximum of 999. */
229
+ limit?: number;
230
+ /** Only messages after this Unix timestamp will be included in results. */
231
+ oldest?: string;
232
+ }
233
+ export const ConversationsHistoryRequest = /*@__PURE__*/ S.suspend(() =>
234
+ S.Struct({
235
+ channel: S.String.pipe(T.Query()),
236
+ cursor: S.optional(S.String.pipe(T.Query())),
237
+ include_all_metadata: S.optional(S.Boolean.pipe(T.Query())),
238
+ inclusive: S.optional(S.Boolean.pipe(T.Query())),
239
+ latest: S.optional(S.String.pipe(T.Query())),
240
+ limit: S.optional(S.Number.pipe(T.Query())),
241
+ oldest: S.optional(S.String.pipe(T.Query())),
242
+ }).pipe(T.Http({ method: "GET", uri: "/conversations.history", code: 200 })),
243
+ ).annotate({
244
+ identifier: "ConversationsHistoryRequest",
245
+ }) as any as S.Schema<ConversationsHistoryRequest>;
246
+
247
+ export type ConversationsHistoryResponseMessagesList = Array<unknown>;
248
+ export const ConversationsHistoryResponseMessagesList = /*@__PURE__*/ S.Array(
249
+ S.Unknown,
250
+ ) as any as S.Schema<ConversationsHistoryResponseMessagesList>;
251
+
252
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
253
+ export interface ConversationsHistoryResponseResponseMetadata {
254
+ /** Cursor for the next page — pass as `cursor` on the next call. */
255
+ next_cursor?: string;
256
+ }
257
+ export const ConversationsHistoryResponseResponseMetadata =
258
+ /*@__PURE__*/ S.suspend(() =>
259
+ S.Struct({
260
+ next_cursor: S.optional(S.String),
261
+ }),
262
+ ).annotate({
263
+ identifier: "ConversationsHistoryResponseResponseMetadata",
264
+ }) as any as S.Schema<ConversationsHistoryResponseResponseMetadata>;
265
+
266
+ export type ConversationsHistoryResponseUsersMap = {
267
+ [key: string]: unknown | undefined;
268
+ };
269
+ export const ConversationsHistoryResponseUsersMap = /*@__PURE__*/ S.Record(
270
+ S.String,
271
+ S.Unknown,
272
+ ) as any as S.Schema<ConversationsHistoryResponseUsersMap>;
273
+
274
+ export type ConversationsHistoryResponseDeletedList = Array<string>;
275
+ export const ConversationsHistoryResponseDeletedList = /*@__PURE__*/ S.Array(
276
+ S.String,
277
+ ) as any as S.Schema<ConversationsHistoryResponseDeletedList>;
278
+
279
+ export interface ConversationsHistoryResponseMutationTimestamps {
280
+ latest: string;
281
+ updated: string;
282
+ history_invalid: string;
283
+ }
284
+ export const ConversationsHistoryResponseMutationTimestamps =
285
+ /*@__PURE__*/ S.suspend(() =>
286
+ S.Struct({
287
+ latest: S.String,
288
+ updated: S.String,
289
+ history_invalid: S.String,
290
+ }),
291
+ ).annotate({
292
+ identifier: "ConversationsHistoryResponseMutationTimestamps",
293
+ }) as any as S.Schema<ConversationsHistoryResponseMutationTimestamps>;
294
+
295
+ export type ConversationsHistoryResponseWarningsList = Array<string>;
296
+ export const ConversationsHistoryResponseWarningsList = /*@__PURE__*/ S.Array(
297
+ S.String,
298
+ ) as any as S.Schema<ConversationsHistoryResponseWarningsList>;
299
+
300
+ export type ConversationsHistoryResponseLatestUpdatesMap = {
301
+ [key: string]: unknown | undefined;
302
+ };
303
+ export const ConversationsHistoryResponseLatestUpdatesMap =
304
+ /*@__PURE__*/ S.Record(
305
+ S.String,
306
+ S.Unknown,
307
+ ) as any as S.Schema<ConversationsHistoryResponseLatestUpdatesMap>;
308
+
309
+ export type ConversationsHistoryResponseUnchangedMessagesList = Array<string>;
310
+ export const ConversationsHistoryResponseUnchangedMessagesList =
311
+ /*@__PURE__*/ S.Array(
312
+ S.String,
313
+ ) as any as S.Schema<ConversationsHistoryResponseUnchangedMessagesList>;
314
+
315
+ export interface ConversationsHistoryResponse {
316
+ /** Always `true` (a failed call raises a typed error instead). */
317
+ ok: boolean;
318
+ messages: ConversationsHistoryResponseMessagesList;
319
+ has_more: boolean;
320
+ pin_count?: number;
321
+ channel_actions_ts: unknown;
322
+ channel_actions_count: number;
323
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
324
+ response_metadata?: ConversationsHistoryResponseResponseMetadata;
325
+ oldest?: string;
326
+ is_limited?: boolean;
327
+ latest?: string;
328
+ unread_count_display?: number;
329
+ users?: ConversationsHistoryResponseUsersMap;
330
+ deleted?: ConversationsHistoryResponseDeletedList;
331
+ mutation_timestamps?: ConversationsHistoryResponseMutationTimestamps;
332
+ deleted_overflow?: boolean;
333
+ warnings?: ConversationsHistoryResponseWarningsList;
334
+ next_ts?: number;
335
+ latest_updates?: ConversationsHistoryResponseLatestUpdatesMap;
336
+ unchanged_messages?: ConversationsHistoryResponseUnchangedMessagesList;
337
+ }
338
+ export const ConversationsHistoryResponse = /*@__PURE__*/ S.suspend(() =>
339
+ S.Struct({
340
+ ok: S.Boolean,
341
+ messages: ConversationsHistoryResponseMessagesList,
342
+ has_more: S.Boolean,
343
+ pin_count: S.optional(S.Number),
344
+ channel_actions_ts: S.Unknown,
345
+ channel_actions_count: S.Number,
346
+ response_metadata: S.optional(ConversationsHistoryResponseResponseMetadata),
347
+ oldest: S.optional(S.String),
348
+ is_limited: S.optional(S.Boolean),
349
+ latest: S.optional(S.String),
350
+ unread_count_display: S.optional(S.Number),
351
+ users: S.optional(ConversationsHistoryResponseUsersMap),
352
+ deleted: S.optional(ConversationsHistoryResponseDeletedList),
353
+ mutation_timestamps: S.optional(
354
+ ConversationsHistoryResponseMutationTimestamps,
355
+ ),
356
+ deleted_overflow: S.optional(S.Boolean),
357
+ warnings: S.optional(ConversationsHistoryResponseWarningsList),
358
+ next_ts: S.optional(S.Number),
359
+ latest_updates: S.optional(ConversationsHistoryResponseLatestUpdatesMap),
360
+ unchanged_messages: S.optional(
361
+ ConversationsHistoryResponseUnchangedMessagesList,
362
+ ),
363
+ }),
364
+ ).annotate({
365
+ identifier: "ConversationsHistoryResponse",
366
+ }) as any as S.Schema<ConversationsHistoryResponse>;
367
+
368
+ export interface ConversationsInfoRequest {
369
+ /** Conversation ID to learn more about */
370
+ channel: string;
371
+ /** Set this to `true` to receive the locale for this conversation. Defaults to `false` */
372
+ include_locale?: boolean;
373
+ /** Set to `true` to include the member count for the specified conversation. Defaults to `false` */
374
+ include_num_members?: boolean;
375
+ }
376
+ export const ConversationsInfoRequest = /*@__PURE__*/ S.suspend(() =>
377
+ S.Struct({
378
+ channel: S.String.pipe(T.Query()),
379
+ include_locale: S.optional(S.Boolean.pipe(T.Query())),
380
+ include_num_members: S.optional(S.Boolean.pipe(T.Query())),
381
+ }).pipe(T.Http({ method: "GET", uri: "/conversations.info", code: 200 })),
382
+ ).annotate({
383
+ identifier: "ConversationsInfoRequest",
384
+ }) as any as S.Schema<ConversationsInfoRequest>;
385
+
386
+ export interface ConversationsInfoResponse {
387
+ /** Always `true` (a failed call raises a typed error instead). */
388
+ ok: boolean;
389
+ app_home?: unknown;
390
+ channel: unknown;
391
+ home_view?: unknown | null;
392
+ }
393
+ export const ConversationsInfoResponse = /*@__PURE__*/ S.suspend(() =>
394
+ S.Struct({
395
+ ok: S.Boolean,
396
+ app_home: S.optional(S.Unknown),
397
+ channel: S.Unknown,
398
+ home_view: S.optional(S.NullOr(S.Unknown)),
399
+ }),
400
+ ).annotate({
401
+ identifier: "ConversationsInfoResponse",
402
+ }) as any as S.Schema<ConversationsInfoResponse>;
403
+
404
+ export interface ConversationsKickRequest {
405
+ /** ID of conversation to remove user from. */
406
+ channel: string;
407
+ /** User ID to be removed. */
408
+ user?: string;
409
+ }
410
+ export const ConversationsKickRequest = /*@__PURE__*/ S.suspend(() =>
411
+ S.Struct({
412
+ channel: S.String,
413
+ user: S.optional(S.String),
414
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.kick", code: 200 })),
415
+ ).annotate({
416
+ identifier: "ConversationsKickRequest",
417
+ }) as any as S.Schema<ConversationsKickRequest>;
418
+
419
+ export interface ConversationsKickResponse {
420
+ /** Always `true` (a failed call raises a typed error instead). */
421
+ ok: boolean;
422
+ }
423
+ export const ConversationsKickResponse = /*@__PURE__*/ S.suspend(() =>
424
+ S.Struct({
425
+ ok: S.Boolean,
426
+ }),
427
+ ).annotate({
428
+ identifier: "ConversationsKickResponse",
429
+ }) as any as S.Schema<ConversationsKickResponse>;
430
+
431
+ export interface ConversationsMarkRequest {
432
+ /** Channel or conversation to set the read cursor for. */
433
+ channel: string;
434
+ /** Unique identifier of message you want marked as most recently seen in this conversation. */
435
+ ts: string;
436
+ }
437
+ export const ConversationsMarkRequest = /*@__PURE__*/ S.suspend(() =>
438
+ S.Struct({
439
+ channel: S.String,
440
+ ts: S.String,
441
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.mark", code: 200 })),
442
+ ).annotate({
443
+ identifier: "ConversationsMarkRequest",
444
+ }) as any as S.Schema<ConversationsMarkRequest>;
445
+
446
+ export interface ConversationsMarkResponse {
447
+ /** Always `true` (a failed call raises a typed error instead). */
448
+ ok: boolean;
449
+ }
450
+ export const ConversationsMarkResponse = /*@__PURE__*/ S.suspend(() =>
451
+ S.Struct({
452
+ ok: S.Boolean,
453
+ }),
454
+ ).annotate({
455
+ identifier: "ConversationsMarkResponse",
456
+ }) as any as S.Schema<ConversationsMarkResponse>;
457
+
458
+ export interface ConversationsMembersRequest {
459
+ /** ID of the conversation to retrieve members for */
460
+ channel: string;
461
+ /** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
462
+ cursor?: string;
463
+ /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. */
464
+ limit?: number;
465
+ }
466
+ export const ConversationsMembersRequest = /*@__PURE__*/ S.suspend(() =>
467
+ S.Struct({
468
+ channel: S.String.pipe(T.Query()),
469
+ cursor: S.optional(S.String.pipe(T.Query())),
470
+ limit: S.optional(S.Number.pipe(T.Query())),
471
+ }).pipe(T.Http({ method: "GET", uri: "/conversations.members", code: 200 })),
472
+ ).annotate({
473
+ identifier: "ConversationsMembersRequest",
474
+ }) as any as S.Schema<ConversationsMembersRequest>;
475
+
476
+ export type ConversationsMembersResponseMembersList = Array<string>;
477
+ export const ConversationsMembersResponseMembersList = /*@__PURE__*/ S.Array(
478
+ S.String,
479
+ ) as any as S.Schema<ConversationsMembersResponseMembersList>;
480
+
481
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
482
+ export type ConversationsMembersResponseResponseMetadata =
483
+ ConversationsHistoryResponseResponseMetadata;
484
+ export const ConversationsMembersResponseResponseMetadata =
485
+ ConversationsHistoryResponseResponseMetadata;
486
+
487
+ export interface ConversationsMembersResponse {
488
+ /** Always `true` (a failed call raises a typed error instead). */
489
+ ok: boolean;
490
+ members: ConversationsMembersResponseMembersList;
491
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
492
+ response_metadata?: ConversationsHistoryResponseResponseMetadata;
493
+ }
494
+ export const ConversationsMembersResponse = /*@__PURE__*/ S.suspend(() =>
495
+ S.Struct({
496
+ ok: S.Boolean,
497
+ members: ConversationsMembersResponseMembersList,
498
+ response_metadata: S.optional(ConversationsHistoryResponseResponseMetadata),
499
+ }),
500
+ ).annotate({
501
+ identifier: "ConversationsMembersResponse",
502
+ }) as any as S.Schema<ConversationsMembersResponse>;
503
+
504
+ export interface ConversationsOpenRequest {
505
+ /** Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead. */
506
+ channel?: string | null;
507
+ /** Boolean, indicates you want the full IM channel definition in the response. */
508
+ return_im?: boolean;
509
+ /** Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`. */
510
+ users?: string;
511
+ /** Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm. */
512
+ prevent_creation?: boolean;
513
+ }
514
+ export const ConversationsOpenRequest = /*@__PURE__*/ S.suspend(() =>
515
+ S.Struct({
516
+ channel: S.optional(S.NullOr(S.String)),
517
+ return_im: S.optional(S.Boolean),
518
+ users: S.optional(S.String),
519
+ prevent_creation: S.optional(S.Boolean),
520
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.open", code: 200 })),
521
+ ).annotate({
522
+ identifier: "ConversationsOpenRequest",
523
+ }) as any as S.Schema<ConversationsOpenRequest>;
524
+
525
+ export interface ConversationsOpenResponse {
526
+ /** Always `true` (a failed call raises a typed error instead). */
527
+ ok: boolean;
528
+ already_open?: boolean;
529
+ no_op?: boolean;
530
+ channel?: unknown;
531
+ app_home?: unknown;
532
+ home_view?: unknown | null;
533
+ }
534
+ export const ConversationsOpenResponse = /*@__PURE__*/ S.suspend(() =>
535
+ S.Struct({
536
+ ok: S.Boolean,
537
+ already_open: S.optional(S.Boolean),
538
+ no_op: S.optional(S.Boolean),
539
+ channel: S.optional(S.Unknown),
540
+ app_home: S.optional(S.Unknown),
541
+ home_view: S.optional(S.NullOr(S.Unknown)),
542
+ }),
543
+ ).annotate({
544
+ identifier: "ConversationsOpenResponse",
545
+ }) as any as S.Schema<ConversationsOpenResponse>;
546
+
547
+ export interface ConversationsRepliesRequest {
548
+ /** Conversation ID to fetch thread from. */
549
+ channel: string;
550
+ /** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
551
+ cursor?: string;
552
+ /** Return all metadata associated with this message. */
553
+ include_all_metadata?: boolean;
554
+ /** Include messages with `oldest` or `latest` timestamps in results. Ignored unless either timestamp is specified. */
555
+ inclusive?: boolean;
556
+ /** Only messages before this Unix timestamp will be included in results. */
557
+ latest?: string;
558
+ /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. */
559
+ limit?: number;
560
+ /** Only messages after this Unix timestamp will be included in results. */
561
+ oldest?: string;
562
+ /** Unique identifier of either a thread’s parent message or a message in the thread. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message. */
563
+ ts: string;
564
+ }
565
+ export const ConversationsRepliesRequest = /*@__PURE__*/ S.suspend(() =>
566
+ S.Struct({
567
+ channel: S.String.pipe(T.Query()),
568
+ cursor: S.optional(S.String.pipe(T.Query())),
569
+ include_all_metadata: S.optional(S.Boolean.pipe(T.Query())),
570
+ inclusive: S.optional(S.Boolean.pipe(T.Query())),
571
+ latest: S.optional(S.String.pipe(T.Query())),
572
+ limit: S.optional(S.Number.pipe(T.Query())),
573
+ oldest: S.optional(S.String.pipe(T.Query())),
574
+ ts: S.String.pipe(T.Query()),
575
+ }).pipe(T.Http({ method: "GET", uri: "/conversations.replies", code: 200 })),
576
+ ).annotate({
577
+ identifier: "ConversationsRepliesRequest",
578
+ }) as any as S.Schema<ConversationsRepliesRequest>;
579
+
580
+ export type ConversationsRepliesResponseMessagesList = Array<unknown>;
581
+ export const ConversationsRepliesResponseMessagesList = /*@__PURE__*/ S.Array(
582
+ S.Unknown,
583
+ ) as any as S.Schema<ConversationsRepliesResponseMessagesList>;
584
+
585
+ export type ConversationsRepliesResponseLatestUpdatesMap = {
586
+ [key: string]: unknown | undefined;
587
+ };
588
+ export const ConversationsRepliesResponseLatestUpdatesMap =
589
+ /*@__PURE__*/ S.Record(
590
+ S.String,
591
+ S.Unknown,
592
+ ) as any as S.Schema<ConversationsRepliesResponseLatestUpdatesMap>;
593
+
594
+ export type ConversationsRepliesResponseUnchangedMessagesList = Array<string>;
595
+ export const ConversationsRepliesResponseUnchangedMessagesList =
596
+ /*@__PURE__*/ S.Array(
597
+ S.String,
598
+ ) as any as S.Schema<ConversationsRepliesResponseUnchangedMessagesList>;
599
+
600
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
601
+ export type ConversationsRepliesResponseResponseMetadata =
602
+ ConversationsHistoryResponseResponseMetadata;
603
+ export const ConversationsRepliesResponseResponseMetadata =
604
+ ConversationsHistoryResponseResponseMetadata;
605
+
606
+ export interface ConversationsRepliesResponse {
607
+ /** Always `true` (a failed call raises a typed error instead). */
608
+ ok: boolean;
609
+ has_more?: boolean;
610
+ messages: ConversationsRepliesResponseMessagesList;
611
+ latest_updates?: ConversationsRepliesResponseLatestUpdatesMap;
612
+ unchanged_messages?: ConversationsRepliesResponseUnchangedMessagesList;
613
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
614
+ response_metadata?: ConversationsHistoryResponseResponseMetadata;
615
+ }
616
+ export const ConversationsRepliesResponse = /*@__PURE__*/ S.suspend(() =>
617
+ S.Struct({
618
+ ok: S.Boolean,
619
+ has_more: S.optional(S.Boolean),
620
+ messages: ConversationsRepliesResponseMessagesList,
621
+ latest_updates: S.optional(ConversationsRepliesResponseLatestUpdatesMap),
622
+ unchanged_messages: S.optional(
623
+ ConversationsRepliesResponseUnchangedMessagesList,
624
+ ),
625
+ response_metadata: S.optional(ConversationsHistoryResponseResponseMetadata),
626
+ }),
627
+ ).annotate({
628
+ identifier: "ConversationsRepliesResponse",
629
+ }) as any as S.Schema<ConversationsRepliesResponse>;
630
+
631
+ export interface CreateCanvaseRequest {
632
+ /** Channel ID of the channel the canvas will be tabbed in. */
633
+ channel_id: string;
634
+ /** Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters). */
635
+ document_content?: unknown;
636
+ /** Title of the newly created canvas */
637
+ title?: string;
638
+ }
639
+ export const CreateCanvaseRequest = /*@__PURE__*/ S.suspend(() =>
640
+ S.Struct({
641
+ channel_id: S.String,
642
+ document_content: S.optional(S.Unknown),
643
+ title: S.optional(S.String),
644
+ }).pipe(
645
+ T.Http({
646
+ method: "POST",
647
+ uri: "/conversations.canvases.create",
648
+ code: 200,
649
+ }),
650
+ ),
651
+ ).annotate({
652
+ identifier: "CreateCanvaseRequest",
653
+ }) as any as S.Schema<CreateCanvaseRequest>;
654
+
655
+ export interface CreateCanvaseResponse {
656
+ /** Always `true` (a failed call raises a typed error instead). */
657
+ ok: boolean;
658
+ /** Encoded ID of the canvas */
659
+ canvas_id: string;
660
+ }
661
+ export const CreateCanvaseResponse = /*@__PURE__*/ S.suspend(() =>
662
+ S.Struct({
663
+ ok: S.Boolean,
664
+ canvas_id: S.String,
665
+ }),
666
+ ).annotate({
667
+ identifier: "CreateCanvaseResponse",
668
+ }) as any as S.Schema<CreateCanvaseResponse>;
669
+
670
+ export interface CreateConversationRequest {
671
+ /** Create a private channel instead of a public one */
672
+ is_private?: boolean;
673
+ /** Name of the public or private channel to create */
674
+ name: string;
675
+ /** encoded team id to create the channel in, required if org token is used */
676
+ team_id?: string | null;
677
+ }
678
+ export const CreateConversationRequest = /*@__PURE__*/ S.suspend(() =>
679
+ S.Struct({
680
+ is_private: S.optional(S.Boolean),
681
+ name: S.String,
682
+ team_id: S.optional(S.NullOr(S.String)),
683
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.create", code: 200 })),
684
+ ).annotate({
685
+ identifier: "CreateConversationRequest",
686
+ }) as any as S.Schema<CreateConversationRequest>;
687
+
688
+ export interface CreateConversationResponse {
689
+ /** Always `true` (a failed call raises a typed error instead). */
690
+ ok: boolean;
691
+ channel: unknown;
692
+ }
693
+ export const CreateConversationResponse = /*@__PURE__*/ S.suspend(() =>
694
+ S.Struct({
695
+ ok: S.Boolean,
696
+ channel: S.Unknown,
697
+ }),
698
+ ).annotate({
699
+ identifier: "CreateConversationResponse",
700
+ }) as any as S.Schema<CreateConversationResponse>;
701
+
702
+ export interface InviteConversationRequest {
703
+ /** The ID of the public or private channel to invite user(s) to. */
704
+ channel: string;
705
+ /** When set to `true` and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to `false`. */
706
+ force?: boolean;
707
+ /** A comma separated list of user IDs. Up to 100 users may be listed. */
708
+ users: string;
709
+ }
710
+ export const InviteConversationRequest = /*@__PURE__*/ S.suspend(() =>
711
+ S.Struct({
712
+ channel: S.String,
713
+ force: S.optional(S.Boolean),
714
+ users: S.String,
715
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.invite", code: 200 })),
716
+ ).annotate({
717
+ identifier: "InviteConversationRequest",
718
+ }) as any as S.Schema<InviteConversationRequest>;
719
+
720
+ export type InviteConversationResponseErrorsList = Array<unknown>;
721
+ export const InviteConversationResponseErrorsList = /*@__PURE__*/ S.Array(
722
+ S.Unknown,
723
+ ) as any as S.Schema<InviteConversationResponseErrorsList>;
724
+
725
+ export interface InviteConversationResponse {
726
+ /** Always `true` (a failed call raises a typed error instead). */
727
+ ok: boolean;
728
+ channel?: unknown;
729
+ group?: unknown;
730
+ errors?: InviteConversationResponseErrorsList;
731
+ }
732
+ export const InviteConversationResponse = /*@__PURE__*/ S.suspend(() =>
733
+ S.Struct({
734
+ ok: S.Boolean,
735
+ channel: S.optional(S.Unknown),
736
+ group: S.optional(S.Unknown),
737
+ errors: S.optional(InviteConversationResponseErrorsList),
738
+ }),
739
+ ).annotate({
740
+ identifier: "InviteConversationResponse",
741
+ }) as any as S.Schema<InviteConversationResponse>;
742
+
743
+ export interface InviteDeclineSharedRequest {
744
+ /** ID of the Slack Connect invite to decline. Subscribe to the [`shared_channel_invite_accepted`](/reference/events/shared_channel_invite_accepted) event to receive IDs of Slack Connect channel invites that have been accepted and are awaiting approval. */
745
+ invite_id: string;
746
+ /** The team or enterprise id of the other party involved in the invitation you are declining */
747
+ target_team?: string;
748
+ }
749
+ export const InviteDeclineSharedRequest = /*@__PURE__*/ S.suspend(() =>
750
+ S.Struct({
751
+ invite_id: S.String.pipe(T.Query()),
752
+ target_team: S.optional(S.String.pipe(T.Query())),
753
+ }).pipe(
754
+ T.Http({
755
+ method: "GET",
756
+ uri: "/conversations.declineSharedInvite",
757
+ code: 200,
758
+ }),
759
+ ),
760
+ ).annotate({
761
+ identifier: "InviteDeclineSharedRequest",
762
+ }) as any as S.Schema<InviteDeclineSharedRequest>;
763
+
764
+ export interface InviteDeclineSharedResponse {
765
+ ok: boolean;
766
+ }
767
+ export const InviteDeclineSharedResponse = /*@__PURE__*/ S.suspend(() =>
768
+ S.Struct({
769
+ ok: S.Boolean,
770
+ }),
771
+ ).annotate({
772
+ identifier: "InviteDeclineSharedResponse",
773
+ }) as any as S.Schema<InviteDeclineSharedResponse>;
774
+
775
+ /** Optional email to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time. */
776
+ export type InviteSharedRequestEmailsList = Array<string>;
777
+ export const InviteSharedRequestEmailsList = /*@__PURE__*/ S.Array(
778
+ S.String,
779
+ ) as any as S.Schema<InviteSharedRequestEmailsList>;
780
+
781
+ /** Optional user_id to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time. */
782
+ export type InviteSharedRequestUserIdsList = Array<string>;
783
+ export const InviteSharedRequestUserIdsList = /*@__PURE__*/ S.Array(
784
+ S.String,
785
+ ) as any as S.Schema<InviteSharedRequestUserIdsList>;
786
+
787
+ export interface InviteSharedRequest {
788
+ /** ID of the channel on your team that you'd like to share */
789
+ channel: string;
790
+ /** Optional email to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time. */
791
+ emails?: InviteSharedRequestEmailsList;
792
+ /** Optional user_id to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time. */
793
+ user_ids?: InviteSharedRequestUserIdsList;
794
+ /** Optional boolean on whether invite is to an external limited member. Defaults to `true`. */
795
+ external_limited?: boolean;
796
+ }
797
+ export const InviteSharedRequest = /*@__PURE__*/ S.suspend(() =>
798
+ S.Struct({
799
+ channel: S.String,
800
+ emails: S.optional(InviteSharedRequestEmailsList),
801
+ user_ids: S.optional(InviteSharedRequestUserIdsList),
802
+ external_limited: S.optional(S.Boolean),
803
+ }).pipe(
804
+ T.Http({ method: "POST", uri: "/conversations.inviteShared", code: 200 }),
805
+ ),
806
+ ).annotate({
807
+ identifier: "InviteSharedRequest",
808
+ }) as any as S.Schema<InviteSharedRequest>;
809
+
810
+ export interface InviteSharedResponse {
811
+ /** Always `true` (a failed call raises a typed error instead). */
812
+ ok: boolean;
813
+ url?: string;
814
+ invite_id?: string;
815
+ conf_code?: string;
816
+ is_legacy_shared_channel?: boolean;
817
+ }
818
+ export const InviteSharedResponse = /*@__PURE__*/ S.suspend(() =>
819
+ S.Struct({
820
+ ok: S.Boolean,
821
+ url: S.optional(S.String),
822
+ invite_id: S.optional(S.String),
823
+ conf_code: S.optional(S.String),
824
+ is_legacy_shared_channel: S.optional(S.Boolean),
825
+ }),
826
+ ).annotate({
827
+ identifier: "InviteSharedResponse",
828
+ }) as any as S.Schema<InviteSharedResponse>;
829
+
830
+ export interface JoinConversationRequest {
831
+ /** ID of conversation to join */
832
+ channel: string;
833
+ }
834
+ export const JoinConversationRequest = /*@__PURE__*/ S.suspend(() =>
835
+ S.Struct({
836
+ channel: S.String,
837
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.join", code: 200 })),
838
+ ).annotate({
839
+ identifier: "JoinConversationRequest",
840
+ }) as any as S.Schema<JoinConversationRequest>;
841
+
842
+ export type JoinConversationResponseResponseMetadataWarningsList =
843
+ Array<string>;
844
+ export const JoinConversationResponseResponseMetadataWarningsList =
845
+ /*@__PURE__*/ S.Array(
846
+ S.String,
847
+ ) as any as S.Schema<JoinConversationResponseResponseMetadataWarningsList>;
848
+
849
+ export interface JoinConversationResponseResponseMetadata {
850
+ warnings?: JoinConversationResponseResponseMetadataWarningsList;
851
+ }
852
+ export const JoinConversationResponseResponseMetadata = /*@__PURE__*/ S.suspend(
853
+ () =>
854
+ S.Struct({
855
+ warnings: S.optional(
856
+ JoinConversationResponseResponseMetadataWarningsList,
857
+ ),
858
+ }),
859
+ ).annotate({
860
+ identifier: "JoinConversationResponseResponseMetadata",
861
+ }) as any as S.Schema<JoinConversationResponseResponseMetadata>;
862
+
863
+ export interface JoinConversationResponse {
864
+ /** Always `true` (a failed call raises a typed error instead). */
865
+ ok: boolean;
866
+ channel: unknown;
867
+ response_metadata?: JoinConversationResponseResponseMetadata;
868
+ }
869
+ export const JoinConversationResponse = /*@__PURE__*/ S.suspend(() =>
870
+ S.Struct({
871
+ ok: S.Boolean,
872
+ channel: S.Unknown,
873
+ response_metadata: S.optional(JoinConversationResponseResponseMetadata),
874
+ }),
875
+ ).annotate({
876
+ identifier: "JoinConversationResponse",
877
+ }) as any as S.Schema<JoinConversationResponse>;
878
+
879
+ export interface LeaveConversationRequest {
880
+ /** Conversation to leave */
881
+ channel: string;
882
+ }
883
+ export const LeaveConversationRequest = /*@__PURE__*/ S.suspend(() =>
884
+ S.Struct({
885
+ channel: S.String,
886
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.leave", code: 200 })),
887
+ ).annotate({
888
+ identifier: "LeaveConversationRequest",
889
+ }) as any as S.Schema<LeaveConversationRequest>;
890
+
891
+ export interface LeaveConversationResponse {
892
+ /** Always `true` (a failed call raises a typed error instead). */
893
+ ok: boolean;
894
+ not_in_channel?: boolean;
895
+ }
896
+ export const LeaveConversationResponse = /*@__PURE__*/ S.suspend(() =>
897
+ S.Struct({
898
+ ok: S.Boolean,
899
+ not_in_channel: S.optional(S.Boolean),
900
+ }),
901
+ ).annotate({
902
+ identifier: "LeaveConversationResponse",
903
+ }) as any as S.Schema<LeaveConversationResponse>;
904
+
905
+ export interface ListConnectInvitesRequest {
906
+ /** Encoded team id for the workspace to retrieve invites for, required if org token is used */
907
+ team_id?: string;
908
+ /** Maximum number of invites to return */
909
+ count?: number;
910
+ /** Set to `next_cursor` returned by previous call to list items in subsequent page */
911
+ cursor?: string;
912
+ }
913
+ export const ListConnectInvitesRequest = /*@__PURE__*/ S.suspend(() =>
914
+ S.Struct({
915
+ team_id: S.optional(S.String),
916
+ count: S.optional(S.Number),
917
+ cursor: S.optional(S.String),
918
+ }).pipe(
919
+ T.Http({
920
+ method: "POST",
921
+ uri: "/conversations.listConnectInvites",
922
+ code: 200,
923
+ }),
924
+ ),
925
+ ).annotate({
926
+ identifier: "ListConnectInvitesRequest",
927
+ }) as any as S.Schema<ListConnectInvitesRequest>;
928
+
929
+ export type ListConnectInvitesResponseInvitesList = Array<unknown>;
930
+ export const ListConnectInvitesResponseInvitesList = /*@__PURE__*/ S.Array(
931
+ S.Unknown,
932
+ ) as any as S.Schema<ListConnectInvitesResponseInvitesList>;
933
+
934
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
935
+ export type ListConnectInvitesResponseResponseMetadata =
936
+ ConversationsHistoryResponseResponseMetadata;
937
+ export const ListConnectInvitesResponseResponseMetadata =
938
+ ConversationsHistoryResponseResponseMetadata;
939
+
940
+ export interface ListConnectInvitesResponse {
941
+ /** Always `true` (a failed call raises a typed error instead). */
942
+ ok: boolean;
943
+ invites: ListConnectInvitesResponseInvitesList;
944
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
945
+ response_metadata?: ConversationsHistoryResponseResponseMetadata;
946
+ }
947
+ export const ListConnectInvitesResponse = /*@__PURE__*/ S.suspend(() =>
948
+ S.Struct({
949
+ ok: S.Boolean,
950
+ invites: ListConnectInvitesResponseInvitesList,
951
+ response_metadata: S.optional(ConversationsHistoryResponseResponseMetadata),
952
+ }),
953
+ ).annotate({
954
+ identifier: "ListConnectInvitesResponse",
955
+ }) as any as S.Schema<ListConnectInvitesResponse>;
956
+
957
+ export interface ListConversationsRequest {
958
+ /** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
959
+ cursor?: string;
960
+ /** Set to `true` to exclude archived channels from the list. */
961
+ exclude_archived?: boolean;
962
+ /** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer under 1000. */
963
+ limit?: number;
964
+ /** encoded team id to list channels in, required if token belongs to org-wide app */
965
+ team_id?: string;
966
+ /** Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im` */
967
+ types?: string;
968
+ }
969
+ export const ListConversationsRequest = /*@__PURE__*/ S.suspend(() =>
970
+ S.Struct({
971
+ cursor: S.optional(S.String.pipe(T.Query())),
972
+ exclude_archived: S.optional(S.Boolean.pipe(T.Query())),
973
+ limit: S.optional(S.Number.pipe(T.Query())),
974
+ team_id: S.optional(S.String.pipe(T.Query())),
975
+ types: S.optional(S.String.pipe(T.Query())),
976
+ }).pipe(T.Http({ method: "GET", uri: "/conversations.list", code: 200 })),
977
+ ).annotate({
978
+ identifier: "ListConversationsRequest",
979
+ }) as any as S.Schema<ListConversationsRequest>;
980
+
981
+ export type ListConversationsResponseChannelsList = Array<unknown>;
982
+ export const ListConversationsResponseChannelsList = /*@__PURE__*/ S.Array(
983
+ S.Unknown,
984
+ ) as any as S.Schema<ListConversationsResponseChannelsList>;
985
+
986
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
987
+ export type ListConversationsResponseResponseMetadata =
988
+ ConversationsHistoryResponseResponseMetadata;
989
+ export const ListConversationsResponseResponseMetadata =
990
+ ConversationsHistoryResponseResponseMetadata;
991
+
992
+ export interface ListConversationsResponse {
993
+ /** Always `true` (a failed call raises a typed error instead). */
994
+ ok: boolean;
995
+ channels: ListConversationsResponseChannelsList;
996
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
997
+ response_metadata?: ConversationsHistoryResponseResponseMetadata;
998
+ }
999
+ export const ListConversationsResponse = /*@__PURE__*/ S.suspend(() =>
1000
+ S.Struct({
1001
+ ok: S.Boolean,
1002
+ channels: ListConversationsResponseChannelsList,
1003
+ response_metadata: S.optional(ConversationsHistoryResponseResponseMetadata),
1004
+ }),
1005
+ ).annotate({
1006
+ identifier: "ListConversationsResponse",
1007
+ }) as any as S.Schema<ListConversationsResponse>;
1008
+
1009
+ /** An optional list of invitation ids to look up */
1010
+ export type ListRequestSharedInviteRequestInviteIdsList = Array<string>;
1011
+ export const ListRequestSharedInviteRequestInviteIdsList =
1012
+ /*@__PURE__*/ S.Array(
1013
+ S.String,
1014
+ ) as any as S.Schema<ListRequestSharedInviteRequestInviteIdsList>;
1015
+
1016
+ export interface ListRequestSharedInviteRequest {
1017
+ /** Optional filter to return invitation requests for the inviting user. */
1018
+ user_id?: string;
1019
+ /** When true expired invitation requests will be returned, otherwise they will be excluded */
1020
+ include_expired?: boolean;
1021
+ /** When true approved invitation requests will be returned, otherwise they will be excluded */
1022
+ include_approved?: boolean;
1023
+ /** When true denied invitation requests will be returned, otherwise they will be excluded */
1024
+ include_denied?: boolean;
1025
+ /** An optional list of invitation ids to look up */
1026
+ invite_ids?: ListRequestSharedInviteRequestInviteIdsList;
1027
+ /** The number of items to return. Must be between 1 - 1000 (inclusive). */
1028
+ limit?: number;
1029
+ /** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. See [pagination](/apis/web-api/pagination) for more detail. */
1030
+ cursor?: string;
1031
+ }
1032
+ export const ListRequestSharedInviteRequest = /*@__PURE__*/ S.suspend(() =>
1033
+ S.Struct({
1034
+ user_id: S.optional(S.String),
1035
+ include_expired: S.optional(S.Boolean),
1036
+ include_approved: S.optional(S.Boolean),
1037
+ include_denied: S.optional(S.Boolean),
1038
+ invite_ids: S.optional(ListRequestSharedInviteRequestInviteIdsList),
1039
+ limit: S.optional(S.Number),
1040
+ cursor: S.optional(S.String),
1041
+ }).pipe(
1042
+ T.Http({
1043
+ method: "POST",
1044
+ uri: "/conversations.requestSharedInvite.list",
1045
+ code: 200,
1046
+ }),
1047
+ ),
1048
+ ).annotate({
1049
+ identifier: "ListRequestSharedInviteRequest",
1050
+ }) as any as S.Schema<ListRequestSharedInviteRequest>;
1051
+
1052
+ export type ListRequestSharedInviteResponseInviteRequestsList = Array<unknown>;
1053
+ export const ListRequestSharedInviteResponseInviteRequestsList =
1054
+ /*@__PURE__*/ S.Array(
1055
+ S.Unknown,
1056
+ ) as any as S.Schema<ListRequestSharedInviteResponseInviteRequestsList>;
1057
+
1058
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
1059
+ export type ListRequestSharedInviteResponseResponseMetadata =
1060
+ ConversationsHistoryResponseResponseMetadata;
1061
+ export const ListRequestSharedInviteResponseResponseMetadata =
1062
+ ConversationsHistoryResponseResponseMetadata;
1063
+
1064
+ export interface ListRequestSharedInviteResponse {
1065
+ /** Always `true` (a failed call raises a typed error instead). */
1066
+ ok: boolean;
1067
+ invite_requests: ListRequestSharedInviteResponseInviteRequestsList;
1068
+ /** Pagination metadata. An empty `next_cursor` means the last page. */
1069
+ response_metadata?: ConversationsHistoryResponseResponseMetadata;
1070
+ }
1071
+ export const ListRequestSharedInviteResponse = /*@__PURE__*/ S.suspend(() =>
1072
+ S.Struct({
1073
+ ok: S.Boolean,
1074
+ invite_requests: ListRequestSharedInviteResponseInviteRequestsList,
1075
+ response_metadata: S.optional(ConversationsHistoryResponseResponseMetadata),
1076
+ }),
1077
+ ).annotate({
1078
+ identifier: "ListRequestSharedInviteResponse",
1079
+ }) as any as S.Schema<ListRequestSharedInviteResponse>;
1080
+
1081
+ export interface RenameConversationRequest {
1082
+ /** ID of conversation to rename */
1083
+ channel: string;
1084
+ /** New name for conversation. */
1085
+ name: string;
1086
+ }
1087
+ export const RenameConversationRequest = /*@__PURE__*/ S.suspend(() =>
1088
+ S.Struct({
1089
+ channel: S.String,
1090
+ name: S.String,
1091
+ }).pipe(T.Http({ method: "POST", uri: "/conversations.rename", code: 200 })),
1092
+ ).annotate({
1093
+ identifier: "RenameConversationRequest",
1094
+ }) as any as S.Schema<RenameConversationRequest>;
1095
+
1096
+ export interface RenameConversationResponse {
1097
+ /** Always `true` (a failed call raises a typed error instead). */
1098
+ ok: boolean;
1099
+ channel: unknown;
1100
+ }
1101
+ export const RenameConversationResponse = /*@__PURE__*/ S.suspend(() =>
1102
+ S.Struct({
1103
+ ok: S.Boolean,
1104
+ channel: S.Unknown,
1105
+ }),
1106
+ ).annotate({
1107
+ identifier: "RenameConversationResponse",
1108
+ }) as any as S.Schema<RenameConversationResponse>;
1109
+
1110
+ export interface RequestSharedInviteDenyRequest {
1111
+ /** ID of the requested shared channel invite to deny. */
1112
+ invite_id: string;
1113
+ /** Optional message explaining why the request to invite was denied. */
1114
+ message?: string;
1115
+ }
1116
+ export const RequestSharedInviteDenyRequest = /*@__PURE__*/ S.suspend(() =>
1117
+ S.Struct({
1118
+ invite_id: S.String,
1119
+ message: S.optional(S.String),
1120
+ }).pipe(
1121
+ T.Http({
1122
+ method: "POST",
1123
+ uri: "/conversations.requestSharedInvite.deny",
1124
+ code: 200,
1125
+ }),
1126
+ ),
1127
+ ).annotate({
1128
+ identifier: "RequestSharedInviteDenyRequest",
1129
+ }) as any as S.Schema<RequestSharedInviteDenyRequest>;
1130
+
1131
+ export interface RequestSharedInviteDenyResponse {
1132
+ ok: boolean;
1133
+ }
1134
+ export const RequestSharedInviteDenyResponse = /*@__PURE__*/ S.suspend(() =>
1135
+ S.Struct({
1136
+ ok: S.Boolean,
1137
+ }),
1138
+ ).annotate({
1139
+ identifier: "RequestSharedInviteDenyResponse",
1140
+ }) as any as S.Schema<RequestSharedInviteDenyResponse>;
1141
+
1142
+ /** Type of action to be taken: upgrade or downgrade */
1143
+ export type SetExternalInvitePermissionsRequestAction = "upgrade" | "downgrade";
1144
+ export const SetExternalInvitePermissionsRequestAction = S.String;
1145
+
1146
+ export interface SetExternalInvitePermissionsRequest {
1147
+ /** The channel ID to change external invite permissions for */
1148
+ channel: string;
1149
+ /** The encoded team ID of the target team. Must be in the specified channel. */
1150
+ target_team: string;
1151
+ /** Type of action to be taken: upgrade or downgrade */
1152
+ action: SetExternalInvitePermissionsRequestAction | (string & {});
1153
+ }
1154
+ export const SetExternalInvitePermissionsRequest = /*@__PURE__*/ S.suspend(() =>
1155
+ S.Struct({
1156
+ channel: S.String,
1157
+ target_team: S.String,
1158
+ action: SetExternalInvitePermissionsRequestAction,
1159
+ }).pipe(
1160
+ T.Http({
1161
+ method: "POST",
1162
+ uri: "/conversations.externalInvitePermissions.set",
1163
+ code: 200,
1164
+ contentType: "form-urlencoded",
1165
+ }),
1166
+ ),
1167
+ ).annotate({
1168
+ identifier: "SetExternalInvitePermissionsRequest",
1169
+ }) as any as S.Schema<SetExternalInvitePermissionsRequest>;
1170
+
1171
+ export interface SetExternalInvitePermissionsResponse {
1172
+ ok: boolean;
1173
+ }
1174
+ export const SetExternalInvitePermissionsResponse = /*@__PURE__*/ S.suspend(
1175
+ () =>
1176
+ S.Struct({
1177
+ ok: S.Boolean,
1178
+ }),
1179
+ ).annotate({
1180
+ identifier: "SetExternalInvitePermissionsResponse",
1181
+ }) as any as S.Schema<SetExternalInvitePermissionsResponse>;
1182
+
1183
+ export interface SetPurposeRequest {
1184
+ /** Channel to set the description of */
1185
+ channel: string;
1186
+ /** The description */
1187
+ purpose: string;
1188
+ }
1189
+ export const SetPurposeRequest = /*@__PURE__*/ S.suspend(() =>
1190
+ S.Struct({
1191
+ channel: S.String,
1192
+ purpose: S.String,
1193
+ }).pipe(
1194
+ T.Http({ method: "POST", uri: "/conversations.setPurpose", code: 200 }),
1195
+ ),
1196
+ ).annotate({
1197
+ identifier: "SetPurposeRequest",
1198
+ }) as any as S.Schema<SetPurposeRequest>;
1199
+
1200
+ export interface SetPurposeResponse {
1201
+ /** Always `true` (a failed call raises a typed error instead). */
1202
+ ok: boolean;
1203
+ channel: unknown;
1204
+ }
1205
+ export const SetPurposeResponse = /*@__PURE__*/ S.suspend(() =>
1206
+ S.Struct({
1207
+ ok: S.Boolean,
1208
+ channel: S.Unknown,
1209
+ }),
1210
+ ).annotate({
1211
+ identifier: "SetPurposeResponse",
1212
+ }) as any as S.Schema<SetPurposeResponse>;
1213
+
1214
+ export interface SetTopicRequest {
1215
+ /** Conversation to set the topic of */
1216
+ channel: string;
1217
+ /** The new topic string. Does not support formatting or linkification. */
1218
+ topic: string;
1219
+ }
1220
+ export const SetTopicRequest = /*@__PURE__*/ S.suspend(() =>
1221
+ S.Struct({
1222
+ channel: S.String,
1223
+ topic: S.String,
1224
+ }).pipe(
1225
+ T.Http({ method: "POST", uri: "/conversations.setTopic", code: 200 }),
1226
+ ),
1227
+ ).annotate({
1228
+ identifier: "SetTopicRequest",
1229
+ }) as any as S.Schema<SetTopicRequest>;
1230
+
1231
+ export interface SetTopicResponse {
1232
+ /** Always `true` (a failed call raises a typed error instead). */
1233
+ ok: boolean;
1234
+ channel: unknown;
1235
+ }
1236
+ export const SetTopicResponse = /*@__PURE__*/ S.suspend(() =>
1237
+ S.Struct({
1238
+ ok: S.Boolean,
1239
+ channel: S.Unknown,
1240
+ }),
1241
+ ).annotate({
1242
+ identifier: "SetTopicResponse",
1243
+ }) as any as S.Schema<SetTopicResponse>;
1244
+
1245
+ export interface UnarchiveConversationRequest {
1246
+ /** ID of conversation to unarchive */
1247
+ channel: string;
1248
+ }
1249
+ export const UnarchiveConversationRequest = /*@__PURE__*/ S.suspend(() =>
1250
+ S.Struct({
1251
+ channel: S.String,
1252
+ }).pipe(
1253
+ T.Http({ method: "POST", uri: "/conversations.unarchive", code: 200 }),
1254
+ ),
1255
+ ).annotate({
1256
+ identifier: "UnarchiveConversationRequest",
1257
+ }) as any as S.Schema<UnarchiveConversationRequest>;
1258
+
1259
+ export interface UnarchiveConversationResponse {
1260
+ /** Always `true` (a failed call raises a typed error instead). */
1261
+ ok: boolean;
1262
+ }
1263
+ export const UnarchiveConversationResponse = /*@__PURE__*/ S.suspend(() =>
1264
+ S.Struct({
1265
+ ok: S.Boolean,
1266
+ }),
1267
+ ).annotate({
1268
+ identifier: "UnarchiveConversationResponse",
1269
+ }) as any as S.Schema<UnarchiveConversationResponse>;
1270
+
1271
+ export type AcceptSharedInviteError = SlackOpError;
1272
+ /** Accepts an invitation to a Slack Connect channel. Required scopes — bot: `conversations.connect:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_conversion_in_progress` — Unable to create a channel connection while a channel conversion is in progress - `connection_limit_exceeded` — This channel has hit the limit of external connections. - `email_does_not_match` — User's email does not match the email in the invite. - `failed_to_start_trial` — Unable to initiate a trial on shared invite acceptance - `has_already_connected_to_org` — A team on the workspace of the org is already in the channel. - `invalid_arguments` — Invalid API arguments were provided. Either `sig` or `invite_id` must be specified. - `invalid_emoji_not_allowed` — The desired name contains emoji. - `invalid_host_team` — The host workspace is invalid. - `invalid_link` — We couldn't find an invite associated with the ID provided. - `invalid_name` — The value passed for `channel_name` was invalid. - `invalid_name_maxlength` — The value passed for `channel_name` exceeded the maximum length. - `invalid_name_punctuation` — The value passed for `channel_name` contained only punctuation. - `invalid_name_required` — The value passed for `channel_name` was empty. - `invalid_name_specials` — The value passed for `channel_name` contained unallowed special characters or upper case characters. - `invite_from_same_org` — You can't accept an invite from the same org or workspace. - `invite_not_found` — We couldn't find a Slack Connect channel invite with the ID provided. - `invalid_privacy` — An invalid channel privacy was provided. - `invalid_recipient_team` — The accepting team does not match the expected recipient team. - `invalid_target_team` — The target workspace is invalid. - `invite_used` — This invite has already been accepted. - `is_pending_connected_to_org` — A team pending to join the channel is on the org of the team trying to accept. - `legacy_connection_invalid_org` — Teams not previously connected to this legacy channel can't connect. - `legacy_connection_limit_exceeded` — You cannot share a legacy ESC channel with a third team - `name_taken` — The desired channel name is already taken in your workspace. - `not_allowed_for_grid_workspace` — Acceptance is not allowed for this workspace. - `not_paid` — This workspace doesn't have access to this feature. - `restricted_action` — A team preference prevents the authenticated user from creating private channels. - `team_not_found` — The team provided in the `team_id` argument does not exits. - `user_cannot_create_channel` — This user is not allowed to create a channel. - `user_is_restricted` — This user is restricted and cannot accept the invite. - `user_not_found` — The user accepting the invite is not a member of the team provided in the `team_id` argument. - `user_required_to_accept_as_private_but_cannot` — This uer cannot accept a private channel invitation. See https://docs.slack.dev/reference/methods/conversations.acceptSharedInvite */
1273
+ export const acceptSharedInvite: API.OperationMethod<
1274
+ AcceptSharedInviteRequest,
1275
+ AcceptSharedInviteResponse,
1276
+ AcceptSharedInviteError,
1277
+ SlackOpContext
1278
+ > = /*@__PURE__*/ API.make(() => ({
1279
+ input: AcceptSharedInviteRequest,
1280
+ output: AcceptSharedInviteResponse,
1281
+ errors: [SlackError, SlackRateLimited],
1282
+ protocol: SlackProtocol,
1283
+ retry: Retry.Retry,
1284
+ }));
1285
+
1286
+ export type ApproveRequestSharedInviteError = SlackOpError;
1287
+ /** Approves a request to add an external user to a channel and sends them a Slack Connect invite Required scopes — bot: `conversations.connect:manage` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invite_not_found` — We couldn't find a Slack Connect channel invite with the ID provided. - `invite_already_approved` — This invite was already approved. - `invite_already_denied` — This invite was already denied. - `invite_expired` — This invite is expired. - `channel_not_found` — The provided channel was not found or the channel is no longer visible to the user who requested the invite. - `user_not_found` — Can not find the user who requested the invite. - `team_not_found` — Can not find the team who requested the invite. - `restricted_action` — A team preference prevents the invite from being approved. - `no_external_invite_permission` — Channel manager has restricted external invites for a given channel. - `internal_error` — Something unexpected went wrong. - `message_too_long` — If the passed in approve message is greater than 560 characters. See https://docs.slack.dev/reference/methods/conversations.requestSharedInvite.approve */
1288
+ export const approveRequestSharedInvite: API.OperationMethod<
1289
+ ApproveRequestSharedInviteRequest,
1290
+ ApproveRequestSharedInviteResponse,
1291
+ ApproveRequestSharedInviteError,
1292
+ SlackOpContext
1293
+ > = /*@__PURE__*/ API.make(() => ({
1294
+ input: ApproveRequestSharedInviteRequest,
1295
+ output: ApproveRequestSharedInviteResponse,
1296
+ errors: [SlackError, SlackRateLimited],
1297
+ protocol: SlackProtocol,
1298
+ retry: Retry.Retry,
1299
+ }));
1300
+
1301
+ export type ApproveSharedInviteError = SlackOpError;
1302
+ /** Approves an invitation to a Slack Connect channel Required scopes — bot: `conversations.connect:manage` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `already_approved` — This invite was already approved by this team. - `approval_inactive` — The approval associated with the invite ID is not active. - `approval_not_found` — We could not find an approval associated with the invite ID provided. - `channel_conversion_in_progress` — A channel conversion is in progress - `channel_not_found` — The channel associated with this invite wasn't found. - `invalid_action` — This action is no longer valid, e.g., trying to approve an invite that has already been approved. - `invalid_link` — The link provided was invalid. - `invite_not_found` — The invite specified wasn't found. - `missing_target_team` — The `target_team` parameter is required for this request. The inviting team must provide this argument. - `not_paid` — The team attempting to approve this invite is not paid and therefore not eligible. - `restricted_action` — A team preference prevents the authenticated user from creating private channels. See https://docs.slack.dev/reference/methods/conversations.approveSharedInvite */
1303
+ export const approveSharedInvite: API.OperationMethod<
1304
+ ApproveSharedInviteRequest,
1305
+ ApproveSharedInviteResponse,
1306
+ ApproveSharedInviteError,
1307
+ SlackOpContext
1308
+ > = /*@__PURE__*/ API.make(() => ({
1309
+ input: ApproveSharedInviteRequest,
1310
+ output: ApproveSharedInviteResponse,
1311
+ errors: [SlackError, SlackRateLimited],
1312
+ protocol: SlackProtocol,
1313
+ retry: Retry.Retry,
1314
+ }));
1315
+
1316
+ export type ArchiveConversationError = SlackOpError;
1317
+ /** Archives a conversation. Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_archived` — Channel has already been archived. - `cant_archive_general` — You cannot archive the general channel - `cant_archive_required` — You cannot archive a required channel - `channel_not_found` — Value passed for `channel` was invalid. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `not_in_channel` — The token can not be found in channel. - `restricted_action` — A team preference prevents the authenticated user from archiving. See https://docs.slack.dev/reference/methods/conversations.archive */
1318
+ export const archiveConversation: API.OperationMethod<
1319
+ ArchiveConversationRequest,
1320
+ ArchiveConversationResponse,
1321
+ ArchiveConversationError,
1322
+ SlackOpContext
1323
+ > = /*@__PURE__*/ API.make(() => ({
1324
+ input: ArchiveConversationRequest,
1325
+ output: ArchiveConversationResponse,
1326
+ errors: [SlackError, SlackRateLimited],
1327
+ protocol: SlackProtocol,
1328
+ retry: Retry.Retry,
1329
+ }));
1330
+
1331
+ export type ConversationsCloseError = SlackOpError;
1332
+ /** Closes a direct message or multi-person direct message. Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `user_does_not_own_channel` — Calling user does not own this DM channel. - `not_permitted` — Not permitted. - `external_channel_migrating` — External channel migrating. See https://docs.slack.dev/reference/methods/conversations.close */
1333
+ export const conversationsClose: API.OperationMethod<
1334
+ ConversationsCloseRequest,
1335
+ ConversationsCloseResponse,
1336
+ ConversationsCloseError,
1337
+ SlackOpContext
1338
+ > = /*@__PURE__*/ API.make(() => ({
1339
+ input: ConversationsCloseRequest,
1340
+ output: ConversationsCloseResponse,
1341
+ errors: [SlackError, SlackRateLimited],
1342
+ protocol: SlackProtocol,
1343
+ retry: Retry.Retry,
1344
+ }));
1345
+
1346
+ export type ConversationsHistoryError = SlackOpError;
1347
+ /** Fetches a conversation's history of messages and events. Required scopes — bot: `groups:history`, `im:history`, `mpim:history`, `channels:history`; user: `groups:history`, `im:history`, `mpim:history`, `channels:history` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_is_limited_access` — The user has no access to the channel. This is only applicable to private Salesforce record channels. - `channel_not_found` — Value passed for `channel` was invalid. - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `invalid_metadata_filter_keys` — Value passed for `metadata_keys_to_include` was invalid. Must be valid json array of strings. - `invalid_ts_latest` — Value passed for `latest` was invalid - `invalid_ts_oldest` — Value passed for `oldest` was invalid - `not_in_channel` — The token used does not have access to the proper channel. Only user tokens can access public channels they are not in. See https://docs.slack.dev/reference/methods/conversations.history */
1348
+ export const conversationsHistory: API.PaginatedOperationMethod<
1349
+ ConversationsHistoryRequest,
1350
+ ConversationsHistoryResponse,
1351
+ ConversationsHistoryError,
1352
+ SlackOpContext,
1353
+ unknown
1354
+ > = /*@__PURE__*/ API.makePaginated(
1355
+ () => ({
1356
+ input: ConversationsHistoryRequest,
1357
+ output: ConversationsHistoryResponse,
1358
+ errors: [SlackError, SlackRateLimited],
1359
+ protocol: SlackProtocol,
1360
+ retry: Retry.Retry,
1361
+ pagination: {
1362
+ mode: "cursor",
1363
+ inputToken: "cursor",
1364
+ outputToken: "response_metadata.next_cursor",
1365
+ items: "messages",
1366
+ pageSize: "limit",
1367
+ } as const,
1368
+ }),
1369
+ slackPaginate,
1370
+ ) as any;
1371
+
1372
+ export type ConversationsInfoError = SlackOpError;
1373
+ /** Retrieve information about a conversation. Required scopes — bot: `groups:read`, `im:read`, `mpim:read`, `channels:read`; user: `groups:read`, `im:read`, `mpim:read`, `channels:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_is_limited_access` — The user has no access to the channel. Only applicable to Salesforce limited access channels. - `channel_not_found` — Value passed for `channel` was invalid. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. See https://docs.slack.dev/reference/methods/conversations.info */
1374
+ export const conversationsInfo: API.OperationMethod<
1375
+ ConversationsInfoRequest,
1376
+ ConversationsInfoResponse,
1377
+ ConversationsInfoError,
1378
+ SlackOpContext
1379
+ > = /*@__PURE__*/ API.make(() => ({
1380
+ input: ConversationsInfoRequest,
1381
+ output: ConversationsInfoResponse,
1382
+ errors: [SlackError, SlackRateLimited],
1383
+ protocol: SlackProtocol,
1384
+ retry: Retry.Retry,
1385
+ }));
1386
+
1387
+ export type ConversationsKickError = SlackOpError;
1388
+ /** Removes a user from a conversation. Required scopes — bot: `groups:write`, `channels:manage`; user: `groups:write`, `channels:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_kick_from_general` — User cannot be removed from #general. - `cant_kick_self` — Authenticated user can't kick themselves from a channel. - `channel_not_found` — Value passed for `channel` was invalid. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `not_in_channel` — User was not in the channel. - `not_supported` — This is not supported for this channel and user combination. - `restricted_action` — A team preference prevents the authenticated user from kicking. - `user_not_found` — Value passed for `user` was invalid. See https://docs.slack.dev/reference/methods/conversations.kick */
1389
+ export const conversationsKick: API.OperationMethod<
1390
+ ConversationsKickRequest,
1391
+ ConversationsKickResponse,
1392
+ ConversationsKickError,
1393
+ SlackOpContext
1394
+ > = /*@__PURE__*/ API.make(() => ({
1395
+ input: ConversationsKickRequest,
1396
+ output: ConversationsKickResponse,
1397
+ errors: [SlackError, SlackRateLimited],
1398
+ protocol: SlackProtocol,
1399
+ retry: Retry.Retry,
1400
+ }));
1401
+
1402
+ export type ConversationsMarkError = SlackOpError;
1403
+ /** Sets the read cursor in a channel. Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `invalid_timestamp` — Value passed for `timestamp` was invalid. - `not_in_channel` — Caller is not a member of the channel. See https://docs.slack.dev/reference/methods/conversations.mark */
1404
+ export const conversationsMark: API.OperationMethod<
1405
+ ConversationsMarkRequest,
1406
+ ConversationsMarkResponse,
1407
+ ConversationsMarkError,
1408
+ SlackOpContext
1409
+ > = /*@__PURE__*/ API.make(() => ({
1410
+ input: ConversationsMarkRequest,
1411
+ output: ConversationsMarkResponse,
1412
+ errors: [SlackError, SlackRateLimited],
1413
+ protocol: SlackProtocol,
1414
+ retry: Retry.Retry,
1415
+ }));
1416
+
1417
+ export type ConversationsMembersError = SlackOpError;
1418
+ /** Retrieve members of a conversation. Required scopes — bot: `groups:read`, `im:read`, `mpim:read`, `channels:read`; user: `groups:read`, `im:read`, `mpim:read`, `channels:read` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `fetch_members_failed` — Failed to fetch members for the conversation. - `invalid_cursor` — Value passed for `cursor` was invalid. - `invalid_limit` — Value passed for `limit` was invalid. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. See https://docs.slack.dev/reference/methods/conversations.members */
1419
+ export const conversationsMembers: API.PaginatedOperationMethod<
1420
+ ConversationsMembersRequest,
1421
+ ConversationsMembersResponse,
1422
+ ConversationsMembersError,
1423
+ SlackOpContext,
1424
+ string
1425
+ > = /*@__PURE__*/ API.makePaginated(
1426
+ () => ({
1427
+ input: ConversationsMembersRequest,
1428
+ output: ConversationsMembersResponse,
1429
+ errors: [SlackError, SlackRateLimited],
1430
+ protocol: SlackProtocol,
1431
+ retry: Retry.Retry,
1432
+ pagination: {
1433
+ mode: "cursor",
1434
+ inputToken: "cursor",
1435
+ outputToken: "response_metadata.next_cursor",
1436
+ items: "members",
1437
+ pageSize: "limit",
1438
+ } as const,
1439
+ }),
1440
+ slackPaginate,
1441
+ ) as any;
1442
+
1443
+ export type ConversationsOpenError = SlackOpError;
1444
+ /** Opens or resumes a direct message or multi-person direct message. Required scopes — bot: `channels:manage`, `groups:write`, `im:write`, `mpim:write`; user: `channels:write`, `groups:write`, `im:write`, `mpim:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `invalid_user_combination` — All external people must already be in at least one channel together to send a message. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `not_enough_users` — Needs at least 2 users to open - `too_many_users` — Needs at most 8 users to open - `user_disabled` — A specified `user` has been disabled. - `user_not_found` — Value(s) passed for `users` was invalid. - `user_not_visible` — The calling user is restricted from seeing the requested user. - `users_list_not_supplied` — Missing `users` in request See https://docs.slack.dev/reference/methods/conversations.open */
1445
+ export const conversationsOpen: API.OperationMethod<
1446
+ ConversationsOpenRequest,
1447
+ ConversationsOpenResponse,
1448
+ ConversationsOpenError,
1449
+ SlackOpContext
1450
+ > = /*@__PURE__*/ API.make(() => ({
1451
+ input: ConversationsOpenRequest,
1452
+ output: ConversationsOpenResponse,
1453
+ errors: [SlackError, SlackRateLimited],
1454
+ protocol: SlackProtocol,
1455
+ retry: Retry.Retry,
1456
+ }));
1457
+
1458
+ export type ConversationsRepliesError = SlackOpError;
1459
+ /** Retrieve a thread of messages posted to a conversation Required scopes — bot: `groups:history`, `im:history`, `mpim:history`, `channels:history`; user: `groups:history`, `im:history`, `mpim:history`, `channels:history` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value for `channel` was missing or invalid. - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `invalid_metadata_filter_keys` — Value passed for `metadata_keys_to_include` was invalid. Must be valid json array of strings. - `invalid_ts_latest` — Value passed for `latest` was invalid - `invalid_ts_oldest` — Value passed for `oldest` was invalid - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `thread_not_found` — Value for `ts` was missing or invalid. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `list_record_comment_fetch_failed` — Failed to fetch list record comments. See https://docs.slack.dev/reference/methods/conversations.replies */
1460
+ export const conversationsReplies: API.PaginatedOperationMethod<
1461
+ ConversationsRepliesRequest,
1462
+ ConversationsRepliesResponse,
1463
+ ConversationsRepliesError,
1464
+ SlackOpContext,
1465
+ unknown
1466
+ > = /*@__PURE__*/ API.makePaginated(
1467
+ () => ({
1468
+ input: ConversationsRepliesRequest,
1469
+ output: ConversationsRepliesResponse,
1470
+ errors: [SlackError, SlackRateLimited],
1471
+ protocol: SlackProtocol,
1472
+ retry: Retry.Retry,
1473
+ pagination: {
1474
+ mode: "cursor",
1475
+ inputToken: "cursor",
1476
+ outputToken: "response_metadata.next_cursor",
1477
+ items: "messages",
1478
+ pageSize: "limit",
1479
+ } as const,
1480
+ }),
1481
+ slackPaginate,
1482
+ ) as any;
1483
+
1484
+ export type CreateCanvaseError = SlackOpError;
1485
+ /** Create a channel canvas for a channel Required scopes — bot: `canvases:write`; user: `canvases:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` — Canvas is disabled on user's team - `restricted_action` — User does not have permission to perform this action. - `channel_canvas_creation_failed` — Channel canvas was unable to be created. - `channel_canvas_already_exists` — Channel canvas for the specified channel already exists. - `team_tier_cannot_create_channel_canvases` — Team tier cannot create channel canvases - `canvas_creation_failed` — Canvas was unable to be created. - `canvas_tab_creation_failed` — Canvas tab was unable to be created. - `free_team_canvas_tab_already_exists` — Canvas tab for specified channel and team tier already exists. See https://docs.slack.dev/reference/methods/conversations.canvases.create */
1486
+ export const createCanvase: API.OperationMethod<
1487
+ CreateCanvaseRequest,
1488
+ CreateCanvaseResponse,
1489
+ CreateCanvaseError,
1490
+ SlackOpContext
1491
+ > = /*@__PURE__*/ API.make(() => ({
1492
+ input: CreateCanvaseRequest,
1493
+ output: CreateCanvaseResponse,
1494
+ errors: [SlackError, SlackRateLimited],
1495
+ protocol: SlackProtocol,
1496
+ retry: Retry.Retry,
1497
+ }));
1498
+
1499
+ export type CreateConversationError = SlackOpError;
1500
+ /** Initiates a public or private channel-based conversation Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `cannot_create_channel` — This channel is unable to be created. - `invalid_name` — Value passed for `name` was invalid. - `invalid_name_maxlength` — Value passed for `name` exceeded max length. - `invalid_name_punctuation` — Value passed for `name` contained only punctuation. - `invalid_name_required` — Value passed for `name` was empty. - `invalid_name_specials` — Value passed for `name` contained unallowed special characters or upper case characters. - `missing_argument` — A required argument is missing. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `name_taken` — A channel cannot be created with the given name. - `no_channel` — Value passed for `name` was empty. - `restricted_action` — A team (workspace) preference prevents the authenticated user from creating channels. - `canvas_disabled_user_team` — Canvas is disabled on user's team See https://docs.slack.dev/reference/methods/conversations.create */
1501
+ export const createConversation: API.OperationMethod<
1502
+ CreateConversationRequest,
1503
+ CreateConversationResponse,
1504
+ CreateConversationError,
1505
+ SlackOpContext
1506
+ > = /*@__PURE__*/ API.make(() => ({
1507
+ input: CreateConversationRequest,
1508
+ output: CreateConversationResponse,
1509
+ errors: [SlackError, SlackRateLimited],
1510
+ protocol: SlackProtocol,
1511
+ retry: Retry.Retry,
1512
+ }));
1513
+
1514
+ export type InviteConversationError = SlackOpError;
1515
+ /** Invites users to a channel. Required scopes — bot: `channels:write.invites`, `groups:write.invites`, `channels:manage`, `groups:write`, `im:write`, `mpim:write`; user: `channels:write.invites`, `groups:write.invites`, `channels:write`, `groups:write`, `im:write`, `mpim:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `already_in_channel` — Invited user is already in the channel. - `app_cannot_join_channel` — This app cannot be invited to this channel. - `cant_invite` — User cannot be invited to this channel. - `cant_invite_self` — Authenticated user cannot invite themselves to a channel. - `channel_not_found` — Value passed for `channel` was invalid. - `invitee_cant_see_channel` — The Enterprise org multi-workspace channel you are inviting a user to is not shared with any workspaces the user is currently a member of. - `is_archived` — Channel has been archived. - `org_user_not_in_team` — One or more members invited are part of the Enterprise organization but not the specific workspace you're interfacing with. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `no_permission` — User does not have permission to invite that specific user to the channel - `no_external_invite_permission` — User does not have permission to invite that external user to the channel - `no_user` — No value was passed for `users`. - `not_in_channel` — Authenticated user is not in the channel. - `ura_max_channels` — An invited user is a single-channel guest user ('ultra restricted access') that is already in the maximum number of conversations. - `user_is_restricted` — An invited user is a guest user that is restricted from accessing this conversation. - `user_not_found` — Value passed for `users` was invalid. - `external_channel_migrating` — External channel migrating. See https://docs.slack.dev/reference/methods/conversations.invite */
1516
+ export const inviteConversation: API.OperationMethod<
1517
+ InviteConversationRequest,
1518
+ InviteConversationResponse,
1519
+ InviteConversationError,
1520
+ SlackOpContext
1521
+ > = /*@__PURE__*/ API.make(() => ({
1522
+ input: InviteConversationRequest,
1523
+ output: InviteConversationResponse,
1524
+ errors: [SlackError, SlackRateLimited],
1525
+ protocol: SlackProtocol,
1526
+ retry: Retry.Retry,
1527
+ }));
1528
+
1529
+ export type InviteDeclineSharedError = SlackOpError;
1530
+ /** Declines a Slack Connect channel invite. Required scopes — bot: `conversations.connect:manage` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `approval_inactive` — This approval is no longer active, it may have expired or been declined. - `approval_not_found` — We could not find a Slack Connect approval for the invite provided. - `inactive_invite` — This invitation is no longer active, it may have expired or been revoked. - `invite_not_found` — We could not find a Slack Connect invite associated with the ID provided. - `missing_target_team` — The `target_team` parameter is required for this request. - `not_paid` — The workspace is not eligible to use Slack Connect. - `restricted_action` — A team preference prevents the authenticated user from declining Slack Connect invites.. See https://docs.slack.dev/reference/methods/conversations.declineSharedInvite */
1531
+ export const inviteDeclineShared: API.OperationMethod<
1532
+ InviteDeclineSharedRequest,
1533
+ InviteDeclineSharedResponse,
1534
+ InviteDeclineSharedError,
1535
+ SlackOpContext
1536
+ > = /*@__PURE__*/ API.make(() => ({
1537
+ input: InviteDeclineSharedRequest,
1538
+ output: InviteDeclineSharedResponse,
1539
+ errors: [SlackError, SlackRateLimited],
1540
+ protocol: SlackProtocol,
1541
+ retry: Retry.Retry,
1542
+ }));
1543
+
1544
+ export type InviteSharedError = SlackOpError;
1545
+ /** Sends an invitation to a Slack Connect channel Required scopes — bot: `conversations.connect:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_in_channel` — User is already in the channel. - `cannot_share_cross_workspace_channel` — You cannot share a cross-workspace or org-wide channel. - `cannot_share_mandatory_channel` — You cannot share #general or mandatory channels. - `channel_archived` — You cannot share an archived channel. - `channel_not_found` — The channel provided was not found. - `connection_limit_exceeded` — This channel has hit the limit of external connections. - `connection_limit_exceeded_pending` — This channel already has a pending invite. - `invalid_channel_type` — You cannot share MPDMs or DMs. - `invalid_email` — At least one email address provided is invalid. - `invite_lookup_error` — An error occurred while attempting to look for existing invites. - `invite_not_found` — An error occurred while inviting users. - `legacy_connection_limit_exceeded` — You cannot share a legacy ESC channel with a third team - `member_limit_exceeded` — This channel that has hit the limit of members - `message_too_long` — The provided message was longer than 560 characters. - `not_allowed_for_grid_workspace` — This workspace does not have Slack Connect enabled. - `not_in_channel` — The app is not a member of the channel to invite. - `not_owner` — Only the host organization for a channel can request to share it. - `not_paid` — This feature is only available to paid teams. - `not_supported` — This channel cannot be shared. - `ratelimit` — The rate-limit for this method has been reached. The ratelimit is applied on a per-user basis when you pass the `emails` parameter. - `recipients_not_specified` — Bots are required to specify which users to invite. - `restricted_action` — A team preference does not allow this authorization to send invites. - `too_many_emails` — Too many email recipients were passed in the `emails` parameter. - `url_in_message` — The message contained a URL. - `user_not_found` — User lookup failed. - `no_external_invite_permission` — User does not have permission to invite an external user. See https://docs.slack.dev/reference/methods/conversations.inviteShared */
1546
+ export const inviteShared: API.OperationMethod<
1547
+ InviteSharedRequest,
1548
+ InviteSharedResponse,
1549
+ InviteSharedError,
1550
+ SlackOpContext
1551
+ > = /*@__PURE__*/ API.make(() => ({
1552
+ input: InviteSharedRequest,
1553
+ output: InviteSharedResponse,
1554
+ errors: [SlackError, SlackRateLimited],
1555
+ protocol: SlackProtocol,
1556
+ retry: Retry.Retry,
1557
+ }));
1558
+
1559
+ export type JoinConversationError = SlackOpError;
1560
+ /** Joins an existing conversation. Required scopes — user: `channels:write`; bot: `channels:join` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_is_limited_access` — The user has no access to the channel. This is only applicable to private Salesforce record channels. - `channel_not_found` — Value passed for `channel` was invalid. - `is_archived` — Channel has been archived. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `too_many_members` — The membership in the channel has exceeded our maximum member limit. No more users can join the channel. See https://docs.slack.dev/reference/methods/conversations.join */
1561
+ export const joinConversation: API.OperationMethod<
1562
+ JoinConversationRequest,
1563
+ JoinConversationResponse,
1564
+ JoinConversationError,
1565
+ SlackOpContext
1566
+ > = /*@__PURE__*/ API.make(() => ({
1567
+ input: JoinConversationRequest,
1568
+ output: JoinConversationResponse,
1569
+ errors: [SlackError, SlackRateLimited],
1570
+ protocol: SlackProtocol,
1571
+ retry: Retry.Retry,
1572
+ }));
1573
+
1574
+ export type LeaveConversationError = SlackOpError;
1575
+ /** Leaves a conversation. Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_leave_general` — Authenticated user cannot leave the general channel - `channel_not_found` — Value passed for `channel` was invalid. - `is_archived` — Channel has been archived. - `last_member` — The last member party to a channel cannot leave the channel. Someone else must join the channel before this user is permitted to exit. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `user_is_restricted` — Restricted and guest users cannot leave channel See https://docs.slack.dev/reference/methods/conversations.leave */
1576
+ export const leaveConversation: API.OperationMethod<
1577
+ LeaveConversationRequest,
1578
+ LeaveConversationResponse,
1579
+ LeaveConversationError,
1580
+ SlackOpContext
1581
+ > = /*@__PURE__*/ API.make(() => ({
1582
+ input: LeaveConversationRequest,
1583
+ output: LeaveConversationResponse,
1584
+ errors: [SlackError, SlackRateLimited],
1585
+ protocol: SlackProtocol,
1586
+ retry: Retry.Retry,
1587
+ }));
1588
+
1589
+ export type ListConnectInvitesError = SlackOpError;
1590
+ /** Lists shared channel invites that have been generated or received but have not been approved by all parties Required scopes — bot: `conversations.connect:manage` Rate limit tier: 1 Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` — An invalid argument was supplied to the method. - `restricted_action` — A team preference prevents the authenticated user from viewing shared channel invites. See https://docs.slack.dev/reference/methods/conversations.listConnectInvites */
1591
+ export const listConnectInvites: API.PaginatedOperationMethod<
1592
+ ListConnectInvitesRequest,
1593
+ ListConnectInvitesResponse,
1594
+ ListConnectInvitesError,
1595
+ SlackOpContext,
1596
+ unknown
1597
+ > = /*@__PURE__*/ API.makePaginated(
1598
+ () => ({
1599
+ input: ListConnectInvitesRequest,
1600
+ output: ListConnectInvitesResponse,
1601
+ errors: [SlackError, SlackRateLimited],
1602
+ protocol: SlackProtocol,
1603
+ retry: Retry.Retry,
1604
+ pagination: {
1605
+ mode: "cursor",
1606
+ inputToken: "cursor",
1607
+ outputToken: "response_metadata.next_cursor",
1608
+ items: "invites",
1609
+ } as const,
1610
+ }),
1611
+ slackPaginate,
1612
+ ) as any;
1613
+
1614
+ export type ListConversationsError = SlackOpError;
1615
+ /** Lists all channels in a Slack team. Required scopes — bot: `groups:read`, `im:read`, `mpim:read`, `channels:read`; user: `groups:read`, `im:read`, `mpim:read`, `channels:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` — Value passed for `cursor` was not valid or is no longer valid. - `invalid_limit` — Value passed for `limit` is not understood. - `invalid_types` — Value passed for `type` could not be used based on the method's capabilities or the permission scopes granted to the used token. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_argument` — A required argument is missing. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. See https://docs.slack.dev/reference/methods/conversations.list */
1616
+ export const listConversations: API.PaginatedOperationMethod<
1617
+ ListConversationsRequest,
1618
+ ListConversationsResponse,
1619
+ ListConversationsError,
1620
+ SlackOpContext,
1621
+ unknown
1622
+ > = /*@__PURE__*/ API.makePaginated(
1623
+ () => ({
1624
+ input: ListConversationsRequest,
1625
+ output: ListConversationsResponse,
1626
+ errors: [SlackError, SlackRateLimited],
1627
+ protocol: SlackProtocol,
1628
+ retry: Retry.Retry,
1629
+ pagination: {
1630
+ mode: "cursor",
1631
+ inputToken: "cursor",
1632
+ outputToken: "response_metadata.next_cursor",
1633
+ items: "channels",
1634
+ pageSize: "limit",
1635
+ } as const,
1636
+ }),
1637
+ slackPaginate,
1638
+ ) as any;
1639
+
1640
+ export type ListRequestSharedInviteError = SlackOpError;
1641
+ /** Lists requests to add external users to channels with ability to filter. Required scopes — bot: `conversations.connect:manage` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `restricted_action` — A team preference prevents the user from listing invitation requests. - `invalid_cursor` — The provided cursor is not valid. - `internal_error` — Something unexpected went wrong. - `not_implemented` — its not implemented! TODO: remove me See https://docs.slack.dev/reference/methods/conversations.requestSharedInvite.list */
1642
+ export const listRequestSharedInvite: API.PaginatedOperationMethod<
1643
+ ListRequestSharedInviteRequest,
1644
+ ListRequestSharedInviteResponse,
1645
+ ListRequestSharedInviteError,
1646
+ SlackOpContext,
1647
+ unknown
1648
+ > = /*@__PURE__*/ API.makePaginated(
1649
+ () => ({
1650
+ input: ListRequestSharedInviteRequest,
1651
+ output: ListRequestSharedInviteResponse,
1652
+ errors: [SlackError, SlackRateLimited],
1653
+ protocol: SlackProtocol,
1654
+ retry: Retry.Retry,
1655
+ pagination: {
1656
+ mode: "cursor",
1657
+ inputToken: "cursor",
1658
+ outputToken: "response_metadata.next_cursor",
1659
+ items: "invite_requests",
1660
+ pageSize: "limit",
1661
+ } as const,
1662
+ }),
1663
+ slackPaginate,
1664
+ ) as any;
1665
+
1666
+ export type RenameConversationError = SlackOpError;
1667
+ /** Renames a conversation. Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `invalid_name` — Value passed for `name` was invalid. - `invalid_name_maxlength` — Value passed for `name` exceeded max length. - `invalid_name_punctuation` — Value passed for `name` contained only punctuation. - `invalid_name_required` — Value passed for `name` was empty. - `invalid_name_specials` — Value passed for `name` contained unallowed special characters or upper case characters. - `is_archived` — Cannot rename archived channel. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `name_taken` — New channel name is taken. - `not_authorized` — Caller cannot rename this channel. - `not_in_channel` — Caller is not a member of the channel. See https://docs.slack.dev/reference/methods/conversations.rename */
1668
+ export const renameConversation: API.OperationMethod<
1669
+ RenameConversationRequest,
1670
+ RenameConversationResponse,
1671
+ RenameConversationError,
1672
+ SlackOpContext
1673
+ > = /*@__PURE__*/ API.make(() => ({
1674
+ input: RenameConversationRequest,
1675
+ output: RenameConversationResponse,
1676
+ errors: [SlackError, SlackRateLimited],
1677
+ protocol: SlackProtocol,
1678
+ retry: Retry.Retry,
1679
+ }));
1680
+
1681
+ export type RequestSharedInviteDenyError = SlackOpError;
1682
+ /** Denies a request to invite an external user to a channel Required scopes — bot: `conversations.connect:manage` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invite_not_found` — We couldn't find a Slack Connect channel invite with the ID provided. - `user_not_found` — We could not find the user who made the invite request. - `team_not_found` — We could not find the team which made the invite request. - `channel_not_found` — We could not find the channel where the request was made. - `invite_already_approved` — This invite was already approved. - `invite_already_denied` — This invite was already denied. - `invite_expired` — This invite is expired. - `restricted_action` — A team preference prevents the invite from being denied. - `internal_error` — Something unexpected went wrong. - `message_too_long` — If the passed in deny message is greater than 560 characters. See https://docs.slack.dev/reference/methods/conversations.requestSharedInvite.deny */
1683
+ export const requestSharedInviteDeny: API.OperationMethod<
1684
+ RequestSharedInviteDenyRequest,
1685
+ RequestSharedInviteDenyResponse,
1686
+ RequestSharedInviteDenyError,
1687
+ SlackOpContext
1688
+ > = /*@__PURE__*/ API.make(() => ({
1689
+ input: RequestSharedInviteDenyRequest,
1690
+ output: RequestSharedInviteDenyResponse,
1691
+ errors: [SlackError, SlackRateLimited],
1692
+ protocol: SlackProtocol,
1693
+ retry: Retry.Retry,
1694
+ }));
1695
+
1696
+ export type SetExternalInvitePermissionsError = SlackOpError;
1697
+ /** Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. Required scopes — bot: `conversations.connect:manage` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Cannot find channel - `not_supported` — Attempting to upgrade a channel that cannot be upgraded - `restricted_action` — A team preference prevents the user from taking this action. - `invalid_target_team` — The target team provided is not valid for the channel. - `invalid_action` — The user did not provid a valid action. Valid actions are 'upgrade' or 'downgrade'. See https://docs.slack.dev/reference/methods/conversations.externalInvitePermissions.set */
1698
+ export const setExternalInvitePermissions: API.OperationMethod<
1699
+ SetExternalInvitePermissionsRequest,
1700
+ SetExternalInvitePermissionsResponse,
1701
+ SetExternalInvitePermissionsError,
1702
+ SlackOpContext
1703
+ > = /*@__PURE__*/ API.make(() => ({
1704
+ input: SetExternalInvitePermissionsRequest,
1705
+ output: SetExternalInvitePermissionsResponse,
1706
+ errors: [SlackError, SlackRateLimited],
1707
+ protocol: SlackProtocol,
1708
+ retry: Retry.Retry,
1709
+ }));
1710
+
1711
+ export type SetPurposeError = SlackOpError;
1712
+ /** Sets the channel description. Required scopes — bot: `channels:write.topic`, `groups:write.topic`, `mpim:write.topic`, `im:write.topic`, `channels:manage`, `groups:write`, `im:write`, `mpim:write`; user: `channels:write.topic`, `groups:write.topic`, `mpim:write.topic`, `im:write.topic`, `channels:write`, `groups:write`, `im:write`, `mpim:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `is_archived` — Channel has been archived. - `method_not_supported_for_channel_type` — This conversation type cannot be used with this method. - `missing_scope` — The calling token has not been granted the necessary scopes to complete this operation. - `not_in_channel` — Authenticated user is not in the channel. - `too_long` — Description was longer than 250 characters. - `user_is_restricted` — Setting the channel description is a restricted action. See https://docs.slack.dev/reference/methods/conversations.setPurpose */
1713
+ export const setPurpose: API.OperationMethod<
1714
+ SetPurposeRequest,
1715
+ SetPurposeResponse,
1716
+ SetPurposeError,
1717
+ SlackOpContext
1718
+ > = /*@__PURE__*/ API.make(() => ({
1719
+ input: SetPurposeRequest,
1720
+ output: SetPurposeResponse,
1721
+ errors: [SlackError, SlackRateLimited],
1722
+ protocol: SlackProtocol,
1723
+ retry: Retry.Retry,
1724
+ }));
1725
+
1726
+ export type SetTopicError = SlackOpError;
1727
+ /** Sets the topic for a conversation. Required scopes — bot: `channels:write.topic`, `groups:write.topic`, `mpim:write.topic`, `im:write.topic`, `channels:manage`, `groups:write`, `im:write`, `mpim:write`; user: `channels:write.topic`, `groups:write.topic`, `mpim:write.topic`, `im:write.topic`, `channels:write`, `groups:write`, `im:write`, `mpim:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `is_archived` — Channel has been archived. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `not_in_channel` — Authenticated user is not in the channel. - `too_long` — Topic was longer than 250 characters. - `user_is_restricted` — Setting the topic is a restricted action. See https://docs.slack.dev/reference/methods/conversations.setTopic */
1728
+ export const setTopic: API.OperationMethod<
1729
+ SetTopicRequest,
1730
+ SetTopicResponse,
1731
+ SetTopicError,
1732
+ SlackOpContext
1733
+ > = /*@__PURE__*/ API.make(() => ({
1734
+ input: SetTopicRequest,
1735
+ output: SetTopicResponse,
1736
+ errors: [SlackError, SlackRateLimited],
1737
+ protocol: SlackProtocol,
1738
+ retry: Retry.Retry,
1739
+ }));
1740
+
1741
+ export type UnarchiveConversationError = SlackOpError;
1742
+ /** Reverses conversation archival. Required scopes — bot: `groups:write`, `im:write`, `mpim:write`, `channels:write`, `channels:manage`; user: `groups:write`, `im:write`, `mpim:write`, `channels:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `method_not_supported_for_channel_type` — This type of conversation cannot be used with this method. - `missing_scope` — The calling token is not granted the necessary scopes to complete this operation. - `not_archived` — Channel is not archived. See https://docs.slack.dev/reference/methods/conversations.unarchive */
1743
+ export const unarchiveConversation: API.OperationMethod<
1744
+ UnarchiveConversationRequest,
1745
+ UnarchiveConversationResponse,
1746
+ UnarchiveConversationError,
1747
+ SlackOpContext
1748
+ > = /*@__PURE__*/ API.make(() => ({
1749
+ input: UnarchiveConversationRequest,
1750
+ output: UnarchiveConversationResponse,
1751
+ errors: [SlackError, SlackRateLimited],
1752
+ protocol: SlackProtocol,
1753
+ retry: Retry.Retry,
1754
+ }));