@distilled.cloud/slack 1.0.0-rc.17 → 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/credentials.d.ts +2 -1
- package/lib/credentials.d.ts.map +1 -1
- package/lib/index.d.ts +3 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.lazy.js.map +1 -1
- package/lib/protocol.d.ts +3 -2
- 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 -139
- 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 +34 -33
- 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 +39 -38
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts.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 +30 -1
- 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.d.ts.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 +3 -1
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/slackbot.js +1 -0
- package/package.json +8 -7
- package/src/credentials.ts +3 -2
- package/src/index.ts +3 -4
- package/src/protocol.ts +23 -21
- package/src/services/admin.ts +1882 -1034
- package/src/services/agents.ts +128 -103
- package/src/services/api.ts +17 -2
- package/src/services/apps.ts +133 -74
- package/src/services/assistant.ts +109 -54
- package/src/services/auth.ts +46 -27
- package/src/services/blocks.ts +18 -3
- package/src/services/bookmarks.ts +40 -19
- package/src/services/bots.ts +38 -23
- package/src/services/calls.ts +35 -10
- package/src/services/canvases.ts +77 -46
- package/src/services/chat.ts +142 -103
- package/src/services/conversations.ts +195 -115
- package/src/services/dialog.ts +15 -0
- package/src/services/dnd.ts +37 -14
- package/src/services/emoji.ts +21 -6
- package/src/services/entity.ts +33 -14
- package/src/services/files.ts +149 -106
- package/src/services/functions.ts +66 -37
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +86 -46
- package/src/services/migration.ts +18 -3
- package/src/services/oauth.ts +127 -102
- package/src/services/openid.ts +57 -40
- package/src/services/pins.ts +28 -9
- package/src/services/reactions.ts +44 -23
- package/src/services/reminders.ts +31 -8
- package/src/services/rtm.ts +28 -11
- package/src/services/search.ts +142 -130
- package/src/services/slackbot.ts +766 -0
- package/src/services/stars.ts +35 -16
- package/src/services/team.ts +73 -37
- package/src/services/tooling.ts +15 -0
- package/src/services/usergroups.ts +57 -30
- package/src/services/users.ts +76 -37
- package/src/services/views.ts +30 -9
- package/src/services/workflows.ts +45 -16
|
@@ -12,19 +12,32 @@ const __s: any[] = [];
|
|
|
12
12
|
|
|
13
13
|
export type { SlackOpError, SlackOpContext };
|
|
14
14
|
|
|
15
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
16
|
+
const TELEMETRY = {
|
|
17
|
+
system: "slack-api",
|
|
18
|
+
responseHeaders: [
|
|
19
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
20
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
21
|
+
{ header: "x-slack-req-id", name: "http.response.header.x-slack-req-id", transform: "list" },
|
|
22
|
+
],
|
|
23
|
+
prefix: "Slack",
|
|
24
|
+
service: "Conversations",
|
|
25
|
+
propagate: "w3c",
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
15
28
|
export interface AcceptSharedInviteRequest {
|
|
16
29
|
/** Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take. */
|
|
17
30
|
channel_name: string;
|
|
18
31
|
/** Whether the channel should be private. */
|
|
19
|
-
is_private?: boolean;
|
|
32
|
+
is_private?: boolean | undefined;
|
|
20
33
|
/** Whether you'd like to use your workspace's free trial to begin using Slack Connect. */
|
|
21
|
-
free_trial_accepted?: boolean;
|
|
34
|
+
free_trial_accepted?: boolean | undefined;
|
|
22
35
|
/** ID of the invite that you'd like to accept. Must provide either `invite_id` or `channel_id`. See the [`shared_channel_invite_received`](/reference/events/shared_channel_invite_received) event payload for more details on how to retrieve the ID of the invitation. */
|
|
23
|
-
invite_id?: string;
|
|
36
|
+
invite_id?: string | undefined;
|
|
24
37
|
/** ID of the channel that you'd like to accept. Must provide either `invite_id` or `channel_id`. */
|
|
25
|
-
channel_id?: string;
|
|
38
|
+
channel_id?: string | undefined;
|
|
26
39
|
/** The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the `team_id` argument is required. */
|
|
27
|
-
team_id?: string;
|
|
40
|
+
team_id?: string | undefined;
|
|
28
41
|
}
|
|
29
42
|
export interface AcceptSharedInviteResponse {
|
|
30
43
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -47,24 +60,24 @@ export interface ApproveRequestSharedInviteRequest {
|
|
|
47
60
|
/** ID of the requested shared channel invite to approve. */
|
|
48
61
|
invite_id: string;
|
|
49
62
|
/** Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite. */
|
|
50
|
-
is_external_limited?: boolean;
|
|
63
|
+
is_external_limited?: boolean | undefined;
|
|
51
64
|
/** Optional channel_id to which external user will be invited to. Will override the value on the requested invite. */
|
|
52
|
-
channel_id?: string;
|
|
65
|
+
channel_id?: string | undefined;
|
|
53
66
|
/** Object describing the text to send along with the invite. If this object is specified, both `text` and `is_override` are required properties. If `is_override` is set to `true`, `text` will override the original invitation message. Otherwise, `text` will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If `is_override` is set to `false`, the length of `text` and the user specified message on the invite request in total must be less than 560 characters. */
|
|
54
|
-
message?: ApproveRequestSharedInviteRequestMessage;
|
|
67
|
+
message?: ApproveRequestSharedInviteRequestMessage | undefined;
|
|
55
68
|
}
|
|
56
69
|
export interface ApproveRequestSharedInviteResponse {
|
|
57
70
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
58
71
|
ok: boolean;
|
|
59
72
|
invite_id: string;
|
|
60
|
-
confirmation_code?: string;
|
|
61
|
-
url?: string;
|
|
73
|
+
confirmation_code?: string | undefined;
|
|
74
|
+
url?: string | undefined;
|
|
62
75
|
}
|
|
63
76
|
export interface ApproveSharedInviteRequest {
|
|
64
77
|
/** ID of the shared channel invite to approve */
|
|
65
78
|
invite_id: string;
|
|
66
79
|
/** The team or enterprise ID of the receiving party involved in the invitation you are approving */
|
|
67
|
-
target_team?: string;
|
|
80
|
+
target_team?: string | undefined;
|
|
68
81
|
}
|
|
69
82
|
export interface ApproveSharedInviteResponse {
|
|
70
83
|
ok: boolean;
|
|
@@ -84,30 +97,30 @@ export interface ConversationsCloseRequest {
|
|
|
84
97
|
export interface ConversationsCloseResponse {
|
|
85
98
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
86
99
|
ok: boolean;
|
|
87
|
-
already_closed?: boolean;
|
|
88
|
-
no_op?: boolean;
|
|
100
|
+
already_closed?: boolean | undefined;
|
|
101
|
+
no_op?: boolean | undefined;
|
|
89
102
|
}
|
|
90
103
|
export interface ConversationsHistoryRequest {
|
|
91
104
|
/** Conversation ID to fetch history for. */
|
|
92
105
|
channel: string;
|
|
93
106
|
/** 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. */
|
|
94
|
-
cursor?: string;
|
|
107
|
+
cursor?: string | undefined;
|
|
95
108
|
/** Return all metadata associated with this message. */
|
|
96
|
-
include_all_metadata?: boolean;
|
|
109
|
+
include_all_metadata?: boolean | undefined;
|
|
97
110
|
/** Include messages with `oldest` or `latest` timestamps in results. Ignored unless either timestamp is specified. */
|
|
98
|
-
inclusive?: boolean;
|
|
111
|
+
inclusive?: boolean | undefined;
|
|
99
112
|
/** Only messages before this Unix timestamp will be included in results. Default is the current time. */
|
|
100
|
-
latest?: string;
|
|
113
|
+
latest?: string | undefined;
|
|
101
114
|
/** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the conversation history hasn't been reached. Maximum of 999. */
|
|
102
|
-
limit?: number;
|
|
115
|
+
limit?: number | undefined;
|
|
103
116
|
/** Only messages after this Unix timestamp will be included in results. */
|
|
104
|
-
oldest?: string;
|
|
117
|
+
oldest?: string | undefined;
|
|
105
118
|
}
|
|
106
119
|
export type ConversationsHistoryResponseMessagesList = Array<unknown>;
|
|
107
120
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
108
121
|
export interface ConversationsHistoryResponseResponseMetadata {
|
|
109
122
|
/** Cursor for the next page -- pass as `cursor` on the next call. */
|
|
110
|
-
next_cursor?: string;
|
|
123
|
+
next_cursor?: string | undefined;
|
|
111
124
|
}
|
|
112
125
|
export type ConversationsHistoryResponseUsersMap = { [key: string]: unknown | undefined };
|
|
113
126
|
export type ConversationsHistoryResponseDeletedList = Array<string>;
|
|
@@ -124,50 +137,52 @@ export interface ConversationsHistoryResponse {
|
|
|
124
137
|
ok: boolean;
|
|
125
138
|
messages: ConversationsHistoryResponseMessagesList;
|
|
126
139
|
has_more: boolean;
|
|
127
|
-
pin_count?: number;
|
|
140
|
+
pin_count?: number | undefined;
|
|
128
141
|
channel_actions_ts: unknown;
|
|
129
142
|
channel_actions_count: number;
|
|
130
143
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
131
|
-
response_metadata?: ConversationsHistoryResponseResponseMetadata;
|
|
132
|
-
oldest?: string;
|
|
133
|
-
is_limited?: boolean;
|
|
134
|
-
latest?: string;
|
|
135
|
-
unread_count_display?: number;
|
|
136
|
-
users?: ConversationsHistoryResponseUsersMap;
|
|
137
|
-
deleted?: ConversationsHistoryResponseDeletedList;
|
|
138
|
-
mutation_timestamps?: ConversationsHistoryResponseMutationTimestamps;
|
|
139
|
-
deleted_overflow?: boolean;
|
|
140
|
-
warnings?: ConversationsHistoryResponseWarningsList;
|
|
141
|
-
next_ts?: number;
|
|
142
|
-
latest_updates?: ConversationsHistoryResponseLatestUpdatesMap;
|
|
143
|
-
unchanged_messages?: ConversationsHistoryResponseUnchangedMessagesList;
|
|
144
|
+
response_metadata?: ConversationsHistoryResponseResponseMetadata | undefined;
|
|
145
|
+
oldest?: string | undefined;
|
|
146
|
+
is_limited?: boolean | undefined;
|
|
147
|
+
latest?: string | undefined;
|
|
148
|
+
unread_count_display?: number | undefined;
|
|
149
|
+
users?: ConversationsHistoryResponseUsersMap | undefined;
|
|
150
|
+
deleted?: ConversationsHistoryResponseDeletedList | undefined;
|
|
151
|
+
mutation_timestamps?: ConversationsHistoryResponseMutationTimestamps | undefined;
|
|
152
|
+
deleted_overflow?: boolean | undefined;
|
|
153
|
+
warnings?: ConversationsHistoryResponseWarningsList | undefined;
|
|
154
|
+
next_ts?: number | undefined;
|
|
155
|
+
latest_updates?: ConversationsHistoryResponseLatestUpdatesMap | undefined;
|
|
156
|
+
unchanged_messages?: ConversationsHistoryResponseUnchangedMessagesList | undefined;
|
|
144
157
|
/** Unix timestamp of when the user joined the channel */
|
|
145
|
-
date_joined?: number;
|
|
158
|
+
date_joined?: number | undefined;
|
|
146
159
|
}
|
|
147
160
|
export interface ConversationsInfoRequest {
|
|
148
161
|
/** Conversation ID to learn more about */
|
|
149
162
|
channel: string;
|
|
150
163
|
/** Set this to `true` to receive the locale for this conversation. Defaults to `false` */
|
|
151
|
-
include_locale?: boolean;
|
|
164
|
+
include_locale?: boolean | undefined;
|
|
152
165
|
/** Set to `true` to include the member count for the specified conversation. Defaults to `false` */
|
|
153
|
-
include_num_members?: boolean;
|
|
166
|
+
include_num_members?: boolean | undefined;
|
|
154
167
|
}
|
|
155
168
|
export interface ConversationsInfoResponse {
|
|
156
169
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
157
170
|
ok: boolean;
|
|
158
|
-
app_home?: unknown;
|
|
171
|
+
app_home?: unknown | undefined;
|
|
159
172
|
channel: unknown;
|
|
160
|
-
home_view?: unknown | null;
|
|
173
|
+
home_view?: unknown | null | undefined;
|
|
161
174
|
}
|
|
162
175
|
export interface ConversationsKickRequest {
|
|
163
176
|
/** ID of conversation to remove user from. */
|
|
164
177
|
channel: string;
|
|
165
178
|
/** User ID to be removed. */
|
|
166
|
-
user?: string;
|
|
179
|
+
user?: string | undefined;
|
|
167
180
|
}
|
|
181
|
+
export type ConversationsKickResponseErrorsMap = { [key: string]: unknown | undefined };
|
|
168
182
|
export interface ConversationsKickResponse {
|
|
169
183
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
170
184
|
ok: boolean;
|
|
185
|
+
errors?: ConversationsKickResponseErrorsMap | undefined;
|
|
171
186
|
}
|
|
172
187
|
export interface ConversationsMarkRequest {
|
|
173
188
|
/** Channel or conversation to set the read cursor for. */
|
|
@@ -183,9 +198,9 @@ export interface ConversationsMembersRequest {
|
|
|
183
198
|
/** ID of the conversation to retrieve members for */
|
|
184
199
|
channel: string;
|
|
185
200
|
/** 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. */
|
|
186
|
-
cursor?: string;
|
|
201
|
+
cursor?: string | undefined;
|
|
187
202
|
/** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. */
|
|
188
|
-
limit?: number;
|
|
203
|
+
limit?: number | undefined;
|
|
189
204
|
}
|
|
190
205
|
export type ConversationsMembersResponseMembersList = Array<string>;
|
|
191
206
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
@@ -196,42 +211,42 @@ export interface ConversationsMembersResponse {
|
|
|
196
211
|
ok: boolean;
|
|
197
212
|
members: ConversationsMembersResponseMembersList;
|
|
198
213
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
199
|
-
response_metadata?: ConversationsHistoryResponseResponseMetadata;
|
|
214
|
+
response_metadata?: ConversationsHistoryResponseResponseMetadata | undefined;
|
|
200
215
|
}
|
|
201
216
|
export interface ConversationsOpenRequest {
|
|
202
217
|
/** Resume a conversation by supplying an `im` or `mpim`'s ID. Or provide the `users` field instead. */
|
|
203
|
-
channel?: string | null;
|
|
218
|
+
channel?: string | null | undefined;
|
|
204
219
|
/** Boolean, indicates you want the full IM channel definition in the response. */
|
|
205
|
-
return_im?: boolean;
|
|
220
|
+
return_im?: boolean | undefined;
|
|
206
221
|
/** Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a `channel` when not supplying `users`. */
|
|
207
|
-
users?: string;
|
|
222
|
+
users?: string | undefined;
|
|
208
223
|
/** Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm. */
|
|
209
|
-
prevent_creation?: boolean;
|
|
224
|
+
prevent_creation?: boolean | undefined;
|
|
210
225
|
}
|
|
211
226
|
export interface ConversationsOpenResponse {
|
|
212
227
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
213
228
|
ok: boolean;
|
|
214
|
-
already_open?: boolean;
|
|
215
|
-
no_op?: boolean;
|
|
216
|
-
channel?: unknown;
|
|
217
|
-
app_home?: unknown;
|
|
218
|
-
home_view?: unknown | null;
|
|
229
|
+
already_open?: boolean | undefined;
|
|
230
|
+
no_op?: boolean | undefined;
|
|
231
|
+
channel?: unknown | undefined;
|
|
232
|
+
app_home?: unknown | undefined;
|
|
233
|
+
home_view?: unknown | null | undefined;
|
|
219
234
|
}
|
|
220
235
|
export interface ConversationsRepliesRequest {
|
|
221
236
|
/** Conversation ID to fetch thread from. */
|
|
222
237
|
channel: string;
|
|
223
238
|
/** 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. */
|
|
224
|
-
cursor?: string;
|
|
239
|
+
cursor?: string | undefined;
|
|
225
240
|
/** Return all metadata associated with this message. */
|
|
226
|
-
include_all_metadata?: boolean;
|
|
241
|
+
include_all_metadata?: boolean | undefined;
|
|
227
242
|
/** Include messages with `oldest` or `latest` timestamps in results. Ignored unless either timestamp is specified. */
|
|
228
|
-
inclusive?: boolean;
|
|
243
|
+
inclusive?: boolean | undefined;
|
|
229
244
|
/** Only messages before this Unix timestamp will be included in results. */
|
|
230
|
-
latest?: string;
|
|
245
|
+
latest?: string | undefined;
|
|
231
246
|
/** The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. */
|
|
232
|
-
limit?: number;
|
|
247
|
+
limit?: number | undefined;
|
|
233
248
|
/** Only messages after this Unix timestamp will be included in results. */
|
|
234
|
-
oldest?: string;
|
|
249
|
+
oldest?: string | undefined;
|
|
235
250
|
/** Unique identifier of either a thread's parent message or a message in the thread. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message. */
|
|
236
251
|
ts: string;
|
|
237
252
|
}
|
|
@@ -244,20 +259,20 @@ export type ConversationsRepliesResponseResponseMetadata =
|
|
|
244
259
|
export interface ConversationsRepliesResponse {
|
|
245
260
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
246
261
|
ok: boolean;
|
|
247
|
-
has_more?: boolean;
|
|
262
|
+
has_more?: boolean | undefined;
|
|
248
263
|
messages: ConversationsRepliesResponseMessagesList;
|
|
249
|
-
latest_updates?: ConversationsRepliesResponseLatestUpdatesMap;
|
|
250
|
-
unchanged_messages?: ConversationsRepliesResponseUnchangedMessagesList;
|
|
264
|
+
latest_updates?: ConversationsRepliesResponseLatestUpdatesMap | undefined;
|
|
265
|
+
unchanged_messages?: ConversationsRepliesResponseUnchangedMessagesList | undefined;
|
|
251
266
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
252
|
-
response_metadata?: ConversationsHistoryResponseResponseMetadata;
|
|
267
|
+
response_metadata?: ConversationsHistoryResponseResponseMetadata | undefined;
|
|
253
268
|
}
|
|
254
269
|
export interface CreateCanvaseRequest {
|
|
255
270
|
/** Channel ID of the channel the canvas will be tabbed in. */
|
|
256
271
|
channel_id: string;
|
|
257
272
|
/** Structure describing the type and value of the content to create. The markdown content is limited to 1 MiB (1,048,576 characters). */
|
|
258
|
-
document_content?: unknown;
|
|
273
|
+
document_content?: unknown | undefined;
|
|
259
274
|
/** Title of the newly created canvas */
|
|
260
|
-
title?: string;
|
|
275
|
+
title?: string | undefined;
|
|
261
276
|
}
|
|
262
277
|
export interface CreateCanvaseResponse {
|
|
263
278
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -267,11 +282,11 @@ export interface CreateCanvaseResponse {
|
|
|
267
282
|
}
|
|
268
283
|
export interface CreateConversationRequest {
|
|
269
284
|
/** Create a private channel instead of a public one */
|
|
270
|
-
is_private?: boolean;
|
|
285
|
+
is_private?: boolean | undefined;
|
|
271
286
|
/** Name of the public or private channel to create */
|
|
272
287
|
name: string;
|
|
273
288
|
/** encoded team id to create the channel in, required if org token is used */
|
|
274
|
-
team_id?: string | null;
|
|
289
|
+
team_id?: string | null | undefined;
|
|
275
290
|
}
|
|
276
291
|
export interface CreateConversationResponse {
|
|
277
292
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
@@ -282,7 +297,7 @@ export interface InviteConversationRequest {
|
|
|
282
297
|
/** The ID of the public or private channel to invite user(s) to. */
|
|
283
298
|
channel: string;
|
|
284
299
|
/** When set to `true` and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to `false`. */
|
|
285
|
-
force?: boolean;
|
|
300
|
+
force?: boolean | undefined;
|
|
286
301
|
/** A comma separated list of user IDs. Up to 1000 users may be listed. */
|
|
287
302
|
users: string;
|
|
288
303
|
}
|
|
@@ -290,15 +305,15 @@ export type InviteConversationResponseErrorsList = Array<unknown>;
|
|
|
290
305
|
export interface InviteConversationResponse {
|
|
291
306
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
292
307
|
ok: boolean;
|
|
293
|
-
channel?: unknown;
|
|
294
|
-
group?: unknown;
|
|
295
|
-
errors?: InviteConversationResponseErrorsList;
|
|
308
|
+
channel?: unknown | undefined;
|
|
309
|
+
group?: unknown | undefined;
|
|
310
|
+
errors?: InviteConversationResponseErrorsList | undefined;
|
|
296
311
|
}
|
|
297
312
|
export interface InviteDeclineSharedRequest {
|
|
298
313
|
/** ID of the Slack Connect invite to decline. Subscribe to the [`shared_channel_invite_accepted`](/reference/events/shared_channel_invite_accepted) event to receive IDs of Slack Connect channel invites that have been accepted and are awaiting approval. */
|
|
299
314
|
invite_id: string;
|
|
300
315
|
/** The team or enterprise id of the other party involved in the invitation you are declining */
|
|
301
|
-
target_team?: string;
|
|
316
|
+
target_team?: string | undefined;
|
|
302
317
|
}
|
|
303
318
|
export interface InviteDeclineSharedResponse {
|
|
304
319
|
ok: boolean;
|
|
@@ -311,19 +326,21 @@ export interface InviteSharedRequest {
|
|
|
311
326
|
/** ID of the channel on your team that you'd like to share */
|
|
312
327
|
channel: string;
|
|
313
328
|
/** Optional email to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time. */
|
|
314
|
-
emails?: InviteSharedRequestEmailsList;
|
|
329
|
+
emails?: InviteSharedRequestEmailsList | undefined;
|
|
315
330
|
/** Optional user_id to receive this invite. Either `emails` or `user_ids` must be provided. Only one email or one user ID may be invited at a time. */
|
|
316
|
-
user_ids?: InviteSharedRequestUserIdsList;
|
|
331
|
+
user_ids?: InviteSharedRequestUserIdsList | undefined;
|
|
317
332
|
/** Optional boolean on whether invite is to an external limited member. Defaults to `true`. */
|
|
318
|
-
external_limited?: boolean;
|
|
333
|
+
external_limited?: boolean | undefined;
|
|
319
334
|
}
|
|
320
335
|
export interface InviteSharedResponse {
|
|
321
336
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
322
337
|
ok: boolean;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
338
|
+
/** Signed accept link for the invite. Omitted for invites addressed to `emails` or `user_ids` (the link is delivered to the recipient directly) and for `external_limited` invites. */
|
|
339
|
+
url?: string | undefined;
|
|
340
|
+
invite_id?: string | undefined;
|
|
341
|
+
/** Confirmation code for the invite. Omitted for invites addressed to `emails` or `user_ids` (it is delivered to the recipient directly) and for `external_limited` invites. */
|
|
342
|
+
conf_code?: string | undefined;
|
|
343
|
+
is_legacy_shared_channel?: boolean | undefined;
|
|
327
344
|
}
|
|
328
345
|
export interface JoinConversationRequest {
|
|
329
346
|
/** ID of conversation to join */
|
|
@@ -331,13 +348,13 @@ export interface JoinConversationRequest {
|
|
|
331
348
|
}
|
|
332
349
|
export type JoinConversationResponseResponseMetadataWarningsList = Array<string>;
|
|
333
350
|
export interface JoinConversationResponseResponseMetadata {
|
|
334
|
-
warnings?: JoinConversationResponseResponseMetadataWarningsList;
|
|
351
|
+
warnings?: JoinConversationResponseResponseMetadataWarningsList | undefined;
|
|
335
352
|
}
|
|
336
353
|
export interface JoinConversationResponse {
|
|
337
354
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
338
355
|
ok: boolean;
|
|
339
356
|
channel: unknown;
|
|
340
|
-
response_metadata?: JoinConversationResponseResponseMetadata;
|
|
357
|
+
response_metadata?: JoinConversationResponseResponseMetadata | undefined;
|
|
341
358
|
}
|
|
342
359
|
export interface LeaveConversationRequest {
|
|
343
360
|
/** Conversation to leave */
|
|
@@ -346,15 +363,15 @@ export interface LeaveConversationRequest {
|
|
|
346
363
|
export interface LeaveConversationResponse {
|
|
347
364
|
/** Always `true` (a failed call raises a typed error instead). */
|
|
348
365
|
ok: boolean;
|
|
349
|
-
not_in_channel?: boolean;
|
|
366
|
+
not_in_channel?: boolean | undefined;
|
|
350
367
|
}
|
|
351
368
|
export interface ListConnectInvitesRequest {
|
|
352
369
|
/** Encoded team id for the workspace to retrieve invites for, required if org token is used */
|
|
353
|
-
team_id?: string;
|
|
370
|
+
team_id?: string | undefined;
|
|
354
371
|
/** Maximum number of invites to return */
|
|
355
|
-
count?: number;
|
|
372
|
+
count?: number | undefined;
|
|
356
373
|
/** Set to `next_cursor` returned by previous call to list items in subsequent page */
|
|
357
|
-
cursor?: string;
|
|
374
|
+
cursor?: string | undefined;
|
|
358
375
|
}
|
|
359
376
|
export type ListConnectInvitesResponseInvitesList = Array<unknown>;
|
|
360
377
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
@@ -365,19 +382,19 @@ export interface ListConnectInvitesResponse {
|
|
|
365
382
|
ok: boolean;
|
|
366
383
|
invites: ListConnectInvitesResponseInvitesList;
|
|
367
384
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
368
|
-
response_metadata?: ConversationsHistoryResponseResponseMetadata;
|
|
385
|
+
response_metadata?: ConversationsHistoryResponseResponseMetadata | undefined;
|
|
369
386
|
}
|
|
370
387
|
export interface ListConversationsRequest {
|
|
371
388
|
/** 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. */
|
|
372
|
-
cursor?: string;
|
|
389
|
+
cursor?: string | undefined;
|
|
373
390
|
/** Set to `true` to exclude archived channels from the list. */
|
|
374
|
-
exclude_archived?: boolean;
|
|
391
|
+
exclude_archived?: boolean | undefined;
|
|
375
392
|
/** 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. Must be an integer under 1000. */
|
|
376
|
-
limit?: number;
|
|
393
|
+
limit?: number | undefined;
|
|
377
394
|
/** encoded team id to list channels in, required if token belongs to org-wide app */
|
|
378
|
-
team_id?: string;
|
|
395
|
+
team_id?: string | undefined;
|
|
379
396
|
/** Mix and match channel types by providing a comma-separated list of any combination of `public_channel`, `private_channel`, `mpim`, `im` */
|
|
380
|
-
types?: string;
|
|
397
|
+
types?: string | undefined;
|
|
381
398
|
}
|
|
382
399
|
export type ListConversationsResponseChannelsList = Array<unknown>;
|
|
383
400
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
@@ -388,25 +405,25 @@ export interface ListConversationsResponse {
|
|
|
388
405
|
ok: boolean;
|
|
389
406
|
channels: ListConversationsResponseChannelsList;
|
|
390
407
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
391
|
-
response_metadata?: ConversationsHistoryResponseResponseMetadata;
|
|
408
|
+
response_metadata?: ConversationsHistoryResponseResponseMetadata | undefined;
|
|
392
409
|
}
|
|
393
410
|
/** An optional list of invitation ids to look up */
|
|
394
411
|
export type ListRequestSharedInviteRequestInviteIdsList = Array<string>;
|
|
395
412
|
export interface ListRequestSharedInviteRequest {
|
|
396
413
|
/** Optional filter to return invitation requests for the inviting user. */
|
|
397
|
-
user_id?: string;
|
|
414
|
+
user_id?: string | undefined;
|
|
398
415
|
/** When true expired invitation requests will be returned, otherwise they will be excluded */
|
|
399
|
-
include_expired?: boolean;
|
|
416
|
+
include_expired?: boolean | undefined;
|
|
400
417
|
/** When true approved invitation requests will be returned, otherwise they will be excluded */
|
|
401
|
-
include_approved?: boolean;
|
|
418
|
+
include_approved?: boolean | undefined;
|
|
402
419
|
/** When true denied invitation requests will be returned, otherwise they will be excluded */
|
|
403
|
-
include_denied?: boolean;
|
|
420
|
+
include_denied?: boolean | undefined;
|
|
404
421
|
/** An optional list of invitation ids to look up */
|
|
405
|
-
invite_ids?: ListRequestSharedInviteRequestInviteIdsList;
|
|
422
|
+
invite_ids?: ListRequestSharedInviteRequestInviteIdsList | undefined;
|
|
406
423
|
/** The number of items to return. Must be between 1 - 1000 (inclusive). */
|
|
407
|
-
limit?: number;
|
|
424
|
+
limit?: number | undefined;
|
|
408
425
|
/** Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. See [pagination](/apis/web-api/pagination) for more detail. */
|
|
409
|
-
cursor?: string;
|
|
426
|
+
cursor?: string | undefined;
|
|
410
427
|
}
|
|
411
428
|
export type ListRequestSharedInviteResponseInviteRequestsList = Array<unknown>;
|
|
412
429
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
@@ -417,7 +434,7 @@ export interface ListRequestSharedInviteResponse {
|
|
|
417
434
|
ok: boolean;
|
|
418
435
|
invite_requests: ListRequestSharedInviteResponseInviteRequestsList;
|
|
419
436
|
/** Pagination metadata. An empty `next_cursor` means the last page. */
|
|
420
|
-
response_metadata?: ConversationsHistoryResponseResponseMetadata;
|
|
437
|
+
response_metadata?: ConversationsHistoryResponseResponseMetadata | undefined;
|
|
421
438
|
}
|
|
422
439
|
export interface RenameConversationRequest {
|
|
423
440
|
/** ID of conversation to rename */
|
|
@@ -434,7 +451,7 @@ export interface RequestSharedInviteDenyRequest {
|
|
|
434
451
|
/** ID of the requested shared channel invite to deny. */
|
|
435
452
|
invite_id: string;
|
|
436
453
|
/** Optional message explaining why the request to invite was denied. */
|
|
437
|
-
message?: string;
|
|
454
|
+
message?: string | undefined;
|
|
438
455
|
}
|
|
439
456
|
export interface RequestSharedInviteDenyResponse {
|
|
440
457
|
ok: boolean;
|
|
@@ -495,6 +512,8 @@ export const acceptSharedInvite: API.OperationMethod<
|
|
|
495
512
|
errors: [SlackError, SlackRateLimited],
|
|
496
513
|
protocol: SlackProtocol,
|
|
497
514
|
retry: Retry.Retry,
|
|
515
|
+
telemetry: TELEMETRY,
|
|
516
|
+
span: "AcceptSharedInvite",
|
|
498
517
|
}));
|
|
499
518
|
|
|
500
519
|
export type ApproveRequestSharedInviteError = SlackOpError;
|
|
@@ -510,6 +529,8 @@ export const approveRequestSharedInvite: API.OperationMethod<
|
|
|
510
529
|
errors: [SlackError, SlackRateLimited],
|
|
511
530
|
protocol: SlackProtocol,
|
|
512
531
|
retry: Retry.Retry,
|
|
532
|
+
telemetry: TELEMETRY,
|
|
533
|
+
span: "ApproveRequestSharedInvite",
|
|
513
534
|
}));
|
|
514
535
|
|
|
515
536
|
export type ApproveSharedInviteError = SlackOpError;
|
|
@@ -525,6 +546,8 @@ export const approveSharedInvite: API.OperationMethod<
|
|
|
525
546
|
errors: [SlackError, SlackRateLimited],
|
|
526
547
|
protocol: SlackProtocol,
|
|
527
548
|
retry: Retry.Retry,
|
|
549
|
+
telemetry: TELEMETRY,
|
|
550
|
+
span: "ApproveSharedInvite",
|
|
528
551
|
}));
|
|
529
552
|
|
|
530
553
|
export type ArchiveConversationError = SlackOpError;
|
|
@@ -540,6 +563,8 @@ export const archiveConversation: API.OperationMethod<
|
|
|
540
563
|
errors: [SlackError, SlackRateLimited],
|
|
541
564
|
protocol: SlackProtocol,
|
|
542
565
|
retry: Retry.Retry,
|
|
566
|
+
telemetry: TELEMETRY,
|
|
567
|
+
span: "ArchiveConversation",
|
|
543
568
|
}));
|
|
544
569
|
|
|
545
570
|
export type ConversationsCloseError = SlackOpError;
|
|
@@ -555,6 +580,8 @@ export const conversationsClose: API.OperationMethod<
|
|
|
555
580
|
errors: [SlackError, SlackRateLimited],
|
|
556
581
|
protocol: SlackProtocol,
|
|
557
582
|
retry: Retry.Retry,
|
|
583
|
+
telemetry: TELEMETRY,
|
|
584
|
+
span: "ConversationsClose",
|
|
558
585
|
}));
|
|
559
586
|
|
|
560
587
|
export type ConversationsHistoryError = SlackOpError;
|
|
@@ -572,6 +599,8 @@ export const conversationsHistory: API.PaginatedOperationMethod<
|
|
|
572
599
|
errors: [SlackError, SlackRateLimited],
|
|
573
600
|
protocol: SlackProtocol,
|
|
574
601
|
retry: Retry.Retry,
|
|
602
|
+
telemetry: TELEMETRY,
|
|
603
|
+
span: "ConversationsHistory",
|
|
575
604
|
pagination: {
|
|
576
605
|
mode: "cursor",
|
|
577
606
|
inputToken: "cursor",
|
|
@@ -596,6 +625,8 @@ export const conversationsInfo: API.OperationMethod<
|
|
|
596
625
|
errors: [SlackError, SlackRateLimited],
|
|
597
626
|
protocol: SlackProtocol,
|
|
598
627
|
retry: Retry.Retry,
|
|
628
|
+
telemetry: TELEMETRY,
|
|
629
|
+
span: "ConversationsInfo",
|
|
599
630
|
}));
|
|
600
631
|
|
|
601
632
|
export type ConversationsKickError = SlackOpError;
|
|
@@ -607,10 +638,12 @@ export const conversationsKick: API.OperationMethod<
|
|
|
607
638
|
SlackOpContext
|
|
608
639
|
> = /*@__PURE__*/ API.make(() => ({
|
|
609
640
|
input: __S(124, __c31, 0) as any as S.Schema<ConversationsKickRequest>,
|
|
610
|
-
output: __S(
|
|
641
|
+
output: __S(125, __c31, 1) as any as S.Schema<ConversationsKickResponse>,
|
|
611
642
|
errors: [SlackError, SlackRateLimited],
|
|
612
643
|
protocol: SlackProtocol,
|
|
613
644
|
retry: Retry.Retry,
|
|
645
|
+
telemetry: TELEMETRY,
|
|
646
|
+
span: "ConversationsKick",
|
|
614
647
|
}));
|
|
615
648
|
|
|
616
649
|
export type ConversationsMarkError = SlackOpError;
|
|
@@ -626,6 +659,8 @@ export const conversationsMark: API.OperationMethod<
|
|
|
626
659
|
errors: [SlackError, SlackRateLimited],
|
|
627
660
|
protocol: SlackProtocol,
|
|
628
661
|
retry: Retry.Retry,
|
|
662
|
+
telemetry: TELEMETRY,
|
|
663
|
+
span: "ConversationsMark",
|
|
629
664
|
}));
|
|
630
665
|
|
|
631
666
|
export type ConversationsMembersError = SlackOpError;
|
|
@@ -643,6 +678,8 @@ export const conversationsMembers: API.PaginatedOperationMethod<
|
|
|
643
678
|
errors: [SlackError, SlackRateLimited],
|
|
644
679
|
protocol: SlackProtocol,
|
|
645
680
|
retry: Retry.Retry,
|
|
681
|
+
telemetry: TELEMETRY,
|
|
682
|
+
span: "ConversationsMembers",
|
|
646
683
|
pagination: {
|
|
647
684
|
mode: "cursor",
|
|
648
685
|
inputToken: "cursor",
|
|
@@ -667,6 +704,8 @@ export const conversationsOpen: API.OperationMethod<
|
|
|
667
704
|
errors: [SlackError, SlackRateLimited],
|
|
668
705
|
protocol: SlackProtocol,
|
|
669
706
|
retry: Retry.Retry,
|
|
707
|
+
telemetry: TELEMETRY,
|
|
708
|
+
span: "ConversationsOpen",
|
|
670
709
|
}));
|
|
671
710
|
|
|
672
711
|
export type ConversationsRepliesError = SlackOpError;
|
|
@@ -684,6 +723,8 @@ export const conversationsReplies: API.PaginatedOperationMethod<
|
|
|
684
723
|
errors: [SlackError, SlackRateLimited],
|
|
685
724
|
protocol: SlackProtocol,
|
|
686
725
|
retry: Retry.Retry,
|
|
726
|
+
telemetry: TELEMETRY,
|
|
727
|
+
span: "ConversationsReplies",
|
|
687
728
|
pagination: {
|
|
688
729
|
mode: "cursor",
|
|
689
730
|
inputToken: "cursor",
|
|
@@ -696,7 +737,7 @@ export const conversationsReplies: API.PaginatedOperationMethod<
|
|
|
696
737
|
) as any;
|
|
697
738
|
|
|
698
739
|
export type CreateCanvaseError = SlackOpError;
|
|
699
|
-
/** Create a channel canvas for a channel Required scopes -- bot: `canvases:write`; user: `canvases:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `restricted_action` -- User does not have permission to perform this action. - `channel_canvas_creation_failed` -- Channel canvas was unable to be created. - `channel_canvas_already_exists` -- Channel canvas for the specified channel already exists. - `team_tier_cannot_create_channel_canvases` -- Team tier cannot create channel canvases - `canvas_creation_failed` -- Canvas was unable to be created. - `canvas_tab_creation_failed` -- Canvas tab was unable to be created. - `free_team_canvas_tab_already_exists` -- Canvas tab for specified channel and team tier already exists. - `posting_to_channel_denied` -- Permission to post to a channel denied See https://docs.slack.dev/reference/methods/conversations.canvases.create */
|
|
740
|
+
/** Create a channel canvas for a channel Required scopes -- bot: `canvases:write`; user: `canvases:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `canvas_disabled_user_team` -- Canvas is disabled on user's team - `restricted_action` -- User does not have permission to perform this action. - `channel_canvas_creation_failed` -- Channel canvas was unable to be created. - `channel_canvas_already_exists` -- Channel canvas for the specified channel already exists. - `team_tier_cannot_create_channel_canvases` -- Team tier cannot create channel canvases - `canvas_creation_failed` -- Canvas was unable to be created. - `canvas_tab_creation_failed` -- Canvas tab was unable to be created. - `free_team_canvas_tab_already_exists` -- Canvas tab for specified channel and team tier already exists. - `posting_to_channel_denied` -- Permission to post to a channel denied - `channel_not_found` -- Value passed for `channel_id` was invalid. See https://docs.slack.dev/reference/methods/conversations.canvases.create */
|
|
700
741
|
export const createCanvase: API.OperationMethod<
|
|
701
742
|
CreateCanvaseRequest,
|
|
702
743
|
CreateCanvaseResponse,
|
|
@@ -708,6 +749,8 @@ export const createCanvase: API.OperationMethod<
|
|
|
708
749
|
errors: [SlackError, SlackRateLimited],
|
|
709
750
|
protocol: SlackProtocol,
|
|
710
751
|
retry: Retry.Retry,
|
|
752
|
+
telemetry: TELEMETRY,
|
|
753
|
+
span: "CreateCanvase",
|
|
711
754
|
}));
|
|
712
755
|
|
|
713
756
|
export type CreateConversationError = SlackOpError;
|
|
@@ -723,6 +766,8 @@ export const createConversation: API.OperationMethod<
|
|
|
723
766
|
errors: [SlackError, SlackRateLimited],
|
|
724
767
|
protocol: SlackProtocol,
|
|
725
768
|
retry: Retry.Retry,
|
|
769
|
+
telemetry: TELEMETRY,
|
|
770
|
+
span: "CreateConversation",
|
|
726
771
|
}));
|
|
727
772
|
|
|
728
773
|
export type InviteConversationError = SlackOpError;
|
|
@@ -738,6 +783,8 @@ export const inviteConversation: API.OperationMethod<
|
|
|
738
783
|
errors: [SlackError, SlackRateLimited],
|
|
739
784
|
protocol: SlackProtocol,
|
|
740
785
|
retry: Retry.Retry,
|
|
786
|
+
telemetry: TELEMETRY,
|
|
787
|
+
span: "InviteConversation",
|
|
741
788
|
}));
|
|
742
789
|
|
|
743
790
|
export type InviteDeclineSharedError = SlackOpError;
|
|
@@ -753,10 +800,12 @@ export const inviteDeclineShared: API.OperationMethod<
|
|
|
753
800
|
errors: [SlackError, SlackRateLimited],
|
|
754
801
|
protocol: SlackProtocol,
|
|
755
802
|
retry: Retry.Retry,
|
|
803
|
+
telemetry: TELEMETRY,
|
|
804
|
+
span: "InviteDeclineShared",
|
|
756
805
|
}));
|
|
757
806
|
|
|
758
807
|
export type InviteSharedError = SlackOpError;
|
|
759
|
-
/** Sends an invitation to a Slack Connect channel Required scopes -- bot: `conversations.connect:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_in_channel` -- User is already in the channel. - `cannot_share_cross_workspace_channel` -- You cannot share a cross-workspace or org-wide channel. - `cannot_share_mandatory_channel` -- You cannot share #general or mandatory channels. - `channel_archived` -- You cannot share an archived channel. - `channel_not_found` -- The channel provided was not found. - `connection_limit_exceeded` -- This channel has hit the limit of external connections. - `connection_limit_exceeded_pending` -- This channel already has a pending invite. - `invalid_channel_type` -- You cannot share MPDMs or DMs. - `invalid_email` -- At least one email address provided is invalid. - `invite_lookup_error` -- An error occurred while attempting to look for existing invites. - `invite_not_found` -- An error occurred while inviting users. - `legacy_connection_limit_exceeded` -- You cannot share a legacy ESC channel with a third team - `member_limit_exceeded` -- This channel that has hit the limit of members - `message_too_long` -- The provided message was longer than 560 characters. - `not_allowed_for_grid_workspace` -- This workspace does not have Slack Connect enabled. - `not_in_channel` -- The app is not a member of the channel to invite. - `not_owner` -- Only the host organization for a channel can request to share it. - `not_paid` -- This feature is only available to paid teams. - `not_supported` -- This channel cannot be shared. - `ratelimit` -- The rate-limit for this method has been reached. The ratelimit is applied on a per-user basis when you pass the `emails` parameter. - `recipients_not_specified` -- Bots are required to specify which users to invite. - `restricted_action` -- A team preference does not allow this authorization to send invites. - `too_many_emails` -- Too many email recipients were passed in the `emails` parameter. - `url_in_message` -- The message contained a URL. - `user_not_found` -- User lookup failed. - `no_external_invite_permission` -- User does not have permission to invite an external user. See https://docs.slack.dev/reference/methods/conversations.inviteShared */
|
|
808
|
+
/** Sends an invitation to a Slack Connect channel Required scopes -- bot: `conversations.connect:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `already_in_channel` -- User is already in the channel. - `cannot_share_cross_workspace_channel` -- You cannot share a cross-workspace or org-wide channel. - `cannot_share_mandatory_channel` -- You cannot share #general or mandatory channels. - `channel_archived` -- You cannot share an archived channel. - `channel_not_found` -- The channel provided was not found. - `connection_limit_exceeded` -- This channel has hit the limit of external connections. - `connection_limit_exceeded_pending` -- This channel already has a pending invite. - `invalid_channel_type` -- You cannot share MPDMs or DMs. - `invalid_email` -- At least one email address provided is invalid. - `invite_lookup_error` -- An error occurred while attempting to look for existing invites. - `invite_not_found` -- An error occurred while inviting users. - `legacy_connection_limit_exceeded` -- You cannot share a legacy ESC channel with a third team - `member_limit_exceeded` -- This channel that has hit the limit of members - `message_too_long` -- The provided message was longer than 560 characters. - `not_allowed_for_grid_workspace` -- This workspace does not have Slack Connect enabled. - `not_in_channel` -- The app is not a member of the channel to invite. - `not_owner` -- Only the host organization for a channel can request to share it. - `not_paid` -- This feature is only available to paid teams. - `not_supported` -- This channel cannot be shared. - `ratelimit` -- The rate-limit for this method has been reached. The ratelimit is applied on a per-user basis when you pass the `emails` parameter. - `recipients_not_specified` -- Bots are required to specify which users to invite. - `restricted_action` -- A team preference does not allow this authorization to send invites. - `too_many_emails` -- Too many email recipients were passed in the `emails` parameter. - `url_in_message` -- The message contained a URL. - `user_not_found` -- User lookup failed. - `no_external_invite_permission` -- User does not have permission to invite an external user. - `inviter_email_not_verified` -- The inviting user has not verified the email address on their own account. They must verify it before they can send Slack Connect invites, since the invite presents that address as theirs. See https://docs.slack.dev/reference/methods/conversations.inviteShared */
|
|
760
809
|
export const inviteShared: API.OperationMethod<
|
|
761
810
|
InviteSharedRequest,
|
|
762
811
|
InviteSharedResponse,
|
|
@@ -768,6 +817,8 @@ export const inviteShared: API.OperationMethod<
|
|
|
768
817
|
errors: [SlackError, SlackRateLimited],
|
|
769
818
|
protocol: SlackProtocol,
|
|
770
819
|
retry: Retry.Retry,
|
|
820
|
+
telemetry: TELEMETRY,
|
|
821
|
+
span: "InviteShared",
|
|
771
822
|
}));
|
|
772
823
|
|
|
773
824
|
export type JoinConversationError = SlackOpError;
|
|
@@ -783,6 +834,8 @@ export const joinConversation: API.OperationMethod<
|
|
|
783
834
|
errors: [SlackError, SlackRateLimited],
|
|
784
835
|
protocol: SlackProtocol,
|
|
785
836
|
retry: Retry.Retry,
|
|
837
|
+
telemetry: TELEMETRY,
|
|
838
|
+
span: "JoinConversation",
|
|
786
839
|
}));
|
|
787
840
|
|
|
788
841
|
export type LeaveConversationError = SlackOpError;
|
|
@@ -798,6 +851,8 @@ export const leaveConversation: API.OperationMethod<
|
|
|
798
851
|
errors: [SlackError, SlackRateLimited],
|
|
799
852
|
protocol: SlackProtocol,
|
|
800
853
|
retry: Retry.Retry,
|
|
854
|
+
telemetry: TELEMETRY,
|
|
855
|
+
span: "LeaveConversation",
|
|
801
856
|
}));
|
|
802
857
|
|
|
803
858
|
export type ListConnectInvitesError = SlackOpError;
|
|
@@ -815,6 +870,8 @@ export const listConnectInvites: API.PaginatedOperationMethod<
|
|
|
815
870
|
errors: [SlackError, SlackRateLimited],
|
|
816
871
|
protocol: SlackProtocol,
|
|
817
872
|
retry: Retry.Retry,
|
|
873
|
+
telemetry: TELEMETRY,
|
|
874
|
+
span: "ListConnectInvites",
|
|
818
875
|
pagination: {
|
|
819
876
|
mode: "cursor",
|
|
820
877
|
inputToken: "cursor",
|
|
@@ -840,6 +897,8 @@ export const listConversations: API.PaginatedOperationMethod<
|
|
|
840
897
|
errors: [SlackError, SlackRateLimited],
|
|
841
898
|
protocol: SlackProtocol,
|
|
842
899
|
retry: Retry.Retry,
|
|
900
|
+
telemetry: TELEMETRY,
|
|
901
|
+
span: "ListConversations",
|
|
843
902
|
pagination: {
|
|
844
903
|
mode: "cursor",
|
|
845
904
|
inputToken: "cursor",
|
|
@@ -866,6 +925,8 @@ export const listRequestSharedInvite: API.PaginatedOperationMethod<
|
|
|
866
925
|
errors: [SlackError, SlackRateLimited],
|
|
867
926
|
protocol: SlackProtocol,
|
|
868
927
|
retry: Retry.Retry,
|
|
928
|
+
telemetry: TELEMETRY,
|
|
929
|
+
span: "ListRequestSharedInvite",
|
|
869
930
|
pagination: {
|
|
870
931
|
mode: "cursor",
|
|
871
932
|
inputToken: "cursor",
|
|
@@ -890,6 +951,8 @@ export const renameConversation: API.OperationMethod<
|
|
|
890
951
|
errors: [SlackError, SlackRateLimited],
|
|
891
952
|
protocol: SlackProtocol,
|
|
892
953
|
retry: Retry.Retry,
|
|
954
|
+
telemetry: TELEMETRY,
|
|
955
|
+
span: "RenameConversation",
|
|
893
956
|
}));
|
|
894
957
|
|
|
895
958
|
export type RequestSharedInviteDenyError = SlackOpError;
|
|
@@ -905,10 +968,12 @@ export const requestSharedInviteDeny: API.OperationMethod<
|
|
|
905
968
|
errors: [SlackError, SlackRateLimited],
|
|
906
969
|
protocol: SlackProtocol,
|
|
907
970
|
retry: Retry.Retry,
|
|
971
|
+
telemetry: TELEMETRY,
|
|
972
|
+
span: "RequestSharedInviteDeny",
|
|
908
973
|
}));
|
|
909
974
|
|
|
910
975
|
export type SetExternalInvitePermissionsError = SlackOpError;
|
|
911
|
-
/** Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. Required scopes -- bot: `conversations.connect:manage` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Cannot find channel - `not_supported` -- Attempting to upgrade a channel that cannot be upgraded - `restricted_action` -- A team preference prevents the user from taking this action. - `invalid_target_team` -- The target team provided is not valid for the channel. - `invalid_action` -- The user did not
|
|
976
|
+
/** Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. Required scopes -- bot: `conversations.connect:manage` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Cannot find channel - `not_supported` -- Attempting to upgrade a channel that cannot be upgraded - `restricted_action` -- A team preference prevents the user from taking this action. - `invalid_target_team` -- The target team provided is not valid for the channel. - `invalid_action` -- The user did not provide a valid action. Valid actions are 'upgrade' or 'downgrade'. See https://docs.slack.dev/reference/methods/conversations.externalInvitePermissions.set */
|
|
912
977
|
export const setExternalInvitePermissions: API.OperationMethod<
|
|
913
978
|
SetExternalInvitePermissionsRequest,
|
|
914
979
|
SetExternalInvitePermissionsResponse,
|
|
@@ -920,6 +985,8 @@ export const setExternalInvitePermissions: API.OperationMethod<
|
|
|
920
985
|
errors: [SlackError, SlackRateLimited],
|
|
921
986
|
protocol: SlackProtocol,
|
|
922
987
|
retry: Retry.Retry,
|
|
988
|
+
telemetry: TELEMETRY,
|
|
989
|
+
span: "SetExternalInvitePermissions",
|
|
923
990
|
}));
|
|
924
991
|
|
|
925
992
|
export type SetPurposeError = SlackOpError;
|
|
@@ -935,6 +1002,8 @@ export const setPurpose: API.OperationMethod<
|
|
|
935
1002
|
errors: [SlackError, SlackRateLimited],
|
|
936
1003
|
protocol: SlackProtocol,
|
|
937
1004
|
retry: Retry.Retry,
|
|
1005
|
+
telemetry: TELEMETRY,
|
|
1006
|
+
span: "SetPurpose",
|
|
938
1007
|
}));
|
|
939
1008
|
|
|
940
1009
|
export type SetTopicError = SlackOpError;
|
|
@@ -950,6 +1019,8 @@ export const setTopic: API.OperationMethod<
|
|
|
950
1019
|
errors: [SlackError, SlackRateLimited],
|
|
951
1020
|
protocol: SlackProtocol,
|
|
952
1021
|
retry: Retry.Retry,
|
|
1022
|
+
telemetry: TELEMETRY,
|
|
1023
|
+
span: "SetTopic",
|
|
953
1024
|
}));
|
|
954
1025
|
|
|
955
1026
|
export type UnarchiveConversationError = SlackOpError;
|
|
@@ -965,6 +1036,8 @@ export const unarchiveConversation: API.OperationMethod<
|
|
|
965
1036
|
errors: [SlackError, SlackRateLimited],
|
|
966
1037
|
protocol: SlackProtocol,
|
|
967
1038
|
retry: Retry.Retry,
|
|
1039
|
+
telemetry: TELEMETRY,
|
|
1040
|
+
span: "UnarchiveConversation",
|
|
968
1041
|
}));
|
|
969
1042
|
|
|
970
1043
|
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
@@ -1068,8 +1141,8 @@ function __c3(j: number): any {
|
|
|
1068
1141
|
S.Struct({
|
|
1069
1142
|
ok: S.Boolean,
|
|
1070
1143
|
has_more: S.optional(S.Boolean),
|
|
1071
|
-
messages: __S(
|
|
1072
|
-
latest_updates: S.optional(__S(
|
|
1144
|
+
messages: __S(104, __c26, 0),
|
|
1145
|
+
latest_updates: S.optional(__S(108, __c27, 0)),
|
|
1073
1146
|
unchanged_messages: S.optional(__S(112, __c28, 0)),
|
|
1074
1147
|
response_metadata: S.optional(__S(116, __c29, 0)),
|
|
1075
1148
|
}),
|
|
@@ -1134,7 +1207,7 @@ function __c7(j: number): any {
|
|
|
1134
1207
|
ok: S.Boolean,
|
|
1135
1208
|
channel: S.optional(S.Unknown),
|
|
1136
1209
|
group: S.optional(S.Unknown),
|
|
1137
|
-
errors: S.optional(__S(
|
|
1210
|
+
errors: S.optional(__S(104, __c26, 0)),
|
|
1138
1211
|
}),
|
|
1139
1212
|
).annotate({ identifier: "InviteConversationResponse" });
|
|
1140
1213
|
}
|
|
@@ -1228,7 +1301,7 @@ function __c12(j: number): any {
|
|
|
1228
1301
|
return S.suspend(() =>
|
|
1229
1302
|
S.Struct({
|
|
1230
1303
|
ok: S.Boolean,
|
|
1231
|
-
invites: __S(
|
|
1304
|
+
invites: __S(104, __c26, 0),
|
|
1232
1305
|
response_metadata: S.optional(__S(116, __c29, 0)),
|
|
1233
1306
|
}),
|
|
1234
1307
|
).annotate({ identifier: "ListConnectInvitesResponse" });
|
|
@@ -1271,7 +1344,7 @@ function __c15(j: number): any {
|
|
|
1271
1344
|
return S.suspend(() =>
|
|
1272
1345
|
S.Struct({
|
|
1273
1346
|
ok: S.Boolean,
|
|
1274
|
-
channels: __S(
|
|
1347
|
+
channels: __S(104, __c26, 0),
|
|
1275
1348
|
response_metadata: S.optional(__S(116, __c29, 0)),
|
|
1276
1349
|
}),
|
|
1277
1350
|
).annotate({ identifier: "ListConversationsResponse" });
|
|
@@ -1297,7 +1370,7 @@ function __c16(j: number): any {
|
|
|
1297
1370
|
return S.suspend(() =>
|
|
1298
1371
|
S.Struct({
|
|
1299
1372
|
ok: S.Boolean,
|
|
1300
|
-
invite_requests: __S(
|
|
1373
|
+
invite_requests: __S(104, __c26, 0),
|
|
1301
1374
|
response_metadata: S.optional(__S(116, __c29, 0)),
|
|
1302
1375
|
}),
|
|
1303
1376
|
).annotate({ identifier: "ListRequestSharedInviteResponse" });
|
|
@@ -1432,7 +1505,7 @@ function __c25(j: number): any {
|
|
|
1432
1505
|
return S.suspend(() =>
|
|
1433
1506
|
S.Struct({
|
|
1434
1507
|
ok: S.Boolean,
|
|
1435
|
-
messages: __S(
|
|
1508
|
+
messages: __S(104, __c26, 0),
|
|
1436
1509
|
has_more: S.Boolean,
|
|
1437
1510
|
pin_count: S.optional(S.Number),
|
|
1438
1511
|
channel_actions_ts: S.Unknown,
|
|
@@ -1442,13 +1515,13 @@ function __c25(j: number): any {
|
|
|
1442
1515
|
is_limited: S.optional(S.Boolean),
|
|
1443
1516
|
latest: S.optional(S.String),
|
|
1444
1517
|
unread_count_display: S.optional(S.Number),
|
|
1445
|
-
users: S.optional(__S(
|
|
1518
|
+
users: S.optional(__S(108, __c27, 0)),
|
|
1446
1519
|
deleted: S.optional(__S(112, __c28, 0)),
|
|
1447
1520
|
mutation_timestamps: S.optional(__S(101, __c25, 1)),
|
|
1448
1521
|
deleted_overflow: S.optional(S.Boolean),
|
|
1449
1522
|
warnings: S.optional(__S(112, __c28, 0)),
|
|
1450
1523
|
next_ts: S.optional(S.Number),
|
|
1451
|
-
latest_updates: S.optional(__S(
|
|
1524
|
+
latest_updates: S.optional(__S(108, __c27, 0)),
|
|
1452
1525
|
unchanged_messages: S.optional(__S(112, __c28, 0)),
|
|
1453
1526
|
date_joined: S.optional(S.Number),
|
|
1454
1527
|
}),
|
|
@@ -1458,13 +1531,13 @@ function __c25(j: number): any {
|
|
|
1458
1531
|
function __c26(j: number): any {
|
|
1459
1532
|
switch (j) {
|
|
1460
1533
|
case 0:
|
|
1461
|
-
return S.
|
|
1534
|
+
return S.Array(S.Unknown);
|
|
1462
1535
|
}
|
|
1463
1536
|
}
|
|
1464
1537
|
function __c27(j: number): any {
|
|
1465
1538
|
switch (j) {
|
|
1466
1539
|
case 0:
|
|
1467
|
-
return S.
|
|
1540
|
+
return S.Record(S.String, S.Unknown);
|
|
1468
1541
|
}
|
|
1469
1542
|
}
|
|
1470
1543
|
function __c28(j: number): any {
|
|
@@ -1513,6 +1586,13 @@ function __c31(j: number): any {
|
|
|
1513
1586
|
user: S.optional(S.String),
|
|
1514
1587
|
}).pipe(T.Http({ method: "POST", uri: "/conversations.kick", code: 200 })),
|
|
1515
1588
|
).annotate({ identifier: "ConversationsKickRequest" });
|
|
1589
|
+
case 1:
|
|
1590
|
+
return S.suspend(() =>
|
|
1591
|
+
S.Struct({
|
|
1592
|
+
ok: S.Boolean,
|
|
1593
|
+
errors: S.optional(__S(108, __c27, 0)),
|
|
1594
|
+
}),
|
|
1595
|
+
).annotate({ identifier: "ConversationsKickResponse" });
|
|
1516
1596
|
}
|
|
1517
1597
|
}
|
|
1518
1598
|
function __c32(j: number): any {
|