@distilled.cloud/slack 1.0.0-rc.17 → 1.0.0-rc.19

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 (201) hide show
  1. package/lib/_bundle/sdk.js +1 -1
  2. package/lib/_bundle/sdk.js.map +1 -1
  3. package/lib/credentials.d.ts +2 -1
  4. package/lib/credentials.d.ts.map +1 -1
  5. package/lib/index.d.ts +3 -4
  6. package/lib/index.d.ts.map +1 -1
  7. package/lib/index.lazy.js.map +1 -1
  8. package/lib/protocol.d.ts +3 -2
  9. package/lib/protocol.d.ts.map +1 -1
  10. package/lib/services/admin.d.ts +594 -356
  11. package/lib/services/admin.d.ts.map +1 -1
  12. package/lib/services/admin.js +149 -139
  13. package/lib/services/admin.js.map +1 -1
  14. package/lib/services/agents.d.ts +89 -97
  15. package/lib/services/agents.d.ts.map +1 -1
  16. package/lib/services/agents.js +1 -1
  17. package/lib/services/agents.js.map +1 -1
  18. package/lib/services/api.d.ts +2 -2
  19. package/lib/services/api.d.ts.map +1 -1
  20. package/lib/services/api.js +1 -1
  21. package/lib/services/api.js.map +1 -1
  22. package/lib/services/apps.d.ts +74 -74
  23. package/lib/services/apps.d.ts.map +1 -1
  24. package/lib/services/apps.js +34 -33
  25. package/lib/services/apps.js.map +1 -1
  26. package/lib/services/assistant.d.ts +55 -46
  27. package/lib/services/assistant.d.ts.map +1 -1
  28. package/lib/services/assistant.js +1 -1
  29. package/lib/services/assistant.js.map +1 -1
  30. package/lib/services/auth.d.ts +27 -27
  31. package/lib/services/auth.d.ts.map +1 -1
  32. package/lib/services/auth.js +1 -1
  33. package/lib/services/auth.js.map +1 -1
  34. package/lib/services/blocks.d.ts +3 -3
  35. package/lib/services/blocks.d.ts.map +1 -1
  36. package/lib/services/blocks.js +1 -1
  37. package/lib/services/blocks.js.map +1 -1
  38. package/lib/services/bookmarks.d.ts +19 -19
  39. package/lib/services/bookmarks.d.ts.map +1 -1
  40. package/lib/services/bookmarks.js +1 -1
  41. package/lib/services/bookmarks.js.map +1 -1
  42. package/lib/services/bots.d.ts +23 -23
  43. package/lib/services/bots.d.ts.map +1 -1
  44. package/lib/services/bots.js +1 -1
  45. package/lib/services/bots.js.map +1 -1
  46. package/lib/services/calls.d.ts +10 -10
  47. package/lib/services/calls.d.ts.map +1 -1
  48. package/lib/services/calls.js +1 -1
  49. package/lib/services/calls.js.map +1 -1
  50. package/lib/services/canvases.d.ts +18 -18
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +1 -1
  53. package/lib/services/canvases.js.map +1 -1
  54. package/lib/services/chat.d.ts +103 -103
  55. package/lib/services/chat.d.ts.map +1 -1
  56. package/lib/services/chat.js +1 -1
  57. package/lib/services/chat.js.map +1 -1
  58. package/lib/services/conversations.d.ts +109 -103
  59. package/lib/services/conversations.d.ts.map +1 -1
  60. package/lib/services/conversations.js +39 -38
  61. package/lib/services/conversations.js.map +1 -1
  62. package/lib/services/dialog.d.ts.map +1 -1
  63. package/lib/services/dialog.js +1 -1
  64. package/lib/services/dialog.js.map +1 -1
  65. package/lib/services/dnd.d.ts +14 -14
  66. package/lib/services/dnd.d.ts.map +1 -1
  67. package/lib/services/dnd.js +1 -1
  68. package/lib/services/dnd.js.map +1 -1
  69. package/lib/services/emoji.d.ts +6 -6
  70. package/lib/services/emoji.d.ts.map +1 -1
  71. package/lib/services/emoji.js +1 -1
  72. package/lib/services/emoji.js.map +1 -1
  73. package/lib/services/entity.d.ts +14 -14
  74. package/lib/services/entity.d.ts.map +1 -1
  75. package/lib/services/entity.js +1 -1
  76. package/lib/services/entity.js.map +1 -1
  77. package/lib/services/files.d.ts +106 -106
  78. package/lib/services/files.d.ts.map +1 -1
  79. package/lib/services/files.js +30 -1
  80. package/lib/services/files.js.map +1 -1
  81. package/lib/services/functions.d.ts +37 -37
  82. package/lib/services/functions.d.ts.map +1 -1
  83. package/lib/services/functions.js +1 -1
  84. package/lib/services/functions.js.map +1 -1
  85. package/lib/services/index.d.ts +1 -0
  86. package/lib/services/index.d.ts.map +1 -1
  87. package/lib/services/index.js +1 -0
  88. package/lib/services/lists.d.ts +47 -45
  89. package/lib/services/lists.d.ts.map +1 -1
  90. package/lib/services/lists.js +1 -1
  91. package/lib/services/lists.js.map +1 -1
  92. package/lib/services/migration.d.ts +3 -3
  93. package/lib/services/migration.d.ts.map +1 -1
  94. package/lib/services/migration.js +1 -1
  95. package/lib/services/migration.js.map +1 -1
  96. package/lib/services/oauth.d.ts +102 -102
  97. package/lib/services/oauth.d.ts.map +1 -1
  98. package/lib/services/oauth.js +1 -1
  99. package/lib/services/oauth.js.map +1 -1
  100. package/lib/services/openid.d.ts +40 -40
  101. package/lib/services/openid.d.ts.map +1 -1
  102. package/lib/services/openid.js +1 -1
  103. package/lib/services/openid.js.map +1 -1
  104. package/lib/services/pins.d.ts +9 -9
  105. package/lib/services/pins.d.ts.map +1 -1
  106. package/lib/services/pins.js +1 -1
  107. package/lib/services/pins.js.map +1 -1
  108. package/lib/services/reactions.d.ts +23 -23
  109. package/lib/services/reactions.d.ts.map +1 -1
  110. package/lib/services/reactions.js +1 -1
  111. package/lib/services/reactions.js.map +1 -1
  112. package/lib/services/reminders.d.ts +8 -8
  113. package/lib/services/reminders.d.ts.map +1 -1
  114. package/lib/services/reminders.js +1 -1
  115. package/lib/services/reminders.js.map +1 -1
  116. package/lib/services/rtm.d.ts +11 -11
  117. package/lib/services/rtm.d.ts.map +1 -1
  118. package/lib/services/rtm.js +1 -1
  119. package/lib/services/rtm.js.map +1 -1
  120. package/lib/services/search.d.ts +84 -80
  121. package/lib/services/search.d.ts.map +1 -1
  122. package/lib/services/search.js +1 -1
  123. package/lib/services/search.js.map +1 -1
  124. package/lib/services/slackbot.d.ts +366 -0
  125. package/lib/services/slackbot.d.ts.map +1 -0
  126. package/lib/services/slackbot.js +2 -0
  127. package/lib/services/slackbot.js.map +1 -0
  128. package/lib/services/stars.d.ts +16 -16
  129. package/lib/services/stars.d.ts.map +1 -1
  130. package/lib/services/stars.js +1 -1
  131. package/lib/services/stars.js.map +1 -1
  132. package/lib/services/team.d.ts +39 -37
  133. package/lib/services/team.d.ts.map +1 -1
  134. package/lib/services/team.js +1 -1
  135. package/lib/services/team.js.map +1 -1
  136. package/lib/services/tooling.d.ts.map +1 -1
  137. package/lib/services/tooling.js +1 -1
  138. package/lib/services/tooling.js.map +1 -1
  139. package/lib/services/usergroups.d.ts +30 -30
  140. package/lib/services/usergroups.d.ts.map +1 -1
  141. package/lib/services/usergroups.js +1 -1
  142. package/lib/services/usergroups.js.map +1 -1
  143. package/lib/services/users.d.ts +37 -37
  144. package/lib/services/users.d.ts.map +1 -1
  145. package/lib/services/users.js +1 -1
  146. package/lib/services/users.js.map +1 -1
  147. package/lib/services/views.d.ts +9 -9
  148. package/lib/services/views.d.ts.map +1 -1
  149. package/lib/services/views.js +1 -1
  150. package/lib/services/views.js.map +1 -1
  151. package/lib/services/workflows.d.ts +16 -16
  152. package/lib/services/workflows.d.ts.map +1 -1
  153. package/lib/services/workflows.js +1 -1
  154. package/lib/services/workflows.js.map +1 -1
  155. package/lib/services.lazy/admin.js +2 -2
  156. package/lib/services.lazy/apps.js +1 -1
  157. package/lib/services.lazy/conversations.js +1 -1
  158. package/lib/services.lazy/files.js +3 -1
  159. package/lib/services.lazy/index.js +2 -2
  160. package/lib/services.lazy/slackbot.js +1 -0
  161. package/package.json +8 -7
  162. package/src/credentials.ts +3 -2
  163. package/src/index.ts +3 -4
  164. package/src/protocol.ts +23 -21
  165. package/src/services/admin.ts +1882 -1034
  166. package/src/services/agents.ts +128 -103
  167. package/src/services/api.ts +17 -2
  168. package/src/services/apps.ts +133 -74
  169. package/src/services/assistant.ts +109 -54
  170. package/src/services/auth.ts +46 -27
  171. package/src/services/blocks.ts +18 -3
  172. package/src/services/bookmarks.ts +40 -19
  173. package/src/services/bots.ts +38 -23
  174. package/src/services/calls.ts +35 -10
  175. package/src/services/canvases.ts +77 -46
  176. package/src/services/chat.ts +142 -103
  177. package/src/services/conversations.ts +195 -115
  178. package/src/services/dialog.ts +15 -0
  179. package/src/services/dnd.ts +37 -14
  180. package/src/services/emoji.ts +21 -6
  181. package/src/services/entity.ts +33 -14
  182. package/src/services/files.ts +149 -106
  183. package/src/services/functions.ts +66 -37
  184. package/src/services/index.ts +1 -0
  185. package/src/services/lists.ts +86 -46
  186. package/src/services/migration.ts +18 -3
  187. package/src/services/oauth.ts +127 -102
  188. package/src/services/openid.ts +57 -40
  189. package/src/services/pins.ts +28 -9
  190. package/src/services/reactions.ts +44 -23
  191. package/src/services/reminders.ts +31 -8
  192. package/src/services/rtm.ts +28 -11
  193. package/src/services/search.ts +142 -130
  194. package/src/services/slackbot.ts +766 -0
  195. package/src/services/stars.ts +35 -16
  196. package/src/services/team.ts +73 -37
  197. package/src/services/tooling.ts +15 -0
  198. package/src/services/usergroups.ts +57 -30
  199. package/src/services/users.ts +76 -37
  200. package/src/services/views.ts +30 -9
  201. package/src/services/workflows.ts +45 -16
