@distilled.cloud/slack 1.0.0-rc.18 → 1.0.0-rc.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/protocol.d.ts +2 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/admin.d.ts +594 -356
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +149 -140
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +89 -97
- package/lib/services/agents.d.ts.map +1 -1
- package/lib/services/agents.js +1 -1
- package/lib/services/agents.js.map +1 -1
- package/lib/services/api.d.ts +2 -2
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +1 -1
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +74 -74
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +32 -32
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +55 -46
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +1 -1
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +27 -27
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -1
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +3 -3
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +1 -1
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +19 -19
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +1 -1
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +23 -23
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +1 -1
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +10 -10
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +1 -1
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +18 -18
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +1 -1
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +103 -103
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +1 -1
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +109 -103
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +38 -38
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.js +1 -1
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +14 -14
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +1 -1
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +6 -6
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +1 -1
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +14 -14
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +1 -1
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +106 -106
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +26 -26
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +37 -37
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +1 -1
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/lists.d.ts +47 -45
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +1 -1
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +3 -3
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +1 -1
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +102 -102
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +1 -1
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +40 -40
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +1 -1
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +9 -9
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +1 -1
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +23 -23
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +1 -1
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +8 -8
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +1 -1
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +11 -11
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +1 -1
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +84 -80
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +1 -1
- package/lib/services/search.js.map +1 -1
- package/lib/services/slackbot.d.ts +366 -0
- package/lib/services/slackbot.d.ts.map +1 -0
- package/lib/services/slackbot.js +2 -0
- package/lib/services/slackbot.js.map +1 -0
- package/lib/services/stars.d.ts +16 -16
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +1 -1
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +39 -37
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +1 -1
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.js +1 -1
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +30 -30
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +1 -1
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +37 -37
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +1 -1
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +9 -9
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +1 -1
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +16 -16
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +1 -1
- package/lib/services/workflows.js.map +1 -1
- package/lib/services.lazy/admin.js +2 -2
- package/lib/services.lazy/apps.js +1 -1
- package/lib/services.lazy/conversations.js +1 -1
- package/lib/services.lazy/files.js +1 -1
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/slackbot.js +1 -0
- package/package.json +6 -6
- package/src/protocol.ts +3 -5
- package/src/services/admin.ts +1609 -1016
- package/src/services/agents.ts +93 -103
- package/src/services/api.ts +2 -2
- package/src/services/apps.ts +74 -74
- package/src/services/assistant.ts +88 -56
- package/src/services/auth.ts +27 -27
- package/src/services/blocks.ts +3 -3
- package/src/services/bookmarks.ts +19 -19
- package/src/services/bots.ts +23 -23
- package/src/services/calls.ts +10 -10
- package/src/services/canvases.ts +50 -46
- package/src/services/chat.ts +103 -103
- package/src/services/conversations.ts +126 -115
- package/src/services/dnd.ts +14 -14
- package/src/services/emoji.ts +6 -6
- package/src/services/entity.ts +14 -14
- package/src/services/files.ts +106 -106
- package/src/services/functions.ts +37 -37
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +49 -46
- package/src/services/migration.ts +3 -3
- package/src/services/oauth.ts +102 -102
- package/src/services/openid.ts +40 -40
- package/src/services/pins.ts +9 -9
- package/src/services/reactions.ts +23 -23
- package/src/services/reminders.ts +8 -8
- package/src/services/rtm.ts +11 -11
- package/src/services/search.ts +123 -130
- package/src/services/slackbot.ts +766 -0
- package/src/services/stars.ts +16 -16
- package/src/services/team.ts +42 -37
- package/src/services/usergroups.ts +30 -30
- package/src/services/users.ts +37 -37
- package/src/services/views.ts +9 -9
- package/src/services/workflows.ts +16 -16
package/src/services/emoji.ts
CHANGED
|
@@ -26,22 +26,22 @@ const TELEMETRY = {
|
|
|
26
26
|
|
|
27
27
|
export interface ListEmojiRequest {
|
|
28
28
|
/** Include a list of categories for Unicode emoji and the emoji in each category */
|
|
29
|
-
include_categories?: boolean;
|
|
29
|
+
include_categories?: boolean | undefined;
|
|
30
30
|
}
|
|
31
31
|
export type ListEmojiResponseEmojiMap = { [key: string]: unknown | undefined };
|
|
32
32
|
export type ListEmojiResponseCategoriesItemEmojiNamesList = Array<string>;
|
|
33
33
|
export interface ListEmojiResponseCategoriesItem {
|
|
34
|
-
name?: string;
|
|
35
|
-
emoji_names?: ListEmojiResponseCategoriesItemEmojiNamesList;
|
|
34
|
+
name?: string | undefined;
|
|
35
|
+
emoji_names?: ListEmojiResponseCategoriesItemEmojiNamesList | undefined;
|
|
36
36
|
}
|
|
37
37
|
export type ListEmojiResponseCategoriesList = Array<ListEmojiResponseCategoriesItem>;
|
|
38
38
|
export interface ListEmojiResponse {
|
|
39
39
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
40
40
|
ok: boolean;
|
|
41
|
-
cache_ts?: string;
|
|
41
|
+
cache_ts?: string | undefined;
|
|
42
42
|
emoji: ListEmojiResponseEmojiMap;
|
|
43
|
-
categories_version?: string;
|
|
44
|
-
categories?: ListEmojiResponseCategoriesList;
|
|
43
|
+
categories_version?: string | undefined;
|
|
44
|
+
categories?: ListEmojiResponseCategoriesList | undefined;
|
|
45
45
|
}
|
|
46
46
|
export type ListEmojiError = SlackOpError;
|
|
47
47
|
/** Lists custom emoji for a team. Required scopes -- bot: `emoji:read`; user: `emoji:read` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `invalid_arguments` -- Invalid API arguments provided - `unable_to_fetch_custom_emojis` -- Unable to fetch custom emojis for team. See https://docs.slack.dev/reference/methods/emoji.list */
|
package/src/services/entity.ts
CHANGED
|
@@ -30,9 +30,9 @@ export interface AcknowledgeCommentActionRequest {
|
|
|
30
30
|
/** A reference to the original user action that initiated the comment mutation */
|
|
31
31
|
trigger_id: string;
|
|
32
32
|
/** The full comment data. Required for edit and post actions. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
|
|
33
|
-
comment?: AcknowledgeCommentActionRequestCommentMap;
|
|
33
|
+
comment?: AcknowledgeCommentActionRequestCommentMap | undefined;
|
|
34
34
|
/** Error message if the action failed in the app. When present, signals that the mutation could not be completed. */
|
|
35
|
-
error?: string;
|
|
35
|
+
error?: string | undefined;
|
|
36
36
|
}
|
|
37
37
|
export interface AcknowledgeCommentActionResponse {
|
|
38
38
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -45,42 +45,42 @@ export interface PresentCommentsRequest {
|
|
|
45
45
|
/** Array of comments to present to the user. See the [comment schema](/messaging/work-objects-comments#entity-present-comments-method) for the full list of properties. */
|
|
46
46
|
comments: PresentCommentsRequestCommentsList;
|
|
47
47
|
/** App supplied cursor used for pagination, will be sent in the next request for comments */
|
|
48
|
-
cursor?: string;
|
|
48
|
+
cursor?: string | undefined;
|
|
49
49
|
/** Indicates whether the user has permissions to post comments */
|
|
50
|
-
can_post_comment?: boolean;
|
|
50
|
+
can_post_comment?: boolean | undefined;
|
|
51
51
|
/** A reference to the original user action that initiated the request */
|
|
52
52
|
trigger_id: string;
|
|
53
53
|
/** The block action id that will be sent when a delete request is initiated for a comment. */
|
|
54
|
-
delete_action_id?: string;
|
|
54
|
+
delete_action_id?: string | undefined;
|
|
55
55
|
/** Set to true (or 1) to indicate that the user must authenticate to see the comments data. */
|
|
56
|
-
user_auth_required?: boolean;
|
|
56
|
+
user_auth_required?: boolean | undefined;
|
|
57
57
|
/** A custom URL to which users are directed for authentication if required. */
|
|
58
|
-
user_auth_url?: string;
|
|
59
|
-
error?: string;
|
|
58
|
+
user_auth_url?: string | undefined;
|
|
59
|
+
error?: string | undefined;
|
|
60
60
|
}
|
|
61
61
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
62
62
|
export interface PresentCommentsResponseResponseMetadata {
|
|
63
63
|
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
64
|
-
next_cursor?: string;
|
|
64
|
+
next_cursor?: string | undefined;
|
|
65
65
|
}
|
|
66
66
|
export interface PresentCommentsResponse {
|
|
67
67
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
68
68
|
ok: boolean;
|
|
69
69
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
70
|
-
response_metadata?: PresentCommentsResponseResponseMetadata;
|
|
70
|
+
response_metadata?: PresentCommentsResponseResponseMetadata | undefined;
|
|
71
71
|
}
|
|
72
72
|
/** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
|
|
73
73
|
export type PresentDetailsRequestMetadataMap = { [key: string]: unknown | undefined };
|
|
74
74
|
export interface PresentDetailsRequest {
|
|
75
75
|
/** URL-encoded JSON object containing flexpane metadata from the app that will be conformed to a Work Object metadata schema, keyed by entity ID. */
|
|
76
|
-
metadata?: PresentDetailsRequestMetadataMap;
|
|
76
|
+
metadata?: PresentDetailsRequestMetadataMap | undefined;
|
|
77
77
|
/** A reference to the original user action that initiated the request. */
|
|
78
78
|
trigger_id: string;
|
|
79
79
|
/** Set to true (or 1) to indicate that the user must authenticate to view full flexpane data. */
|
|
80
|
-
user_auth_required?: boolean;
|
|
80
|
+
user_auth_required?: boolean | undefined;
|
|
81
81
|
/** A custom URL to which users are directed for authentication if required. */
|
|
82
|
-
user_auth_url?: string;
|
|
83
|
-
error?: string;
|
|
82
|
+
user_auth_url?: string | undefined;
|
|
83
|
+
error?: string | undefined;
|
|
84
84
|
}
|
|
85
85
|
export interface PresentDetailsResponse {
|
|
86
86
|
/** Always `true` (a failed call raises a typed error instead). */
|
package/src/services/files.ts
CHANGED
|
@@ -31,11 +31,11 @@ export interface AddRemoteRequest {
|
|
|
31
31
|
/** URL of the remote file. */
|
|
32
32
|
external_url: string;
|
|
33
33
|
/** type of file */
|
|
34
|
-
filetype?: string;
|
|
34
|
+
filetype?: string | undefined;
|
|
35
35
|
/** A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file. */
|
|
36
|
-
indexable_file_contents?: unknown;
|
|
36
|
+
indexable_file_contents?: unknown | undefined;
|
|
37
37
|
/** Preview of the document via `multipart/form-data`. */
|
|
38
|
-
preview_image?: unknown;
|
|
38
|
+
preview_image?: unknown | undefined;
|
|
39
39
|
/** Title of the file being shared. */
|
|
40
40
|
title: string;
|
|
41
41
|
}
|
|
@@ -44,35 +44,35 @@ export type AddRemoteResponseFileChannelsList = Array<string>;
|
|
|
44
44
|
export type AddRemoteResponseFileGroupsList = Array<string>;
|
|
45
45
|
export type AddRemoteResponseFileImsList = Array<string>;
|
|
46
46
|
export interface AddRemoteResponseFile {
|
|
47
|
-
id?: string;
|
|
48
|
-
created?: number;
|
|
49
|
-
timestamp?: number;
|
|
50
|
-
name?: string;
|
|
51
|
-
title?: string;
|
|
52
|
-
mimetype?: string;
|
|
53
|
-
filetype?: string;
|
|
54
|
-
pretty_type?: string;
|
|
55
|
-
user?: string;
|
|
56
|
-
editable?: boolean;
|
|
57
|
-
size?: number;
|
|
58
|
-
mode?: string;
|
|
59
|
-
is_external?: boolean;
|
|
60
|
-
external_type?: string;
|
|
61
|
-
is_public?: boolean;
|
|
62
|
-
public_url_shared?: boolean;
|
|
63
|
-
display_as_bot?: boolean;
|
|
64
|
-
username?: string;
|
|
65
|
-
url_private?: string;
|
|
66
|
-
permalink?: string;
|
|
67
|
-
comments_count?: number;
|
|
68
|
-
is_starred?: boolean;
|
|
69
|
-
shares?: AddRemoteResponseFileSharesMap;
|
|
70
|
-
channels?: AddRemoteResponseFileChannelsList;
|
|
71
|
-
groups?: AddRemoteResponseFileGroupsList;
|
|
72
|
-
ims?: AddRemoteResponseFileImsList;
|
|
73
|
-
external_id?: string;
|
|
74
|
-
external_url?: string;
|
|
75
|
-
has_rich_preview?: boolean;
|
|
47
|
+
id?: string | undefined;
|
|
48
|
+
created?: number | undefined;
|
|
49
|
+
timestamp?: number | undefined;
|
|
50
|
+
name?: string | undefined;
|
|
51
|
+
title?: string | undefined;
|
|
52
|
+
mimetype?: string | undefined;
|
|
53
|
+
filetype?: string | undefined;
|
|
54
|
+
pretty_type?: string | undefined;
|
|
55
|
+
user?: string | undefined;
|
|
56
|
+
editable?: boolean | undefined;
|
|
57
|
+
size?: number | undefined;
|
|
58
|
+
mode?: string | undefined;
|
|
59
|
+
is_external?: boolean | undefined;
|
|
60
|
+
external_type?: string | undefined;
|
|
61
|
+
is_public?: boolean | undefined;
|
|
62
|
+
public_url_shared?: boolean | undefined;
|
|
63
|
+
display_as_bot?: boolean | undefined;
|
|
64
|
+
username?: string | undefined;
|
|
65
|
+
url_private?: string | undefined;
|
|
66
|
+
permalink?: string | undefined;
|
|
67
|
+
comments_count?: number | undefined;
|
|
68
|
+
is_starred?: boolean | undefined;
|
|
69
|
+
shares?: AddRemoteResponseFileSharesMap | undefined;
|
|
70
|
+
channels?: AddRemoteResponseFileChannelsList | undefined;
|
|
71
|
+
groups?: AddRemoteResponseFileGroupsList | undefined;
|
|
72
|
+
ims?: AddRemoteResponseFileImsList | undefined;
|
|
73
|
+
external_id?: string | undefined;
|
|
74
|
+
external_url?: string | undefined;
|
|
75
|
+
has_rich_preview?: boolean | undefined;
|
|
76
76
|
}
|
|
77
77
|
export interface AddRemoteResponse {
|
|
78
78
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -83,9 +83,9 @@ export interface CompleteUploadExternalRequestFilesItem {
|
|
|
83
83
|
/** File ID returned from files.getUploadURL. */
|
|
84
84
|
id: string;
|
|
85
85
|
/** Title of file. */
|
|
86
|
-
title?: string;
|
|
86
|
+
title?: string | undefined;
|
|
87
87
|
/** Optional highlight type hint for the file. The upload processing job may overwrite this value. */
|
|
88
|
-
highlight_type?: string;
|
|
88
|
+
highlight_type?: string | undefined;
|
|
89
89
|
}
|
|
90
90
|
/** Array of file ids and their corresponding (optional) titles. */
|
|
91
91
|
export type CompleteUploadExternalRequestFilesList = Array<CompleteUploadExternalRequestFilesItem>;
|
|
@@ -102,31 +102,31 @@ export interface CompleteUploadExternalRequest {
|
|
|
102
102
|
/** Array of file ids and their corresponding (optional) titles. */
|
|
103
103
|
files: CompleteUploadExternalRequestFilesList;
|
|
104
104
|
/** Channel ID where the file will be shared. If not specified the file will be private. */
|
|
105
|
-
channel_id?: string;
|
|
105
|
+
channel_id?: string | undefined;
|
|
106
106
|
/** Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts' */
|
|
107
|
-
thread_ts?: string;
|
|
107
|
+
thread_ts?: string | undefined;
|
|
108
108
|
/** Comma-separated string of channel IDs or user IDs where the file will be shared. */
|
|
109
|
-
channels?: string;
|
|
109
|
+
channels?: string | undefined;
|
|
110
110
|
/** The message text introducing the file in specified channels. */
|
|
111
|
-
initial_comment?: string;
|
|
111
|
+
initial_comment?: string | undefined;
|
|
112
112
|
/** 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 */
|
|
113
|
-
blocks?: CompleteUploadExternalRequestBlocks;
|
|
113
|
+
blocks?: CompleteUploadExternalRequestBlocks | undefined;
|
|
114
114
|
/** Set your bot's user name for the file share message. Requires the [`chat:write.customize`](/reference/scopes/chat.write.customize) scope. */
|
|
115
|
-
username?: string | null;
|
|
115
|
+
username?: string | null | undefined;
|
|
116
116
|
/** 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. */
|
|
117
|
-
icon_url?: string | null;
|
|
117
|
+
icon_url?: string | null | undefined;
|
|
118
118
|
/** 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. */
|
|
119
|
-
icon_emoji?: string | null;
|
|
119
|
+
icon_emoji?: string | null | undefined;
|
|
120
120
|
}
|
|
121
121
|
export interface CompleteUploadExternalResponseFilesItem {
|
|
122
122
|
/** File ID returned from files.getUploadURLExternal. */
|
|
123
123
|
id: string;
|
|
124
124
|
/** Title of file. */
|
|
125
|
-
title?: unknown;
|
|
125
|
+
title?: unknown | undefined;
|
|
126
126
|
/** file created timestamp */
|
|
127
|
-
created?: number;
|
|
127
|
+
created?: number | undefined;
|
|
128
128
|
/** file owner */
|
|
129
|
-
user?: string;
|
|
129
|
+
user?: string | undefined;
|
|
130
130
|
}
|
|
131
131
|
/** Array of files uploaded. */
|
|
132
132
|
export type CompleteUploadExternalResponseFilesList =
|
|
@@ -156,14 +156,14 @@ export interface DeleteFileResponse {
|
|
|
156
156
|
ok: boolean;
|
|
157
157
|
}
|
|
158
158
|
export interface FilesInfoRequest {
|
|
159
|
-
count?: number;
|
|
159
|
+
count?: number | undefined;
|
|
160
160
|
/** Parameter for pagination. File comments are paginated for a single file. Set `cursor` equal to the `next_cursor` attribute returned by the previous request's `response_metadata`. This parameter is optional, but pagination is mandatory: the default value simply fetches the first "page" of the collection of comments. See [pagination](/apis/web-api/pagination) for more details. */
|
|
161
|
-
cursor?: string;
|
|
161
|
+
cursor?: string | undefined;
|
|
162
162
|
/** Specify a file by providing its ID. */
|
|
163
163
|
file: string;
|
|
164
164
|
/** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. */
|
|
165
|
-
limit?: number;
|
|
166
|
-
page?: number;
|
|
165
|
+
limit?: number | undefined;
|
|
166
|
+
page?: number | undefined;
|
|
167
167
|
}
|
|
168
168
|
export interface FilesInfoResponseFile {
|
|
169
169
|
id: string;
|
|
@@ -180,18 +180,18 @@ export type FilesInfoResponseCommentsList = Array<FilesInfoResponseCommentsItem>
|
|
|
180
180
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
181
181
|
export interface FilesInfoResponseResponseMetadata {
|
|
182
182
|
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
183
|
-
next_cursor?: string;
|
|
183
|
+
next_cursor?: string | undefined;
|
|
184
184
|
}
|
|
185
185
|
export interface FilesInfoResponse {
|
|
186
186
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
187
187
|
ok: boolean;
|
|
188
188
|
file: FilesInfoResponseFile;
|
|
189
189
|
comments: FilesInfoResponseCommentsList;
|
|
190
|
-
content?: string;
|
|
191
|
-
content_html?: unknown;
|
|
192
|
-
content_highlight_html?: unknown;
|
|
190
|
+
content?: string | undefined;
|
|
191
|
+
content_html?: unknown | undefined;
|
|
192
|
+
content_highlight_html?: unknown | undefined;
|
|
193
193
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
194
|
-
response_metadata?: FilesInfoResponseResponseMetadata;
|
|
194
|
+
response_metadata?: FilesInfoResponseResponseMetadata | undefined;
|
|
195
195
|
}
|
|
196
196
|
export interface GetUploadURLExternalRequest {
|
|
197
197
|
/** Size in bytes of the file being uploaded. */
|
|
@@ -199,9 +199,9 @@ export interface GetUploadURLExternalRequest {
|
|
|
199
199
|
/** Name of the file being uploaded. */
|
|
200
200
|
filename: string;
|
|
201
201
|
/** Syntax type of the snippet being uploaded. */
|
|
202
|
-
snippet_type?: string;
|
|
202
|
+
snippet_type?: string | undefined;
|
|
203
203
|
/** Description of image for screen-reader. */
|
|
204
|
-
alt_txt?: string;
|
|
204
|
+
alt_txt?: string | undefined;
|
|
205
205
|
}
|
|
206
206
|
export interface GetUploadURLExternalResponse {
|
|
207
207
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -213,30 +213,30 @@ export type ListFilesRequestCount = number | string;
|
|
|
213
213
|
export type ListFilesRequestPage = number | string;
|
|
214
214
|
export interface ListFilesRequest {
|
|
215
215
|
/** Filter files appearing in a specific channel, indicated by its ID. */
|
|
216
|
-
channel?: string;
|
|
217
|
-
count?: ListFilesRequestCount;
|
|
218
|
-
page?: ListFilesRequestPage;
|
|
216
|
+
channel?: string | undefined;
|
|
217
|
+
count?: ListFilesRequestCount | undefined;
|
|
218
|
+
page?: ListFilesRequestPage | undefined;
|
|
219
219
|
/** Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit. */
|
|
220
|
-
show_files_hidden_by_limit?: boolean;
|
|
220
|
+
show_files_hidden_by_limit?: boolean | undefined;
|
|
221
221
|
/** encoded team id to list files in, required if org token is used */
|
|
222
|
-
team_id?: string;
|
|
222
|
+
team_id?: string | undefined;
|
|
223
223
|
/** Filter files created after this timestamp (inclusive). */
|
|
224
|
-
ts_from?: string;
|
|
224
|
+
ts_from?: string | undefined;
|
|
225
225
|
/** Filter files created before this timestamp (inclusive). */
|
|
226
|
-
ts_to?: string;
|
|
226
|
+
ts_to?: string | undefined;
|
|
227
227
|
/** Filter files by type ([see below](#file_types)). You can pass multiple values in the types argument, like `types=spaces,snippets`.The default value is `all`, which does not filter the list. */
|
|
228
|
-
types?: string;
|
|
228
|
+
types?: string | undefined;
|
|
229
229
|
/** Filter files created by a single user. */
|
|
230
|
-
user?: string;
|
|
230
|
+
user?: string | undefined;
|
|
231
231
|
}
|
|
232
232
|
export interface ListFilesResponseFilesItem {
|
|
233
233
|
id: string;
|
|
234
|
-
created?: number;
|
|
235
|
-
user?: string;
|
|
234
|
+
created?: number | undefined;
|
|
235
|
+
user?: string | undefined;
|
|
236
236
|
}
|
|
237
237
|
export type ListFilesResponseFilesList = Array<ListFilesResponseFilesItem>;
|
|
238
238
|
export interface ListFilesResponsePaging {
|
|
239
|
-
count?: number;
|
|
239
|
+
count?: number | undefined;
|
|
240
240
|
total: number;
|
|
241
241
|
page: number;
|
|
242
242
|
pages: number;
|
|
@@ -245,22 +245,22 @@ export interface ListFilesResponse {
|
|
|
245
245
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
246
246
|
ok: boolean;
|
|
247
247
|
files: ListFilesResponseFilesList;
|
|
248
|
-
paging?: ListFilesResponsePaging;
|
|
248
|
+
paging?: ListFilesResponsePaging | undefined;
|
|
249
249
|
}
|
|
250
250
|
export interface ListRemoteRequest {
|
|
251
251
|
/** Filter files appearing in a specific channel, indicated by its ID. */
|
|
252
|
-
channel?: string;
|
|
252
|
+
channel?: string | undefined;
|
|
253
253
|
/** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first "page" of the collection. See [pagination](/apis/web-api/pagination) for more detail. */
|
|
254
|
-
cursor?: string;
|
|
254
|
+
cursor?: string | undefined;
|
|
255
255
|
/** The maximum number of items to return. */
|
|
256
|
-
limit?: number;
|
|
256
|
+
limit?: number | undefined;
|
|
257
257
|
/** Filter files created after this timestamp (inclusive). */
|
|
258
|
-
ts_from?: string;
|
|
258
|
+
ts_from?: string | undefined;
|
|
259
259
|
/** Filter files created before this timestamp (inclusive). */
|
|
260
|
-
ts_to?: string;
|
|
260
|
+
ts_to?: string | undefined;
|
|
261
261
|
}
|
|
262
262
|
export interface ListRemoteResponseFilesItem {
|
|
263
|
-
id?: string;
|
|
263
|
+
id?: string | undefined;
|
|
264
264
|
}
|
|
265
265
|
export type ListRemoteResponseFilesList = Array<ListRemoteResponseFilesItem>;
|
|
266
266
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
@@ -270,13 +270,13 @@ export interface ListRemoteResponse {
|
|
|
270
270
|
ok: boolean;
|
|
271
271
|
files: ListRemoteResponseFilesList;
|
|
272
272
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
273
|
-
response_metadata?: FilesInfoResponseResponseMetadata;
|
|
273
|
+
response_metadata?: FilesInfoResponseResponseMetadata | undefined;
|
|
274
274
|
}
|
|
275
275
|
export interface RemoteInfoRequest {
|
|
276
276
|
/** Creator defined GUID for the file. */
|
|
277
|
-
external_id?: string;
|
|
277
|
+
external_id?: string | undefined;
|
|
278
278
|
/** Specify a file by providing its ID. */
|
|
279
|
-
file?: string;
|
|
279
|
+
file?: string | undefined;
|
|
280
280
|
}
|
|
281
281
|
export type RemoteInfoResponseFile = ListFilesResponseFilesItem;
|
|
282
282
|
export interface RemoteInfoResponse {
|
|
@@ -286,9 +286,9 @@ export interface RemoteInfoResponse {
|
|
|
286
286
|
}
|
|
287
287
|
export interface RemoveRemoteRequest {
|
|
288
288
|
/** Creator defined GUID for the file. */
|
|
289
|
-
external_id?: string;
|
|
289
|
+
external_id?: string | undefined;
|
|
290
290
|
/** Specify a file by providing its ID. */
|
|
291
|
-
file?: string;
|
|
291
|
+
file?: string | undefined;
|
|
292
292
|
}
|
|
293
293
|
export interface RemoveRemoteResponse {
|
|
294
294
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -299,9 +299,9 @@ export interface RevokePublicURLRequest {
|
|
|
299
299
|
file: string;
|
|
300
300
|
}
|
|
301
301
|
export interface RevokePublicURLResponseFile {
|
|
302
|
-
id?: string;
|
|
303
|
-
created?: number;
|
|
304
|
-
user?: string;
|
|
302
|
+
id?: string | undefined;
|
|
303
|
+
created?: number | undefined;
|
|
304
|
+
user?: string | undefined;
|
|
305
305
|
}
|
|
306
306
|
export interface RevokePublicURLResponse {
|
|
307
307
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -320,62 +320,62 @@ export interface SharedPublicURLResponse {
|
|
|
320
320
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
321
321
|
ok: boolean;
|
|
322
322
|
file: RevokePublicURLResponseFile;
|
|
323
|
-
comment?: SharedPublicURLResponseCommentList;
|
|
324
|
-
paging?: SharedPublicURLResponsePagingMap;
|
|
323
|
+
comment?: SharedPublicURLResponseCommentList | undefined;
|
|
324
|
+
paging?: SharedPublicURLResponsePagingMap | undefined;
|
|
325
325
|
}
|
|
326
326
|
export interface ShareRemoteRequest {
|
|
327
327
|
/** Comma-separated list of channel IDs where the file will be shared. */
|
|
328
328
|
channels: string;
|
|
329
329
|
/** The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field or `file` or both are required. */
|
|
330
|
-
external_id?: string;
|
|
330
|
+
external_id?: string | undefined;
|
|
331
331
|
/** Specify a file registered with Slack by providing its ID. Either this field or `external_id` or both are required. */
|
|
332
|
-
file?: string;
|
|
332
|
+
file?: string | undefined;
|
|
333
333
|
}
|
|
334
334
|
export type ShareRemoteResponseFile = ListRemoteResponseFilesItem;
|
|
335
335
|
export interface ShareRemoteResponse {
|
|
336
336
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
337
337
|
ok: boolean;
|
|
338
|
-
file?: ListRemoteResponseFilesItem;
|
|
338
|
+
file?: ListRemoteResponseFilesItem | undefined;
|
|
339
339
|
}
|
|
340
340
|
export interface UpdateRemoteRequest {
|
|
341
341
|
/** Creator defined GUID for the file. */
|
|
342
|
-
external_id?: string;
|
|
342
|
+
external_id?: string | undefined;
|
|
343
343
|
/** URL of the remote file. */
|
|
344
|
-
external_url?: string;
|
|
344
|
+
external_url?: string | undefined;
|
|
345
345
|
/** Specify a file by providing its ID. */
|
|
346
|
-
file?: string;
|
|
346
|
+
file?: string | undefined;
|
|
347
347
|
/** type of file */
|
|
348
|
-
filetype?: string;
|
|
348
|
+
filetype?: string | undefined;
|
|
349
349
|
/** File containing contents that can be used to improve searchability for the remote file. */
|
|
350
|
-
indexable_file_contents?: unknown;
|
|
350
|
+
indexable_file_contents?: unknown | undefined;
|
|
351
351
|
/** Preview of the document via `multipart/form-data`. */
|
|
352
|
-
preview_image?: unknown;
|
|
352
|
+
preview_image?: unknown | undefined;
|
|
353
353
|
/** Title of the file being shared. */
|
|
354
|
-
title?: string;
|
|
354
|
+
title?: string | undefined;
|
|
355
355
|
}
|
|
356
356
|
export type UpdateRemoteResponseFile = ListRemoteResponseFilesItem;
|
|
357
357
|
export interface UpdateRemoteResponse {
|
|
358
358
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
359
359
|
ok: boolean;
|
|
360
|
-
file?: ListRemoteResponseFilesItem;
|
|
360
|
+
file?: ListRemoteResponseFilesItem | undefined;
|
|
361
361
|
}
|
|
362
362
|
export interface UploadFileRequest {
|
|
363
363
|
/** Comma-separated list of channel names or IDs where the file will be shared. */
|
|
364
|
-
channels?: string;
|
|
364
|
+
channels?: string | undefined;
|
|
365
365
|
/** File contents via a POST variable. If omitting this parameter, you must provide a `file`. */
|
|
366
|
-
content?: string;
|
|
366
|
+
content?: string | undefined;
|
|
367
367
|
/** File contents via `multipart/form-data`. If omitting this parameter, you must submit `content`. */
|
|
368
|
-
file?: unknown;
|
|
368
|
+
file?: unknown | undefined;
|
|
369
369
|
/** Filename of file. */
|
|
370
|
-
filename?: string;
|
|
370
|
+
filename?: string | undefined;
|
|
371
371
|
/** A [file type](/reference/objects/file-object#file_types) identifier. */
|
|
372
|
-
filetype?: string;
|
|
372
|
+
filetype?: string | undefined;
|
|
373
373
|
/** The message text introducing the file in specified `channels`. */
|
|
374
|
-
initial_comment?: string;
|
|
374
|
+
initial_comment?: string | undefined;
|
|
375
375
|
/** Provide another message's `ts` value to upload this file as a reply. Never use a reply's `ts` value; use its parent instead. */
|
|
376
|
-
thread_ts?: string;
|
|
376
|
+
thread_ts?: string | undefined;
|
|
377
377
|
/** Title of file. */
|
|
378
|
-
title?: string;
|
|
378
|
+
title?: string | undefined;
|
|
379
379
|
}
|
|
380
380
|
export type UploadFileResponseFile = RevokePublicURLResponseFile;
|
|
381
381
|
export interface UploadFileResponse {
|
|
@@ -384,7 +384,7 @@ export interface UploadFileResponse {
|
|
|
384
384
|
file: RevokePublicURLResponseFile;
|
|
385
385
|
}
|
|
386
386
|
export type AddRemoteError = SlackOpError;
|
|
387
|
-
/** 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 */
|
|
387
|
+
/** 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 (over 255 characters) or contains non-ASCII characters. - `too_large` -- The uploaded image had excessive dimensions See https://docs.slack.dev/reference/methods/files.remote.add */
|
|
388
388
|
export const addRemote: API.OperationMethod<
|
|
389
389
|
AddRemoteRequest,
|
|
390
390
|
AddRemoteResponse,
|
|
@@ -435,7 +435,7 @@ export const deleteComment: API.OperationMethod<
|
|
|
435
435
|
}));
|
|
436
436
|
|
|
437
437
|
export type DeleteFileError = SlackOpError;
|
|
438
|
-
/** Deletes a file. Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_file` -- Authenticated user does not have permission to delete this file. - `delete_not_allowed` -- Error returned when the requested file does not support deletion; for example, when attempting to delete a canvas template. - `file_deleted` -- The file has already been deleted. - `file_deleting_disabled` -- This functionality is disabled. - `file_not_found` -- The file does not exist, or is not visible to the calling user. See https://docs.slack.dev/reference/methods/files.delete */
|
|
438
|
+
/** Deletes a file. Required scopes -- bot: `files:write`; user: `files:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_file` -- Authenticated user does not have permission to delete this file. - `delete_not_allowed` -- Error returned when the requested file does not support deletion; for example, when attempting to delete a canvas template. - `file_deleted` -- The file has already been deleted. - `file_deleting_disabled` -- This functionality is disabled. - `file_not_found` -- The file does not exist, or is not visible to the calling user. - `use_skills_api` -- This file is a Slackbot skill. Use slackbot.skills.delete with skill_id and a user OAuth token carrying skills:write. See https://docs.slack.dev/reference/methods/files.delete */
|
|
439
439
|
export const deleteFile: API.OperationMethod<
|
|
440
440
|
DeleteFileRequest,
|
|
441
441
|
DeleteFileResponse,
|