@distilled.cloud/slack 1.0.0-rc.18 → 1.0.0-rc.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/protocol.d.ts +2 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/admin.d.ts +594 -356
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +149 -140
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +89 -97
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +1 -1
- package/lib/services/agents.js.map +1 -1
- package/lib/services/api.d.ts +2 -2
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +1 -1
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +74 -74
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +32 -32
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +55 -46
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +1 -1
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +27 -27
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -1
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +3 -3
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +1 -1
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +19 -19
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +1 -1
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +23 -23
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +1 -1
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +10 -10
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +1 -1
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +18 -18
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +1 -1
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +103 -103
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +1 -1
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +109 -103
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +38 -38
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.js +1 -1
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +14 -14
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +1 -1
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +6 -6
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +1 -1
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +14 -14
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +1 -1
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +106 -106
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +26 -26
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +37 -37
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +1 -1
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/lists.d.ts +47 -45
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +1 -1
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +3 -3
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +1 -1
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +102 -102
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +1 -1
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +40 -40
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +1 -1
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +9 -9
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +1 -1
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +23 -23
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +1 -1
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +8 -8
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +1 -1
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +11 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +1 -1
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +84 -80
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +1 -1
- package/lib/services/search.js.map +1 -1
- package/lib/services/slackbot.d.ts +366 -0
- package/lib/services/slackbot.d.ts.map +1 -0
- package/lib/services/slackbot.js +2 -0
- package/lib/services/slackbot.js.map +1 -0
- package/lib/services/stars.d.ts +16 -16
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +1 -1
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +39 -37
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +1 -1
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.js +1 -1
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +30 -30
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +1 -1
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +37 -37
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +1 -1
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +9 -9
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +1 -1
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +16 -16
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +1 -1
- package/lib/services/workflows.js.map +1 -1
- package/lib/services.lazy/admin.js +2 -2
- package/lib/services.lazy/apps.js +1 -1
- package/lib/services.lazy/conversations.js +1 -1
- package/lib/services.lazy/files.js +1 -1
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/slackbot.js +1 -0
- package/package.json +6 -6
- package/src/protocol.ts +3 -5
- package/src/services/admin.ts +1609 -1016
- package/src/services/agents.ts +93 -103
- package/src/services/api.ts +2 -2
- package/src/services/apps.ts +74 -74
- package/src/services/assistant.ts +88 -56
- package/src/services/auth.ts +27 -27
- package/src/services/blocks.ts +3 -3
- package/src/services/bookmarks.ts +19 -19
- package/src/services/bots.ts +23 -23
- package/src/services/calls.ts +10 -10
- package/src/services/canvases.ts +50 -46
- package/src/services/chat.ts +103 -103
- package/src/services/conversations.ts +126 -115
- package/src/services/dnd.ts +14 -14
- package/src/services/emoji.ts +6 -6
- package/src/services/entity.ts +14 -14
- package/src/services/files.ts +106 -106
- package/src/services/functions.ts +37 -37
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +49 -46
- package/src/services/migration.ts +3 -3
- package/src/services/oauth.ts +102 -102
- package/src/services/openid.ts +40 -40
- package/src/services/pins.ts +9 -9
- package/src/services/reactions.ts +23 -23
- package/src/services/reminders.ts +8 -8
- package/src/services/rtm.ts +11 -11
- package/src/services/search.ts +123 -130
- package/src/services/slackbot.ts +766 -0
- package/src/services/stars.ts +16 -16
- package/src/services/team.ts +42 -37
- package/src/services/usergroups.ts +30 -30
- package/src/services/users.ts +37 -37
- package/src/services/views.ts +9 -9
- package/src/services/workflows.ts +16 -16
package/src/services/chat.ts
CHANGED
|
@@ -25,17 +25,17 @@ const TELEMETRY = {
|
|
|
25
25
|
propagate: "w3c",
|
|
26
26
|
} as const;
|
|
27
27
|
|
|
28
|
-
/** Array of streaming chunks
|
|
28
|
+
/** Array of streaming chunks that can contain either markdown text or task updates */
|
|
29
29
|
export type AppendStreamRequestChunksList = Array<unknown>;
|
|
30
30
|
export interface AppendStreamRequest {
|
|
31
31
|
/** An encoded ID that represents a channel, private group, or DM */
|
|
32
32
|
channel: string;
|
|
33
|
-
/** Array of streaming chunks
|
|
34
|
-
chunks?: AppendStreamRequestChunksList;
|
|
33
|
+
/** Array of streaming chunks that can contain either markdown text or task updates */
|
|
34
|
+
chunks?: AppendStreamRequestChunksList | undefined;
|
|
35
35
|
/** The timestamp of the streaming message. */
|
|
36
36
|
ts: string;
|
|
37
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. */
|
|
38
|
-
markdown_text?: string;
|
|
38
|
+
markdown_text?: string | undefined;
|
|
39
39
|
}
|
|
40
40
|
export interface AppendStreamResponse {
|
|
41
41
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -47,23 +47,23 @@ export interface AppendStreamResponse {
|
|
|
47
47
|
export type ChatUnfurlRequestSource = "composer" | "conversations_history";
|
|
48
48
|
export interface ChatUnfurlRequest {
|
|
49
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. */
|
|
50
|
-
channel?: string;
|
|
50
|
+
channel?: string | undefined;
|
|
51
51
|
/** Timestamp of the message to add unfurl behavior to. Required for public channels. */
|
|
52
|
-
ts?: string;
|
|
52
|
+
ts?: string | undefined;
|
|
53
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. */
|
|
54
|
-
unfurls?: string;
|
|
54
|
+
unfurls?: string | undefined;
|
|
55
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`. */
|
|
56
|
-
user_auth_message?: string | null;
|
|
56
|
+
user_auth_message?: string | null | undefined;
|
|
57
57
|
/** Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain */
|
|
58
|
-
user_auth_required?: boolean;
|
|
58
|
+
user_auth_required?: boolean | undefined;
|
|
59
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. */
|
|
60
|
-
user_auth_url?: string | null;
|
|
60
|
+
user_auth_url?: string | null | undefined;
|
|
61
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 */
|
|
62
|
-
user_auth_blocks?: unknown;
|
|
62
|
+
user_auth_blocks?: unknown | undefined;
|
|
63
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. */
|
|
64
|
-
unfurl_id?: string;
|
|
64
|
+
unfurl_id?: string | undefined;
|
|
65
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. */
|
|
66
|
-
source?: ChatUnfurlRequestSource | (string & {});
|
|
66
|
+
source?: ChatUnfurlRequestSource | (string & {}) | undefined;
|
|
67
67
|
}
|
|
68
68
|
export interface ChatUnfurlResponse {
|
|
69
69
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -71,7 +71,7 @@ export interface ChatUnfurlResponse {
|
|
|
71
71
|
}
|
|
72
72
|
export interface DeleteChatRequest {
|
|
73
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. */
|
|
74
|
-
as_user?: boolean;
|
|
74
|
+
as_user?: boolean | undefined;
|
|
75
75
|
/** Channel containing the message to be deleted. */
|
|
76
76
|
channel: string;
|
|
77
77
|
/** Timestamp of the message to be deleted. */
|
|
@@ -85,7 +85,7 @@ export interface DeleteChatResponse {
|
|
|
85
85
|
}
|
|
86
86
|
export interface DeleteScheduledMessageRequest {
|
|
87
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. */
|
|
88
|
-
as_user?: boolean;
|
|
88
|
+
as_user?: boolean | undefined;
|
|
89
89
|
/** The channel the scheduled_message is posting to */
|
|
90
90
|
channel: string;
|
|
91
91
|
/** `scheduled_message_id` returned from call to chat.scheduleMessage */
|
|
@@ -109,38 +109,38 @@ export interface GetPermalinkResponse {
|
|
|
109
109
|
}
|
|
110
110
|
export interface ListScheduledMessagesRequest {
|
|
111
111
|
/** The channel of the scheduled messages */
|
|
112
|
-
channel?: string;
|
|
112
|
+
channel?: string | undefined;
|
|
113
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. */
|
|
114
|
-
cursor?: string;
|
|
114
|
+
cursor?: string | undefined;
|
|
115
115
|
/** A Unix timestamp of the latest value in the time range */
|
|
116
|
-
latest?: string;
|
|
116
|
+
latest?: string | undefined;
|
|
117
117
|
/** Maximum number of original entries to return. */
|
|
118
|
-
limit?: number;
|
|
118
|
+
limit?: number | undefined;
|
|
119
119
|
/** A Unix timestamp of the oldest value in the time range */
|
|
120
|
-
oldest?: string;
|
|
120
|
+
oldest?: string | undefined;
|
|
121
121
|
/** encoded team id to list channels in, required if org token is used */
|
|
122
|
-
team_id?: string;
|
|
122
|
+
team_id?: string | undefined;
|
|
123
123
|
}
|
|
124
124
|
export interface ListScheduledMessagesResponseScheduledMessagesItem {
|
|
125
125
|
id: string;
|
|
126
126
|
channel_id: string;
|
|
127
127
|
post_at: number;
|
|
128
128
|
date_created: number;
|
|
129
|
-
text?: string;
|
|
129
|
+
text?: string | undefined;
|
|
130
130
|
}
|
|
131
131
|
export type ListScheduledMessagesResponseScheduledMessagesList =
|
|
132
132
|
Array<ListScheduledMessagesResponseScheduledMessagesItem>;
|
|
133
133
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
134
134
|
export interface ListScheduledMessagesResponseResponseMetadata {
|
|
135
135
|
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
136
|
-
next_cursor?: string;
|
|
136
|
+
next_cursor?: string | undefined;
|
|
137
137
|
}
|
|
138
138
|
export interface ListScheduledMessagesResponse {
|
|
139
139
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
140
140
|
ok: boolean;
|
|
141
141
|
scheduled_messages: ListScheduledMessagesResponseScheduledMessagesList;
|
|
142
142
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
143
|
-
response_metadata?: ListScheduledMessagesResponseResponseMetadata;
|
|
143
|
+
response_metadata?: ListScheduledMessagesResponseResponseMetadata | undefined;
|
|
144
144
|
}
|
|
145
145
|
export interface MeMessageRequest {
|
|
146
146
|
/** Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. */
|
|
@@ -151,8 +151,8 @@ export interface MeMessageRequest {
|
|
|
151
151
|
export interface MeMessageResponse {
|
|
152
152
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
153
153
|
ok: boolean;
|
|
154
|
-
ts?: string;
|
|
155
|
-
channel?: string;
|
|
154
|
+
ts?: string | undefined;
|
|
155
|
+
channel?: string | undefined;
|
|
156
156
|
}
|
|
157
157
|
export type PostEphemeralRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
|
|
158
158
|
export type PostEphemeralRequestAttachmentsCase1List =
|
|
@@ -166,33 +166,33 @@ export type PostEphemeralRequestBlocks = string | PostEphemeralRequestBlocksCase
|
|
|
166
166
|
export type PostEphemeralRequestParse = "" | "none" | "full" | "mrkdwn" | "false";
|
|
167
167
|
export interface PostEphemeralRequest {
|
|
168
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. */
|
|
169
|
-
as_user?: boolean;
|
|
169
|
+
as_user?: boolean | undefined;
|
|
170
170
|
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
171
|
-
attachments?: PostEphemeralRequestAttachments;
|
|
171
|
+
attachments?: PostEphemeralRequestAttachments | undefined;
|
|
172
172
|
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
173
|
-
blocks?: PostEphemeralRequestBlocks;
|
|
173
|
+
blocks?: PostEphemeralRequestBlocks | undefined;
|
|
174
174
|
/** Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. */
|
|
175
175
|
channel: string;
|
|
176
176
|
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
177
|
-
icon_emoji?: string;
|
|
177
|
+
icon_emoji?: string | undefined;
|
|
178
178
|
/** URL to an image to use as the icon for this message. */
|
|
179
|
-
icon_url?: string;
|
|
179
|
+
icon_url?: string | undefined;
|
|
180
180
|
/** Find and link channel names and usernames. */
|
|
181
|
-
link_names?: boolean;
|
|
181
|
+
link_names?: boolean | undefined;
|
|
182
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. */
|
|
183
|
-
markdown_text?: string;
|
|
183
|
+
markdown_text?: string | undefined;
|
|
184
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`. */
|
|
185
|
-
metadata?: string | null;
|
|
185
|
+
metadata?: string | null | undefined;
|
|
186
186
|
/** Change how messages are treated. Defaults to `none`. See [below](#formatting). */
|
|
187
|
-
parse?: PostEphemeralRequestParse | (string & {}) | null;
|
|
187
|
+
parse?: PostEphemeralRequestParse | (string & {}) | null | undefined;
|
|
188
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. */
|
|
189
|
-
text?: string | null;
|
|
189
|
+
text?: string | null | undefined;
|
|
190
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. */
|
|
191
|
-
thread_ts?: string | null;
|
|
191
|
+
thread_ts?: string | null | undefined;
|
|
192
192
|
/** `id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument. */
|
|
193
193
|
user: string;
|
|
194
194
|
/** Set your bot's user name. */
|
|
195
|
-
username?: string;
|
|
195
|
+
username?: string | undefined;
|
|
196
196
|
}
|
|
197
197
|
export interface PostEphemeralResponse {
|
|
198
198
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -210,52 +210,52 @@ export type PostMessageRequestBlocksCase1List = Array<PostMessageRequestBlocksCa
|
|
|
210
210
|
export type PostMessageRequestBlocks = string | PostMessageRequestBlocksCase1List;
|
|
211
211
|
export interface PostMessageRequest {
|
|
212
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. */
|
|
213
|
-
as_user?: boolean;
|
|
213
|
+
as_user?: boolean | undefined;
|
|
214
214
|
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
215
|
-
attachments?: PostMessageRequestAttachments;
|
|
215
|
+
attachments?: PostMessageRequestAttachments | undefined;
|
|
216
216
|
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
217
|
-
blocks?: PostMessageRequestBlocks;
|
|
217
|
+
blocks?: PostMessageRequestBlocks | undefined;
|
|
218
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. */
|
|
219
219
|
channel: string;
|
|
220
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. */
|
|
221
|
-
current_draft_last_updated_ts?: string;
|
|
221
|
+
current_draft_last_updated_ts?: string | undefined;
|
|
222
222
|
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
223
|
-
icon_emoji?: string | null;
|
|
223
|
+
icon_emoji?: string | null | undefined;
|
|
224
224
|
/** URL to an image to use as the icon for this message. */
|
|
225
|
-
icon_url?: string | null;
|
|
225
|
+
icon_url?: string | null | undefined;
|
|
226
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. */
|
|
227
|
-
link_names?: boolean;
|
|
227
|
+
link_names?: boolean | undefined;
|
|
228
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. */
|
|
229
|
-
markdown_text?: string;
|
|
229
|
+
markdown_text?: string | undefined;
|
|
230
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. */
|
|
231
|
-
metadata?: string | null;
|
|
231
|
+
metadata?: string | null | undefined;
|
|
232
232
|
/** Disable Slack markup parsing by setting to `false`. Enabled by default. */
|
|
233
|
-
mrkdwn?: boolean;
|
|
233
|
+
mrkdwn?: boolean | undefined;
|
|
234
234
|
/** Change how messages are treated. See [below](#formatting). */
|
|
235
|
-
parse?: string | null;
|
|
235
|
+
parse?: string | null | undefined;
|
|
236
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`. */
|
|
237
|
-
reply_broadcast?: boolean;
|
|
237
|
+
reply_broadcast?: boolean | undefined;
|
|
238
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. */
|
|
239
|
-
text?: string | null;
|
|
239
|
+
text?: string | null | undefined;
|
|
240
240
|
/** Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. */
|
|
241
|
-
thread_ts?: string | null;
|
|
241
|
+
thread_ts?: string | null | undefined;
|
|
242
242
|
/** Pass true to enable unfurling of primarily text-based content. */
|
|
243
|
-
unfurl_links?: boolean;
|
|
243
|
+
unfurl_links?: boolean | undefined;
|
|
244
244
|
/** Pass false to disable unfurling of media content. */
|
|
245
|
-
unfurl_media?: boolean;
|
|
245
|
+
unfurl_media?: boolean | undefined;
|
|
246
246
|
/** Set your bot's user name. */
|
|
247
|
-
username?: string | null;
|
|
247
|
+
username?: string | null | undefined;
|
|
248
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. */
|
|
249
|
-
unfurl_app_links?: boolean;
|
|
249
|
+
unfurl_app_links?: boolean | undefined;
|
|
250
250
|
}
|
|
251
251
|
export interface PostMessageResponse {
|
|
252
252
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
253
253
|
ok: boolean;
|
|
254
254
|
channel: string;
|
|
255
255
|
ts: string;
|
|
256
|
-
message?: unknown;
|
|
256
|
+
message?: unknown | undefined;
|
|
257
257
|
/** Pass true if duplicate message is attempted to be sent. */
|
|
258
|
-
is_duplicate?: boolean;
|
|
258
|
+
is_duplicate?: boolean | undefined;
|
|
259
259
|
}
|
|
260
260
|
export type ScheduleMessageRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
|
|
261
261
|
export type ScheduleMessageRequestAttachmentsCase1List =
|
|
@@ -270,33 +270,33 @@ export type ScheduleMessageRequestBlocks = string | ScheduleMessageRequestBlocks
|
|
|
270
270
|
export type ScheduleMessageRequestParse = "none" | "full";
|
|
271
271
|
export interface ScheduleMessageRequest {
|
|
272
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). */
|
|
273
|
-
as_user?: boolean;
|
|
273
|
+
as_user?: boolean | undefined;
|
|
274
274
|
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
275
|
-
attachments?: ScheduleMessageRequestAttachments;
|
|
275
|
+
attachments?: ScheduleMessageRequestAttachments | undefined;
|
|
276
276
|
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
277
|
-
blocks?: ScheduleMessageRequestBlocks;
|
|
277
|
+
blocks?: ScheduleMessageRequestBlocks | undefined;
|
|
278
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. */
|
|
279
279
|
channel: string;
|
|
280
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. */
|
|
281
|
-
link_names?: boolean;
|
|
281
|
+
link_names?: boolean | undefined;
|
|
282
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. */
|
|
283
|
-
markdown_text?: string;
|
|
283
|
+
markdown_text?: string | undefined;
|
|
284
284
|
/** Change how messages are treated. See [chat.postMessage](chat.postMessage#formatting). */
|
|
285
|
-
parse?: ScheduleMessageRequestParse | (string & {});
|
|
285
|
+
parse?: ScheduleMessageRequestParse | (string & {}) | undefined;
|
|
286
286
|
/** Unix timestamp representing the future time the message should post to Slack. */
|
|
287
287
|
post_at: number;
|
|
288
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`. */
|
|
289
|
-
reply_broadcast?: boolean;
|
|
289
|
+
reply_broadcast?: boolean | undefined;
|
|
290
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. */
|
|
291
|
-
text?: string;
|
|
291
|
+
text?: string | undefined;
|
|
292
292
|
/** Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. */
|
|
293
|
-
thread_ts?: string;
|
|
293
|
+
thread_ts?: string | undefined;
|
|
294
294
|
/** Pass true to enable unfurling of primarily text-based content. */
|
|
295
|
-
unfurl_links?: boolean;
|
|
295
|
+
unfurl_links?: boolean | undefined;
|
|
296
296
|
/** Pass false to disable unfurling of media content. */
|
|
297
|
-
unfurl_media?: boolean;
|
|
297
|
+
unfurl_media?: boolean | undefined;
|
|
298
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. */
|
|
299
|
-
metadata?: string | null;
|
|
299
|
+
metadata?: string | null | undefined;
|
|
300
300
|
}
|
|
301
301
|
export type ScheduleMessageResponseMessageMap = { [key: string]: unknown | undefined };
|
|
302
302
|
export interface ScheduleMessageResponse {
|
|
@@ -315,23 +315,23 @@ export interface StartStreamRequest {
|
|
|
315
315
|
/** An encoded ID that represents a channel, thread, or DM. */
|
|
316
316
|
channel: string;
|
|
317
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). */
|
|
318
|
-
chunks?: StartStreamRequestChunksList;
|
|
318
|
+
chunks?: StartStreamRequestChunksList | undefined;
|
|
319
319
|
/** Accepts message text formatted in markdown. Limit this field to 12,000 characters. */
|
|
320
|
-
markdown_text?: string;
|
|
320
|
+
markdown_text?: string | undefined;
|
|
321
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. */
|
|
322
|
-
thread_ts?: string;
|
|
322
|
+
thread_ts?: string | undefined;
|
|
323
323
|
/** The encoded ID of the user to receive the streaming text. Required when streaming to channels. */
|
|
324
|
-
recipient_user_id?: string;
|
|
324
|
+
recipient_user_id?: string | undefined;
|
|
325
325
|
/** The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels. */
|
|
326
|
-
recipient_team_id?: string;
|
|
326
|
+
recipient_team_id?: string | undefined;
|
|
327
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. */
|
|
328
|
-
task_display_mode?: StartStreamRequestTaskDisplayMode | (string & {});
|
|
328
|
+
task_display_mode?: StartStreamRequestTaskDisplayMode | (string & {}) | undefined;
|
|
329
329
|
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
330
|
-
icon_emoji?: string | null;
|
|
330
|
+
icon_emoji?: string | null | undefined;
|
|
331
331
|
/** Image URL to use as the icon for this message. */
|
|
332
|
-
icon_url?: string | null;
|
|
332
|
+
icon_url?: string | null | undefined;
|
|
333
333
|
/** The bot's username to display. */
|
|
334
|
-
username?: string | null;
|
|
334
|
+
username?: string | null | undefined;
|
|
335
335
|
}
|
|
336
336
|
export interface StartStreamResponse {
|
|
337
337
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -346,17 +346,17 @@ export interface StopStreamRequest {
|
|
|
346
346
|
/** An encoded ID that represents a channel, private group, or DM */
|
|
347
347
|
channel: string;
|
|
348
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). */
|
|
349
|
-
chunks?: unknown;
|
|
349
|
+
chunks?: unknown | undefined;
|
|
350
350
|
/** The timestamp of the streaming message. */
|
|
351
351
|
ts: string;
|
|
352
352
|
/** Accepts message text formatted in markdown. Limit this field to 12,000 characters. */
|
|
353
|
-
markdown_text?: string;
|
|
353
|
+
markdown_text?: string | undefined;
|
|
354
354
|
/** A list of blocks that will be rendered at the bottom of the finalized message. */
|
|
355
|
-
blocks?: unknown;
|
|
355
|
+
blocks?: unknown | undefined;
|
|
356
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. */
|
|
357
|
-
metadata?: string | null;
|
|
357
|
+
metadata?: string | null | undefined;
|
|
358
358
|
/** The session status to set after stopping the stream. */
|
|
359
|
-
session_status?: StopStreamRequestSessionStatus | (string & {});
|
|
359
|
+
session_status?: StopStreamRequestSessionStatus | (string & {}) | undefined;
|
|
360
360
|
}
|
|
361
361
|
export interface StopStreamResponse {
|
|
362
362
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -381,31 +381,31 @@ export type UpdateChatRequestLinkNames = boolean | string;
|
|
|
381
381
|
export type UpdateChatRequestFileIdsList = Array<string>;
|
|
382
382
|
export interface UpdateChatRequest {
|
|
383
383
|
/** Pass true to update the message as the authed user. Bot users in this context are considered authed users. */
|
|
384
|
-
as_user?: UpdateChatRequestAsUser | null;
|
|
384
|
+
as_user?: UpdateChatRequestAsUser | null | undefined;
|
|
385
385
|
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
386
|
-
attachments?: UpdateChatRequestAttachments;
|
|
386
|
+
attachments?: UpdateChatRequestAttachments | undefined;
|
|
387
387
|
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
388
|
-
unfurled_attachments?: string | null;
|
|
388
|
+
unfurled_attachments?: string | null | undefined;
|
|
389
389
|
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
390
|
-
blocks?: UpdateChatRequestBlocks;
|
|
390
|
+
blocks?: UpdateChatRequestBlocks | undefined;
|
|
391
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. */
|
|
392
|
-
markdown_text?: string;
|
|
392
|
+
markdown_text?: string | undefined;
|
|
393
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. */
|
|
394
|
-
metadata?: string | null;
|
|
394
|
+
metadata?: string | null | undefined;
|
|
395
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`). */
|
|
396
396
|
channel: string;
|
|
397
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`. */
|
|
398
|
-
link_names?: UpdateChatRequestLinkNames | null;
|
|
398
|
+
link_names?: UpdateChatRequestLinkNames | null | undefined;
|
|
399
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`. */
|
|
400
|
-
parse?: string | null;
|
|
400
|
+
parse?: string | null | undefined;
|
|
401
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. */
|
|
402
|
-
text?: string | null;
|
|
402
|
+
text?: string | null | undefined;
|
|
403
403
|
/** Timestamp of the message to be updated. */
|
|
404
404
|
ts: string;
|
|
405
405
|
/** Broadcast an existing thread reply to make it visible to everyone in the channel or conversation. */
|
|
406
|
-
reply_broadcast?: boolean;
|
|
406
|
+
reply_broadcast?: boolean | undefined;
|
|
407
407
|
/** Array of new file ids that will be sent with this message. */
|
|
408
|
-
file_ids?: UpdateChatRequestFileIdsList;
|
|
408
|
+
file_ids?: UpdateChatRequestFileIdsList | undefined;
|
|
409
409
|
}
|
|
410
410
|
export type UpdateChatResponseMessageAttachmentsItemMap = { [key: string]: unknown | undefined };
|
|
411
411
|
export type UpdateChatResponseMessageAttachmentsList =
|
|
@@ -413,9 +413,9 @@ export type UpdateChatResponseMessageAttachmentsList =
|
|
|
413
413
|
export type UpdateChatResponseMessageMetadataMap = { [key: string]: unknown | undefined };
|
|
414
414
|
export interface UpdateChatResponseMessage {
|
|
415
415
|
text: string;
|
|
416
|
-
blocks?: unknown;
|
|
417
|
-
attachments?: UpdateChatResponseMessageAttachmentsList;
|
|
418
|
-
metadata?: UpdateChatResponseMessageMetadataMap;
|
|
416
|
+
blocks?: unknown | undefined;
|
|
417
|
+
attachments?: UpdateChatResponseMessageAttachmentsList | undefined;
|
|
418
|
+
metadata?: UpdateChatResponseMessageMetadataMap | undefined;
|
|
419
419
|
}
|
|
420
420
|
export interface UpdateChatResponse {
|
|
421
421
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -556,7 +556,7 @@ export const meMessage: API.OperationMethod<
|
|
|
556
556
|
}));
|
|
557
557
|
|
|
558
558
|
export type PostEphemeralError = SlackOpError;
|
|
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. 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 */
|
|
560
560
|
export const postEphemeral: API.OperationMethod<
|
|
561
561
|
PostEphemeralRequest,
|
|
562
562
|
PostEphemeralResponse,
|
|
@@ -573,7 +573,7 @@ export const postEphemeral: API.OperationMethod<
|
|
|
573
573
|
}));
|
|
574
574
|
|
|
575
575
|
export type PostMessageError = SlackOpError;
|
|
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. 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 */
|
|
577
577
|
export const postMessage: API.OperationMethod<
|
|
578
578
|
PostMessageRequest,
|
|
579
579
|
PostMessageResponse,
|
|
@@ -590,7 +590,7 @@ export const postMessage: API.OperationMethod<
|
|
|
590
590
|
}));
|
|
591
591
|
|
|
592
592
|
export type ScheduleMessageError = SlackOpError;
|
|
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. 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 */
|
|
594
594
|
export const scheduleMessage: API.OperationMethod<
|
|
595
595
|
ScheduleMessageRequest,
|
|
596
596
|
ScheduleMessageResponse,
|
|
@@ -607,7 +607,7 @@ export const scheduleMessage: API.OperationMethod<
|
|
|
607
607
|
}));
|
|
608
608
|
|
|
609
609
|
export type StartStreamError = SlackOpError;
|
|
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. 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 */
|
|
611
611
|
export const startStream: API.OperationMethod<
|
|
612
612
|
StartStreamRequest,
|
|
613
613
|
StartStreamResponse,
|
|
@@ -641,7 +641,7 @@ export const stopStream: API.OperationMethod<
|
|
|
641
641
|
}));
|
|
642
642
|
|
|
643
643
|
export type UpdateChatError = SlackOpError;
|
|
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` --
|
|
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 */
|
|
645
645
|
export const updateChat: API.OperationMethod<
|
|
646
646
|
UpdateChatRequest,
|
|
647
647
|
UpdateChatResponse,
|