@@ -12,17 +12,30 @@ const __s: any[] = [];
12
12
 
13
13
  export type { SlackOpError, SlackOpContext };
14
14
 
15
- /** Array of streaming chunks. */
15
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
16
+ const TELEMETRY = {
17
+ system: "slack-api",
18
+ responseHeaders: [
19
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
20
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
21
+ { header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
22
+ ],
23
+ prefix: "Slack",
24
+ service: "Chat",
25
+ propagate: "w3c",
26
+ } as const;
27
+
28
+ /** Array of streaming chunks that can contain either markdown text or task updates */
16
29
  export type AppendStreamRequestChunksList = Array<unknown>;
17
30
  export interface AppendStreamRequest {
18
31
  /** An encoded ID that represents a channel, private group, or DM */
19
32
  channel: string;
20
- /** Array of streaming chunks. */
21
- chunks?: AppendStreamRequestChunksList;
33
+ /** Array of streaming chunks that can contain either markdown text or task updates */
34
+ chunks?: AppendStreamRequestChunksList | undefined;
22
35
  /** The timestamp of the streaming message. */
23
36
  ts: string;
24
37
  /** Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far. */
25
- markdown_text?: string;
38
+ markdown_text?: string | undefined;
26
39
  }
27
40
  export interface AppendStreamResponse {
28
41
  /** Always `true` (a failed call raises a typed error instead). */
@@ -34,23 +47,23 @@ export interface AppendStreamResponse {
34
47
  export type ChatUnfurlRequestSource = "composer" | "conversations_history";
35
48
  export interface ChatUnfurlRequest {
36
49
  /** Channel ID of the message. Both `channel` and `ts` must be provided together, *or* `unfurl_id` and `source` must be provided together. Required for public channels. */
37
- channel?: string;
50
+ channel?: string | undefined;
38
51
  /** Timestamp of the message to add unfurl behavior to. Required for public channels. */
39
- ts?: string;
52
+ ts?: string | undefined;
40
53
  /** URL-encoded JSON map with keys set to URLs featured in the message, pointing to their unfurl blocks or message attachments. Required for public channels. */
41
- unfurls?: string;
54
+ unfurls?: string | undefined;
42
55
  /** Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, `Not now` or `Never ask me again`. */
43
- user_auth_message?: string | null;
56
+ user_auth_message?: string | null | undefined;
44
57
  /** Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain */
45
- user_auth_required?: boolean;
58
+ user_auth_required?: boolean | undefined;
46
59
  /** Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded. */
47
- user_auth_url?: string | null;
60
+ user_auth_url?: string | null | undefined;
48
61
  /** Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior */
49
- user_auth_blocks?: unknown;
62
+ user_auth_blocks?: unknown | undefined;
50
63
  /** The ID of the link to unfurl. Both `unfurl_id` and `source` must be provided together, *or* `channel` and `ts` must be provided together. */
51
- unfurl_id?: string;
64
+ unfurl_id?: string | undefined;
52
65
  /** The source of the link to unfurl. The source may either be `composer`, when the link is inside the message composer, or `conversations_history`, when the link has been posted to a conversation. */
53
- source?: ChatUnfurlRequestSource | (string & {});
66
+ source?: ChatUnfurlRequestSource | (string & {}) | undefined;
54
67
  }
55
68
  export interface ChatUnfurlResponse {
56
69
  /** Always `true` (a failed call raises a typed error instead). */
@@ -58,7 +71,7 @@ export interface ChatUnfurlResponse {
58
71
  }
59
72
  export interface DeleteChatRequest {
60
73
  /** (Legacy) Pass true to delete the message as the authed user with `chat:write:user` scope. Bot users in this context are considered authed users. See [legacy `as_user` parameter](#legacy_as_user) below. */
61
- as_user?: boolean;
74
+ as_user?: boolean | undefined;
62
75
  /** Channel containing the message to be deleted. */
63
76
  channel: string;
64
77
  /** Timestamp of the message to be deleted. */
@@ -72,7 +85,7 @@ export interface DeleteChatResponse {
72
85
  }
73
86
  export interface DeleteScheduledMessageRequest {
74
87
  /** Pass true to delete the message as the authed user with `chat:write:user` scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope. */
75
- as_user?: boolean;
88
+ as_user?: boolean | undefined;
76
89
  /** The channel the scheduled_message is posting to */
77
90
  channel: string;
78
91
  /** `scheduled_message_id` returned from call to chat.scheduleMessage */
@@ -96,38 +109,38 @@ export interface GetPermalinkResponse {
96
109
  }
97
110
  export interface ListScheduledMessagesRequest {
98
111
  /** The channel of the scheduled messages */
99
- channel?: string;
112
+ channel?: string | undefined;
100
113
  /** For pagination purposes, this is the `cursor` value returned from a previous call to `chat.scheduledmessages.list` indicating where you want to start this call from. */
101
- cursor?: string;
114
+ cursor?: string | undefined;
102
115
  /** A Unix timestamp of the latest value in the time range */
103
- latest?: string;
116
+ latest?: string | undefined;
104
117
  /** Maximum number of original entries to return. */
105
- limit?: number;
118
+ limit?: number | undefined;
106
119
  /** A Unix timestamp of the oldest value in the time range */
107
- oldest?: string;
120
+ oldest?: string | undefined;
108
121
  /** encoded team id to list channels in, required if org token is used */
109
- team_id?: string;
122
+ team_id?: string | undefined;
110
123
  }
111
124
  export interface ListScheduledMessagesResponseScheduledMessagesItem {
112
125
  id: string;
113
126
  channel_id: string;
114
127
  post_at: number;
115
128
  date_created: number;
116
- text?: string;
129
+ text?: string | undefined;
117
130
  }
118
131
  export type ListScheduledMessagesResponseScheduledMessagesList =
119
132
  Array<ListScheduledMessagesResponseScheduledMessagesItem>;
120
133
  /** Pagination metadata. An empty `next_cursor` means the last page. */
121
134
  export interface ListScheduledMessagesResponseResponseMetadata {
122
135
  /** Cursor for the next page -- pass as `cursor` on the next call. */
123
- next_cursor?: string;
136
+ next_cursor?: string | undefined;
124
137
  }
125
138
  export interface ListScheduledMessagesResponse {
126
139
  /** Always `true` (a failed call raises a typed error instead). */
127
140
  ok: boolean;
128
141
  scheduled_messages: ListScheduledMessagesResponseScheduledMessagesList;
129
142
  /** Pagination metadata. An empty `next_cursor` means the last page. */
130
- response_metadata?: ListScheduledMessagesResponseResponseMetadata;
143
+ response_metadata?: ListScheduledMessagesResponseResponseMetadata | undefined;
131
144
  }
132
145
  export interface MeMessageRequest {
133
146
  /** Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. */
@@ -138,8 +151,8 @@ export interface MeMessageRequest {
138
151
  export interface MeMessageResponse {
139
152
  /** Always `true` (a failed call raises a typed error instead). */
140
153
  ok: boolean;
141
- ts?: string;
142
- channel?: string;
154
+ ts?: string | undefined;
155
+ channel?: string | undefined;
143
156
  }
144
157
  export type PostEphemeralRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
145
158
  export type PostEphemeralRequestAttachmentsCase1List =
@@ -153,33 +166,33 @@ export type PostEphemeralRequestBlocks = string | PostEphemeralRequestBlocksCase
153
166
  export type PostEphemeralRequestParse = "" | "none" | "full" | "mrkdwn" | "false";
154
167
  export interface PostEphemeralRequest {
155
168
  /** (Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false. */
156
- as_user?: boolean;
169
+ as_user?: boolean | undefined;
157
170
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
158
- attachments?: PostEphemeralRequestAttachments;
171
+ attachments?: PostEphemeralRequestAttachments | undefined;
159
172
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
160
- blocks?: PostEphemeralRequestBlocks;
173
+ blocks?: PostEphemeralRequestBlocks | undefined;
161
174
  /** Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. */
162
175
  channel: string;
163
176
  /** Emoji to use as the icon for this message. Overrides `icon_url`. */
164
- icon_emoji?: string;
177
+ icon_emoji?: string | undefined;
165
178
  /** URL to an image to use as the icon for this message. */
166
- icon_url?: string;
179
+ icon_url?: string | undefined;
167
180
  /** Find and link channel names and usernames. */
168
- link_names?: boolean;
181
+ link_names?: boolean | undefined;
169
182
  /** Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters. */
170
- markdown_text?: string;
183
+ markdown_text?: string | undefined;
171
184
  /** JSON object with an `entities` array of work object entity metadata, presented as a URL-encoded string. Only entity metadata is supported: ephemeral messages are not persisted and never dispatch `message_metadata_*` events, so `event_type`/`event_payload` message metadata is ignored here. Each entity requires `entity_type`, `entity_payload`, `external_ref`, and `url`. */
172
- metadata?: string | null;
185
+ metadata?: string | null | undefined;
173
186
  /** Change how messages are treated. Defaults to `none`. See [below](#formatting). */
174
- parse?: PostEphemeralRequestParse | (string & {}) | null;
187
+ parse?: PostEphemeralRequestParse | (string & {}) | null | undefined;
175
188
  /** How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. */
176
- text?: string | null;
189
+ text?: string | null | undefined;
177
190
  /** Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread. */
178
- thread_ts?: string | null;
191
+ thread_ts?: string | null | undefined;
179
192
  /** `id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument. */
180
193
  user: string;
181
194
  /** Set your bot's user name. */
182
- username?: string;
195
+ username?: string | undefined;
183
196
  }
184
197
  export interface PostEphemeralResponse {
185
198
  /** Always `true` (a failed call raises a typed error instead). */
@@ -197,52 +210,52 @@ export type PostMessageRequestBlocksCase1List = Array<PostMessageRequestBlocksCa
197
210
  export type PostMessageRequestBlocks = string | PostMessageRequestBlocksCase1List;
198
211
  export interface PostMessageRequest {
199
212
  /** (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See [legacy `as_user` parameter](#legacy_as_user) below. */
200
- as_user?: boolean;
213
+ as_user?: boolean | undefined;
201
214
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
202
- attachments?: PostMessageRequestAttachments;
215
+ attachments?: PostMessageRequestAttachments | undefined;
203
216
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
204
- blocks?: PostMessageRequestBlocks;
217
+ blocks?: PostMessageRequestBlocks | undefined;
205
218
  /** An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See [below](#channels) for more details. */
206
219
  channel: string;
207
220
  /** This field represents the timestamp of the draft's last update at the time this API is called. If the current message is a draft, this field can be provided to ensure synchronization with the server. */
208
- current_draft_last_updated_ts?: string;
221
+ current_draft_last_updated_ts?: string | undefined;
209
222
  /** Emoji to use as the icon for this message. Overrides `icon_url`. */
210
- icon_emoji?: string | null;
223
+ icon_emoji?: string | null | undefined;
211
224
  /** URL to an image to use as the icon for this message. */
212
- icon_url?: string | null;
225
+ icon_url?: string | null | undefined;
213
226
  /** Find and link user groups. No longer supports linking individual users; use syntax shown in [Mentioning Users](/messaging/formatting-message-text#mentioning-users) instead. */
214
- link_names?: boolean;
227
+ link_names?: boolean | undefined;
215
228
  /** Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters. */
216
- markdown_text?: string;
229
+ markdown_text?: string | undefined;
217
230
  /** JSON object with event_type and event_payload fields, presented as a URL-encoded string. You can also provide Work Object entity metadata using this parameter. Metadata you post to Slack is accessible to any app or user who is a member of that workspace. */
218
- metadata?: string | null;
231
+ metadata?: string | null | undefined;
219
232
  /** Disable Slack markup parsing by setting to `false`. Enabled by default. */
220
- mrkdwn?: boolean;
233
+ mrkdwn?: boolean | undefined;
221
234
  /** Change how messages are treated. See [below](#formatting). */
222
- parse?: string | null;
235
+ parse?: string | null | undefined;
223
236
  /** Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. */
224
- reply_broadcast?: boolean;
237
+ reply_broadcast?: boolean | undefined;
225
238
  /** How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. */
226
- text?: string | null;
239
+ text?: string | null | undefined;
227
240
  /** Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. */
228
- thread_ts?: string | null;
241
+ thread_ts?: string | null | undefined;
229
242
  /** Pass true to enable unfurling of primarily text-based content. */
230
- unfurl_links?: boolean;
243
+ unfurl_links?: boolean | undefined;
231
244
  /** Pass false to disable unfurling of media content. */
232
- unfurl_media?: boolean;
245
+ unfurl_media?: boolean | undefined;
233
246
  /** Set your bot's user name. */
234
- username?: string | null;
247
+ username?: string | null | undefined;
235
248
  /** Pass true to unfurl links from installed apps, or false to prevent app links from unfurling. When omitted, app links follow the `unfurl_links` setting. */
236
- unfurl_app_links?: boolean;
249
+ unfurl_app_links?: boolean | undefined;
237
250
  }
238
251
  export interface PostMessageResponse {
239
252
  /** Always `true` (a failed call raises a typed error instead). */
240
253
  ok: boolean;
241
254
  channel: string;
242
255
  ts: string;
243
- message?: unknown;
256
+ message?: unknown | undefined;
244
257
  /** Pass true if duplicate message is attempted to be sent. */
245
- is_duplicate?: boolean;
258
+ is_duplicate?: boolean | undefined;
246
259
  }
247
260
  export type ScheduleMessageRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
248
261
  export type ScheduleMessageRequestAttachmentsCase1List =
@@ -257,33 +270,33 @@ export type ScheduleMessageRequestBlocks = string | ScheduleMessageRequestBlocks
257
270
  export type ScheduleMessageRequestParse = "none" | "full";
258
271
  export interface ScheduleMessageRequest {
259
272
  /** Set to `true` to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by [new Slack apps](/quickstart). See [chat.postMessage](chat.postMessage#authorship). */
260
- as_user?: boolean;
273
+ as_user?: boolean | undefined;
261
274
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
262
- attachments?: ScheduleMessageRequestAttachments;
275
+ attachments?: ScheduleMessageRequestAttachments | undefined;
263
276
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
264
- blocks?: ScheduleMessageRequestBlocks;
277
+ blocks?: ScheduleMessageRequestBlocks | undefined;
265
278
  /** Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. */
266
279
  channel: string;
267
280
  /** Find and link user groups. No longer supports linking individual users; use syntax shown in [Mentioning Users](/messaging/formatting-message-text#mentioning-users) instead. */
268
- link_names?: boolean;
281
+ link_names?: boolean | undefined;
269
282
  /** Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters. */
270
- markdown_text?: string;
283
+ markdown_text?: string | undefined;
271
284
  /** Change how messages are treated. See [chat.postMessage](chat.postMessage#formatting). */
272
- parse?: ScheduleMessageRequestParse | (string & {});
285
+ parse?: ScheduleMessageRequestParse | (string & {}) | undefined;
273
286
  /** Unix timestamp representing the future time the message should post to Slack. */
274
287
  post_at: number;
275
288
  /** Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. */
276
- reply_broadcast?: boolean;
289
+ reply_broadcast?: boolean | undefined;
277
290
  /** How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. */
278
- text?: string;
291
+ text?: string | undefined;
279
292
  /** Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. */
280
- thread_ts?: string;
293
+ thread_ts?: string | undefined;
281
294
  /** Pass true to enable unfurling of primarily text-based content. */
282
- unfurl_links?: boolean;
295
+ unfurl_links?: boolean | undefined;
283
296
  /** Pass false to disable unfurling of media content. */
284
- unfurl_media?: boolean;
297
+ unfurl_media?: boolean | undefined;
285
298
  /** JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace. */
286
- metadata?: string | null;
299
+ metadata?: string | null | undefined;
287
300
  }
288
301
  export type ScheduleMessageResponseMessageMap = { [key: string]: unknown | undefined };
289
302
  export interface ScheduleMessageResponse {
@@ -302,23 +315,23 @@ export interface StartStreamRequest {
302
315
  /** An encoded ID that represents a channel, thread, or DM. */
303
316
  channel: string;
304
317
  /** Array of streaming chunks. Can include [markdown text chunk](#markdown_text-chunks) objects, [task update chunk](#task_update-chunks) objects, [plan update chunks](#plan_update-chunks), or [blocks chunks](#blocks-chunks). */
305
- chunks?: StartStreamRequestChunksList;
318
+ chunks?: StartStreamRequestChunksList | undefined;
306
319
  /** Accepts message text formatted in markdown. Limit this field to 12,000 characters. */
307
- markdown_text?: string;
320
+ markdown_text?: string | undefined;
308
321
  /** Provide another message's `ts` value to reply to. Omit it to stream a top-level message instead of a thread reply; this is only supported in channels where the whole channel is one session, such as Slack Code, and returns `invalid_thread_ts` elsewhere. Passing `"0"` is equivalent to omitting it. */
309
- thread_ts?: string;
322
+ thread_ts?: string | undefined;
310
323
  /** The encoded ID of the user to receive the streaming text. Required when streaming to channels. */
311
- recipient_user_id?: string;
324
+ recipient_user_id?: string | undefined;
312
325
  /** The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels. */
313
- recipient_team_id?: string;
326
+ recipient_team_id?: string | undefined;
314
327
  /** Specifies how tasks are displayed in the message. `timeline` task updates render as individual task cards interleaved with streamed text. `plan` task updates render together in a plan block. */
315
- task_display_mode?: StartStreamRequestTaskDisplayMode | (string & {});
328
+ task_display_mode?: StartStreamRequestTaskDisplayMode | (string & {}) | undefined;
316
329
  /** Emoji to use as the icon for this message. Overrides `icon_url`. */
317
- icon_emoji?: string | null;
330
+ icon_emoji?: string | null | undefined;
318
331
  /** Image URL to use as the icon for this message. */
319
- icon_url?: string | null;
332
+ icon_url?: string | null | undefined;
320
333
  /** The bot's username to display. */
321
- username?: string | null;
334
+ username?: string | null | undefined;
322
335
  }
323
336
  export interface StartStreamResponse {
324
337
  /** Always `true` (a failed call raises a typed error instead). */
@@ -333,17 +346,17 @@ export interface StopStreamRequest {
333
346
  /** An encoded ID that represents a channel, private group, or DM */
334
347
  channel: string;
335
348
  /** Array of streaming chunks. Can include [markdown text chunk](#markdown_text-chunks) objects, [task update chunk](#task_update-chunks) objects, [plan update chunks](#plan_update-chunks), or [blocks chunks](#blocks-chunks). */
336
- chunks?: unknown;
349
+ chunks?: unknown | undefined;
337
350
  /** The timestamp of the streaming message. */
338
351
  ts: string;
339
352
  /** Accepts message text formatted in markdown. Limit this field to 12,000 characters. */
340
- markdown_text?: string;
353
+ markdown_text?: string | undefined;
341
354
  /** A list of blocks that will be rendered at the bottom of the finalized message. */
342
- blocks?: unknown;
355
+ blocks?: unknown | undefined;
343
356
  /** JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace. */
344
- metadata?: string | null;
357
+ metadata?: string | null | undefined;
345
358
  /** The session status to set after stopping the stream. */
346
- session_status?: StopStreamRequestSessionStatus | (string & {});
359
+ session_status?: StopStreamRequestSessionStatus | (string & {}) | undefined;
347
360
  }
348
361
  export interface StopStreamResponse {
349
362
  /** Always `true` (a failed call raises a typed error instead). */
@@ -368,31 +381,31 @@ export type UpdateChatRequestLinkNames = boolean | string;
368
381
  export type UpdateChatRequestFileIdsList = Array<string>;
369
382
  export interface UpdateChatRequest {
370
383
  /** Pass true to update the message as the authed user. Bot users in this context are considered authed users. */
371
- as_user?: UpdateChatRequestAsUser | null;
384
+ as_user?: UpdateChatRequestAsUser | null | undefined;
372
385
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
373
- attachments?: UpdateChatRequestAttachments;
386
+ attachments?: UpdateChatRequestAttachments | undefined;
374
387
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
375
- unfurled_attachments?: string | null;
388
+ unfurled_attachments?: string | null | undefined;
376
389
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
377
- blocks?: UpdateChatRequestBlocks;
390
+ blocks?: UpdateChatRequestBlocks | undefined;
378
391
  /** Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters. */
379
- markdown_text?: string;
392
+ markdown_text?: string | undefined;
380
393
  /** JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous `metadata` will be retained. To remove previous `metadata`, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace. */
381
- metadata?: string | null;
394
+ metadata?: string | null | undefined;
382
395
  /** Channel containing the message to be updated. For direct messages, ensure that this value is a DM ID (starts with `D`) instead of a User ID (starts with either `U` or `W`). */
383
396
  channel: string;
384
397
  /** Find and link channel names and usernames. Defaults to `none`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `none`. */
385
- link_names?: UpdateChatRequestLinkNames | null;
398
+ link_names?: UpdateChatRequestLinkNames | null | undefined;
386
399
  /** Change how messages are treated. Defaults to `client`, unlike `chat.postMessage`. Accepts either `none` or `full`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `client`. */
387
- parse?: string | null;
400
+ parse?: string | null | undefined;
388
401
  /** How this field works and whether it is required depends on other fields you use in your API call. [See below](#text_usage) for more detail. */
389
- text?: string | null;
402
+ text?: string | null | undefined;
390
403
  /** Timestamp of the message to be updated. */
391
404
  ts: string;
392
405
  /** Broadcast an existing thread reply to make it visible to everyone in the channel or conversation. */
393
- reply_broadcast?: boolean;
406
+ reply_broadcast?: boolean | undefined;
394
407
  /** Array of new file ids that will be sent with this message. */
395
- file_ids?: UpdateChatRequestFileIdsList;
408
+ file_ids?: UpdateChatRequestFileIdsList | undefined;
396
409
  }
397
410
  export type UpdateChatResponseMessageAttachmentsItemMap = { [key: string]: unknown | undefined };
398
411
  export type UpdateChatResponseMessageAttachmentsList =
@@ -400,9 +413,9 @@ export type UpdateChatResponseMessageAttachmentsList =
400
413
  export type UpdateChatResponseMessageMetadataMap = { [key: string]: unknown | undefined };
401
414
  export interface UpdateChatResponseMessage {
402
415
  text: string;
403
- blocks?: unknown;
404
- attachments?: UpdateChatResponseMessageAttachmentsList;
405
- metadata?: UpdateChatResponseMessageMetadataMap;
416
+ blocks?: unknown | undefined;
417
+ attachments?: UpdateChatResponseMessageAttachmentsList | undefined;
418
+ metadata?: UpdateChatResponseMessageMetadataMap | undefined;
406
419
  }
407
420
  export interface UpdateChatResponse {
408
421
  /** Always `true` (a failed call raises a typed error instead). */
@@ -425,6 +438,8 @@ export const appendStream: API.OperationMethod<
425
438
  errors: [SlackError, SlackRateLimited],
426
439
  protocol: SlackProtocol,
427
440
  retry: Retry.Retry,
441
+ telemetry: TELEMETRY,
442
+ span: "AppendStream",
428
443
  }));
429
444
 
430
445
  export type ChatUnfurlError = SlackOpError;
@@ -440,6 +455,8 @@ export const chatUnfurl: API.OperationMethod<
440
455
  errors: [SlackError, SlackRateLimited],
441
456
  protocol: SlackProtocol,
442
457
  retry: Retry.Retry,
458
+ telemetry: TELEMETRY,
459
+ span: "ChatUnfurl",
443
460
  }));
444
461
 
445
462
  export type DeleteChatError = SlackOpError;
@@ -455,6 +472,8 @@ export const deleteChat: API.OperationMethod<
455
472
  errors: [SlackError, SlackRateLimited],
456
473
  protocol: SlackProtocol,
457
474
  retry: Retry.Retry,
475
+ telemetry: TELEMETRY,
476
+ span: "DeleteChat",
458
477
  }));
459
478
 
460
479
  export type DeleteScheduledMessageError = SlackOpError;
@@ -470,6 +489,8 @@ export const deleteScheduledMessage: API.OperationMethod<
470
489
  errors: [SlackError, SlackRateLimited],
471
490
  protocol: SlackProtocol,
472
491
  retry: Retry.Retry,
492
+ telemetry: TELEMETRY,
493
+ span: "DeleteScheduledMessage",
473
494
  }));
474
495
 
475
496
  export type GetPermalinkError = SlackOpError;
@@ -485,6 +506,8 @@ export const getPermalink: API.OperationMethod<
485
506
  errors: [SlackError, SlackRateLimited],
486
507
  protocol: SlackProtocol,
487
508
  retry: Retry.Retry,
509
+ telemetry: TELEMETRY,
510
+ span: "GetPermalink",
488
511
  }));
