@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
|
@@ -3,6 +3,7 @@ import * as API from "@distilled.cloud/core/api";
|
|
|
3
3
|
import * as S from "@distilled.cloud/core/schema-lite";
|
|
4
4
|
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
5
5
|
import { SlackError, SlackRateLimited } from "../errors.ts";
|
|
6
|
+
import { slackPaginate } from "../pagination.ts";
|
|
6
7
|
import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
|
|
7
8
|
import * as Retry from "../retry.ts";
|
|
8
9
|
import * as T from "../traits.ts";
|
|
@@ -53,43 +54,43 @@ export interface SearchContextRequest {
|
|
|
53
54
|
/** User prompt or search query */
|
|
54
55
|
query: string;
|
|
55
56
|
/** Send `action_token` as received in a message event. */
|
|
56
|
-
action_token?: string;
|
|
57
|
+
action_token?: string | undefined;
|
|
57
58
|
/** Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im`. */
|
|
58
|
-
channel_types?: SearchContextRequestChannelTypesList;
|
|
59
|
+
channel_types?: SearchContextRequestChannelTypesList | undefined;
|
|
59
60
|
/** Content types to include, a comma-separated list of any combination of `messages`, `files`, `channels`, `users`. */
|
|
60
|
-
content_types?: SearchContextRequestContentTypesList;
|
|
61
|
+
content_types?: SearchContextRequestContentTypesList | undefined;
|
|
61
62
|
/** Whether the results should include bots. */
|
|
62
|
-
include_bots?: boolean;
|
|
63
|
+
include_bots?: boolean | undefined;
|
|
63
64
|
/** Whether to include deleted users in the user search results. Defaults to false. */
|
|
64
|
-
include_deleted_users?: boolean;
|
|
65
|
+
include_deleted_users?: boolean | undefined;
|
|
65
66
|
/** UNIX timestamp filter. If present, filters for results before this date. */
|
|
66
|
-
before?: number;
|
|
67
|
+
before?: number | undefined;
|
|
67
68
|
/** UNIX timestamp filter. If present, filters for results after this date. */
|
|
68
|
-
after?: number;
|
|
69
|
+
after?: number | undefined;
|
|
69
70
|
/** Whether to include context messages surrounding the main message result. Defaults to false if unspecified. */
|
|
70
|
-
include_context_messages?: boolean;
|
|
71
|
+
include_context_messages?: boolean | undefined;
|
|
71
72
|
/** Context channel ID to support scoping the search when applicable. */
|
|
72
|
-
context_channel_id?: string;
|
|
73
|
+
context_channel_id?: string | undefined;
|
|
73
74
|
/** The cursor returned by the API. Leave this blank for the first request and use this to get the next page of results. */
|
|
74
|
-
cursor?: string;
|
|
75
|
+
cursor?: string | undefined;
|
|
75
76
|
/** Number of results to return, up to a max of 20. Defaults to 20. */
|
|
76
|
-
limit?: number;
|
|
77
|
+
limit?: number | undefined;
|
|
77
78
|
/** The field to sort the results by. Defaults to score. Can be one of: score, timestamp. */
|
|
78
|
-
sort?: SearchContextRequestSort | (string & {});
|
|
79
|
+
sort?: SearchContextRequestSort | (string & {}) | undefined;
|
|
79
80
|
/** The direction to sort the results by. Defaults to desc. */
|
|
80
|
-
sort_dir?: SearchContextRequestSortDir | (string & {});
|
|
81
|
+
sort_dir?: SearchContextRequestSortDir | (string & {}) | undefined;
|
|
81
82
|
/** Whether to return the message blocks in the response. */
|
|
82
|
-
include_message_blocks?: boolean;
|
|
83
|
+
include_message_blocks?: boolean | undefined;
|
|
83
84
|
/** Whether to highlight the search query in the results. Defaults to false if unspecified. */
|
|
84
|
-
highlight?: boolean;
|
|
85
|
+
highlight?: boolean | undefined;
|
|
85
86
|
/** A list of term clauses. A term clause is a string with search terms. Search results returned will match every term clause specified (i.e., conjunctive normal form). */
|
|
86
|
-
term_clauses?: SearchContextRequestTermClausesList;
|
|
87
|
+
term_clauses?: SearchContextRequestTermClausesList | undefined;
|
|
87
88
|
/** A string containing only modifiers in the format of `modifier:value`. Search results returned will match the modifier value. For now modifiers only affect term clauses. */
|
|
88
|
-
modifiers?: string;
|
|
89
|
+
modifiers?: string | undefined;
|
|
89
90
|
/** Whether to include archived channels in the search results. */
|
|
90
|
-
include_archived_channels?: boolean;
|
|
91
|
+
include_archived_channels?: boolean | undefined;
|
|
91
92
|
/** Whether to disable semantic search. When true, only keyword-based search is used. Defaults to false. */
|
|
92
|
-
disable_semantic_search?: boolean;
|
|
93
|
+
disable_semantic_search?: boolean | undefined;
|
|
93
94
|
}
|
|
94
95
|
/** Messages before the current message, if applicable. */
|
|
95
96
|
export type SearchContextResponseResultsMessagesItemContextMessagesBeforeList = Array<unknown>;
|
|
@@ -97,9 +98,9 @@ export type SearchContextResponseResultsMessagesItemContextMessagesBeforeList =
|
|
|
97
98
|
export type SearchContextResponseResultsMessagesItemContextMessagesAfterList = Array<unknown>;
|
|
98
99
|
export interface SearchContextResponseResultsMessagesItemContextMessages {
|
|
99
100
|
/** Messages before the current message, if applicable. */
|
|
100
|
-
before?: SearchContextResponseResultsMessagesItemContextMessagesBeforeList;
|
|
101
|
+
before?: SearchContextResponseResultsMessagesItemContextMessagesBeforeList | undefined;
|
|
101
102
|
/** Messages after the current message. */
|
|
102
|
-
after?: SearchContextResponseResultsMessagesItemContextMessagesAfterList;
|
|
103
|
+
after?: SearchContextResponseResultsMessagesItemContextMessagesAfterList | undefined;
|
|
103
104
|
}
|
|
104
105
|
/** Blocks from the retrieved message. */
|
|
105
106
|
export type SearchContextResponseResultsMessagesItemBlocksList = Array<unknown>;
|
|
@@ -107,7 +108,7 @@ export interface SearchContextResponseResultsMessagesItem {
|
|
|
107
108
|
/** Full name of the user who authored the message. */
|
|
108
109
|
author_name: string;
|
|
109
110
|
/** Email address of the user who authored the message, if visible to the searching user. */
|
|
110
|
-
author_email?: string;
|
|
111
|
+
author_email?: string | undefined;
|
|
111
112
|
/** ID of the user who authored the message. */
|
|
112
113
|
author_user_id: string;
|
|
113
114
|
/** ID of the workspace in which the message was sent. */
|
|
@@ -123,10 +124,10 @@ export interface SearchContextResponseResultsMessagesItem {
|
|
|
123
124
|
/** Whether the message was authored by a bot (app) or not. */
|
|
124
125
|
is_author_bot: boolean;
|
|
125
126
|
permalink: string;
|
|
126
|
-
context_messages?: SearchContextResponseResultsMessagesItemContextMessages;
|
|
127
|
+
context_messages?: SearchContextResponseResultsMessagesItemContextMessages | undefined;
|
|
127
128
|
/** Blocks from the retrieved message. */
|
|
128
|
-
blocks?: SearchContextResponseResultsMessagesItemBlocksList;
|
|
129
|
-
reply_count?: number;
|
|
129
|
+
blocks?: SearchContextResponseResultsMessagesItemBlocksList | undefined;
|
|
130
|
+
reply_count?: number | undefined;
|
|
130
131
|
}
|
|
131
132
|
export type SearchContextResponseResultsMessagesList =
|
|
132
133
|
Array<SearchContextResponseResultsMessagesItem>;
|
|
@@ -134,7 +135,7 @@ export interface SearchContextResponseResultsFilesItem {
|
|
|
134
135
|
/** Full name of the user who uploaded or created the file. */
|
|
135
136
|
author_name: string;
|
|
136
137
|
/** Email address of the user who uploaded or created the file, if visible to the searching user */
|
|
137
|
-
author_email?: string;
|
|
138
|
+
author_email?: string | undefined;
|
|
138
139
|
/** ID of the user who uploaded or created the file. */
|
|
139
140
|
author_user_id: string;
|
|
140
141
|
/** ID of the user who uploaded the file. */
|
|
@@ -156,17 +157,23 @@ export interface SearchContextResponseResultsFilesItem {
|
|
|
156
157
|
/** Content from the retrieved file. */
|
|
157
158
|
content: string;
|
|
158
159
|
/** Size of the file in bytes. */
|
|
159
|
-
size?: number;
|
|
160
|
+
size?: number | undefined;
|
|
160
161
|
}
|
|
161
162
|
export type SearchContextResponseResultsFilesList = Array<SearchContextResponseResultsFilesItem>;
|
|
162
163
|
export type SearchContextResponseResultsEnterpriseList = Array<unknown>;
|
|
164
|
+
/** Type of the channel */
|
|
165
|
+
export type SearchContextResponseResultsChannelsItemChannelType =
|
|
166
|
+
| "public_channel"
|
|
167
|
+
| "private_channel"
|
|
168
|
+
| "mpim"
|
|
169
|
+
| "im";
|
|
163
170
|
export interface SearchContextResponseResultsChannelsItem {
|
|
164
171
|
/** ID of the workspace in which the channel was created. */
|
|
165
172
|
team_id: string;
|
|
166
173
|
/** ID of the user who created the channel. */
|
|
167
174
|
creator_user_id: string;
|
|
168
175
|
/** Full name of the user who created the channel. */
|
|
169
|
-
creator_name?: string;
|
|
176
|
+
creator_name?: string | undefined;
|
|
170
177
|
/** Epoch timestamp in microseconds at which the channel was created. */
|
|
171
178
|
date_created: number;
|
|
172
179
|
/** Epoch timestamp in microseconds at which the channel was updated. */
|
|
@@ -174,13 +181,15 @@ export interface SearchContextResponseResultsChannelsItem {
|
|
|
174
181
|
/** Name of the channel. */
|
|
175
182
|
name: string;
|
|
176
183
|
/** Topic of the channel. */
|
|
177
|
-
topic?: string;
|
|
184
|
+
topic?: string | undefined;
|
|
178
185
|
/** Purpose of the channel. */
|
|
179
|
-
purpose?: string;
|
|
186
|
+
purpose?: string | undefined;
|
|
180
187
|
/** Permanent link to the channel in Slack. */
|
|
181
188
|
permalink: string;
|
|
182
189
|
/** Whether the channel is archived. */
|
|
183
190
|
is_archived: boolean;
|
|
191
|
+
/** Type of the channel */
|
|
192
|
+
channel_type: SearchContextResponseResultsChannelsItemChannelType;
|
|
184
193
|
}
|
|
185
194
|
export type SearchContextResponseResultsChannelsList =
|
|
186
195
|
Array<SearchContextResponseResultsChannelsItem>;
|
|
@@ -190,7 +199,7 @@ export interface SearchContextResponseResultsUsersItem {
|
|
|
190
199
|
/** The permalink to the user in Slack */
|
|
191
200
|
permalink: string;
|
|
192
201
|
/** The permalink to the user's profile photo. */
|
|
193
|
-
profile_pic_permalink?: string;
|
|
202
|
+
profile_pic_permalink?: string | undefined;
|
|
194
203
|
/** The user's full name, which might be different from the display name. */
|
|
195
204
|
full_name: string;
|
|
196
205
|
/** The user's job title. */
|
|
@@ -202,23 +211,33 @@ export interface SearchContextResponseResultsUsersItem {
|
|
|
202
211
|
}
|
|
203
212
|
export type SearchContextResponseResultsUsersList = Array<SearchContextResponseResultsUsersItem>;
|
|
204
213
|
export interface SearchContextResponseResults {
|
|
205
|
-
messages?: SearchContextResponseResultsMessagesList;
|
|
206
|
-
files?: SearchContextResponseResultsFilesList;
|
|
207
|
-
enterprise?: SearchContextResponseResultsEnterpriseList;
|
|
208
|
-
channels?: SearchContextResponseResultsChannelsList;
|
|
209
|
-
users?: SearchContextResponseResultsUsersList;
|
|
214
|
+
messages?: SearchContextResponseResultsMessagesList | undefined;
|
|
215
|
+
files?: SearchContextResponseResultsFilesList | undefined;
|
|
216
|
+
enterprise?: SearchContextResponseResultsEnterpriseList | undefined;
|
|
217
|
+
channels?: SearchContextResponseResultsChannelsList | undefined;
|
|
218
|
+
users?: SearchContextResponseResultsUsersList | undefined;
|
|
210
219
|
}
|
|
211
220
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
212
221
|
export interface SearchContextResponseResponseMetadata {
|
|
213
222
|
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
214
|
-
next_cursor?: string;
|
|
223
|
+
next_cursor?: string | undefined;
|
|
215
224
|
}
|
|
225
|
+
export type SearchContextResponseFailedContentTypesItem =
|
|
226
|
+
| "messages"
|
|
227
|
+
| "files"
|
|
228
|
+
| "channels"
|
|
229
|
+
| "users";
|
|
230
|
+
/** Requested content types whose search failed. Their lists in `results` are empty because they could not be searched, not because nothing matched. Present only when at least one failed; see the `content_type_search_failed` warning. */
|
|
231
|
+
export type SearchContextResponseFailedContentTypesList =
|
|
232
|
+
Array<SearchContextResponseFailedContentTypesItem>;
|
|
216
233
|
export interface SearchContextResponse {
|
|
217
234
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
218
235
|
ok: boolean;
|
|
219
236
|
results: SearchContextResponseResults;
|
|
220
237
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
221
|
-
response_metadata?: SearchContextResponseResponseMetadata;
|
|
238
|
+
response_metadata?: SearchContextResponseResponseMetadata | undefined;
|
|
239
|
+
/** Requested content types whose search failed. Their lists in `results` are empty because they could not be searched, not because nothing matched. Present only when at least one failed; see the `content_type_search_failed` warning. */
|
|
240
|
+
failed_content_types: SearchContextResponseFailedContentTypesList;
|
|
222
241
|
}
|
|
223
242
|
export interface SearchInfoRequest {}
|
|
224
243
|
export interface SearchInfoResponse {
|
|
@@ -237,13 +256,13 @@ export interface SetStatusRequest {
|
|
|
237
256
|
/** Status of the specified bot user, e.g., 'is thinking...'. A two minute timeout applies, which will cause the status to be removed if no message has been sent. */
|
|
238
257
|
status: string;
|
|
239
258
|
/** The list of messages to rotate through as a loading indicator. Maximum of 10 messages. */
|
|
240
|
-
loading_messages?: SetStatusRequestLoadingMessagesList;
|
|
259
|
+
loading_messages?: SetStatusRequestLoadingMessagesList | undefined;
|
|
241
260
|
/** Emoji to use as the icon for this message. Overrides `icon_url`. */
|
|
242
|
-
icon_emoji?: string;
|
|
261
|
+
icon_emoji?: string | undefined;
|
|
243
262
|
/** Image URL to use as the icon for this message. */
|
|
244
|
-
icon_url?: string;
|
|
263
|
+
icon_url?: string | undefined;
|
|
245
264
|
/** The bot's username to display. */
|
|
246
|
-
username?: string;
|
|
265
|
+
username?: string | undefined;
|
|
247
266
|
}
|
|
248
267
|
export interface SetStatusResponse {
|
|
249
268
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -253,11 +272,11 @@ export interface SetSuggestedPromptsRequest {
|
|
|
253
272
|
/** Channel ID containing the assistant thread. */
|
|
254
273
|
channel_id: string;
|
|
255
274
|
/** Message timestamp of the thread to set suggested prompts for. If not provided, the prompts will be set for the latest message in the channel. */
|
|
256
|
-
thread_ts?: string;
|
|
275
|
+
thread_ts?: string | undefined;
|
|
257
276
|
/** Each prompt should be supplied with its `title` and `message` attribute. */
|
|
258
277
|
prompts: unknown;
|
|
259
278
|
/** Title for the list of provided prompts. For example: Suggested Prompts, Related Questions. */
|
|
260
|
-
title?: string;
|
|
279
|
+
title?: string | undefined;
|
|
261
280
|
}
|
|
262
281
|
export interface SetSuggestedPromptsResponse {
|
|
263
282
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -276,21 +295,32 @@ export interface SetTitleResponse {
|
|
|
276
295
|
ok: boolean;
|
|
277
296
|
}
|
|
278
297
|
export type SearchContextError = SlackOpError;
|
|
279
|
-
/** Searches messages, files, channels and users across your Slack organization. Required scopes -- user: `search:read.public`, `search:read.private`, `search:read.im`, `search:read.mpim`, `search:read.files`, `search:read.users`; bot: `search:read.public`, `search:read.files`, `search:read.users` Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- Internal error. - `rate_limited` -- Rate limited. - `missing_query` -- Missing query. - `query_too_long` -- Query too long. - `feature_not_enabled` -- The feature is not available on the current workspace. - `invalid_action_token` -- The `action_token` provided is not valid. - `invalid_cursor` -- The cursormark provided is not valid. - `context_channel_not_found` -- Specified `context_channel_id` is invalid or the user lacks permission to view it. - `missing_scope` -- The requested channel types are not allowed by the provided scopes. - `assistant_search_context_disabled` -- We're having issues returning your search results. Please wait and try again. See https://docs.slack.dev/reference/methods/assistant.search.context */
|
|
280
|
-
export const searchContext: API.
|
|
298
|
+
/** Searches messages, files, channels and users across your Slack organization. Required scopes -- user: `search:read.public`, `search:read.private`, `search:read.im`, `search:read.mpim`, `search:read.files`, `search:read.users`; bot: `search:read.public`, `search:read.files`, `search:read.users` Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `internal_error` -- Internal error. - `rate_limited` -- Rate limited. - `missing_query` -- Missing query. - `query_too_long` -- Query too long. - `feature_not_enabled` -- The feature is not available on the current workspace. - `invalid_action_token` -- The `action_token` provided is not valid, has expired, or was not issued to the app whose token accompanies it. - `invalid_cursor` -- The cursormark provided is not valid. - `context_channel_not_found` -- Specified `context_channel_id` is invalid or the user lacks permission to view it. - `missing_scope` -- The requested channel types are not allowed by the provided scopes. - `assistant_search_context_disabled` -- We're having issues returning your search results. Please wait and try again. - `restricted_action` -- The calling user is a guest, or is not an active member of the workspace. See https://docs.slack.dev/reference/methods/assistant.search.context */
|
|
299
|
+
export const searchContext: API.PaginatedOperationMethod<
|
|
281
300
|
SearchContextRequest,
|
|
282
301
|
SearchContextResponse,
|
|
283
302
|
SearchContextError,
|
|
284
|
-
SlackOpContext
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
303
|
+
SlackOpContext,
|
|
304
|
+
SearchContextResponseFailedContentTypesItem
|
|
305
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
306
|
+
() => ({
|
|
307
|
+
input: __S(1, __c0, 1) as any as S.Schema<SearchContextRequest>,
|
|
308
|
+
output: __S(14, __c0, 14) as any as S.Schema<SearchContextResponse>,
|
|
309
|
+
errors: [SlackError, SlackRateLimited],
|
|
310
|
+
protocol: SlackProtocol,
|
|
311
|
+
retry: Retry.Retry,
|
|
312
|
+
telemetry: TELEMETRY,
|
|
313
|
+
span: "SearchContext",
|
|
314
|
+
pagination: {
|
|
315
|
+
mode: "cursor",
|
|
316
|
+
inputToken: "cursor",
|
|
317
|
+
outputToken: "response_metadata.next_cursor",
|
|
318
|
+
items: "failed_content_types",
|
|
319
|
+
pageSize: "limit",
|
|
320
|
+
} as const,
|
|
321
|
+
}),
|
|
322
|
+
slackPaginate,
|
|
323
|
+
) as any;
|
|
294
324
|
|
|
295
325
|
export type SearchInfoError = SlackOpError;
|
|
296
326
|
/** Returns search capabilities on a given team. Required scopes -- user: `search:read.public`; bot: `search:read.public` Rate limit tier: 2 See https://docs.slack.dev/reference/methods/assistant.search.info */
|
|
@@ -452,6 +482,7 @@ function __c0(j: number): any {
|
|
|
452
482
|
purpose: S.optional(S.String),
|
|
453
483
|
permalink: S.String,
|
|
454
484
|
is_archived: S.Boolean,
|
|
485
|
+
channel_type: S.String,
|
|
455
486
|
}),
|
|
456
487
|
).annotate({ identifier: "SearchContextResponseResultsChannelsItem" });
|
|
457
488
|
case 9:
|
|
@@ -492,6 +523,7 @@ function __c0(j: number): any {
|
|
|
492
523
|
ok: S.Boolean,
|
|
493
524
|
results: __S(12, __c0, 12),
|
|
494
525
|
response_metadata: S.optional(__S(13, __c0, 13)),
|
|
526
|
+
failed_content_types: __S(0, __c0, 0),
|
|
495
527
|
}),
|
|
496
528
|
).annotate({ identifier: "SearchContextResponse" });
|
|
497
529
|
}
|
package/src/services/auth.ts
CHANGED
|
@@ -27,47 +27,47 @@ const TELEMETRY = {
|
|
|
27
27
|
|
|
28
28
|
export interface ListTeamsRequest {
|
|
29
29
|
/** The maximum number of workspaces to return. Must be a positive integer no larger than 1000. */
|
|
30
|
-
limit?: number;
|
|
30
|
+
limit?: number | undefined;
|
|
31
31
|
/** Set `cursor` to `next_cursor` returned by the previous call to list items in the next page. */
|
|
32
|
-
cursor?: string;
|
|
32
|
+
cursor?: string | undefined;
|
|
33
33
|
/** Whether to return icon paths for each workspace. An icon path represents a URI pointing to the image signifying the workspace. */
|
|
34
|
-
include_icon?: boolean;
|
|
34
|
+
include_icon?: boolean | undefined;
|
|
35
35
|
}
|
|
36
36
|
/** Paths to icons */
|
|
37
37
|
export interface ListTeamsResponseTeamsItemIcon {
|
|
38
|
-
image_34?: string;
|
|
39
|
-
image_44?: string;
|
|
40
|
-
image_68?: string;
|
|
41
|
-
image_88?: string;
|
|
42
|
-
image_102?: string;
|
|
43
|
-
image_132?: string;
|
|
44
|
-
image_230?: string;
|
|
45
|
-
image_default?: boolean;
|
|
38
|
+
image_34?: string | undefined;
|
|
39
|
+
image_44?: string | undefined;
|
|
40
|
+
image_68?: string | undefined;
|
|
41
|
+
image_88?: string | undefined;
|
|
42
|
+
image_102?: string | undefined;
|
|
43
|
+
image_132?: string | undefined;
|
|
44
|
+
image_230?: string | undefined;
|
|
45
|
+
image_default?: boolean | undefined;
|
|
46
46
|
}
|
|
47
47
|
export interface ListTeamsResponseTeamsItem {
|
|
48
48
|
/** ID of the workspace */
|
|
49
|
-
id?: string;
|
|
49
|
+
id?: string | undefined;
|
|
50
50
|
/** Name of the workspace */
|
|
51
51
|
name: string;
|
|
52
52
|
/** Paths to icons */
|
|
53
|
-
icon?: ListTeamsResponseTeamsItemIcon;
|
|
53
|
+
icon?: ListTeamsResponseTeamsItemIcon | undefined;
|
|
54
54
|
}
|
|
55
55
|
export type ListTeamsResponseTeamsList = Array<ListTeamsResponseTeamsItem>;
|
|
56
56
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
57
57
|
export interface ListTeamsResponseResponseMetadata {
|
|
58
58
|
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
59
|
-
next_cursor?: string;
|
|
59
|
+
next_cursor?: string | undefined;
|
|
60
60
|
}
|
|
61
61
|
export interface ListTeamsResponse {
|
|
62
62
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
63
63
|
ok: boolean;
|
|
64
64
|
teams: ListTeamsResponseTeamsList;
|
|
65
65
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
66
|
-
response_metadata?: ListTeamsResponseResponseMetadata;
|
|
66
|
+
response_metadata?: ListTeamsResponseResponseMetadata | undefined;
|
|
67
67
|
}
|
|
68
68
|
export interface RevokeAuthRequest {
|
|
69
69
|
/** Setting this parameter to `1` triggers a _testing mode_ where the specified token will not actually be revoked. */
|
|
70
|
-
test?: boolean;
|
|
70
|
+
test?: boolean | undefined;
|
|
71
71
|
}
|
|
72
72
|
export interface RevokeAuthResponse {
|
|
73
73
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -78,17 +78,17 @@ export interface TestAuthRequest {}
|
|
|
78
78
|
export interface TestAuthResponse {
|
|
79
79
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
80
80
|
ok: boolean;
|
|
81
|
-
user_id?: string;
|
|
82
|
-
url?: string;
|
|
83
|
-
team_id?: string;
|
|
84
|
-
user?: string | null;
|
|
85
|
-
team?: string;
|
|
86
|
-
app_id?: string;
|
|
87
|
-
app_name?: string;
|
|
88
|
-
enterprise_id?: string;
|
|
89
|
-
bot_id?: string;
|
|
90
|
-
is_enterprise_install?: boolean;
|
|
91
|
-
expires_in?: number | null;
|
|
81
|
+
user_id?: string | undefined;
|
|
82
|
+
url?: string | undefined;
|
|
83
|
+
team_id?: string | undefined;
|
|
84
|
+
user?: string | null | undefined;
|
|
85
|
+
team?: string | undefined;
|
|
86
|
+
app_id?: string | undefined;
|
|
87
|
+
app_name?: string | undefined;
|
|
88
|
+
enterprise_id?: string | undefined;
|
|
89
|
+
bot_id?: string | undefined;
|
|
90
|
+
is_enterprise_install?: boolean | undefined;
|
|
91
|
+
expires_in?: number | null | undefined;
|
|
92
92
|
}
|
|
93
93
|
export type ListTeamsError = SlackOpError;
|
|
94
94
|
/** Obtain a full list of workspaces your org-wide app has been approved for. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_cursor` -- Invalid cursor. - `invalid_limit` -- The value passed for `limit` was not valid. - `invalid_auth` -- The token doesn't have access to this endpoint. - `internal_error` -- There was an internal error. See https://docs.slack.dev/reference/methods/auth.teams.list */
|
package/src/services/blocks.ts
CHANGED
|
@@ -30,11 +30,11 @@ export type ValidateBlockRequestBlocksCase1List = Array<ValidateBlockRequestBloc
|
|
|
30
30
|
export type ValidateBlockRequestBlocks = string | ValidateBlockRequestBlocksCase1List;
|
|
31
31
|
export interface ValidateBlockRequest {
|
|
32
32
|
/** A JSON-encoded array of [structured blocks](/reference/block-kit/blocks). Provide exactly one of `blocks`, `view`, or `message`. */
|
|
33
|
-
blocks?: ValidateBlockRequestBlocks;
|
|
33
|
+
blocks?: ValidateBlockRequestBlocks | undefined;
|
|
34
34
|
/** A JSON-encoded [message payload](/messaging/creating-interactive-messages) to validate. Provide exactly one of `blocks`, `view`, or `message`. */
|
|
35
|
-
message?: string;
|
|
35
|
+
message?: string | undefined;
|
|
36
36
|
/** A JSON-encoded [view payload](/reference/views) to validate. Provide exactly one of `blocks`, `view`, or `message`. */
|
|
37
|
-
view?: string;
|
|
37
|
+
view?: string | undefined;
|
|
38
38
|
}
|
|
39
39
|
export interface ValidateBlockResponse {
|
|
40
40
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -28,21 +28,21 @@ const TELEMETRY = {
|
|
|
28
28
|
export type AddBookmarkRequestAccessLevel = "read" | "write";
|
|
29
29
|
export interface AddBookmarkRequest {
|
|
30
30
|
/** Channel to add bookmark in. Required for public channels. */
|
|
31
|
-
channel_id?: string;
|
|
31
|
+
channel_id?: string | undefined;
|
|
32
32
|
/** Title for the bookmark. */
|
|
33
33
|
title: string;
|
|
34
34
|
/** Link to bookmark. */
|
|
35
|
-
link?: string;
|
|
35
|
+
link?: string | undefined;
|
|
36
36
|
/** Type of the bookmark i.e link. */
|
|
37
37
|
type: string;
|
|
38
38
|
/** Emoji tag to apply to the link. */
|
|
39
|
-
emoji?: string;
|
|
39
|
+
emoji?: string | undefined;
|
|
40
40
|
/** ID of the entity being bookmarked. Only applies to message and file types. */
|
|
41
|
-
entity_id?: string;
|
|
41
|
+
entity_id?: string | undefined;
|
|
42
42
|
/** The level that we are setting the file's permission to (read or write) */
|
|
43
|
-
access_level?: AddBookmarkRequestAccessLevel | (string & {});
|
|
43
|
+
access_level?: AddBookmarkRequestAccessLevel | (string & {}) | undefined;
|
|
44
44
|
/** Id of this bookmark's parent */
|
|
45
|
-
parent_id?: string;
|
|
45
|
+
parent_id?: string | undefined;
|
|
46
46
|
}
|
|
47
47
|
export interface AddBookmarkResponse {
|
|
48
48
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -51,15 +51,15 @@ export interface AddBookmarkResponse {
|
|
|
51
51
|
}
|
|
52
52
|
export interface EditBookmarkRequest {
|
|
53
53
|
/** Channel to update bookmark in. Required for public channels. */
|
|
54
|
-
channel_id?: string;
|
|
54
|
+
channel_id?: string | undefined;
|
|
55
55
|
/** Bookmark to update. Required for public channels. */
|
|
56
|
-
bookmark_id?: string;
|
|
56
|
+
bookmark_id?: string | undefined;
|
|
57
57
|
/** Title for the bookmark. */
|
|
58
|
-
title?: string;
|
|
58
|
+
title?: string | undefined;
|
|
59
59
|
/** Link to bookmark. */
|
|
60
|
-
link?: string;
|
|
60
|
+
link?: string | undefined;
|
|
61
61
|
/** Emoji tag to apply to the link. */
|
|
62
|
-
emoji?: string;
|
|
62
|
+
emoji?: string | undefined;
|
|
63
63
|
}
|
|
64
64
|
export interface EditBookmarkResponse {
|
|
65
65
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -68,7 +68,7 @@ export interface EditBookmarkResponse {
|
|
|
68
68
|
}
|
|
69
69
|
export interface ListBookmarksRequest {
|
|
70
70
|
/** Channel to list bookmarks in. Required for public channels. */
|
|
71
|
-
channel_id?: string;
|
|
71
|
+
channel_id?: string | undefined;
|
|
72
72
|
}
|
|
73
73
|
export type ListBookmarksResponseBookmarksList = Array<unknown>;
|
|
74
74
|
export interface ListBookmarksResponse {
|
|
@@ -78,18 +78,18 @@ export interface ListBookmarksResponse {
|
|
|
78
78
|
}
|
|
79
79
|
export interface RemoveBookmarkRequest {
|
|
80
80
|
/** Channel to remove bookmark. Required for public channels. */
|
|
81
|
-
channel_id?: string;
|
|
81
|
+
channel_id?: string | undefined;
|
|
82
82
|
/** Bookmark to remove. Required for public channels. */
|
|
83
|
-
bookmark_id?: string;
|
|
83
|
+
bookmark_id?: string | undefined;
|
|
84
84
|
/** Quip section ID to unbookmark */
|
|
85
|
-
quip_section_id?: string;
|
|
85
|
+
quip_section_id?: string | undefined;
|
|
86
86
|
}
|
|
87
87
|
export interface RemoveBookmarkResponse {
|
|
88
88
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
89
89
|
ok: boolean;
|
|
90
90
|
}
|
|
91
91
|
export type AddBookmarkError = SlackOpError;
|
|
92
|
-
/** Add bookmark to a channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` -- File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` -- File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` -- Channel cannot be found. - `file_already_added` -- The file has already been added to the folder. - `file_not_found` -- File cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_app_action_type` -- App action type is not valid. - `invalid_shortcut_type` -- Shortcut type is not valid. - `invalid_child_type` -- Child type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` -- Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` -- Parent type is not valid. - `
|
|
92
|
+
/** Add bookmark to a channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `cannot_bookmark_from_external_org` -- File is an external file and cannot be bookmarked. - `cannot_bookmark_restricted_sharing_enabled` -- File has restricted sharing enabled and cannot be bookmarked. - `channel_not_found` -- Channel cannot be found. - `file_already_added` -- The file has already been added to the folder. - `file_not_found` -- File cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_app_action_type` -- App action type is not valid. - `invalid_shortcut_type` -- Shortcut type is not valid. - `invalid_child_type` -- Child type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_entity_id` -- Invalid entity_id, file or message type bookmark should have original file or message ID. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `invalid_parent_type` -- Parent type is not valid. - `parent_bookmark_disabled` -- Parent bookmark feature flag is off. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot add workflow bookmarks to this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications - `too_many_bookmarks` -- Bookmark limit reached for channel. - `too_many_tabs` -- tab limit reached for channel. - `too_many_requests` -- Too many concurrent requests. Please retry. See https://docs.slack.dev/reference/methods/bookmarks.add */
|
|
93
93
|
export const addBookmark: API.OperationMethod<
|
|
94
94
|
AddBookmarkRequest,
|
|
95
95
|
AddBookmarkResponse,
|
|
@@ -106,7 +106,7 @@ export const addBookmark: API.OperationMethod<
|
|
|
106
106
|
}));
|
|
107
107
|
|
|
108
108
|
export type EditBookmarkError = SlackOpError;
|
|
109
|
-
/** Edit bookmark. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `not_found` -- Bookmark cannot be found. - `
|
|
109
|
+
/** Edit bookmark. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `invalid_emoji` -- Invalid emoji, does not follow the pattern of a valid emoji name. - `invalid_link` -- Invalid link, link should begin with either http:// or https://. - `not_found` -- Bookmark cannot be found. - `parent_with_link` -- Parent bookmark should not have link. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot edit workflow bookmarks in this channel. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled File uploads in all Slack Connect communications - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip sharing in Slack Connect channels - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect communications See https://docs.slack.dev/reference/methods/bookmarks.edit */
|
|
110
110
|
export const editBookmark: API.OperationMethod<
|
|
111
111
|
EditBookmarkRequest,
|
|
112
112
|
EditBookmarkResponse,
|
|
@@ -123,7 +123,7 @@ export const editBookmark: API.OperationMethod<
|
|
|
123
123
|
}));
|
|
124
124
|
|
|
125
125
|
export type ListBookmarksError = SlackOpError;
|
|
126
|
-
/** List bookmark for the channel. Required scopes -- bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found.
|
|
126
|
+
/** List bookmark for the channel. Required scopes -- bot: `bookmarks:read`; user: `bookmarks:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. See https://docs.slack.dev/reference/methods/bookmarks.list */
|
|
127
127
|
export const listBookmarks: API.OperationMethod<
|
|
128
128
|
ListBookmarksRequest,
|
|
129
129
|
ListBookmarksResponse,
|
|
@@ -140,7 +140,7 @@ export const listBookmarks: API.OperationMethod<
|
|
|
140
140
|
}));
|
|
141
141
|
|
|
142
142
|
export type RemoveBookmarkError = SlackOpError;
|
|
143
|
-
/** Remove bookmark from the channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `user_not_found` -- User cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `not_found` -- Bookmark cannot be found. - `
|
|
143
|
+
/** Remove bookmark from the channel. Required scopes -- bot: `bookmarks:write`; user: `bookmarks:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `access_denied` -- Actor lacks access to the requested resource. - `channel_not_found` -- Channel cannot be found. - `user_not_found` -- User cannot be found. - `invalid_bookmark_type` -- Bookmark type is not valid. - `not_found` -- Bookmark cannot be found. - `permission_denied` -- No permission to perform this operation. - `restricted_action` -- Members from an external organization cannot remove workflow bookmarks from this channel. See https://docs.slack.dev/reference/methods/bookmarks.remove */
|
|
144
144
|
export const removeBookmark: API.OperationMethod<
|
|
145
145
|
RemoveBookmarkRequest,
|
|
146
146
|
RemoveBookmarkResponse,
|
package/src/services/bots.ts
CHANGED
|
@@ -26,48 +26,48 @@ const TELEMETRY = {
|
|
|
26
26
|
|
|
27
27
|
export interface BotsInfoRequest {
|
|
28
28
|
/** Bot user to get info on */
|
|
29
|
-
bot?: string;
|
|
29
|
+
bot?: string | undefined;
|
|
30
30
|
/** encoded team id or enterprise id where the bot exists, required if org token is used */
|
|
31
|
-
team_id?: string;
|
|
31
|
+
team_id?: string | undefined;
|
|
32
32
|
}
|
|
33
33
|
export interface BotsInfoResponseBotsItemIcons {
|
|
34
|
-
emoji?: string;
|
|
35
|
-
image_36?: string;
|
|
36
|
-
image_48?: string;
|
|
37
|
-
image_64?: string;
|
|
38
|
-
image_72?: string;
|
|
34
|
+
emoji?: string | undefined;
|
|
35
|
+
image_36?: string | undefined;
|
|
36
|
+
image_48?: string | undefined;
|
|
37
|
+
image_64?: string | undefined;
|
|
38
|
+
image_72?: string | undefined;
|
|
39
39
|
}
|
|
40
40
|
export interface BotsInfoResponseBotsItem {
|
|
41
41
|
updated: number;
|
|
42
|
-
name?: string;
|
|
43
|
-
icons?: BotsInfoResponseBotsItemIcons;
|
|
42
|
+
name?: string | undefined;
|
|
43
|
+
icons?: BotsInfoResponseBotsItemIcons | undefined;
|
|
44
44
|
deleted: boolean;
|
|
45
|
-
app_id?: string;
|
|
45
|
+
app_id?: string | undefined;
|
|
46
46
|
id: string;
|
|
47
|
-
is_workflow_bot?: boolean;
|
|
48
|
-
is_connector_bot?: boolean;
|
|
49
|
-
is_legacy_workflow_bot?: boolean;
|
|
50
|
-
user_id?: string;
|
|
47
|
+
is_workflow_bot?: boolean | undefined;
|
|
48
|
+
is_connector_bot?: boolean | undefined;
|
|
49
|
+
is_legacy_workflow_bot?: boolean | undefined;
|
|
50
|
+
user_id?: string | undefined;
|
|
51
51
|
}
|
|
52
52
|
export type BotsInfoResponseBotsList = Array<BotsInfoResponseBotsItem>;
|
|
53
53
|
export type BotsInfoResponseBotIcons = BotsInfoResponseBotsItemIcons;
|
|
54
54
|
export interface BotsInfoResponseBot {
|
|
55
55
|
updated: number;
|
|
56
|
-
user_id?: string;
|
|
57
|
-
name?: string;
|
|
58
|
-
icons?: BotsInfoResponseBotsItemIcons;
|
|
56
|
+
user_id?: string | undefined;
|
|
57
|
+
name?: string | undefined;
|
|
58
|
+
icons?: BotsInfoResponseBotsItemIcons | undefined;
|
|
59
59
|
deleted: boolean;
|
|
60
|
-
app_id?: string;
|
|
60
|
+
app_id?: string | undefined;
|
|
61
61
|
id: string;
|
|
62
|
-
is_workflow_bot?: boolean;
|
|
63
|
-
is_connector_bot?: boolean;
|
|
64
|
-
is_legacy_workflow_bot?: boolean;
|
|
62
|
+
is_workflow_bot?: boolean | undefined;
|
|
63
|
+
is_connector_bot?: boolean | undefined;
|
|
64
|
+
is_legacy_workflow_bot?: boolean | undefined;
|
|
65
65
|
}
|
|
66
66
|
export interface BotsInfoResponse {
|
|
67
67
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
68
68
|
ok: boolean;
|
|
69
|
-
bots?: BotsInfoResponseBotsList;
|
|
70
|
-
bot?: BotsInfoResponseBot;
|
|
69
|
+
bots?: BotsInfoResponseBotsList | undefined;
|
|
70
|
+
bot?: BotsInfoResponseBot | undefined;
|
|
71
71
|
}
|
|
72
72
|
export type BotsInfoError = SlackOpError;
|
|
73
73
|
/** Gets information about a bot user. Required scopes -- bot: `users:read`; user: `users:read` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bot_not_found` -- Value passed for `bot` was invalid. - `bots_not_found` -- At least one value passed for `bots` was invalid. - `missing_argument` -- A required argument is missing. - `team_not_found` -- Value passed for `team_id` was invalid. See https://docs.slack.dev/reference/methods/bots.info */
|