@distilled.cloud/slack 0.0.0 → 1.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/lib/credentials.d.ts +27 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +53 -0
- package/lib/credentials.js.map +1 -0
- package/lib/errors.d.ts +83 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +59 -0
- package/lib/errors.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +17 -0
- package/lib/index.js.map +1 -0
- package/lib/pagination.d.ts +31 -0
- package/lib/pagination.d.ts.map +1 -0
- package/lib/pagination.js +31 -0
- package/lib/pagination.js.map +1 -0
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +230 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +52 -0
- package/lib/retry.d.ts.map +1 -0
- package/lib/retry.js +45 -0
- package/lib/retry.js.map +1 -0
- package/lib/services/admin.d.ts +2796 -0
- package/lib/services/admin.d.ts.map +1 -0
- package/lib/services/admin.js +3217 -0
- package/lib/services/admin.js.map +1 -0
- package/lib/services/api.d.ts +23 -0
- package/lib/services/api.d.ts.map +1 -0
- package/lib/services/api.js +26 -0
- package/lib/services/api.js.map +1 -0
- package/lib/services/apps.d.ts +568 -0
- package/lib/services/apps.d.ts.map +1 -0
- package/lib/services/apps.js +584 -0
- package/lib/services/apps.js.map +1 -0
- package/lib/services/assistant.d.ts +290 -0
- package/lib/services/assistant.d.ts.map +1 -0
- package/lib/services/assistant.js +232 -0
- package/lib/services/assistant.js.map +1 -0
- package/lib/services/auth.d.ts +90 -0
- package/lib/services/auth.d.ts.map +1 -0
- package/lib/services/auth.js +114 -0
- package/lib/services/auth.js.map +1 -0
- package/lib/services/blocks.d.ts +31 -0
- package/lib/services/blocks.d.ts.map +1 -0
- package/lib/services/blocks.js +31 -0
- package/lib/services/blocks.js.map +1 -0
- package/lib/services/bookmarks.d.ts +91 -0
- package/lib/services/bookmarks.d.ts.map +1 -0
- package/lib/services/bookmarks.js +98 -0
- package/lib/services/bookmarks.js.map +1 -0
- package/lib/services/bots.d.ts +60 -0
- package/lib/services/bots.d.ts.map +1 -0
- package/lib/services/bots.js +68 -0
- package/lib/services/bots.js.map +1 -0
- package/lib/services/calls.d.ts +124 -0
- package/lib/services/calls.d.ts.map +1 -0
- package/lib/services/calls.js +136 -0
- package/lib/services/calls.js.map +1 -0
- package/lib/services/canvases.d.ts +152 -0
- package/lib/services/canvases.d.ts.map +1 -0
- package/lib/services/canvases.js +152 -0
- package/lib/services/canvases.js.map +1 -0
- package/lib/services/chat.d.ts +525 -0
- package/lib/services/chat.d.ts.map +1 -0
- package/lib/services/chat.js +436 -0
- package/lib/services/chat.js.map +1 -0
- package/lib/services/conversations.d.ts +642 -0
- package/lib/services/conversations.d.ts.map +1 -0
- package/lib/services/conversations.js +769 -0
- package/lib/services/conversations.js.map +1 -0
- package/lib/services/dialog.d.ts +20 -0
- package/lib/services/dialog.d.ts.map +1 -0
- package/lib/services/dialog.js +27 -0
- package/lib/services/dialog.js.map +1 -0
- package/lib/services/dnd.d.ts +94 -0
- package/lib/services/dnd.d.ts.map +1 -0
- package/lib/services/dnd.js +111 -0
- package/lib/services/dnd.js.map +1 -0
- package/lib/services/emoji.d.ts +35 -0
- package/lib/services/emoji.d.ts.map +1 -0
- package/lib/services/emoji.js +40 -0
- package/lib/services/emoji.js.map +1 -0
- package/lib/services/entity.d.ts +93 -0
- package/lib/services/entity.d.ts.map +1 -0
- package/lib/services/entity.js +89 -0
- package/lib/services/entity.js.map +1 -0
- package/lib/services/files.d.ts +473 -0
- package/lib/services/files.d.ts.map +1 -0
- package/lib/services/files.js +510 -0
- package/lib/services/files.js.map +1 -0
- package/lib/services/functions.d.ts +235 -0
- package/lib/services/functions.d.ts.map +1 -0
- package/lib/services/functions.js +256 -0
- package/lib/services/functions.js.map +1 -0
- package/lib/services/index.d.ts +35 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +36 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/lists.d.ts +300 -0
- package/lib/services/lists.d.ts.map +1 -0
- package/lib/services/lists.js +366 -0
- package/lib/services/lists.js.map +1 -0
- package/lib/services/migration.d.ts +34 -0
- package/lib/services/migration.d.ts.map +1 -0
- package/lib/services/migration.js +36 -0
- package/lib/services/migration.js.map +1 -0
- package/lib/services/oauth.d.ts +307 -0
- package/lib/services/oauth.d.ts.map +1 -0
- package/lib/services/oauth.js +278 -0
- package/lib/services/oauth.js.map +1 -0
- package/lib/services/openid.d.ts +86 -0
- package/lib/services/openid.d.ts.map +1 -0
- package/lib/services/openid.js +93 -0
- package/lib/services/openid.js.map +1 -0
- package/lib/services/pins.d.ts +64 -0
- package/lib/services/pins.d.ts.map +1 -0
- package/lib/services/pins.js +75 -0
- package/lib/services/pins.js.map +1 -0
- package/lib/services/reactions.d.ts +108 -0
- package/lib/services/reactions.d.ts.map +1 -0
- package/lib/services/reactions.js +119 -0
- package/lib/services/reactions.js.map +1 -0
- package/lib/services/reminders.d.ts +89 -0
- package/lib/services/reminders.d.ts.map +1 -0
- package/lib/services/reminders.js +109 -0
- package/lib/services/reminders.js.map +1 -0
- package/lib/services/rtm.d.ts +68 -0
- package/lib/services/rtm.d.ts.map +1 -0
- package/lib/services/rtm.js +74 -0
- package/lib/services/rtm.js.map +1 -0
- package/lib/services/search.d.ts +239 -0
- package/lib/services/search.d.ts.map +1 -0
- package/lib/services/search.js +190 -0
- package/lib/services/search.js.map +1 -0
- package/lib/services/stars.d.ts +126 -0
- package/lib/services/stars.d.ts.map +1 -0
- package/lib/services/stars.js +145 -0
- package/lib/services/stars.js.map +1 -0
- package/lib/services/team.d.ts +309 -0
- package/lib/services/team.d.ts.map +1 -0
- package/lib/services/team.js +333 -0
- package/lib/services/team.js.map +1 -0
- package/lib/services/tooling.d.ts +31 -0
- package/lib/services/tooling.d.ts.map +1 -0
- package/lib/services/tooling.js +38 -0
- package/lib/services/tooling.js.map +1 -0
- package/lib/services/usergroups.d.ts +183 -0
- package/lib/services/usergroups.d.ts.map +1 -0
- package/lib/services/usergroups.js +180 -0
- package/lib/services/usergroups.js.map +1 -0
- package/lib/services/users.d.ts +246 -0
- package/lib/services/users.d.ts.map +1 -0
- package/lib/services/users.js +309 -0
- package/lib/services/users.js.map +1 -0
- package/lib/services/views.d.ts +84 -0
- package/lib/services/views.d.ts.map +1 -0
- package/lib/services/views.js +95 -0
- package/lib/services/views.js.map +1 -0
- package/lib/services/workflows.d.ts +231 -0
- package/lib/services/workflows.d.ts.map +1 -0
- package/lib/services/workflows.js +238 -0
- package/lib/services/workflows.js.map +1 -0
- package/lib/traits.d.ts +11 -0
- package/lib/traits.d.ts.map +1 -0
- package/lib/traits.js +12 -0
- package/lib/traits.js.map +1 -0
- package/package.json +82 -4
- package/src/credentials.ts +86 -0
- package/src/errors.ts +101 -0
- package/src/index.ts +20 -0
- package/src/pagination.ts +35 -0
- package/src/protocol.ts +326 -0
- package/src/retry.ts +76 -0
- package/src/services/admin.ts +7722 -0
- package/src/services/api.ts +58 -0
- package/src/services/apps.ts +1441 -0
- package/src/services/assistant.ts +639 -0
- package/src/services/auth.ts +241 -0
- package/src/services/blocks.ts +80 -0
- package/src/services/bookmarks.ts +223 -0
- package/src/services/bots.ts +144 -0
- package/src/services/calls.ts +318 -0
- package/src/services/canvases.ts +392 -0
- package/src/services/chat.ts +1191 -0
- package/src/services/conversations.ts +1754 -0
- package/src/services/dialog.ts +55 -0
- package/src/services/dnd.ts +246 -0
- package/src/services/emoji.ts +91 -0
- package/src/services/entity.ts +225 -0
- package/src/services/files.ts +1192 -0
- package/src/services/functions.ts +642 -0
- package/src/services/index.ts +35 -0
- package/src/services/lists.ts +832 -0
- package/src/services/migration.ts +85 -0
- package/src/services/oauth.ts +658 -0
- package/src/services/openid.ts +243 -0
- package/src/services/pins.ts +167 -0
- package/src/services/reactions.ts +272 -0
- package/src/services/reminders.ts +240 -0
- package/src/services/rtm.ts +162 -0
- package/src/services/search.ts +507 -0
- package/src/services/stars.ts +323 -0
- package/src/services/team.ts +834 -0
- package/src/services/tooling.ts +78 -0
- package/src/services/usergroups.ts +441 -0
- package/src/services/users.ts +685 -0
- package/src/services/views.ts +212 -0
- package/src/services/workflows.ts +605 -0
- package/src/traits.ts +45 -0
|
@@ -0,0 +1,1191 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
|
+
import * as S from "@distilled.cloud/core/schema";
|
|
3
|
+
import * as API from "@distilled.cloud/core/api";
|
|
4
|
+
import * as T from "../traits.ts";
|
|
5
|
+
import {
|
|
6
|
+
SlackProtocol,
|
|
7
|
+
type SlackOpError,
|
|
8
|
+
type SlackOpContext,
|
|
9
|
+
} from "../protocol.ts";
|
|
10
|
+
import { slackPaginate } from "../pagination.ts";
|
|
11
|
+
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
12
|
+
import * as Retry from "../retry.ts";
|
|
13
|
+
|
|
14
|
+
export type { SlackOpError, SlackOpContext };
|
|
15
|
+
|
|
16
|
+
/** Array of streaming chunks. */
|
|
17
|
+
export type AppendStreamRequestChunksList = Array<unknown>;
|
|
18
|
+
export const AppendStreamRequestChunksList = /*@__PURE__*/ S.Array(
|
|
19
|
+
S.Unknown,
|
|
20
|
+
) as any as S.Schema<AppendStreamRequestChunksList>;
|
|
21
|
+
|
|
22
|
+
export interface AppendStreamRequest {
|
|
23
|
+
/** An encoded ID that represents a channel, private group, or DM */
|
|
24
|
+
channel: string;
|
|
25
|
+
/** Array of streaming chunks. */
|
|
26
|
+
chunks?: AppendStreamRequestChunksList;
|
|
27
|
+
/** The timestamp of the streaming message. */
|
|
28
|
+
ts: string;
|
|
29
|
+
/** 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. */
|
|
30
|
+
markdown_text: string;
|
|
31
|
+
}
|
|
32
|
+
export const AppendStreamRequest = /*@__PURE__*/ S.suspend(() =>
|
|
33
|
+
S.Struct({
|
|
34
|
+
channel: S.String,
|
|
35
|
+
chunks: S.optional(AppendStreamRequestChunksList),
|
|
36
|
+
ts: S.String,
|
|
37
|
+
markdown_text: S.String,
|
|
38
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.appendStream", code: 200 })),
|
|
39
|
+
).annotate({
|
|
40
|
+
identifier: "AppendStreamRequest",
|
|
41
|
+
}) as any as S.Schema<AppendStreamRequest>;
|
|
42
|
+
|
|
43
|
+
export interface AppendStreamResponse {
|
|
44
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
45
|
+
ok: boolean;
|
|
46
|
+
channel: string;
|
|
47
|
+
ts: string;
|
|
48
|
+
}
|
|
49
|
+
export const AppendStreamResponse = /*@__PURE__*/ S.suspend(() =>
|
|
50
|
+
S.Struct({
|
|
51
|
+
ok: S.Boolean,
|
|
52
|
+
channel: S.String,
|
|
53
|
+
ts: S.String,
|
|
54
|
+
}),
|
|
55
|
+
).annotate({
|
|
56
|
+
identifier: "AppendStreamResponse",
|
|
57
|
+
}) as any as S.Schema<AppendStreamResponse>;
|
|
58
|
+
|
|
59
|
+
/** 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. */
|
|
60
|
+
export type ChatUnfurlRequestSource = "composer" | "conversations_history";
|
|
61
|
+
export const ChatUnfurlRequestSource = S.String;
|
|
62
|
+
|
|
63
|
+
export interface ChatUnfurlRequest {
|
|
64
|
+
/** 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. */
|
|
65
|
+
channel?: string;
|
|
66
|
+
/** Timestamp of the message to add unfurl behavior to. Required for public channels. */
|
|
67
|
+
ts?: string;
|
|
68
|
+
/** URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments. Required for public channels. */
|
|
69
|
+
unfurls?: string;
|
|
70
|
+
/** 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`. */
|
|
71
|
+
user_auth_message?: string | null;
|
|
72
|
+
/** Set to `true` or `1` to indicate the user must install your Slack app to trigger unfurls for this domain */
|
|
73
|
+
user_auth_required?: boolean;
|
|
74
|
+
/** Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded. */
|
|
75
|
+
user_auth_url?: string | null;
|
|
76
|
+
/** 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 */
|
|
77
|
+
user_auth_blocks?: unknown;
|
|
78
|
+
/** The ID of the link to unfurl. Both `unfurl_id` and `source` must be provided together, *or* `channel` and `ts` must be provided together. */
|
|
79
|
+
unfurl_id?: string;
|
|
80
|
+
/** 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. */
|
|
81
|
+
source?: ChatUnfurlRequestSource | (string & {});
|
|
82
|
+
}
|
|
83
|
+
export const ChatUnfurlRequest = /*@__PURE__*/ S.suspend(() =>
|
|
84
|
+
S.Struct({
|
|
85
|
+
channel: S.optional(S.String),
|
|
86
|
+
ts: S.optional(S.String),
|
|
87
|
+
unfurls: S.optional(S.String),
|
|
88
|
+
user_auth_message: S.optional(S.NullOr(S.String)),
|
|
89
|
+
user_auth_required: S.optional(S.Boolean),
|
|
90
|
+
user_auth_url: S.optional(S.NullOr(S.String)),
|
|
91
|
+
user_auth_blocks: S.optional(S.Unknown),
|
|
92
|
+
unfurl_id: S.optional(S.String),
|
|
93
|
+
source: S.optional(ChatUnfurlRequestSource),
|
|
94
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.unfurl", code: 200 })),
|
|
95
|
+
).annotate({
|
|
96
|
+
identifier: "ChatUnfurlRequest",
|
|
97
|
+
}) as any as S.Schema<ChatUnfurlRequest>;
|
|
98
|
+
|
|
99
|
+
export interface ChatUnfurlResponse {
|
|
100
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
101
|
+
ok: boolean;
|
|
102
|
+
}
|
|
103
|
+
export const ChatUnfurlResponse = /*@__PURE__*/ S.suspend(() =>
|
|
104
|
+
S.Struct({
|
|
105
|
+
ok: S.Boolean,
|
|
106
|
+
}),
|
|
107
|
+
).annotate({
|
|
108
|
+
identifier: "ChatUnfurlResponse",
|
|
109
|
+
}) as any as S.Schema<ChatUnfurlResponse>;
|
|
110
|
+
|
|
111
|
+
export interface DeleteChatRequest {
|
|
112
|
+
/** (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. */
|
|
113
|
+
as_user?: boolean;
|
|
114
|
+
/** Channel containing the message to be deleted. */
|
|
115
|
+
channel: string;
|
|
116
|
+
/** Timestamp of the message to be deleted. */
|
|
117
|
+
ts: string;
|
|
118
|
+
}
|
|
119
|
+
export const DeleteChatRequest = /*@__PURE__*/ S.suspend(() =>
|
|
120
|
+
S.Struct({
|
|
121
|
+
as_user: S.optional(S.Boolean),
|
|
122
|
+
channel: S.String,
|
|
123
|
+
ts: S.String,
|
|
124
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.delete", code: 200 })),
|
|
125
|
+
).annotate({
|
|
126
|
+
identifier: "DeleteChatRequest",
|
|
127
|
+
}) as any as S.Schema<DeleteChatRequest>;
|
|
128
|
+
|
|
129
|
+
export interface DeleteChatResponse {
|
|
130
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
131
|
+
ok: boolean;
|
|
132
|
+
channel: string;
|
|
133
|
+
ts: string;
|
|
134
|
+
}
|
|
135
|
+
export const DeleteChatResponse = /*@__PURE__*/ S.suspend(() =>
|
|
136
|
+
S.Struct({
|
|
137
|
+
ok: S.Boolean,
|
|
138
|
+
channel: S.String,
|
|
139
|
+
ts: S.String,
|
|
140
|
+
}),
|
|
141
|
+
).annotate({
|
|
142
|
+
identifier: "DeleteChatResponse",
|
|
143
|
+
}) as any as S.Schema<DeleteChatResponse>;
|
|
144
|
+
|
|
145
|
+
export interface DeleteScheduledMessageRequest {
|
|
146
|
+
/** 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. */
|
|
147
|
+
as_user?: boolean;
|
|
148
|
+
/** The channel the scheduled_message is posting to */
|
|
149
|
+
channel: string;
|
|
150
|
+
/** `scheduled_message_id` returned from call to chat.scheduleMessage */
|
|
151
|
+
scheduled_message_id: string;
|
|
152
|
+
}
|
|
153
|
+
export const DeleteScheduledMessageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
154
|
+
S.Struct({
|
|
155
|
+
as_user: S.optional(S.Boolean),
|
|
156
|
+
channel: S.String,
|
|
157
|
+
scheduled_message_id: S.String,
|
|
158
|
+
}).pipe(
|
|
159
|
+
T.Http({ method: "POST", uri: "/chat.deleteScheduledMessage", code: 200 }),
|
|
160
|
+
),
|
|
161
|
+
).annotate({
|
|
162
|
+
identifier: "DeleteScheduledMessageRequest",
|
|
163
|
+
}) as any as S.Schema<DeleteScheduledMessageRequest>;
|
|
164
|
+
|
|
165
|
+
export interface DeleteScheduledMessageResponse {
|
|
166
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
167
|
+
ok: boolean;
|
|
168
|
+
}
|
|
169
|
+
export const DeleteScheduledMessageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
170
|
+
S.Struct({
|
|
171
|
+
ok: S.Boolean,
|
|
172
|
+
}),
|
|
173
|
+
).annotate({
|
|
174
|
+
identifier: "DeleteScheduledMessageResponse",
|
|
175
|
+
}) as any as S.Schema<DeleteScheduledMessageResponse>;
|
|
176
|
+
|
|
177
|
+
export interface GetPermalinkRequest {
|
|
178
|
+
/** The ID of the conversation or channel containing the message */
|
|
179
|
+
channel: string;
|
|
180
|
+
/** A message's `ts` value, uniquely identifying it within a channel */
|
|
181
|
+
message_ts: string;
|
|
182
|
+
}
|
|
183
|
+
export const GetPermalinkRequest = /*@__PURE__*/ S.suspend(() =>
|
|
184
|
+
S.Struct({
|
|
185
|
+
channel: S.String.pipe(T.Query()),
|
|
186
|
+
message_ts: S.String.pipe(T.Query()),
|
|
187
|
+
}).pipe(T.Http({ method: "GET", uri: "/chat.getPermalink", code: 200 })),
|
|
188
|
+
).annotate({
|
|
189
|
+
identifier: "GetPermalinkRequest",
|
|
190
|
+
}) as any as S.Schema<GetPermalinkRequest>;
|
|
191
|
+
|
|
192
|
+
export interface GetPermalinkResponse {
|
|
193
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
194
|
+
ok: boolean;
|
|
195
|
+
permalink: string;
|
|
196
|
+
channel: string;
|
|
197
|
+
}
|
|
198
|
+
export const GetPermalinkResponse = /*@__PURE__*/ S.suspend(() =>
|
|
199
|
+
S.Struct({
|
|
200
|
+
ok: S.Boolean,
|
|
201
|
+
permalink: S.String,
|
|
202
|
+
channel: S.String,
|
|
203
|
+
}),
|
|
204
|
+
).annotate({
|
|
205
|
+
identifier: "GetPermalinkResponse",
|
|
206
|
+
}) as any as S.Schema<GetPermalinkResponse>;
|
|
207
|
+
|
|
208
|
+
export interface ListScheduledMessagesRequest {
|
|
209
|
+
/** The channel of the scheduled messages */
|
|
210
|
+
channel?: string;
|
|
211
|
+
/** 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. */
|
|
212
|
+
cursor?: string;
|
|
213
|
+
/** A Unix timestamp of the latest value in the time range */
|
|
214
|
+
latest?: string;
|
|
215
|
+
/** Maximum number of original entries to return. */
|
|
216
|
+
limit?: number;
|
|
217
|
+
/** A Unix timestamp of the oldest value in the time range */
|
|
218
|
+
oldest?: string;
|
|
219
|
+
/** encoded team id to list channels in, required if org token is used */
|
|
220
|
+
team_id?: string;
|
|
221
|
+
}
|
|
222
|
+
export const ListScheduledMessagesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
223
|
+
S.Struct({
|
|
224
|
+
channel: S.optional(S.String),
|
|
225
|
+
cursor: S.optional(S.String),
|
|
226
|
+
latest: S.optional(S.String),
|
|
227
|
+
limit: S.optional(S.Number),
|
|
228
|
+
oldest: S.optional(S.String),
|
|
229
|
+
team_id: S.optional(S.String),
|
|
230
|
+
}).pipe(
|
|
231
|
+
T.Http({ method: "POST", uri: "/chat.scheduledMessages.list", code: 200 }),
|
|
232
|
+
),
|
|
233
|
+
).annotate({
|
|
234
|
+
identifier: "ListScheduledMessagesRequest",
|
|
235
|
+
}) as any as S.Schema<ListScheduledMessagesRequest>;
|
|
236
|
+
|
|
237
|
+
export interface ListScheduledMessagesResponseScheduledMessagesItem {
|
|
238
|
+
id: string;
|
|
239
|
+
channel_id: string;
|
|
240
|
+
post_at: number;
|
|
241
|
+
date_created: number;
|
|
242
|
+
text?: string;
|
|
243
|
+
}
|
|
244
|
+
export const ListScheduledMessagesResponseScheduledMessagesItem =
|
|
245
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
246
|
+
S.Struct({
|
|
247
|
+
id: S.String,
|
|
248
|
+
channel_id: S.String,
|
|
249
|
+
post_at: S.Number,
|
|
250
|
+
date_created: S.Number,
|
|
251
|
+
text: S.optional(S.String),
|
|
252
|
+
}),
|
|
253
|
+
).annotate({
|
|
254
|
+
identifier: "ListScheduledMessagesResponseScheduledMessagesItem",
|
|
255
|
+
}) as any as S.Schema<ListScheduledMessagesResponseScheduledMessagesItem>;
|
|
256
|
+
|
|
257
|
+
export type ListScheduledMessagesResponseScheduledMessagesList =
|
|
258
|
+
Array<ListScheduledMessagesResponseScheduledMessagesItem>;
|
|
259
|
+
export const ListScheduledMessagesResponseScheduledMessagesList =
|
|
260
|
+
/*@__PURE__*/ S.Array(
|
|
261
|
+
ListScheduledMessagesResponseScheduledMessagesItem,
|
|
262
|
+
) as any as S.Schema<ListScheduledMessagesResponseScheduledMessagesList>;
|
|
263
|
+
|
|
264
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
265
|
+
export interface ListScheduledMessagesResponseResponseMetadata {
|
|
266
|
+
/** Cursor for the next page — pass as `cursor` on the next call. */
|
|
267
|
+
next_cursor?: string;
|
|
268
|
+
}
|
|
269
|
+
export const ListScheduledMessagesResponseResponseMetadata =
|
|
270
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
271
|
+
S.Struct({
|
|
272
|
+
next_cursor: S.optional(S.String),
|
|
273
|
+
}),
|
|
274
|
+
).annotate({
|
|
275
|
+
identifier: "ListScheduledMessagesResponseResponseMetadata",
|
|
276
|
+
}) as any as S.Schema<ListScheduledMessagesResponseResponseMetadata>;
|
|
277
|
+
|
|
278
|
+
export interface ListScheduledMessagesResponse {
|
|
279
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
280
|
+
ok: boolean;
|
|
281
|
+
scheduled_messages: ListScheduledMessagesResponseScheduledMessagesList;
|
|
282
|
+
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
283
|
+
response_metadata?: ListScheduledMessagesResponseResponseMetadata;
|
|
284
|
+
}
|
|
285
|
+
export const ListScheduledMessagesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
286
|
+
S.Struct({
|
|
287
|
+
ok: S.Boolean,
|
|
288
|
+
scheduled_messages: ListScheduledMessagesResponseScheduledMessagesList,
|
|
289
|
+
response_metadata: S.optional(
|
|
290
|
+
ListScheduledMessagesResponseResponseMetadata,
|
|
291
|
+
),
|
|
292
|
+
}),
|
|
293
|
+
).annotate({
|
|
294
|
+
identifier: "ListScheduledMessagesResponse",
|
|
295
|
+
}) as any as S.Schema<ListScheduledMessagesResponse>;
|
|
296
|
+
|
|
297
|
+
export interface MeMessageRequest {
|
|
298
|
+
/** Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. */
|
|
299
|
+
channel: string;
|
|
300
|
+
/** Text of the message to send. */
|
|
301
|
+
text: string;
|
|
302
|
+
}
|
|
303
|
+
export const MeMessageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
304
|
+
S.Struct({
|
|
305
|
+
channel: S.String,
|
|
306
|
+
text: S.String,
|
|
307
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.meMessage", code: 200 })),
|
|
308
|
+
).annotate({
|
|
309
|
+
identifier: "MeMessageRequest",
|
|
310
|
+
}) as any as S.Schema<MeMessageRequest>;
|
|
311
|
+
|
|
312
|
+
export interface MeMessageResponse {
|
|
313
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
314
|
+
ok: boolean;
|
|
315
|
+
ts?: string;
|
|
316
|
+
channel?: string;
|
|
317
|
+
}
|
|
318
|
+
export const MeMessageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
319
|
+
S.Struct({
|
|
320
|
+
ok: S.Boolean,
|
|
321
|
+
ts: S.optional(S.String),
|
|
322
|
+
channel: S.optional(S.String),
|
|
323
|
+
}),
|
|
324
|
+
).annotate({
|
|
325
|
+
identifier: "MeMessageResponse",
|
|
326
|
+
}) as any as S.Schema<MeMessageResponse>;
|
|
327
|
+
|
|
328
|
+
export type PostEphemeralRequestAttachmentsCase1ItemMap = {
|
|
329
|
+
[key: string]: unknown | undefined;
|
|
330
|
+
};
|
|
331
|
+
export const PostEphemeralRequestAttachmentsCase1ItemMap =
|
|
332
|
+
/*@__PURE__*/ S.Record(
|
|
333
|
+
S.String,
|
|
334
|
+
S.Unknown,
|
|
335
|
+
) as any as S.Schema<PostEphemeralRequestAttachmentsCase1ItemMap>;
|
|
336
|
+
|
|
337
|
+
export type PostEphemeralRequestAttachmentsCase1List =
|
|
338
|
+
Array<PostEphemeralRequestAttachmentsCase1ItemMap>;
|
|
339
|
+
export const PostEphemeralRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
|
|
340
|
+
PostEphemeralRequestAttachmentsCase1ItemMap,
|
|
341
|
+
) as any as S.Schema<PostEphemeralRequestAttachmentsCase1List>;
|
|
342
|
+
|
|
343
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
344
|
+
export type PostEphemeralRequestAttachments =
|
|
345
|
+
| string
|
|
346
|
+
| PostEphemeralRequestAttachmentsCase1List;
|
|
347
|
+
export const PostEphemeralRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(
|
|
348
|
+
T.UnionCases([[], []]),
|
|
349
|
+
);
|
|
350
|
+
|
|
351
|
+
export type PostEphemeralRequestBlocksCase1ItemMap = {
|
|
352
|
+
[key: string]: unknown | undefined;
|
|
353
|
+
};
|
|
354
|
+
export const PostEphemeralRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
355
|
+
S.String,
|
|
356
|
+
S.Unknown,
|
|
357
|
+
) as any as S.Schema<PostEphemeralRequestBlocksCase1ItemMap>;
|
|
358
|
+
|
|
359
|
+
export type PostEphemeralRequestBlocksCase1List =
|
|
360
|
+
Array<PostEphemeralRequestBlocksCase1ItemMap>;
|
|
361
|
+
export const PostEphemeralRequestBlocksCase1List = /*@__PURE__*/ S.Array(
|
|
362
|
+
PostEphemeralRequestBlocksCase1ItemMap,
|
|
363
|
+
) as any as S.Schema<PostEphemeralRequestBlocksCase1List>;
|
|
364
|
+
|
|
365
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
366
|
+
export type PostEphemeralRequestBlocks =
|
|
367
|
+
| string
|
|
368
|
+
| PostEphemeralRequestBlocksCase1List;
|
|
369
|
+
export const PostEphemeralRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(
|
|
370
|
+
T.UnionCases([[], []]),
|
|
371
|
+
);
|
|
372
|
+
|
|
373
|
+
export type PostEphemeralRequestParse =
|
|
374
|
+
| ""
|
|
375
|
+
| "none"
|
|
376
|
+
| "full"
|
|
377
|
+
| "mrkdwn"
|
|
378
|
+
| "false";
|
|
379
|
+
export const PostEphemeralRequestParse = S.String;
|
|
380
|
+
|
|
381
|
+
export interface PostEphemeralRequest {
|
|
382
|
+
/** (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. */
|
|
383
|
+
as_user?: boolean;
|
|
384
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
385
|
+
attachments?: PostEphemeralRequestAttachments;
|
|
386
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
387
|
+
blocks?: PostEphemeralRequestBlocks;
|
|
388
|
+
/** Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. */
|
|
389
|
+
channel: string;
|
|
390
|
+
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
391
|
+
icon_emoji?: string;
|
|
392
|
+
/** URL to an image to use as the icon for this message. */
|
|
393
|
+
icon_url?: string;
|
|
394
|
+
/** Find and link channel names and usernames. */
|
|
395
|
+
link_names?: boolean;
|
|
396
|
+
/** 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. */
|
|
397
|
+
markdown_text?: string;
|
|
398
|
+
/** 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`. */
|
|
399
|
+
metadata?: string | null;
|
|
400
|
+
/** Change how messages are treated. Defaults to `none`. See [below](#formatting). */
|
|
401
|
+
parse?: PostEphemeralRequestParse | (string & {}) | null;
|
|
402
|
+
/** 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. */
|
|
403
|
+
text?: string | null;
|
|
404
|
+
/** 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. */
|
|
405
|
+
thread_ts?: string | null;
|
|
406
|
+
/** `id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument. */
|
|
407
|
+
user: string;
|
|
408
|
+
/** Set your bot's user name. */
|
|
409
|
+
username?: string;
|
|
410
|
+
}
|
|
411
|
+
export const PostEphemeralRequest = /*@__PURE__*/ S.suspend(() =>
|
|
412
|
+
S.Struct({
|
|
413
|
+
as_user: S.optional(S.Boolean),
|
|
414
|
+
attachments: S.optional(PostEphemeralRequestAttachments),
|
|
415
|
+
blocks: S.optional(PostEphemeralRequestBlocks),
|
|
416
|
+
channel: S.String,
|
|
417
|
+
icon_emoji: S.optional(S.String),
|
|
418
|
+
icon_url: S.optional(S.String),
|
|
419
|
+
link_names: S.optional(S.Boolean),
|
|
420
|
+
markdown_text: S.optional(S.String),
|
|
421
|
+
metadata: S.optional(S.NullOr(S.String)),
|
|
422
|
+
parse: S.optional(S.NullOr(PostEphemeralRequestParse)),
|
|
423
|
+
text: S.optional(S.NullOr(S.String)),
|
|
424
|
+
thread_ts: S.optional(S.NullOr(S.String)),
|
|
425
|
+
user: S.String,
|
|
426
|
+
username: S.optional(S.String),
|
|
427
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.postEphemeral", code: 200 })),
|
|
428
|
+
).annotate({
|
|
429
|
+
identifier: "PostEphemeralRequest",
|
|
430
|
+
}) as any as S.Schema<PostEphemeralRequest>;
|
|
431
|
+
|
|
432
|
+
export interface PostEphemeralResponse {
|
|
433
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
434
|
+
ok: boolean;
|
|
435
|
+
message_ts: string;
|
|
436
|
+
}
|
|
437
|
+
export const PostEphemeralResponse = /*@__PURE__*/ S.suspend(() =>
|
|
438
|
+
S.Struct({
|
|
439
|
+
ok: S.Boolean,
|
|
440
|
+
message_ts: S.String,
|
|
441
|
+
}),
|
|
442
|
+
).annotate({
|
|
443
|
+
identifier: "PostEphemeralResponse",
|
|
444
|
+
}) as any as S.Schema<PostEphemeralResponse>;
|
|
445
|
+
|
|
446
|
+
export type PostMessageRequestAttachmentsCase1ItemMap = {
|
|
447
|
+
[key: string]: unknown | undefined;
|
|
448
|
+
};
|
|
449
|
+
export const PostMessageRequestAttachmentsCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
450
|
+
S.String,
|
|
451
|
+
S.Unknown,
|
|
452
|
+
) as any as S.Schema<PostMessageRequestAttachmentsCase1ItemMap>;
|
|
453
|
+
|
|
454
|
+
export type PostMessageRequestAttachmentsCase1List =
|
|
455
|
+
Array<PostMessageRequestAttachmentsCase1ItemMap>;
|
|
456
|
+
export const PostMessageRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
|
|
457
|
+
PostMessageRequestAttachmentsCase1ItemMap,
|
|
458
|
+
) as any as S.Schema<PostMessageRequestAttachmentsCase1List>;
|
|
459
|
+
|
|
460
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
461
|
+
export type PostMessageRequestAttachments =
|
|
462
|
+
| string
|
|
463
|
+
| PostMessageRequestAttachmentsCase1List;
|
|
464
|
+
export const PostMessageRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(
|
|
465
|
+
T.UnionCases([[], []]),
|
|
466
|
+
);
|
|
467
|
+
|
|
468
|
+
export type PostMessageRequestBlocksCase1ItemMap = {
|
|
469
|
+
[key: string]: unknown | undefined;
|
|
470
|
+
};
|
|
471
|
+
export const PostMessageRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
472
|
+
S.String,
|
|
473
|
+
S.Unknown,
|
|
474
|
+
) as any as S.Schema<PostMessageRequestBlocksCase1ItemMap>;
|
|
475
|
+
|
|
476
|
+
export type PostMessageRequestBlocksCase1List =
|
|
477
|
+
Array<PostMessageRequestBlocksCase1ItemMap>;
|
|
478
|
+
export const PostMessageRequestBlocksCase1List = /*@__PURE__*/ S.Array(
|
|
479
|
+
PostMessageRequestBlocksCase1ItemMap,
|
|
480
|
+
) as any as S.Schema<PostMessageRequestBlocksCase1List>;
|
|
481
|
+
|
|
482
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
483
|
+
export type PostMessageRequestBlocks =
|
|
484
|
+
| string
|
|
485
|
+
| PostMessageRequestBlocksCase1List;
|
|
486
|
+
export const PostMessageRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(
|
|
487
|
+
T.UnionCases([[], []]),
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
export interface PostMessageRequest {
|
|
491
|
+
/** (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. */
|
|
492
|
+
as_user?: boolean;
|
|
493
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
494
|
+
attachments?: PostMessageRequestAttachments;
|
|
495
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
496
|
+
blocks?: PostMessageRequestBlocks;
|
|
497
|
+
/** 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. */
|
|
498
|
+
channel: string;
|
|
499
|
+
/** 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. */
|
|
500
|
+
current_draft_last_updated_ts?: string;
|
|
501
|
+
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
502
|
+
icon_emoji?: string | null;
|
|
503
|
+
/** URL to an image to use as the icon for this message. */
|
|
504
|
+
icon_url?: string | null;
|
|
505
|
+
/** Find and link user groups. No longer supports linking individual users; use syntax shown in [Mentioning Users](/messaging/formatting-message-text#mentioning-users) instead. */
|
|
506
|
+
link_names?: boolean;
|
|
507
|
+
/** 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. */
|
|
508
|
+
markdown_text?: string;
|
|
509
|
+
/** 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. */
|
|
510
|
+
metadata?: string | null;
|
|
511
|
+
/** Disable Slack markup parsing by setting to `false`. Enabled by default. */
|
|
512
|
+
mrkdwn?: boolean;
|
|
513
|
+
/** Change how messages are treated. See [below](#formatting). */
|
|
514
|
+
parse?: string | null;
|
|
515
|
+
/** Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. */
|
|
516
|
+
reply_broadcast?: boolean;
|
|
517
|
+
/** 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. */
|
|
518
|
+
text?: string | null;
|
|
519
|
+
/** Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. */
|
|
520
|
+
thread_ts?: string | null;
|
|
521
|
+
/** Pass true to enable unfurling of primarily text-based content. */
|
|
522
|
+
unfurl_links?: boolean;
|
|
523
|
+
/** Pass false to disable unfurling of media content. */
|
|
524
|
+
unfurl_media?: boolean;
|
|
525
|
+
/** Set your bot's user name. */
|
|
526
|
+
username?: string | null;
|
|
527
|
+
}
|
|
528
|
+
export const PostMessageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
529
|
+
S.Struct({
|
|
530
|
+
as_user: S.optional(S.Boolean),
|
|
531
|
+
attachments: S.optional(PostMessageRequestAttachments),
|
|
532
|
+
blocks: S.optional(PostMessageRequestBlocks),
|
|
533
|
+
channel: S.String,
|
|
534
|
+
current_draft_last_updated_ts: S.optional(S.String),
|
|
535
|
+
icon_emoji: S.optional(S.NullOr(S.String)),
|
|
536
|
+
icon_url: S.optional(S.NullOr(S.String)),
|
|
537
|
+
link_names: S.optional(S.Boolean),
|
|
538
|
+
markdown_text: S.optional(S.String),
|
|
539
|
+
metadata: S.optional(S.NullOr(S.String)),
|
|
540
|
+
mrkdwn: S.optional(S.Boolean),
|
|
541
|
+
parse: S.optional(S.NullOr(S.String)),
|
|
542
|
+
reply_broadcast: S.optional(S.Boolean),
|
|
543
|
+
text: S.optional(S.NullOr(S.String)),
|
|
544
|
+
thread_ts: S.optional(S.NullOr(S.String)),
|
|
545
|
+
unfurl_links: S.optional(S.Boolean),
|
|
546
|
+
unfurl_media: S.optional(S.Boolean),
|
|
547
|
+
username: S.optional(S.NullOr(S.String)),
|
|
548
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.postMessage", code: 200 })),
|
|
549
|
+
).annotate({
|
|
550
|
+
identifier: "PostMessageRequest",
|
|
551
|
+
}) as any as S.Schema<PostMessageRequest>;
|
|
552
|
+
|
|
553
|
+
export interface PostMessageResponse {
|
|
554
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
555
|
+
ok: boolean;
|
|
556
|
+
channel: string;
|
|
557
|
+
ts: string;
|
|
558
|
+
message?: unknown;
|
|
559
|
+
/** Pass true if duplicate message is attempted to be sent. */
|
|
560
|
+
is_duplicate?: boolean;
|
|
561
|
+
}
|
|
562
|
+
export const PostMessageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
563
|
+
S.Struct({
|
|
564
|
+
ok: S.Boolean,
|
|
565
|
+
channel: S.String,
|
|
566
|
+
ts: S.String,
|
|
567
|
+
message: S.optional(S.Unknown),
|
|
568
|
+
is_duplicate: S.optional(S.Boolean),
|
|
569
|
+
}),
|
|
570
|
+
).annotate({
|
|
571
|
+
identifier: "PostMessageResponse",
|
|
572
|
+
}) as any as S.Schema<PostMessageResponse>;
|
|
573
|
+
|
|
574
|
+
export type ScheduleMessageRequestAttachmentsCase1ItemMap = {
|
|
575
|
+
[key: string]: unknown | undefined;
|
|
576
|
+
};
|
|
577
|
+
export const ScheduleMessageRequestAttachmentsCase1ItemMap =
|
|
578
|
+
/*@__PURE__*/ S.Record(
|
|
579
|
+
S.String,
|
|
580
|
+
S.Unknown,
|
|
581
|
+
) as any as S.Schema<ScheduleMessageRequestAttachmentsCase1ItemMap>;
|
|
582
|
+
|
|
583
|
+
export type ScheduleMessageRequestAttachmentsCase1List =
|
|
584
|
+
Array<ScheduleMessageRequestAttachmentsCase1ItemMap>;
|
|
585
|
+
export const ScheduleMessageRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
|
|
586
|
+
ScheduleMessageRequestAttachmentsCase1ItemMap,
|
|
587
|
+
) as any as S.Schema<ScheduleMessageRequestAttachmentsCase1List>;
|
|
588
|
+
|
|
589
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
590
|
+
export type ScheduleMessageRequestAttachments =
|
|
591
|
+
| string
|
|
592
|
+
| ScheduleMessageRequestAttachmentsCase1List;
|
|
593
|
+
export const ScheduleMessageRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(
|
|
594
|
+
T.UnionCases([[], []]),
|
|
595
|
+
);
|
|
596
|
+
|
|
597
|
+
export type ScheduleMessageRequestBlocksCase1ItemMap = {
|
|
598
|
+
[key: string]: unknown | undefined;
|
|
599
|
+
};
|
|
600
|
+
export const ScheduleMessageRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
601
|
+
S.String,
|
|
602
|
+
S.Unknown,
|
|
603
|
+
) as any as S.Schema<ScheduleMessageRequestBlocksCase1ItemMap>;
|
|
604
|
+
|
|
605
|
+
export type ScheduleMessageRequestBlocksCase1List =
|
|
606
|
+
Array<ScheduleMessageRequestBlocksCase1ItemMap>;
|
|
607
|
+
export const ScheduleMessageRequestBlocksCase1List = /*@__PURE__*/ S.Array(
|
|
608
|
+
ScheduleMessageRequestBlocksCase1ItemMap,
|
|
609
|
+
) as any as S.Schema<ScheduleMessageRequestBlocksCase1List>;
|
|
610
|
+
|
|
611
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
612
|
+
export type ScheduleMessageRequestBlocks =
|
|
613
|
+
| string
|
|
614
|
+
| ScheduleMessageRequestBlocksCase1List;
|
|
615
|
+
export const ScheduleMessageRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(
|
|
616
|
+
T.UnionCases([[], []]),
|
|
617
|
+
);
|
|
618
|
+
|
|
619
|
+
/** Change how messages are treated. See [chat.postMessage](chat.postMessage#formatting). */
|
|
620
|
+
export type ScheduleMessageRequestParse = "none" | "full";
|
|
621
|
+
export const ScheduleMessageRequestParse = S.String;
|
|
622
|
+
|
|
623
|
+
export interface ScheduleMessageRequest {
|
|
624
|
+
/** 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). */
|
|
625
|
+
as_user?: boolean;
|
|
626
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
627
|
+
attachments?: ScheduleMessageRequestAttachments;
|
|
628
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
629
|
+
blocks?: ScheduleMessageRequestBlocks;
|
|
630
|
+
/** Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See [below](#channels) for more details. */
|
|
631
|
+
channel: string;
|
|
632
|
+
/** Find and link user groups. No longer supports linking individual users; use syntax shown in [Mentioning Users](/messaging/formatting-message-text#mentioning-users) instead. */
|
|
633
|
+
link_names?: boolean;
|
|
634
|
+
/** 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. */
|
|
635
|
+
markdown_text?: string;
|
|
636
|
+
/** Change how messages are treated. See [chat.postMessage](chat.postMessage#formatting). */
|
|
637
|
+
parse?: ScheduleMessageRequestParse | (string & {});
|
|
638
|
+
/** Unix timestamp representing the future time the message should post to Slack. */
|
|
639
|
+
post_at: number;
|
|
640
|
+
/** Used in conjunction with `thread_ts` and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to `false`. */
|
|
641
|
+
reply_broadcast?: boolean;
|
|
642
|
+
/** 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. */
|
|
643
|
+
text?: string;
|
|
644
|
+
/** Provide another message's `ts` value to make this message a reply. Avoid using a reply's `ts` value; use its parent instead. */
|
|
645
|
+
thread_ts?: string;
|
|
646
|
+
/** Pass true to enable unfurling of primarily text-based content. */
|
|
647
|
+
unfurl_links?: boolean;
|
|
648
|
+
/** Pass false to disable unfurling of media content. */
|
|
649
|
+
unfurl_media?: boolean;
|
|
650
|
+
/** 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. */
|
|
651
|
+
metadata?: string | null;
|
|
652
|
+
}
|
|
653
|
+
export const ScheduleMessageRequest = /*@__PURE__*/ S.suspend(() =>
|
|
654
|
+
S.Struct({
|
|
655
|
+
as_user: S.optional(S.Boolean),
|
|
656
|
+
attachments: S.optional(ScheduleMessageRequestAttachments),
|
|
657
|
+
blocks: S.optional(ScheduleMessageRequestBlocks),
|
|
658
|
+
channel: S.String,
|
|
659
|
+
link_names: S.optional(S.Boolean),
|
|
660
|
+
markdown_text: S.optional(S.String),
|
|
661
|
+
parse: S.optional(ScheduleMessageRequestParse),
|
|
662
|
+
post_at: S.Number,
|
|
663
|
+
reply_broadcast: S.optional(S.Boolean),
|
|
664
|
+
text: S.optional(S.String),
|
|
665
|
+
thread_ts: S.optional(S.String),
|
|
666
|
+
unfurl_links: S.optional(S.Boolean),
|
|
667
|
+
unfurl_media: S.optional(S.Boolean),
|
|
668
|
+
metadata: S.optional(S.NullOr(S.String)),
|
|
669
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.scheduleMessage", code: 200 })),
|
|
670
|
+
).annotate({
|
|
671
|
+
identifier: "ScheduleMessageRequest",
|
|
672
|
+
}) as any as S.Schema<ScheduleMessageRequest>;
|
|
673
|
+
|
|
674
|
+
export type ScheduleMessageResponseMessageMap = {
|
|
675
|
+
[key: string]: unknown | undefined;
|
|
676
|
+
};
|
|
677
|
+
export const ScheduleMessageResponseMessageMap = /*@__PURE__*/ S.Record(
|
|
678
|
+
S.String,
|
|
679
|
+
S.Unknown,
|
|
680
|
+
) as any as S.Schema<ScheduleMessageResponseMessageMap>;
|
|
681
|
+
|
|
682
|
+
export interface ScheduleMessageResponse {
|
|
683
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
684
|
+
ok: boolean;
|
|
685
|
+
channel: string;
|
|
686
|
+
post_at: number;
|
|
687
|
+
scheduled_message_id: string;
|
|
688
|
+
message: ScheduleMessageResponseMessageMap;
|
|
689
|
+
}
|
|
690
|
+
export const ScheduleMessageResponse = /*@__PURE__*/ S.suspend(() =>
|
|
691
|
+
S.Struct({
|
|
692
|
+
ok: S.Boolean,
|
|
693
|
+
channel: S.String,
|
|
694
|
+
post_at: S.Number,
|
|
695
|
+
scheduled_message_id: S.String,
|
|
696
|
+
message: ScheduleMessageResponseMessageMap,
|
|
697
|
+
}),
|
|
698
|
+
).annotate({
|
|
699
|
+
identifier: "ScheduleMessageResponse",
|
|
700
|
+
}) as any as S.Schema<ScheduleMessageResponse>;
|
|
701
|
+
|
|
702
|
+
/** Array of streaming chunks. */
|
|
703
|
+
export type StartStreamRequestChunksList = Array<unknown>;
|
|
704
|
+
export const StartStreamRequestChunksList = /*@__PURE__*/ S.Array(
|
|
705
|
+
S.Unknown,
|
|
706
|
+
) as any as S.Schema<StartStreamRequestChunksList>;
|
|
707
|
+
|
|
708
|
+
/** Specifies how tasks are displayed in the message. A `timeline` displays individual tasks with text in sequential order, `plan` displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and `dense` collapses consecutive tool calls into a single summarized task card. */
|
|
709
|
+
export type StartStreamRequestTaskDisplayMode = "timeline" | "plan" | "dense";
|
|
710
|
+
export const StartStreamRequestTaskDisplayMode = S.String;
|
|
711
|
+
|
|
712
|
+
export interface StartStreamRequest {
|
|
713
|
+
/** An encoded ID that represents a channel thread or DM. */
|
|
714
|
+
channel: string;
|
|
715
|
+
/** Array of streaming chunks. */
|
|
716
|
+
chunks?: StartStreamRequestChunksList;
|
|
717
|
+
/** Accepts message text formatted in markdown. Limit this field to 12,000 characters. */
|
|
718
|
+
markdown_text?: string;
|
|
719
|
+
/** Provide another message's `ts` value to reply to. Streamed messages should always be replies to a user request. */
|
|
720
|
+
thread_ts: string;
|
|
721
|
+
/** The encoded ID of the user to receive the streaming text. Required when streaming to channels. */
|
|
722
|
+
recipient_user_id?: string;
|
|
723
|
+
/** The encoded ID of the team the user receiving the streaming text belongs to. Required when streaming to channels. */
|
|
724
|
+
recipient_team_id?: string;
|
|
725
|
+
/** Specifies how tasks are displayed in the message. A `timeline` displays individual tasks with text in sequential order, `plan` displays all tasks together, with the first tasks's placement determining the placement of the rest of the tasks, and `dense` collapses consecutive tool calls into a single summarized task card. */
|
|
726
|
+
task_display_mode?: StartStreamRequestTaskDisplayMode | (string & {});
|
|
727
|
+
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
728
|
+
icon_emoji?: string;
|
|
729
|
+
/** Image URL to use as the icon for this message. */
|
|
730
|
+
icon_url?: string;
|
|
731
|
+
/** The bot's username to display. */
|
|
732
|
+
username?: string;
|
|
733
|
+
}
|
|
734
|
+
export const StartStreamRequest = /*@__PURE__*/ S.suspend(() =>
|
|
735
|
+
S.Struct({
|
|
736
|
+
channel: S.String,
|
|
737
|
+
chunks: S.optional(StartStreamRequestChunksList),
|
|
738
|
+
markdown_text: S.optional(S.String),
|
|
739
|
+
thread_ts: S.String,
|
|
740
|
+
recipient_user_id: S.optional(S.String),
|
|
741
|
+
recipient_team_id: S.optional(S.String),
|
|
742
|
+
task_display_mode: S.optional(StartStreamRequestTaskDisplayMode),
|
|
743
|
+
icon_emoji: S.optional(S.String),
|
|
744
|
+
icon_url: S.optional(S.String),
|
|
745
|
+
username: S.optional(S.String),
|
|
746
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.startStream", code: 200 })),
|
|
747
|
+
).annotate({
|
|
748
|
+
identifier: "StartStreamRequest",
|
|
749
|
+
}) as any as S.Schema<StartStreamRequest>;
|
|
750
|
+
|
|
751
|
+
export interface StartStreamResponse {
|
|
752
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
753
|
+
ok: boolean;
|
|
754
|
+
channel: string;
|
|
755
|
+
/** The timestamp of the streaming message. */
|
|
756
|
+
ts: string;
|
|
757
|
+
}
|
|
758
|
+
export const StartStreamResponse = /*@__PURE__*/ S.suspend(() =>
|
|
759
|
+
S.Struct({
|
|
760
|
+
ok: S.Boolean,
|
|
761
|
+
channel: S.String,
|
|
762
|
+
ts: S.String,
|
|
763
|
+
}),
|
|
764
|
+
).annotate({
|
|
765
|
+
identifier: "StartStreamResponse",
|
|
766
|
+
}) as any as S.Schema<StartStreamResponse>;
|
|
767
|
+
|
|
768
|
+
/** Array of streaming chunks. */
|
|
769
|
+
export type StopStreamRequestChunksList = Array<unknown>;
|
|
770
|
+
export const StopStreamRequestChunksList = /*@__PURE__*/ S.Array(
|
|
771
|
+
S.Unknown,
|
|
772
|
+
) as any as S.Schema<StopStreamRequestChunksList>;
|
|
773
|
+
|
|
774
|
+
export interface StopStreamRequest {
|
|
775
|
+
/** An encoded ID that represents a channel, private group, or DM */
|
|
776
|
+
channel: string;
|
|
777
|
+
/** Array of streaming chunks. */
|
|
778
|
+
chunks?: StopStreamRequestChunksList;
|
|
779
|
+
/** The timestamp of the streaming message. */
|
|
780
|
+
ts: string;
|
|
781
|
+
/** Accepts message text formatted in markdown. Limit this field to 12,000 characters. */
|
|
782
|
+
markdown_text?: string;
|
|
783
|
+
/** A list of blocks that will be rendered at the bottom of the finalized message. */
|
|
784
|
+
blocks?: unknown;
|
|
785
|
+
/** 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. */
|
|
786
|
+
metadata?: string | null;
|
|
787
|
+
}
|
|
788
|
+
export const StopStreamRequest = /*@__PURE__*/ S.suspend(() =>
|
|
789
|
+
S.Struct({
|
|
790
|
+
channel: S.String,
|
|
791
|
+
chunks: S.optional(StopStreamRequestChunksList),
|
|
792
|
+
ts: S.String,
|
|
793
|
+
markdown_text: S.optional(S.String),
|
|
794
|
+
blocks: S.optional(S.Unknown),
|
|
795
|
+
metadata: S.optional(S.NullOr(S.String)),
|
|
796
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.stopStream", code: 200 })),
|
|
797
|
+
).annotate({
|
|
798
|
+
identifier: "StopStreamRequest",
|
|
799
|
+
}) as any as S.Schema<StopStreamRequest>;
|
|
800
|
+
|
|
801
|
+
export interface StopStreamResponse {
|
|
802
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
803
|
+
ok: boolean;
|
|
804
|
+
channel: string;
|
|
805
|
+
ts: string;
|
|
806
|
+
message: unknown;
|
|
807
|
+
}
|
|
808
|
+
export const StopStreamResponse = /*@__PURE__*/ S.suspend(() =>
|
|
809
|
+
S.Struct({
|
|
810
|
+
ok: S.Boolean,
|
|
811
|
+
channel: S.String,
|
|
812
|
+
ts: S.String,
|
|
813
|
+
message: S.Unknown,
|
|
814
|
+
}),
|
|
815
|
+
).annotate({
|
|
816
|
+
identifier: "StopStreamResponse",
|
|
817
|
+
}) as any as S.Schema<StopStreamResponse>;
|
|
818
|
+
|
|
819
|
+
/** Pass true to update the message as the authed user. Bot users in this context are considered authed users. */
|
|
820
|
+
export type UpdateChatRequestAsUser = boolean | string;
|
|
821
|
+
export const UpdateChatRequestAsUser = /*@__PURE__*/ S.Unknown.pipe(
|
|
822
|
+
T.UnionCases([[], []]),
|
|
823
|
+
);
|
|
824
|
+
|
|
825
|
+
export type UpdateChatRequestAttachmentsCase1ItemMap = {
|
|
826
|
+
[key: string]: unknown | undefined;
|
|
827
|
+
};
|
|
828
|
+
export const UpdateChatRequestAttachmentsCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
829
|
+
S.String,
|
|
830
|
+
S.Unknown,
|
|
831
|
+
) as any as S.Schema<UpdateChatRequestAttachmentsCase1ItemMap>;
|
|
832
|
+
|
|
833
|
+
export type UpdateChatRequestAttachmentsCase1List =
|
|
834
|
+
Array<UpdateChatRequestAttachmentsCase1ItemMap>;
|
|
835
|
+
export const UpdateChatRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
|
|
836
|
+
UpdateChatRequestAttachmentsCase1ItemMap,
|
|
837
|
+
) as any as S.Schema<UpdateChatRequestAttachmentsCase1List>;
|
|
838
|
+
|
|
839
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
840
|
+
export type UpdateChatRequestAttachments =
|
|
841
|
+
| string
|
|
842
|
+
| UpdateChatRequestAttachmentsCase1List;
|
|
843
|
+
export const UpdateChatRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(
|
|
844
|
+
T.UnionCases([[], []]),
|
|
845
|
+
);
|
|
846
|
+
|
|
847
|
+
export type UpdateChatRequestBlocksCase1ItemMap = {
|
|
848
|
+
[key: string]: unknown | undefined;
|
|
849
|
+
};
|
|
850
|
+
export const UpdateChatRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
851
|
+
S.String,
|
|
852
|
+
S.Unknown,
|
|
853
|
+
) as any as S.Schema<UpdateChatRequestBlocksCase1ItemMap>;
|
|
854
|
+
|
|
855
|
+
export type UpdateChatRequestBlocksCase1List =
|
|
856
|
+
Array<UpdateChatRequestBlocksCase1ItemMap>;
|
|
857
|
+
export const UpdateChatRequestBlocksCase1List = /*@__PURE__*/ S.Array(
|
|
858
|
+
UpdateChatRequestBlocksCase1ItemMap,
|
|
859
|
+
) as any as S.Schema<UpdateChatRequestBlocksCase1List>;
|
|
860
|
+
|
|
861
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
862
|
+
export type UpdateChatRequestBlocks = string | UpdateChatRequestBlocksCase1List;
|
|
863
|
+
export const UpdateChatRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(
|
|
864
|
+
T.UnionCases([[], []]),
|
|
865
|
+
);
|
|
866
|
+
|
|
867
|
+
/** 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`. */
|
|
868
|
+
export type UpdateChatRequestLinkNames = boolean | string;
|
|
869
|
+
export const UpdateChatRequestLinkNames = /*@__PURE__*/ S.Unknown.pipe(
|
|
870
|
+
T.UnionCases([[], []]),
|
|
871
|
+
);
|
|
872
|
+
|
|
873
|
+
/** Array of new file ids that will be sent with this message. */
|
|
874
|
+
export type UpdateChatRequestFileIdsList = Array<string>;
|
|
875
|
+
export const UpdateChatRequestFileIdsList = /*@__PURE__*/ S.Array(
|
|
876
|
+
S.String,
|
|
877
|
+
) as any as S.Schema<UpdateChatRequestFileIdsList>;
|
|
878
|
+
|
|
879
|
+
export interface UpdateChatRequest {
|
|
880
|
+
/** Pass true to update the message as the authed user. Bot users in this context are considered authed users. */
|
|
881
|
+
as_user?: UpdateChatRequestAsUser | null;
|
|
882
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
883
|
+
attachments?: UpdateChatRequestAttachments;
|
|
884
|
+
/** A JSON-based array of structured attachments, presented as a URL-encoded string. */
|
|
885
|
+
unfurled_attachments?: string | null;
|
|
886
|
+
/** A JSON-based array of structured blocks, presented as a URL-encoded string. */
|
|
887
|
+
blocks?: UpdateChatRequestBlocks;
|
|
888
|
+
/** 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. */
|
|
889
|
+
markdown_text?: string;
|
|
890
|
+
/** 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. */
|
|
891
|
+
metadata?: string | null;
|
|
892
|
+
/** 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`). */
|
|
893
|
+
channel: string;
|
|
894
|
+
/** 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`. */
|
|
895
|
+
link_names?: UpdateChatRequestLinkNames | null;
|
|
896
|
+
/** 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`. */
|
|
897
|
+
parse?: string | null;
|
|
898
|
+
/** 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. */
|
|
899
|
+
text?: string | null;
|
|
900
|
+
/** Timestamp of the message to be updated. */
|
|
901
|
+
ts: string;
|
|
902
|
+
/** Broadcast an existing thread reply to make it visible to everyone in the channel or conversation. */
|
|
903
|
+
reply_broadcast?: boolean;
|
|
904
|
+
/** Array of new file ids that will be sent with this message. */
|
|
905
|
+
file_ids?: UpdateChatRequestFileIdsList;
|
|
906
|
+
}
|
|
907
|
+
export const UpdateChatRequest = /*@__PURE__*/ S.suspend(() =>
|
|
908
|
+
S.Struct({
|
|
909
|
+
as_user: S.optional(S.NullOr(UpdateChatRequestAsUser)),
|
|
910
|
+
attachments: S.optional(UpdateChatRequestAttachments),
|
|
911
|
+
unfurled_attachments: S.optional(S.NullOr(S.String)),
|
|
912
|
+
blocks: S.optional(UpdateChatRequestBlocks),
|
|
913
|
+
markdown_text: S.optional(S.String),
|
|
914
|
+
metadata: S.optional(S.NullOr(S.String)),
|
|
915
|
+
channel: S.String,
|
|
916
|
+
link_names: S.optional(S.NullOr(UpdateChatRequestLinkNames)),
|
|
917
|
+
parse: S.optional(S.NullOr(S.String)),
|
|
918
|
+
text: S.optional(S.NullOr(S.String)),
|
|
919
|
+
ts: S.String,
|
|
920
|
+
reply_broadcast: S.optional(S.Boolean),
|
|
921
|
+
file_ids: S.optional(UpdateChatRequestFileIdsList),
|
|
922
|
+
}).pipe(T.Http({ method: "POST", uri: "/chat.update", code: 200 })),
|
|
923
|
+
).annotate({
|
|
924
|
+
identifier: "UpdateChatRequest",
|
|
925
|
+
}) as any as S.Schema<UpdateChatRequest>;
|
|
926
|
+
|
|
927
|
+
export type UpdateChatResponseMessageAttachmentsItemMap = {
|
|
928
|
+
[key: string]: unknown | undefined;
|
|
929
|
+
};
|
|
930
|
+
export const UpdateChatResponseMessageAttachmentsItemMap =
|
|
931
|
+
/*@__PURE__*/ S.Record(
|
|
932
|
+
S.String,
|
|
933
|
+
S.Unknown,
|
|
934
|
+
) as any as S.Schema<UpdateChatResponseMessageAttachmentsItemMap>;
|
|
935
|
+
|
|
936
|
+
export type UpdateChatResponseMessageAttachmentsList =
|
|
937
|
+
Array<UpdateChatResponseMessageAttachmentsItemMap>;
|
|
938
|
+
export const UpdateChatResponseMessageAttachmentsList = /*@__PURE__*/ S.Array(
|
|
939
|
+
UpdateChatResponseMessageAttachmentsItemMap,
|
|
940
|
+
) as any as S.Schema<UpdateChatResponseMessageAttachmentsList>;
|
|
941
|
+
|
|
942
|
+
export type UpdateChatResponseMessageMetadataMap = {
|
|
943
|
+
[key: string]: unknown | undefined;
|
|
944
|
+
};
|
|
945
|
+
export const UpdateChatResponseMessageMetadataMap = /*@__PURE__*/ S.Record(
|
|
946
|
+
S.String,
|
|
947
|
+
S.Unknown,
|
|
948
|
+
) as any as S.Schema<UpdateChatResponseMessageMetadataMap>;
|
|
949
|
+
|
|
950
|
+
export interface UpdateChatResponseMessage {
|
|
951
|
+
text: string;
|
|
952
|
+
blocks?: unknown;
|
|
953
|
+
attachments?: UpdateChatResponseMessageAttachmentsList;
|
|
954
|
+
metadata?: UpdateChatResponseMessageMetadataMap;
|
|
955
|
+
}
|
|
956
|
+
export const UpdateChatResponseMessage = /*@__PURE__*/ S.suspend(() =>
|
|
957
|
+
S.Struct({
|
|
958
|
+
text: S.String,
|
|
959
|
+
blocks: S.optional(S.Unknown),
|
|
960
|
+
attachments: S.optional(UpdateChatResponseMessageAttachmentsList),
|
|
961
|
+
metadata: S.optional(UpdateChatResponseMessageMetadataMap),
|
|
962
|
+
}),
|
|
963
|
+
).annotate({
|
|
964
|
+
identifier: "UpdateChatResponseMessage",
|
|
965
|
+
}) as any as S.Schema<UpdateChatResponseMessage>;
|
|
966
|
+
|
|
967
|
+
export interface UpdateChatResponse {
|
|
968
|
+
/** Always `true` (a failed call raises a typed error instead). */
|
|
969
|
+
ok: boolean;
|
|
970
|
+
channel: string;
|
|
971
|
+
ts: string;
|
|
972
|
+
text: string;
|
|
973
|
+
message: UpdateChatResponseMessage;
|
|
974
|
+
}
|
|
975
|
+
export const UpdateChatResponse = /*@__PURE__*/ S.suspend(() =>
|
|
976
|
+
S.Struct({
|
|
977
|
+
ok: S.Boolean,
|
|
978
|
+
channel: S.String,
|
|
979
|
+
ts: S.String,
|
|
980
|
+
text: S.String,
|
|
981
|
+
message: UpdateChatResponseMessage,
|
|
982
|
+
}),
|
|
983
|
+
).annotate({
|
|
984
|
+
identifier: "UpdateChatResponse",
|
|
985
|
+
}) as any as S.Schema<UpdateChatResponse>;
|
|
986
|
+
|
|
987
|
+
export type AppendStreamError = SlackOpError;
|
|
988
|
+
/** Appends text to an existing streaming conversation. Required scopes — bot: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `message_not_in_streaming_state` — The message is not in the streaming state. - `messaging_processing_failed` — Failed to process the message. - `as_user_not_supported` — The `as_user` parameter does not function with workspace apps. - `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_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 - `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. - `metadata_too_large` — Metadata exceeds size limit - `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`. - `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. - `message_not_found` — Message not found - `channel_type_not_supported` — Channel type not supported - `stopped_by_user` — The streaming message was stopped by the user and no further appends are accepted. - `message_not_owned_by_app` — The message is not owned by the app. See https://docs.slack.dev/reference/methods/chat.appendStream */
|
|
989
|
+
export const appendStream: API.OperationMethod<
|
|
990
|
+
AppendStreamRequest,
|
|
991
|
+
AppendStreamResponse,
|
|
992
|
+
AppendStreamError,
|
|
993
|
+
SlackOpContext
|
|
994
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
995
|
+
input: AppendStreamRequest,
|
|
996
|
+
output: AppendStreamResponse,
|
|
997
|
+
errors: [SlackError, SlackRateLimited],
|
|
998
|
+
protocol: SlackProtocol,
|
|
999
|
+
retry: Retry.Retry,
|
|
1000
|
+
}));
|
|
1001
|
+
|
|
1002
|
+
export type ChatUnfurlError = SlackOpError;
|
|
1003
|
+
/** Provide custom unfurl behavior for user-posted URLs Required scopes — bot: `links:write`; user: `links:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cannot_auth_user` — The current user cannot be authenticated. - `cannot_find_channel` — The specified channel could not be located for this token. - `cannot_find_message` — The `ts` value in the request does not match a message. - `cannot_find_service` — A record of your app being allowed to unfurl for this workspace could not be found. - `cannot_parse_attachment` — The provided `unfurls` argument could not be parsed or understood. - `cannot_prompt` — The current user has already interacted with and dismissed a prompt for this application. - `cannot_unfurl_message` — The URL cannot be unfurled because the URL provided does not appear in the message. - `cannot_unfurl_url` — The URL cannot be unfurled. This error may be returned if you haven't acknowledged a `link_shared` event tied to the same URL. It is also returned when the domain appears in a workspace's administrative blocklists. - `invalid_unfurl_id` — The unfurl ID is invalid. - `invalid_unfurls_format` — The `unfurls` parameter cannot be JSON-decoded into a map of URLs to attachments. - `invalid_metadata_format` — The `metadata` parameter cannot be JSON-decoded into the expected format. - `invalid_source` — The unfurl source is invalid. - `missing_channel` — The request is missing the `channel` parameter - `missing_source` — The request is missing the `source` parameter. - `missing_ts` — The request is missing the `ts` parameter - `missing_unfurl_id` — The request is missing the `unfurl_id` parameter. - `missing_unfurls` — The request is missing the `unfurls` parameter. See https://docs.slack.dev/reference/methods/chat.unfurl */
|
|
1004
|
+
export const chatUnfurl: API.OperationMethod<
|
|
1005
|
+
ChatUnfurlRequest,
|
|
1006
|
+
ChatUnfurlResponse,
|
|
1007
|
+
ChatUnfurlError,
|
|
1008
|
+
SlackOpContext
|
|
1009
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1010
|
+
input: ChatUnfurlRequest,
|
|
1011
|
+
output: ChatUnfurlResponse,
|
|
1012
|
+
errors: [SlackError, SlackRateLimited],
|
|
1013
|
+
protocol: SlackProtocol,
|
|
1014
|
+
retry: Retry.Retry,
|
|
1015
|
+
}));
|
|
1016
|
+
|
|
1017
|
+
export type DeleteChatError = SlackOpError;
|
|
1018
|
+
/** Deletes a message. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_message` — Authenticated user does not have permission to delete this message. - `channel_not_found` — Value passed for `channel` was invalid. - `message_not_found` — No message exists with the requested timestamp. See https://docs.slack.dev/reference/methods/chat.delete */
|
|
1019
|
+
export const deleteChat: API.OperationMethod<
|
|
1020
|
+
DeleteChatRequest,
|
|
1021
|
+
DeleteChatResponse,
|
|
1022
|
+
DeleteChatError,
|
|
1023
|
+
SlackOpContext
|
|
1024
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1025
|
+
input: DeleteChatRequest,
|
|
1026
|
+
output: DeleteChatResponse,
|
|
1027
|
+
errors: [SlackError, SlackRateLimited],
|
|
1028
|
+
protocol: SlackProtocol,
|
|
1029
|
+
retry: Retry.Retry,
|
|
1030
|
+
}));
|
|
1031
|
+
|
|
1032
|
+
export type DeleteScheduledMessageError = SlackOpError;
|
|
1033
|
+
/** Deletes a pending scheduled message from the queue. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_token` — The provided `token` was invalid. - `channel_not_found` — The `channel` passed is either an invalid ID or does not exist. - `invalid_scheduled_message_id` — The `scheduled_message_id` passed is either an invalid ID, or the scheduled message it's referencing has already been sent or deleted. See https://docs.slack.dev/reference/methods/chat.deleteScheduledMessage */
|
|
1034
|
+
export const deleteScheduledMessage: API.OperationMethod<
|
|
1035
|
+
DeleteScheduledMessageRequest,
|
|
1036
|
+
DeleteScheduledMessageResponse,
|
|
1037
|
+
DeleteScheduledMessageError,
|
|
1038
|
+
SlackOpContext
|
|
1039
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1040
|
+
input: DeleteScheduledMessageRequest,
|
|
1041
|
+
output: DeleteScheduledMessageResponse,
|
|
1042
|
+
errors: [SlackError, SlackRateLimited],
|
|
1043
|
+
protocol: SlackProtocol,
|
|
1044
|
+
retry: Retry.Retry,
|
|
1045
|
+
}));
|
|
1046
|
+
|
|
1047
|
+
export type GetPermalinkError = SlackOpError;
|
|
1048
|
+
/** Retrieve a permalink URL for a specific extant message Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `message_not_found` — The message identified by `message_ts` could not be found. See https://docs.slack.dev/reference/methods/chat.getPermalink */
|
|
1049
|
+
export const getPermalink: API.OperationMethod<
|
|
1050
|
+
GetPermalinkRequest,
|
|
1051
|
+
GetPermalinkResponse,
|
|
1052
|
+
GetPermalinkError,
|
|
1053
|
+
SlackOpContext
|
|
1054
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1055
|
+
input: GetPermalinkRequest,
|
|
1056
|
+
output: GetPermalinkResponse,
|
|
1057
|
+
errors: [SlackError, SlackRateLimited],
|
|
1058
|
+
protocol: SlackProtocol,
|
|
1059
|
+
retry: Retry.Retry,
|
|
1060
|
+
}));
|
|
1061
|
+
|
|
1062
|
+
export type ListScheduledMessagesError = SlackOpError;
|
|
1063
|
+
/** Returns a list of scheduled messages. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_channel` — The channel passed is invalid - `invalid_cursor` — Provided cursor is invalid - `invalid_token` — Token is invalid See https://docs.slack.dev/reference/methods/chat.scheduledMessages.list */
|
|
1064
|
+
export const listScheduledMessages: API.PaginatedOperationMethod<
|
|
1065
|
+
ListScheduledMessagesRequest,
|
|
1066
|
+
ListScheduledMessagesResponse,
|
|
1067
|
+
ListScheduledMessagesError,
|
|
1068
|
+
SlackOpContext,
|
|
1069
|
+
ListScheduledMessagesResponseScheduledMessagesItem
|
|
1070
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
1071
|
+
() => ({
|
|
1072
|
+
input: ListScheduledMessagesRequest,
|
|
1073
|
+
output: ListScheduledMessagesResponse,
|
|
1074
|
+
errors: [SlackError, SlackRateLimited],
|
|
1075
|
+
protocol: SlackProtocol,
|
|
1076
|
+
retry: Retry.Retry,
|
|
1077
|
+
pagination: {
|
|
1078
|
+
mode: "cursor",
|
|
1079
|
+
inputToken: "cursor",
|
|
1080
|
+
outputToken: "response_metadata.next_cursor",
|
|
1081
|
+
items: "scheduled_messages",
|
|
1082
|
+
pageSize: "limit",
|
|
1083
|
+
} as const,
|
|
1084
|
+
}),
|
|
1085
|
+
slackPaginate,
|
|
1086
|
+
) as any;
|
|
1087
|
+
|
|
1088
|
+
export type MeMessageError = SlackOpError;
|
|
1089
|
+
/** Share a me message into 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. - `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 See https://docs.slack.dev/reference/methods/chat.meMessage */
|
|
1090
|
+
export const meMessage: API.OperationMethod<
|
|
1091
|
+
MeMessageRequest,
|
|
1092
|
+
MeMessageResponse,
|
|
1093
|
+
MeMessageError,
|
|
1094
|
+
SlackOpContext
|
|
1095
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1096
|
+
input: MeMessageRequest,
|
|
1097
|
+
output: MeMessageResponse,
|
|
1098
|
+
errors: [SlackError, SlackRateLimited],
|
|
1099
|
+
protocol: SlackProtocol,
|
|
1100
|
+
retry: Retry.Retry,
|
|
1101
|
+
}));
|
|
1102
|
+
|
|
1103
|
+
export type PostEphemeralError = SlackOpError;
|
|
1104
|
+
/** 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 */
|
|
1105
|
+
export const postEphemeral: API.OperationMethod<
|
|
1106
|
+
PostEphemeralRequest,
|
|
1107
|
+
PostEphemeralResponse,
|
|
1108
|
+
PostEphemeralError,
|
|
1109
|
+
SlackOpContext
|
|
1110
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1111
|
+
input: PostEphemeralRequest,
|
|
1112
|
+
output: PostEphemeralResponse,
|
|
1113
|
+
errors: [SlackError, SlackRateLimited],
|
|
1114
|
+
protocol: SlackProtocol,
|
|
1115
|
+
retry: Retry.Retry,
|
|
1116
|
+
}));
|
|
1117
|
+
|
|
1118
|
+
export type PostMessageError = SlackOpError;
|
|
1119
|
+
/** 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): - `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 */
|
|
1120
|
+
export const postMessage: API.OperationMethod<
|
|
1121
|
+
PostMessageRequest,
|
|
1122
|
+
PostMessageResponse,
|
|
1123
|
+
PostMessageError,
|
|
1124
|
+
SlackOpContext
|
|
1125
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1126
|
+
input: PostMessageRequest,
|
|
1127
|
+
output: PostMessageResponse,
|
|
1128
|
+
errors: [SlackError, SlackRateLimited],
|
|
1129
|
+
protocol: SlackProtocol,
|
|
1130
|
+
retry: Retry.Retry,
|
|
1131
|
+
}));
|
|
1132
|
+
|
|
1133
|
+
export type ScheduleMessageError = SlackOpError;
|
|
1134
|
+
/** 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 */
|
|
1135
|
+
export const scheduleMessage: API.OperationMethod<
|
|
1136
|
+
ScheduleMessageRequest,
|
|
1137
|
+
ScheduleMessageResponse,
|
|
1138
|
+
ScheduleMessageError,
|
|
1139
|
+
SlackOpContext
|
|
1140
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1141
|
+
input: ScheduleMessageRequest,
|
|
1142
|
+
output: ScheduleMessageResponse,
|
|
1143
|
+
errors: [SlackError, SlackRateLimited],
|
|
1144
|
+
protocol: SlackProtocol,
|
|
1145
|
+
retry: Retry.Retry,
|
|
1146
|
+
}));
|
|
1147
|
+
|
|
1148
|
+
export type StartStreamError = SlackOpError;
|
|
1149
|
+
/** 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. - `not_subscribed_to_message_stream_stopped` — The app must be subscribed to the `message_stream_stopped` event to use `is_stoppable`. See https://docs.slack.dev/reference/methods/chat.startStream */
|
|
1150
|
+
export const startStream: API.OperationMethod<
|
|
1151
|
+
StartStreamRequest,
|
|
1152
|
+
StartStreamResponse,
|
|
1153
|
+
StartStreamError,
|
|
1154
|
+
SlackOpContext
|
|
1155
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1156
|
+
input: StartStreamRequest,
|
|
1157
|
+
output: StartStreamResponse,
|
|
1158
|
+
errors: [SlackError, SlackRateLimited],
|
|
1159
|
+
protocol: SlackProtocol,
|
|
1160
|
+
retry: Retry.Retry,
|
|
1161
|
+
}));
|
|
1162
|
+
|
|
1163
|
+
export type StopStreamError = SlackOpError;
|
|
1164
|
+
/** Stops a streaming conversation. Required scopes — bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `message_not_found` — The message was not found. - `message_not_in_streaming_state` — The message is not in a streaming state. - `as_user_not_supported` — The `as_user` parameter does not function with workspace apps. - `channel_not_found` — Value passed for `channel` was invalid. - `channel_type_not_supported` — Channel type not supported. - `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_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 - `message_not_owned_by_app` — The message is not owned by the app. - `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`. - `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.stopStream */
|
|
1165
|
+
export const stopStream: API.OperationMethod<
|
|
1166
|
+
StopStreamRequest,
|
|
1167
|
+
StopStreamResponse,
|
|
1168
|
+
StopStreamError,
|
|
1169
|
+
SlackOpContext
|
|
1170
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1171
|
+
input: StopStreamRequest,
|
|
1172
|
+
output: StopStreamResponse,
|
|
1173
|
+
errors: [SlackError, SlackRateLimited],
|
|
1174
|
+
protocol: SlackProtocol,
|
|
1175
|
+
retry: Retry.Retry,
|
|
1176
|
+
}));
|
|
1177
|
+
|
|
1178
|
+
export type UpdateChatError = SlackOpError;
|
|
1179
|
+
/** 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. See https://docs.slack.dev/reference/methods/chat.update */
|
|
1180
|
+
export const updateChat: API.OperationMethod<
|
|
1181
|
+
UpdateChatRequest,
|
|
1182
|
+
UpdateChatResponse,
|
|
1183
|
+
UpdateChatError,
|
|
1184
|
+
SlackOpContext
|
|
1185
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
1186
|
+
input: UpdateChatRequest,
|
|
1187
|
+
output: UpdateChatResponse,
|
|
1188
|
+
errors: [SlackError, SlackRateLimited],
|
|
1189
|
+
protocol: SlackProtocol,
|
|
1190
|
+
retry: Retry.Retry,
|
|
1191
|
+
}));
|