489
512
 
490
513
  export type ListScheduledMessagesError = SlackOpError;
@@ -502,6 +525,8 @@ export const listScheduledMessages: API.PaginatedOperationMethod<
502
525
  errors: [SlackError, SlackRateLimited],
503
526
  protocol: SlackProtocol,
504
527
  retry: Retry.Retry,
528
+ telemetry: TELEMETRY,
529
+ span: "ListScheduledMessages",
505
530
  pagination: {
506
531
  mode: "cursor",
507
532
  inputToken: "cursor",
@@ -526,10 +551,12 @@ export const meMessage: API.OperationMethod<
526
551
  errors: [SlackError, SlackRateLimited],
527
552
  protocol: SlackProtocol,
528
553
  retry: Retry.Retry,
554
+ telemetry: TELEMETRY,
555
+ span: "MeMessage",
529
556
  }));
530
557
 
531
558
  export type PostEphemeralError = SlackOpError;
532
- /** Sends an ephemeral message to a user in a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `is_archived` -- Channel has been archived. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `user_not_in_channel` -- Intended recipient is not in the specified channel. - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `invalid_attachments` -- Attachments that contain blocks are not valid - `cannot_reply_to_message` -- This message type cannot have thread replies. See https://docs.slack.dev/reference/methods/chat.postEphemeral */
559
+ /** Sends an ephemeral message to a user in a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `is_archived` -- Channel has been archived. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `user_not_in_channel` -- Intended recipient is not in the specified channel. - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `invalid_attachments` -- Attachments that contain blocks are not valid - `cannot_reply_to_message` -- This message type cannot have thread replies. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. See https://docs.slack.dev/reference/methods/chat.postEphemeral */
533
560
  export const postEphemeral: API.OperationMethod<
