@distilled.cloud/slack 1.0.0-rc.13 → 1.0.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +3 -3
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +12 -18
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.test.d.ts +2 -0
- package/lib/protocol.test.d.ts.map +1 -0
- package/lib/protocol.test.js +288 -0
- package/lib/protocol.test.js.map +1 -0
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +236 -29
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +417 -749
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +423 -0
- package/lib/services/agents.d.ts.map +1 -0
- package/lib/services/agents.js +315 -0
- package/lib/services/agents.js.map +1 -0
- package/lib/services/api.d.ts +1 -1
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +4 -6
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +21 -3
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +65 -133
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +4 -4
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +16 -38
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +2 -2
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +11 -28
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -1
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +5 -9
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -4
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +14 -30
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -1
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +7 -15
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +1 -1
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +13 -33
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +22 -2
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +37 -48
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +29 -25
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +47 -95
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +10 -8
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +43 -115
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -1
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +5 -9
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +1 -1
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +10 -24
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -1
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +6 -11
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +8 -20
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +5 -5
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +39 -109
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +1 -1
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +28 -75
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/lists.d.ts +5 -1
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +35 -146
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -1
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +5 -8
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +38 -2
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +67 -50
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +1 -1
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +7 -15
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +1 -1
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +7 -15
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +2 -2
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +13 -29
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +1 -1
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +13 -33
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +1 -1
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +9 -21
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +1 -1
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +13 -30
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +1 -1
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +10 -20
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +1 -1
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +25 -62
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +1 -1
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +5 -9
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +8 -3
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +23 -51
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +2 -2
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +28 -81
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +1 -1
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +11 -27
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +1 -1
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +27 -71
- package/lib/services/workflows.js.map +1 -1
- package/package.json +15 -11
- package/src/credentials.ts +8 -10
- package/src/errors.ts +17 -31
- package/src/index.ts +3 -7
- package/src/pagination.ts +2 -5
- package/src/protocol.test.ts +372 -0
- package/src/protocol.ts +34 -66
- package/src/retry.ts +4 -9
- package/src/services/admin.ts +1241 -1557
- package/src/services/agents.ts +853 -0
- package/src/services/api.ts +4 -10
- package/src/services/apps.ts +146 -243
- package/src/services/assistant.ts +93 -144
- package/src/services/auth.ts +12 -33
- package/src/services/blocks.ts +9 -24
- package/src/services/bookmarks.ts +14 -34
- package/src/services/bots.ts +7 -19
- package/src/services/calls.ts +15 -43
- package/src/services/canvases.ts +82 -85
- package/src/services/chat.ts +134 -254
- package/src/services/conversations.ts +101 -217
- package/src/services/dialog.ts +5 -13
- package/src/services/dnd.ts +11 -31
- package/src/services/emoji.ts +9 -19
- package/src/services/entity.ts +17 -45
- package/src/services/files.ts +72 -165
- package/src/services/functions.ts +95 -168
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +65 -208
- package/src/services/migration.ts +8 -17
- package/src/services/oauth.ts +127 -60
- package/src/services/openid.ts +12 -34
- package/src/services/pins.ts +7 -19
- package/src/services/reactions.ts +19 -43
- package/src/services/reminders.ts +13 -37
- package/src/services/rtm.ts +9 -25
- package/src/services/search.ts +51 -92
- package/src/services/stars.ts +20 -31
- package/src/services/team.ts +81 -155
- package/src/services/tooling.ts +5 -13
- package/src/services/usergroups.ts +37 -68
- package/src/services/users.ts +35 -102
- package/src/services/views.ts +11 -31
- package/src/services/workflows.ts +65 -129
- package/lib/response-validation.test.d.ts +0 -4
- package/lib/response-validation.test.d.ts.map +0 -1
- package/lib/response-validation.test.js +0 -40
- package/lib/response-validation.test.js.map +0 -1
- package/src/response-validation.test.ts +0 -54
package/src/services/files.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
1
2
|
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
|
|
2
3
|
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
4
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
5
|
+
import { slackPaginate } from "../pagination.ts";
|
|
6
|
+
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
12
7
|
import * as Retry from "../retry.ts";
|
|
8
|
+
import * as T from "../traits.ts";
|
|
13
9
|
|
|
14
10
|
export type { SlackOpError, SlackOpContext };
|
|
15
11
|
|
|
@@ -36,20 +32,11 @@ export const AddRemoteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
36
32
|
preview_image: S.optional(S.Unknown),
|
|
37
33
|
title: S.String,
|
|
38
34
|
}).pipe(
|
|
39
|
-
T.Http({
|
|
40
|
-
method: "POST",
|
|
41
|
-
uri: "/files.remote.add",
|
|
42
|
-
code: 200,
|
|
43
|
-
contentType: "form-urlencoded",
|
|
44
|
-
}),
|
|
35
|
+
T.Http({ method: "POST", uri: "/files.remote.add", code: 200, contentType: "form-urlencoded" }),
|
|
45
36
|
),
|
|
46
|
-
).annotate({
|
|
47
|
-
identifier: "AddRemoteRequest",
|
|
48
|
-
}) as any as S.Schema<AddRemoteRequest>;
|
|
37
|
+
).annotate({ identifier: "AddRemoteRequest" }) as any as S.Schema<AddRemoteRequest>;
|
|
49
38
|
|
|
50
|
-
export type AddRemoteResponseFileSharesMap = {
|
|
51
|
-
[key: string]: unknown | undefined;
|
|
52
|
-
};
|
|
39
|
+
export type AddRemoteResponseFileSharesMap = { [key: string]: unknown | undefined };
|
|
53
40
|
export const AddRemoteResponseFileSharesMap = /*@__PURE__*/ S.Record(
|
|
54
41
|
S.String,
|
|
55
42
|
S.Unknown,
|
|
@@ -133,9 +120,7 @@ export const AddRemoteResponseFile = /*@__PURE__*/ S.suspend(() =>
|
|
|
133
120
|
external_url: S.optional(S.String),
|
|
134
121
|
has_rich_preview: S.optional(S.Boolean),
|
|
135
122
|
}),
|
|
136
|
-
).annotate({
|
|
137
|
-
identifier: "AddRemoteResponseFile",
|
|
138
|
-
}) as any as S.Schema<AddRemoteResponseFile>;
|
|
123
|
+
).annotate({ identifier: "AddRemoteResponseFile" }) as any as S.Schema<AddRemoteResponseFile>;
|
|
139
124
|
|
|
140
125
|
export interface AddRemoteResponse {
|
|
141
126
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -147,9 +132,7 @@ export const AddRemoteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
147
132
|
ok: S.Boolean,
|
|
148
133
|
file: AddRemoteResponseFile,
|
|
149
134
|
}),
|
|
150
|
-
).annotate({
|
|
151
|
-
identifier: "AddRemoteResponse",
|
|
152
|
-
}) as any as S.Schema<AddRemoteResponse>;
|
|
135
|
+
).annotate({ identifier: "AddRemoteResponse" }) as any as S.Schema<AddRemoteResponse>;
|
|
153
136
|
|
|
154
137
|
export interface CompleteUploadExternalRequestFilesItem {
|
|
155
138
|
/** File ID returned from files.getUploadURL. */
|
|
@@ -159,20 +142,18 @@ export interface CompleteUploadExternalRequestFilesItem {
|
|
|
159
142
|
/** Optional highlight type hint for the file. The upload processing job may overwrite this value. */
|
|
160
143
|
highlight_type?: string;
|
|
161
144
|
}
|
|
162
|
-
export const CompleteUploadExternalRequestFilesItem = /*@__PURE__*/ S.suspend(
|
|
163
|
-
(
|
|
164
|
-
S.
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}),
|
|
145
|
+
export const CompleteUploadExternalRequestFilesItem = /*@__PURE__*/ S.suspend(() =>
|
|
146
|
+
S.Struct({
|
|
147
|
+
id: S.String,
|
|
148
|
+
title: S.optional(S.String),
|
|
149
|
+
highlight_type: S.optional(S.String),
|
|
150
|
+
}),
|
|
169
151
|
).annotate({
|
|
170
152
|
identifier: "CompleteUploadExternalRequestFilesItem",
|
|
171
153
|
}) as any as S.Schema<CompleteUploadExternalRequestFilesItem>;
|
|
172
154
|
|
|
173
155
|
/** Array of file ids and their corresponding (optional) titles. */
|
|
174
|
-
export type CompleteUploadExternalRequestFilesList =
|
|
175
|
-
Array<CompleteUploadExternalRequestFilesItem>;
|
|
156
|
+
export type CompleteUploadExternalRequestFilesList = Array<CompleteUploadExternalRequestFilesItem>;
|
|
176
157
|
export const CompleteUploadExternalRequestFilesList = /*@__PURE__*/ S.Array(
|
|
177
158
|
CompleteUploadExternalRequestFilesItem,
|
|
178
159
|
) as any as S.Schema<CompleteUploadExternalRequestFilesList>;
|
|
@@ -180,18 +161,16 @@ export const CompleteUploadExternalRequestFilesList = /*@__PURE__*/ S.Array(
|
|
|
180
161
|
export type CompleteUploadExternalRequestBlocksCase1ItemMap = {
|
|
181
162
|
[key: string]: unknown | undefined;
|
|
182
163
|
};
|
|
183
|
-
export const CompleteUploadExternalRequestBlocksCase1ItemMap =
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
) as any as S.Schema<CompleteUploadExternalRequestBlocksCase1ItemMap>;
|
|
164
|
+
export const CompleteUploadExternalRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
|
|
165
|
+
S.String,
|
|
166
|
+
S.Unknown,
|
|
167
|
+
) as any as S.Schema<CompleteUploadExternalRequestBlocksCase1ItemMap>;
|
|
188
168
|
|
|
189
169
|
export type CompleteUploadExternalRequestBlocksCase1List =
|
|
190
170
|
Array<CompleteUploadExternalRequestBlocksCase1ItemMap>;
|
|
191
|
-
export const CompleteUploadExternalRequestBlocksCase1List =
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
) as any as S.Schema<CompleteUploadExternalRequestBlocksCase1List>;
|
|
171
|
+
export const CompleteUploadExternalRequestBlocksCase1List = /*@__PURE__*/ S.Array(
|
|
172
|
+
CompleteUploadExternalRequestBlocksCase1ItemMap,
|
|
173
|
+
) as any as S.Schema<CompleteUploadExternalRequestBlocksCase1List>;
|
|
195
174
|
|
|
196
175
|
/** A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the `initial_comment` field is provided, the `blocks` field is ignored */
|
|
197
176
|
export type CompleteUploadExternalRequestBlocks =
|
|
@@ -217,9 +196,9 @@ export interface CompleteUploadExternalRequest {
|
|
|
217
196
|
/** Set your bot's user name for the file share message. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
|
|
218
197
|
username?: string | null;
|
|
219
198
|
/** URL to an image to use as the icon for the file share message. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
|
|
220
|
-
icon_url?: string;
|
|
199
|
+
icon_url?: string | null;
|
|
221
200
|
/** Emoji to use as the icon for the file share message. Overrides `icon_url`. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
|
|
222
|
-
icon_emoji?: string;
|
|
201
|
+
icon_emoji?: string | null;
|
|
223
202
|
}
|
|
224
203
|
export const CompleteUploadExternalRequest = /*@__PURE__*/ S.suspend(() =>
|
|
225
204
|
S.Struct({
|
|
@@ -230,11 +209,9 @@ export const CompleteUploadExternalRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
230
209
|
initial_comment: S.optional(S.String),
|
|
231
210
|
blocks: S.optional(CompleteUploadExternalRequestBlocks),
|
|
232
211
|
username: S.optional(S.NullOr(S.String)),
|
|
233
|
-
icon_url: S.optional(S.String),
|
|
234
|
-
icon_emoji: S.optional(S.String),
|
|
235
|
-
}).pipe(
|
|
236
|
-
T.Http({ method: "POST", uri: "/files.completeUploadExternal", code: 200 }),
|
|
237
|
-
),
|
|
212
|
+
icon_url: S.optional(S.NullOr(S.String)),
|
|
213
|
+
icon_emoji: S.optional(S.NullOr(S.String)),
|
|
214
|
+
}).pipe(T.Http({ method: "POST", uri: "/files.completeUploadExternal", code: 200 })),
|
|
238
215
|
).annotate({
|
|
239
216
|
identifier: "CompleteUploadExternalRequest",
|
|
240
217
|
}) as any as S.Schema<CompleteUploadExternalRequest>;
|
|
@@ -249,14 +226,13 @@ export interface CompleteUploadExternalResponseFilesItem {
|
|
|
249
226
|
/** file owner */
|
|
250
227
|
user?: string;
|
|
251
228
|
}
|
|
252
|
-
export const CompleteUploadExternalResponseFilesItem = /*@__PURE__*/ S.suspend(
|
|
253
|
-
(
|
|
254
|
-
S.
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}),
|
|
229
|
+
export const CompleteUploadExternalResponseFilesItem = /*@__PURE__*/ S.suspend(() =>
|
|
230
|
+
S.Struct({
|
|
231
|
+
id: S.String,
|
|
232
|
+
title: S.optional(S.Unknown),
|
|
233
|
+
created: S.optional(S.Number),
|
|
234
|
+
user: S.optional(S.String),
|
|
235
|
+
}),
|
|
260
236
|
).annotate({
|
|
261
237
|
identifier: "CompleteUploadExternalResponseFilesItem",
|
|
262
238
|
}) as any as S.Schema<CompleteUploadExternalResponseFilesItem>;
|
|
@@ -294,9 +270,7 @@ export const DeleteCommentRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
294
270
|
file: S.String,
|
|
295
271
|
id: S.String,
|
|
296
272
|
}).pipe(T.Http({ method: "POST", uri: "/files.comments.delete", code: 200 })),
|
|
297
|
-
).annotate({
|
|
298
|
-
identifier: "DeleteCommentRequest",
|
|
299
|
-
}) as any as S.Schema<DeleteCommentRequest>;
|
|
273
|
+
).annotate({ identifier: "DeleteCommentRequest" }) as any as S.Schema<DeleteCommentRequest>;
|
|
300
274
|
|
|
301
275
|
export interface DeleteCommentResponse {
|
|
302
276
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -306,9 +280,7 @@ export const DeleteCommentResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
306
280
|
S.Struct({
|
|
307
281
|
ok: S.Boolean,
|
|
308
282
|
}),
|
|
309
|
-
).annotate({
|
|
310
|
-
identifier: "DeleteCommentResponse",
|
|
311
|
-
}) as any as S.Schema<DeleteCommentResponse>;
|
|
283
|
+
).annotate({ identifier: "DeleteCommentResponse" }) as any as S.Schema<DeleteCommentResponse>;
|
|
312
284
|
|
|
313
285
|
export interface DeleteFileRequest {
|
|
314
286
|
/** ID of file to delete. */
|
|
@@ -318,9 +290,7 @@ export const DeleteFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
318
290
|
S.Struct({
|
|
319
291
|
file: S.String,
|
|
320
292
|
}).pipe(T.Http({ method: "POST", uri: "/files.delete", code: 200 })),
|
|
321
|
-
).annotate({
|
|
322
|
-
identifier: "DeleteFileRequest",
|
|
323
|
-
}) as any as S.Schema<DeleteFileRequest>;
|
|
293
|
+
).annotate({ identifier: "DeleteFileRequest" }) as any as S.Schema<DeleteFileRequest>;
|
|
324
294
|
|
|
325
295
|
export interface DeleteFileResponse {
|
|
326
296
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -330,9 +300,7 @@ export const DeleteFileResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
330
300
|
S.Struct({
|
|
331
301
|
ok: S.Boolean,
|
|
332
302
|
}),
|
|
333
|
-
).annotate({
|
|
334
|
-
identifier: "DeleteFileResponse",
|
|
335
|
-
}) as any as S.Schema<DeleteFileResponse>;
|
|
303
|
+
).annotate({ identifier: "DeleteFileResponse" }) as any as S.Schema<DeleteFileResponse>;
|
|
336
304
|
|
|
337
305
|
export interface FilesInfoRequest {
|
|
338
306
|
count?: number;
|
|
@@ -352,9 +320,7 @@ export const FilesInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
352
320
|
limit: S.optional(S.Number.pipe(T.Query())),
|
|
353
321
|
page: S.optional(S.Number.pipe(T.Query())),
|
|
354
322
|
}).pipe(T.Http({ method: "GET", uri: "/files.info", code: 200 })),
|
|
355
|
-
).annotate({
|
|
356
|
-
identifier: "FilesInfoRequest",
|
|
357
|
-
}) as any as S.Schema<FilesInfoRequest>;
|
|
323
|
+
).annotate({ identifier: "FilesInfoRequest" }) as any as S.Schema<FilesInfoRequest>;
|
|
358
324
|
|
|
359
325
|
export interface FilesInfoResponseFile {
|
|
360
326
|
id: string;
|
|
@@ -363,9 +329,7 @@ export const FilesInfoResponseFile = /*@__PURE__*/ S.suspend(() =>
|
|
|
363
329
|
S.Struct({
|
|
364
330
|
id: S.String,
|
|
365
331
|
}),
|
|
366
|
-
).annotate({
|
|
367
|
-
identifier: "FilesInfoResponseFile",
|
|
368
|
-
}) as any as S.Schema<FilesInfoResponseFile>;
|
|
332
|
+
).annotate({ identifier: "FilesInfoResponseFile" }) as any as S.Schema<FilesInfoResponseFile>;
|
|
369
333
|
|
|
370
334
|
export interface FilesInfoResponseCommentsItem {
|
|
371
335
|
comment: string;
|
|
@@ -388,8 +352,7 @@ export const FilesInfoResponseCommentsItem = /*@__PURE__*/ S.suspend(() =>
|
|
|
388
352
|
identifier: "FilesInfoResponseCommentsItem",
|
|
389
353
|
}) as any as S.Schema<FilesInfoResponseCommentsItem>;
|
|
390
354
|
|
|
391
|
-
export type FilesInfoResponseCommentsList =
|
|
392
|
-
Array<FilesInfoResponseCommentsItem>;
|
|
355
|
+
export type FilesInfoResponseCommentsList = Array<FilesInfoResponseCommentsItem>;
|
|
393
356
|
export const FilesInfoResponseCommentsList = /*@__PURE__*/ S.Array(
|
|
394
357
|
FilesInfoResponseCommentsItem,
|
|
395
358
|
) as any as S.Schema<FilesInfoResponseCommentsList>;
|
|
@@ -428,9 +391,7 @@ export const FilesInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
428
391
|
content_highlight_html: S.optional(S.Unknown),
|
|
429
392
|
response_metadata: S.optional(FilesInfoResponseResponseMetadata),
|
|
430
393
|
}),
|
|
431
|
-
).annotate({
|
|
432
|
-
identifier: "FilesInfoResponse",
|
|
433
|
-
}) as any as S.Schema<FilesInfoResponse>;
|
|
394
|
+
).annotate({ identifier: "FilesInfoResponse" }) as any as S.Schema<FilesInfoResponse>;
|
|
434
395
|
|
|
435
396
|
export interface GetUploadURLExternalRequest {
|
|
436
397
|
/** Size in bytes of the file being uploaded. */
|
|
@@ -477,14 +438,10 @@ export const GetUploadURLExternalResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
477
438
|
}) as any as S.Schema<GetUploadURLExternalResponse>;
|
|
478
439
|
|
|
479
440
|
export type ListFilesRequestCount = number | string;
|
|
480
|
-
export const ListFilesRequestCount = /*@__PURE__*/ S.Unknown.pipe(
|
|
481
|
-
T.UnionCases([[], []]),
|
|
482
|
-
);
|
|
441
|
+
export const ListFilesRequestCount = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
|
|
483
442
|
|
|
484
443
|
export type ListFilesRequestPage = number | string;
|
|
485
|
-
export const ListFilesRequestPage = /*@__PURE__*/ S.Unknown.pipe(
|
|
486
|
-
T.UnionCases([[], []]),
|
|
487
|
-
);
|
|
444
|
+
export const ListFilesRequestPage = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
|
|
488
445
|
|
|
489
446
|
export interface ListFilesRequest {
|
|
490
447
|
/** Filter files appearing in a specific channel, indicated by its ID. */
|
|
@@ -516,9 +473,7 @@ export const ListFilesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
516
473
|
types: S.optional(S.String.pipe(T.Query())),
|
|
517
474
|
user: S.optional(S.String.pipe(T.Query())),
|
|
518
475
|
}).pipe(T.Http({ method: "GET", uri: "/files.list", code: 200 })),
|
|
519
|
-
).annotate({
|
|
520
|
-
identifier: "ListFilesRequest",
|
|
521
|
-
}) as any as S.Schema<ListFilesRequest>;
|
|
476
|
+
).annotate({ identifier: "ListFilesRequest" }) as any as S.Schema<ListFilesRequest>;
|
|
522
477
|
|
|
523
478
|
export interface ListFilesResponseFilesItem {
|
|
524
479
|
id: string;
|
|
@@ -553,9 +508,7 @@ export const ListFilesResponsePaging = /*@__PURE__*/ S.suspend(() =>
|
|
|
553
508
|
page: S.Number,
|
|
554
509
|
pages: S.Number,
|
|
555
510
|
}),
|
|
556
|
-
).annotate({
|
|
557
|
-
identifier: "ListFilesResponsePaging",
|
|
558
|
-
}) as any as S.Schema<ListFilesResponsePaging>;
|
|
511
|
+
).annotate({ identifier: "ListFilesResponsePaging" }) as any as S.Schema<ListFilesResponsePaging>;
|
|
559
512
|
|
|
560
513
|
export interface ListFilesResponse {
|
|
561
514
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -569,9 +522,7 @@ export const ListFilesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
569
522
|
files: ListFilesResponseFilesList,
|
|
570
523
|
paging: S.optional(ListFilesResponsePaging),
|
|
571
524
|
}),
|
|
572
|
-
).annotate({
|
|
573
|
-
identifier: "ListFilesResponse",
|
|
574
|
-
}) as any as S.Schema<ListFilesResponse>;
|
|
525
|
+
).annotate({ identifier: "ListFilesResponse" }) as any as S.Schema<ListFilesResponse>;
|
|
575
526
|
|
|
576
527
|
export interface ListRemoteRequest {
|
|
577
528
|
/** Filter files appearing in a specific channel, indicated by its ID. */
|
|
@@ -593,9 +544,7 @@ export const ListRemoteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
593
544
|
ts_from: S.optional(S.String.pipe(T.Query())),
|
|
594
545
|
ts_to: S.optional(S.String.pipe(T.Query())),
|
|
595
546
|
}).pipe(T.Http({ method: "GET", uri: "/files.remote.list", code: 200 })),
|
|
596
|
-
).annotate({
|
|
597
|
-
identifier: "ListRemoteRequest",
|
|
598
|
-
}) as any as S.Schema<ListRemoteRequest>;
|
|
547
|
+
).annotate({ identifier: "ListRemoteRequest" }) as any as S.Schema<ListRemoteRequest>;
|
|
599
548
|
|
|
600
549
|
export interface ListRemoteResponseFilesItem {
|
|
601
550
|
id?: string;
|
|
@@ -614,10 +563,8 @@ export const ListRemoteResponseFilesList = /*@__PURE__*/ S.Array(
|
|
|
614
563
|
) as any as S.Schema<ListRemoteResponseFilesList>;
|
|
615
564
|
|
|
616
565
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
617
|
-
export type ListRemoteResponseResponseMetadata =
|
|
618
|
-
|
|
619
|
-
export const ListRemoteResponseResponseMetadata =
|
|
620
|
-
FilesInfoResponseResponseMetadata;
|
|
566
|
+
export type ListRemoteResponseResponseMetadata = FilesInfoResponseResponseMetadata;
|
|
567
|
+
export const ListRemoteResponseResponseMetadata = FilesInfoResponseResponseMetadata;
|
|
621
568
|
|
|
622
569
|
export interface ListRemoteResponse {
|
|
623
570
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -632,9 +579,7 @@ export const ListRemoteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
632
579
|
files: ListRemoteResponseFilesList,
|
|
633
580
|
response_metadata: S.optional(FilesInfoResponseResponseMetadata),
|
|
634
581
|
}),
|
|
635
|
-
).annotate({
|
|
636
|
-
identifier: "ListRemoteResponse",
|
|
637
|
-
}) as any as S.Schema<ListRemoteResponse>;
|
|
582
|
+
).annotate({ identifier: "ListRemoteResponse" }) as any as S.Schema<ListRemoteResponse>;
|
|
638
583
|
|
|
639
584
|
export interface RemoteInfoRequest {
|
|
640
585
|
/** Creator defined GUID for the file. */
|
|
@@ -647,9 +592,7 @@ export const RemoteInfoRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
647
592
|
external_id: S.optional(S.String.pipe(T.Query())),
|
|
648
593
|
file: S.optional(S.String.pipe(T.Query())),
|
|
649
594
|
}).pipe(T.Http({ method: "GET", uri: "/files.remote.info", code: 200 })),
|
|
650
|
-
).annotate({
|
|
651
|
-
identifier: "RemoteInfoRequest",
|
|
652
|
-
}) as any as S.Schema<RemoteInfoRequest>;
|
|
595
|
+
).annotate({ identifier: "RemoteInfoRequest" }) as any as S.Schema<RemoteInfoRequest>;
|
|
653
596
|
|
|
654
597
|
export type RemoteInfoResponseFile = ListFilesResponseFilesItem;
|
|
655
598
|
export const RemoteInfoResponseFile = ListFilesResponseFilesItem;
|
|
@@ -664,9 +607,7 @@ export const RemoteInfoResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
664
607
|
ok: S.Boolean,
|
|
665
608
|
file: ListFilesResponseFilesItem,
|
|
666
609
|
}),
|
|
667
|
-
).annotate({
|
|
668
|
-
identifier: "RemoteInfoResponse",
|
|
669
|
-
}) as any as S.Schema<RemoteInfoResponse>;
|
|
610
|
+
).annotate({ identifier: "RemoteInfoResponse" }) as any as S.Schema<RemoteInfoResponse>;
|
|
670
611
|
|
|
671
612
|
export interface RemoveRemoteRequest {
|
|
672
613
|
/** Creator defined GUID for the file. */
|
|
@@ -686,9 +627,7 @@ export const RemoveRemoteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
686
627
|
contentType: "form-urlencoded",
|
|
687
628
|
}),
|
|
688
629
|
),
|
|
689
|
-
).annotate({
|
|
690
|
-
identifier: "RemoveRemoteRequest",
|
|
691
|
-
}) as any as S.Schema<RemoveRemoteRequest>;
|
|
630
|
+
).annotate({ identifier: "RemoveRemoteRequest" }) as any as S.Schema<RemoveRemoteRequest>;
|
|
692
631
|
|
|
693
632
|
export interface RemoveRemoteResponse {
|
|
694
633
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -698,9 +637,7 @@ export const RemoveRemoteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
698
637
|
S.Struct({
|
|
699
638
|
ok: S.Boolean,
|
|
700
639
|
}),
|
|
701
|
-
).annotate({
|
|
702
|
-
identifier: "RemoveRemoteResponse",
|
|
703
|
-
}) as any as S.Schema<RemoveRemoteResponse>;
|
|
640
|
+
).annotate({ identifier: "RemoveRemoteResponse" }) as any as S.Schema<RemoveRemoteResponse>;
|
|
704
641
|
|
|
705
642
|
export interface RevokePublicURLRequest {
|
|
706
643
|
/** File to revoke */
|
|
@@ -710,9 +647,7 @@ export const RevokePublicURLRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
710
647
|
S.Struct({
|
|
711
648
|
file: S.String,
|
|
712
649
|
}).pipe(T.Http({ method: "POST", uri: "/files.revokePublicURL", code: 200 })),
|
|
713
|
-
).annotate({
|
|
714
|
-
identifier: "RevokePublicURLRequest",
|
|
715
|
-
}) as any as S.Schema<RevokePublicURLRequest>;
|
|
650
|
+
).annotate({ identifier: "RevokePublicURLRequest" }) as any as S.Schema<RevokePublicURLRequest>;
|
|
716
651
|
|
|
717
652
|
export interface RevokePublicURLResponseFile {
|
|
718
653
|
id?: string;
|
|
@@ -739,9 +674,7 @@ export const RevokePublicURLResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
739
674
|
ok: S.Boolean,
|
|
740
675
|
file: RevokePublicURLResponseFile,
|
|
741
676
|
}),
|
|
742
|
-
).annotate({
|
|
743
|
-
identifier: "RevokePublicURLResponse",
|
|
744
|
-
}) as any as S.Schema<RevokePublicURLResponse>;
|
|
677
|
+
).annotate({ identifier: "RevokePublicURLResponse" }) as any as S.Schema<RevokePublicURLResponse>;
|
|
745
678
|
|
|
746
679
|
export interface SharedPublicURLRequest {
|
|
747
680
|
/** File to share */
|
|
@@ -751,30 +684,23 @@ export const SharedPublicURLRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
751
684
|
S.Struct({
|
|
752
685
|
file: S.String,
|
|
753
686
|
}).pipe(T.Http({ method: "POST", uri: "/files.sharedPublicURL", code: 200 })),
|
|
754
|
-
).annotate({
|
|
755
|
-
identifier: "SharedPublicURLRequest",
|
|
756
|
-
}) as any as S.Schema<SharedPublicURLRequest>;
|
|
687
|
+
).annotate({ identifier: "SharedPublicURLRequest" }) as any as S.Schema<SharedPublicURLRequest>;
|
|
757
688
|
|
|
758
689
|
export type SharedPublicURLResponseFile = RevokePublicURLResponseFile;
|
|
759
690
|
export const SharedPublicURLResponseFile = RevokePublicURLResponseFile;
|
|
760
691
|
|
|
761
|
-
export type SharedPublicURLResponseCommentItemMap = {
|
|
762
|
-
[key: string]: unknown | undefined;
|
|
763
|
-
};
|
|
692
|
+
export type SharedPublicURLResponseCommentItemMap = { [key: string]: unknown | undefined };
|
|
764
693
|
export const SharedPublicURLResponseCommentItemMap = /*@__PURE__*/ S.Record(
|
|
765
694
|
S.String,
|
|
766
695
|
S.Unknown,
|
|
767
696
|
) as any as S.Schema<SharedPublicURLResponseCommentItemMap>;
|
|
768
697
|
|
|
769
|
-
export type SharedPublicURLResponseCommentList =
|
|
770
|
-
Array<SharedPublicURLResponseCommentItemMap>;
|
|
698
|
+
export type SharedPublicURLResponseCommentList = Array<SharedPublicURLResponseCommentItemMap>;
|
|
771
699
|
export const SharedPublicURLResponseCommentList = /*@__PURE__*/ S.Array(
|
|
772
700
|
SharedPublicURLResponseCommentItemMap,
|
|
773
701
|
) as any as S.Schema<SharedPublicURLResponseCommentList>;
|
|
774
702
|
|
|
775
|
-
export type SharedPublicURLResponsePagingMap = {
|
|
776
|
-
[key: string]: unknown | undefined;
|
|
777
|
-
};
|
|
703
|
+
export type SharedPublicURLResponsePagingMap = { [key: string]: unknown | undefined };
|
|
778
704
|
export const SharedPublicURLResponsePagingMap = /*@__PURE__*/ S.Record(
|
|
779
705
|
S.String,
|
|
780
706
|
S.Unknown,
|
|
@@ -794,9 +720,7 @@ export const SharedPublicURLResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
794
720
|
comment: S.optional(SharedPublicURLResponseCommentList),
|
|
795
721
|
paging: S.optional(SharedPublicURLResponsePagingMap),
|
|
796
722
|
}),
|
|
797
|
-
).annotate({
|
|
798
|
-
identifier: "SharedPublicURLResponse",
|
|
799
|
-
}) as any as S.Schema<SharedPublicURLResponse>;
|
|
723
|
+
).annotate({ identifier: "SharedPublicURLResponse" }) as any as S.Schema<SharedPublicURLResponse>;
|
|
800
724
|
|
|
801
725
|
export interface ShareRemoteRequest {
|
|
802
726
|
/** Comma-separated list of channel IDs where the file will be shared. */
|
|
@@ -812,9 +736,7 @@ export const ShareRemoteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
812
736
|
external_id: S.optional(S.String.pipe(T.Query())),
|
|
813
737
|
file: S.optional(S.String.pipe(T.Query())),
|
|
814
738
|
}).pipe(T.Http({ method: "GET", uri: "/files.remote.share", code: 200 })),
|
|
815
|
-
).annotate({
|
|
816
|
-
identifier: "ShareRemoteRequest",
|
|
817
|
-
}) as any as S.Schema<ShareRemoteRequest>;
|
|
739
|
+
).annotate({ identifier: "ShareRemoteRequest" }) as any as S.Schema<ShareRemoteRequest>;
|
|
818
740
|
|
|
819
741
|
export type ShareRemoteResponseFile = ListRemoteResponseFilesItem;
|
|
820
742
|
export const ShareRemoteResponseFile = ListRemoteResponseFilesItem;
|
|
@@ -829,9 +751,7 @@ export const ShareRemoteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
829
751
|
ok: S.Boolean,
|
|
830
752
|
file: S.optional(ListRemoteResponseFilesItem),
|
|
831
753
|
}),
|
|
832
|
-
).annotate({
|
|
833
|
-
identifier: "ShareRemoteResponse",
|
|
834
|
-
}) as any as S.Schema<ShareRemoteResponse>;
|
|
754
|
+
).annotate({ identifier: "ShareRemoteResponse" }) as any as S.Schema<ShareRemoteResponse>;
|
|
835
755
|
|
|
836
756
|
export interface UpdateRemoteRequest {
|
|
837
757
|
/** Creator defined GUID for the file. */
|
|
@@ -866,9 +786,7 @@ export const UpdateRemoteRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
866
786
|
contentType: "form-urlencoded",
|
|
867
787
|
}),
|
|
868
788
|
),
|
|
869
|
-
).annotate({
|
|
870
|
-
identifier: "UpdateRemoteRequest",
|
|
871
|
-
}) as any as S.Schema<UpdateRemoteRequest>;
|
|
789
|
+
).annotate({ identifier: "UpdateRemoteRequest" }) as any as S.Schema<UpdateRemoteRequest>;
|
|
872
790
|
|
|
873
791
|
export type UpdateRemoteResponseFile = ListRemoteResponseFilesItem;
|
|
874
792
|
export const UpdateRemoteResponseFile = ListRemoteResponseFilesItem;
|
|
@@ -883,9 +801,7 @@ export const UpdateRemoteResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
883
801
|
ok: S.Boolean,
|
|
884
802
|
file: S.optional(ListRemoteResponseFilesItem),
|
|
885
803
|
}),
|
|
886
|
-
).annotate({
|
|
887
|
-
identifier: "UpdateRemoteResponse",
|
|
888
|
-
}) as any as S.Schema<UpdateRemoteResponse>;
|
|
804
|
+
).annotate({ identifier: "UpdateRemoteResponse" }) as any as S.Schema<UpdateRemoteResponse>;
|
|
889
805
|
|
|
890
806
|
export interface UploadFileRequest {
|
|
891
807
|
/** Comma-separated list of channel names or IDs where the file will be shared. */
|
|
@@ -916,16 +832,9 @@ export const UploadFileRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
916
832
|
thread_ts: S.optional(S.String),
|
|
917
833
|
title: S.optional(S.String),
|
|
918
834
|
}).pipe(
|
|
919
|
-
T.Http({
|
|
920
|
-
method: "POST",
|
|
921
|
-
uri: "/files.upload",
|
|
922
|
-
code: 200,
|
|
923
|
-
contentType: "form-urlencoded",
|
|
924
|
-
}),
|
|
835
|
+
T.Http({ method: "POST", uri: "/files.upload", code: 200, contentType: "form-urlencoded" }),
|
|
925
836
|
),
|
|
926
|
-
).annotate({
|
|
927
|
-
identifier: "UploadFileRequest",
|
|
928
|
-
}) as any as S.Schema<UploadFileRequest>;
|
|
837
|
+
).annotate({ identifier: "UploadFileRequest" }) as any as S.Schema<UploadFileRequest>;
|
|
929
838
|
|
|
930
839
|
export type UploadFileResponseFile = RevokePublicURLResponseFile;
|
|
931
840
|
export const UploadFileResponseFile = RevokePublicURLResponseFile;
|
|
@@ -940,9 +849,7 @@ export const UploadFileResponse = /*@__PURE__*/ S.suspend(() =>
|
|
|
940
849
|
ok: S.Boolean,
|
|
941
850
|
file: RevokePublicURLResponseFile,
|
|
942
851
|
}),
|
|
943
|
-
).annotate({
|
|
944
|
-
identifier: "UploadFileResponse",
|
|
945
|
-
}) as any as S.Schema<UploadFileResponse>;
|
|
852
|
+
).annotate({ identifier: "UploadFileResponse" }) as any as S.Schema<UploadFileResponse>;
|
|
946
853
|
|
|
947
854
|
export type AddRemoteError = SlackOpError;
|
|
948
855
|
/** Adds a file from a remote service Required scopes — bot: `remote_files:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `bad_image` — The uploaded image could not be processed - try passing a JPG or PNG - `bad_title` — The title provided is too long. - `bot_user_required` — bot user token is required - `invalid_external_id` — The external_id provided is too long. - `too_large` — The uploaded image had excessive dimensions See https://docs.slack.dev/reference/methods/files.remote.add */
|
|
@@ -960,7 +867,7 @@ export const addRemote: API.OperationMethod<
|
|
|
960
867
|
}));
|
|
961
868
|
|
|
962
869
|
export type CompleteUploadExternalError = SlackOpError;
|
|
963
|
-
/** Finishes an upload started with files.getUploadURLExternal Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — User is not the owner of the file. - `channel_not_found` — Value passed for `channel_id` was invalid. - `file_not_found` — Could not find the file from the upload ticket. - `file_update_failed` — Failure occurred when attempting to update the file. - `invalid_blocks` — Provided blocks are in the incorrect format. - `invalid_channel` — Channel could not be found or channel specified is invalid. - `not_in_channel` — User/bot membership is required for the specified channel. - `posting_to_channel_denied` — User is not authorized to post to channel. - `channels_limit_exceeded` — Exceeded the channel limit. A maximum of 100 channels is allowed per request. - `file_type_not_allowed` — The file type is not permitted based on the team's allowed_file_upload_types preference. - `file_uploads_except_images_disabled` — Only image file uploads are permitted for this team. See https://docs.slack.dev/reference/methods/files.completeUploadExternal */
|
|
870
|
+
/** Finishes an upload started with files.getUploadURLExternal Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `access_denied` — User is not the owner of the file. - `channel_not_found` — Value passed for `channel_id` was invalid. - `file_not_found` — Could not find the file from the upload ticket. - `file_update_failed` — Failure occurred when attempting to update the file. - `invalid_blocks` — Provided blocks are in the incorrect format. - `invalid_channel` — Channel could not be found or channel specified is invalid. - `not_in_channel` — User/bot membership is required for the specified channel. - `posting_to_channel_denied` — User is not authorized to post to channel. - `channels_limit_exceeded` — Exceeded the channel limit. A maximum of 100 channels is allowed per request. - `file_type_not_allowed` — The file type is not permitted based on the team's allowed_file_upload_types preference. - `file_uploads_except_images_disabled` — Only image file uploads are permitted for this team. - `user_is_external_guest` — External guests cannot upload or share files. See https://docs.slack.dev/reference/methods/files.completeUploadExternal */
|
|
964
871
|
export const completeUploadExternal: API.OperationMethod<
|
|
965
872
|
CompleteUploadExternalRequest,
|
|
966
873
|
CompleteUploadExternalResponse,
|
|
@@ -1031,7 +938,7 @@ export const filesInfo: API.PaginatedOperationMethod<
|
|
|
1031
938
|
) as any;
|
|
1032
939
|
|
|
1033
940
|
export type GetUploadURLExternalError = SlackOpError;
|
|
1034
|
-
/** Gets a URL for an edge external file upload Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `alt_txt_too_large` — Description for the image is longer than the limit of 1000 character - `file_upload_size_restricted` — The size of provided file is too large, as the team has restricted uploads of large files. - `file_uploads_disabled` — Team has disabled all file uploads. - `missing_argument` — A required argument was not provided. Typically only occurs when the `length` provided is 0. - `snippet_too_large` — The provided `length` is too large to create a snippet, which are limited to 1MB. - `storage_limit_reached` — File storage limit has been reached. This occurs when free teams have uploaded 5GB of files. - `unknown_snippet_type` — The provided `snippet_type` is not a supported type. - `unknown_subtype` — The provided `subtype` is not a supported type. - `file_type_not_allowed` — The file type is not allowed. - `file_uploads_except_images_disabled` — File uploads except images are disabled. See https://docs.slack.dev/reference/methods/files.getUploadURLExternal */
|
|
941
|
+
/** Gets a URL for an edge external file upload Required scopes — bot: `files:write`; user: `files:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `alt_txt_too_large` — Description for the image is longer than the limit of 1000 character - `file_upload_size_restricted` — The size of provided file is too large, as the team has restricted uploads of large files. - `file_uploads_disabled` — Team has disabled all file uploads. - `missing_argument` — A required argument was not provided. Typically only occurs when the `length` provided is 0. - `snippet_too_large` — The provided `length` is too large to create a snippet, which are limited to 1MB. - `storage_limit_reached` — File storage limit has been reached. This occurs when free teams have uploaded 5GB of files. - `unknown_snippet_type` — The provided `snippet_type` is not a supported type. - `unknown_subtype` — The provided `subtype` is not a supported type. - `file_type_not_allowed` — The file type is not allowed. - `file_uploads_except_images_disabled` — File uploads except images are disabled. - `user_is_external_guest` — External guests cannot upload or share files. See https://docs.slack.dev/reference/methods/files.getUploadURLExternal */
|
|
1035
942
|
export const getUploadURLExternal: API.OperationMethod<
|
|
1036
943
|
GetUploadURLExternalRequest,
|
|
1037
944
|
GetUploadURLExternalResponse,
|