534
561
  PostEphemeralRequest,
535
562
  PostEphemeralResponse,
@@ -541,10 +568,12 @@ export const postEphemeral: API.OperationMethod<
541
568
  errors: [SlackError, SlackRateLimited],
542
569
  protocol: SlackProtocol,
543
570
  retry: Retry.Retry,
571
+ telemetry: TELEMETRY,
572
+ span: "PostEphemeral",
544
573
  }));
545
574
 
546
575
  export type PostMessageError = SlackOpError;
547
- /** Sends a message to a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `agent_prompt_display_not_allowed` -- `client_context.agent_prompt_display` may only be set by the Slack client when posting to the user's Slackbot DM. - `app_access_restricted` -- The user does not have permission to use this app. - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `channel_not_found` -- Value passed for `channel` was invalid. - `draft_already_deleted` -- The draft has already been deleted. - `draft_already_sent` -- The draft has already been sent. - `draft_has_conflict` -- The client draft version is out of sync with the server draft version. - `draft_not_found` -- The draft was not found. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid. - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided. - `invalid_metadata_schema` -- Invalid metadata schema provided. - `is_archived` -- Channel has been archived. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token. - `metadata_too_large` -- Metadata exceeds size limit. - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `no_text` -- No message text provided. - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information. - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `send_on_behalf_not_allowed` -- Cannot send on behalf of the provided user. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications. - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications. - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications. - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` -- Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `cannot_reply_to_message` -- This message type cannot have thread replies. - `missing_file_data` -- Attempted to share a file but some required data was missing. - `attachment_payload_limit_exceeded` -- Attachment payload size is too long. See https://docs.slack.dev/reference/methods/chat.postMessage */
576
+ /** Sends a message to a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `agent_prompt_display_not_allowed` -- `client_context.agent_prompt_display` may only be set by the Slack client when posting to the user's Slackbot DM. - `app_access_restricted` -- The user does not have permission to use this app. - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `channel_not_found` -- Value passed for `channel` was invalid. - `draft_already_deleted` -- The draft has already been deleted. - `draft_already_sent` -- The draft has already been sent. - `draft_has_conflict` -- The client draft version is out of sync with the server draft version. - `draft_not_found` -- The draft was not found. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid. - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided. - `invalid_metadata_schema` -- Invalid metadata schema provided. - `is_archived` -- Channel has been archived. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token. - `metadata_too_large` -- Metadata exceeds size limit. - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `no_text` -- No message text provided. - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information. - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `send_on_behalf_not_allowed` -- Cannot send on behalf of the provided user. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications. - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications. - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications. - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` -- Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `cannot_reply_to_message` -- This message type cannot have thread replies. - `missing_file_data` -- Attempted to share a file but some required data was missing. - `attachment_payload_limit_exceeded` -- Attachment payload size is too long. - `posting_to_channel_denied` -- Files and images, including attachments with `image_url` or `thumb_url` and `image` blocks (such as GIFs), can't be posted to this channel. Remove them and try again. See https://docs.slack.dev/reference/methods/chat.postMessage */
548
577
  export const postMessage: API.OperationMethod<
549
578
  PostMessageRequest,
550
579
  PostMessageResponse,
@@ -556,10 +585,12 @@ export const postMessage: API.OperationMethod<
556
585
  errors: [SlackError, SlackRateLimited],
557
586
  protocol: SlackProtocol,
558
587
  retry: Retry.Retry,
588
+ telemetry: TELEMETRY,
589
+ span: "PostMessage",
559
590
  }));
560
591
 
561
592
  export type ScheduleMessageError = SlackOpError;
562
- /** Schedules a message to be sent to a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `is_archived` -- Channel has been archived. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `invalid_time` -- value passed for `post_time` was invalid. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `restricted_too_many` -- Too many messages were scheduled in the channel for a given period. See [usage info](/reference/methods/chat.scheduleMessage#restrictions) for additional details - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `time_in_past` -- value passed for `post_time` was in the past. - `time_too_far` -- value passed for `post_time` was too far into the future. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `invalid_token` -- The passed token is invalid or not supported by this method. See https://docs.slack.dev/reference/methods/chat.scheduleMessage */
593
+ /** Schedules a message to be sent to a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `is_archived` -- Channel has been archived. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `invalid_time` -- value passed for `post_time` was invalid. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `restricted_too_many` -- Too many messages were scheduled in the channel for a given period. See [usage info](/reference/methods/chat.scheduleMessage#restrictions) for additional details - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `time_in_past` -- value passed for `post_time` was in the past. - `time_too_far` -- value passed for `post_time` was too far into the future. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `invalid_token` -- The passed token is invalid or not supported by this method. - `posting_to_channel_denied` -- Files and images, including attachments with `image_url` or `thumb_url` and `image` blocks (such as GIFs), can't be posted to this channel. Remove them and try again. See https://docs.slack.dev/reference/methods/chat.scheduleMessage */
563
594
  export const scheduleMessage: API.OperationMethod<
564
595
  ScheduleMessageRequest,
565
596
  ScheduleMessageResponse,
@@ -571,10 +602,12 @@ export const scheduleMessage: API.OperationMethod<
571
602
  errors: [SlackError, SlackRateLimited],
572
603
  protocol: SlackProtocol,
573
604
  retry: Retry.Retry,
605
+ telemetry: TELEMETRY,
606
+ span: "ScheduleMessage",
574
607
  }));
575
608
 
576
609
  export type StartStreamError = SlackOpError;
577
- /** Starts a new streaming conversation. Required scopes -- bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `messaging_processing_failed` -- Failed to process the message. - `channel_not_found` -- Value passed for `channel` was invalid. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_chunks` -- Chunks submitted with this message are not valid. - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_archived` -- Channel has been archived. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `msg_blocks_too_many` -- Max blocks exceeded, blocks are limited to 50 per message. - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `channel_type_not_supported` -- Channel type not supported - `user_not_found` -- User not found. - `missing_recipient_team_id` -- Missing recipient team ID. - `missing_recipient_user_id` -- Missing recipient user ID. - `cannot_provide_both_markdown_text_and_chunks` -- Cannot provide both `markdown_text` and `chunks` in the same request. See https://docs.slack.dev/reference/methods/chat.startStream */
610
+ /** Starts a new streaming conversation. Required scopes -- bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `messaging_processing_failed` -- Failed to process the message. - `channel_not_found` -- Value passed for `channel` was invalid. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_chunks` -- Chunks submitted with this message are not valid. - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_archived` -- Channel has been archived. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `msg_blocks_too_many` -- Max blocks exceeded, blocks are limited to 50 per message. - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `channel_type_not_supported` -- Channel type not supported - `user_not_found` -- User not found. - `missing_recipient_team_id` -- Missing recipient team ID. - `missing_recipient_user_id` -- Missing recipient user ID. - `cannot_provide_both_markdown_text_and_chunks` -- Cannot provide both `markdown_text` and `chunks` in the same request. - `cannot_reply_to_message` -- This message type cannot have thread replies. See https://docs.slack.dev/reference/methods/chat.startStream */
578
611
  export const startStream: API.OperationMethod<
579
612
  StartStreamRequest,
580
613
  StartStreamResponse,
@@ -586,6 +619,8 @@ export const startStream: API.OperationMethod<
586
619
  errors: [SlackError, SlackRateLimited],
587
620
  protocol: SlackProtocol,
588
621
  retry: Retry.Retry,
622
+ telemetry: TELEMETRY,
623
+ span: "StartStream",
589
624
  }));
590
625
 
591
626
  export type StopStreamError = SlackOpError;
@@ -601,10 +636,12 @@ export const stopStream: API.OperationMethod<
601
636
  errors: [SlackError, SlackRateLimited],
602
637
  protocol: SlackProtocol,
603
638
  retry: Retry.Retry,
639
+ telemetry: TELEMETRY,
640
+ span: "StopStream",
604
641
  }));
605
642
 
606
643
  export type UpdateChatError = SlackOpError;
607
- /** Updates a message. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `blocked_file_type` -- Admin has disabled uploading this type of file. - `block_mismatch` -- Rich-text blocks cannot be replaced with non-rich-text blocks - `cant_broadcast_message` -- Unable to broadcast this message. - `cant_update_message` -- Authenticated user does not have permission to update this message. - `channel_not_found` -- Value passed for `channel` was invalid. - `edit_window_closed` -- The message cannot be edited due to the team message edit settings - `external_channel_migrating` -- The channel is in the process of migrating and so the message cannot be updated at this time. - `file_deleted` -- File to share deleted. - `file_is_deleted` -- The file is deleted. - `file_not_found` -- One or more of the provided file IDs could not be found. - `file_share_limit_reached` -- The file has reached the share limit. - `invalid_attachments` -- The attachments were invalid. - `invalid_blocks` -- The blocks were invalid for the requesting user. - `invalid_blocks_format` -- The `blocks` array is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_inactive` -- The message cannot be edited within a frozen, archived or deleted channel. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `max_file_sharing_exceeded` -- Exceeded max allowed files shared. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `message_not_found` -- No message exists with the requested timestamp. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_too_long` -- Message text is too long. The `text` field cannot exceed 4,000 characters. - `no_dual_broadcast_content_update` -- Can't broadcast an old reply and update the content at the same time. - `no_text` -- No message text provided - `posting_to_channel_denied` -- The user does not have permission to share files in this channel. - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect messages. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled sharing of canvas links in all Slack Connect messages. - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip uploads in Slack Connect channels. - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack file sharing in all Slack Connect messages. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled file uploads in all Slack Connect messages. - `streaming_state_conflict` -- The message is currently streaming text and cannot be edited. - `team_not_found` -- Team associated with the message and channel could not be found. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `unable_to_share_files` -- Sharing the files failed. - `update_failed` -- Internal update failure. - `invalid_channel_id` -- Value passed for `channel` was not a valid channel ID. See https://docs.slack.dev/reference/methods/chat.update */
644
+ /** Updates a message. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `blocked_file_type` -- Admin has disabled uploading this type of file. - `block_mismatch` -- Rich-text blocks cannot be replaced with non-rich-text blocks - `cant_broadcast_message` -- Unable to broadcast this message. - `cant_update_message` -- Authenticated user does not have permission to update this message. - `channel_not_found` -- Value passed for `channel` was invalid. - `edit_window_closed` -- The message cannot be edited due to the team message edit settings - `external_channel_migrating` -- The channel is in the process of migrating and so the message cannot be updated at this time. - `file_deleted` -- File to share deleted. - `file_is_deleted` -- The file is deleted. - `file_not_found` -- One or more of the provided file IDs could not be found. - `file_share_limit_reached` -- The file has reached the share limit. - `invalid_attachments` -- The attachments were invalid. - `invalid_blocks` -- The blocks were invalid for the requesting user. - `invalid_blocks_format` -- The `blocks` array is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_inactive` -- The message cannot be edited within a frozen, archived or deleted channel. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `max_file_sharing_exceeded` -- Exceeded max allowed files shared. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `message_not_found` -- No message exists with the requested timestamp. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_too_long` -- Message text is too long. The `text` field cannot exceed 4,000 characters. - `no_dual_broadcast_content_update` -- Can't broadcast an old reply and update the content at the same time. - `no_text` -- No message text provided - `posting_to_channel_denied` -- Files and images, including attachments with `image_url` or `thumb_url` and `image` blocks (such as GIFs), can't be added to messages in this channel. Remove them and try again. - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect messages. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled sharing of canvas links in all Slack Connect messages. - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip uploads in Slack Connect channels. - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack file sharing in all Slack Connect messages. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled file uploads in all Slack Connect messages. - `streaming_state_conflict` -- The message is currently streaming text and cannot be edited. - `team_not_found` -- Team associated with the message and channel could not be found. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `unable_to_share_files` -- Sharing the files failed. - `update_failed` -- Internal update failure. - `invalid_channel_id` -- Value passed for `channel` was not a valid channel ID. See https://docs.slack.dev/reference/methods/chat.update */
608
645
  export const updateChat: API.OperationMethod<
609
646
  UpdateChatRequest,
610
647
  UpdateChatResponse,
@@ -616,6 +653,8 @@ export const updateChat: API.OperationMethod<
616
653
  errors: [SlackError, SlackRateLimited],
617
654
  protocol: SlackProtocol,
618
655
  retry: Retry.Retry,
656
+ telemetry: TELEMETRY,
657
+ span: "UpdateChat",
619
658
  }));
620
659
 
621
660
  // Schema builders: each runs one schema initializer, on that schema's first use.